Skip to content

Commit

Permalink
fix(evm): fixes solhint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
allemanfredi committed Oct 16, 2023
1 parent a5d4a4a commit 9401d11
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
3 changes: 1 addition & 2 deletions packages/evm/.solhint.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@
"extends": "solhint:recommended",
"plugins": ["prettier"],
"rules": {
"code-complexity": ["error", 8],
"code-complexity": ["error", 9],
"compiler-version": ["error", ">=0.8.4"],
"func-visibility": ["error", { "ignoreConstructors": true }],
"max-line-length": ["error", 120],
"not-rely-on-time": "off",
"avoid-low-level-calls": "off",
"prettier/prettier": [
Expand Down
11 changes: 6 additions & 5 deletions packages/evm/contracts/adapters/axiom/AxiomV02.sol
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,11 @@ function calcMerkleRoot(bytes32[HISTORICAL_NUM_ROOTS] calldata leaves) pure retu
contract AxiomV02 is IAxiomV0, Ownable {
string public constant VERSION = "0.2";

/// @notice The address of the snark verifier contract.
/// @notice The address of the snark verifier contract. */
address public verifierAddress;
/// @dev The address of AxiomV0 version "0.1". We will read from the storage of the old contract for old block hashes.
/** @dev The address of AxiomV0 version "0.1". We will read from the storage of the old contract for old block hashes. */
address public oldAxiomAddress;
/// @notice The block the contract was created at.
/// @notice The block the contract was created at
uint256 public creationBlockNumber;

// historicalRoots[startBlockNumber] is 0 unless (startBlockNumber % NUM_LEAVES == 0)
Expand All @@ -56,7 +56,7 @@ contract AxiomV02 is IAxiomV0, Ownable {

event UpdateSnarkVerifierAddress(address newAddress);

/// @dev We do not re-import all historical blockhashes in this v0.2 contract, so we use the old v0.1 contract for older block numbers
/** @dev We do not re-import all historical blockhashes in this v0.2 contract, so we use the old v0.1 contract for older block numbers */
function historicalRoots(uint32 startBlockNumber) public view returns (bytes32) {
if (startBlockNumber < creationBlockNumber) {
return IAxiomV0(oldAxiomAddress).historicalRoots(startBlockNumber);
Expand Down Expand Up @@ -98,7 +98,8 @@ contract AxiomV02 is IAxiomV0, Ownable {
return emptyHashes[depth];
}

// The ZKP has block headers for [startBlockNumber, endBlockNumber] blocks. We extract some common information from the calldata.
// The ZKP has block headers for [startBlockNumber, endBlockNumber] blocks.
// We extract some common information from the calldata.
function getBoundaryBlockData(
bytes calldata proofData
)
Expand Down
4 changes: 2 additions & 2 deletions packages/evm/contracts/adapters/axiom/Ownable.sol
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;
pragma solidity ^0.8.4;

import "./utils/Context.sol";
import { Context } from "./utils/Context.sol";

/**
* @dev Contract module which provides a basic access control mechanism, where
Expand Down
2 changes: 1 addition & 1 deletion packages/evm/contracts/adapters/axiom/utils/Context.sol
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;
pragma solidity ^0.8.4;

/**
* @dev Provides information about the current execution context, including the
Expand Down

0 comments on commit 9401d11

Please sign in to comment.