@@ -5,30 +5,30 @@ import {OwnableUpgradeable} from "@openzeppelin-contracts-upgradeable/access/Own
55import {UUPSUpgradeable} from "@openzeppelin-contracts-upgradeable/proxy/utils/UUPSUpgradeable.sol " ;
66import {PausableUpgradeable} from "@openzeppelin-contracts-upgradeable/utils/PausableUpgradeable.sol " ;
77import {ISP1Verifier} from "succinctlabs-sp1-contracts/src/ISP1Verifier.sol " ;
8- import {IEthereumISM } from "../interfaces/IEthereumISM .sol " ;
9- import {IEthereumLightClient } from "../interfaces/IEthereumLightClient .sol " ;
8+ import {IEvmISM } from "../interfaces/IEvmISM .sol " ;
9+ import {IEvmLightClient } from "../interfaces/IEvmLightClient .sol " ;
1010import {IInterchainSecurityModule} from "hyperlane/interfaces/IInterchainSecurityModule.sol " ;
1111import {Message} from "hyperlane/libs/Message.sol " ;
1212import {MerkleLib} from "hyperlane/libs/Merkle.sol " ;
1313
1414/**
15- * @title EthereumISM
15+ * @title EvmISM
1616 * @author NASD Inc.
1717 * @notice Hyperlane Interchain Security Module that uses SP1 zk proofs to verify Hyperlane
18- * Merkle tree hook roots from the Ethereum blockchain
19- * @dev This EthereumISM verifies messages by:
20- * 1. Accepting SP1 proofs of Ethereum 's Merkle tree hook roots via update()
18+ * Merkle tree hook roots from an EVM source chain.
19+ * @dev This ISM verifies messages by:
20+ * 1. Accepting SP1 proofs of the source chain 's Merkle tree hook roots via update()
2121 * 2. Validating Hyperlane messages against these roots via verify(). This will be called by the Hyperlane mailbox.
2222 */
23- contract EthereumISM is OwnableUpgradeable , UUPSUpgradeable , PausableUpgradeable , IEthereumISM {
23+ contract EvmISM is OwnableUpgradeable , UUPSUpgradeable , PausableUpgradeable , IEvmISM {
2424 /// @notice The verification key for the EVM Hyperlane Merkle Tree SP1 program circuit
2525 bytes32 public programVk;
2626
2727 /// @notice The SP1 verifier contract used to verify the proofs
2828 ISP1Verifier public verifier;
2929
30- /// @notice The Ethereum light client contract for validating app hashes
31- IEthereumLightClient public ethereumLightClient ;
30+ /// @notice The light client contract for validating source chain state roots
31+ IEvmLightClient public lightClient ;
3232
3333 /// @notice Mapping of verified Merkle tree roots that can be used for message verification
3434 /// @dev A root is added when an SP1 proof is successfully verified via update()
@@ -43,25 +43,22 @@ contract EthereumISM is OwnableUpgradeable, UUPSUpgradeable, PausableUpgradeable
4343 }
4444
4545 /**
46- * @notice Initializes the EthereumISM contract with required addresses and verification key
46+ * @notice Initializes the EvmISM contract with required addresses and verification key
4747 * @dev Can only be called once due to initializer modifier
4848 * @param _programVk The SP1 program verification key for the Merkle tree circuit
4949 * @param verifierAddress Address of the SP1 verifier contract
50- * @param ethereumLightClientAddress Address of the Ethereum light client contract
50+ * @param lightClientAddress Address of the EVM light client contract
5151 */
52- function initialize (bytes32 _programVk , address verifierAddress , address ethereumLightClientAddress )
53- public
54- initializer
55- {
52+ function initialize (bytes32 _programVk , address verifierAddress , address lightClientAddress ) public initializer {
5653 __Ownable_init (msg .sender );
5754 __Pausable_init ();
5855
5956 programVk = _programVk;
6057 require (verifierAddress != address (0 ), InvalidAddress ());
6158 verifier = ISP1Verifier (verifierAddress);
6259
63- require (ethereumLightClientAddress != address (0 ), InvalidAddress ());
64- ethereumLightClient = IEthereumLightClient (ethereumLightClientAddress );
60+ require (lightClientAddress != address (0 ), InvalidAddress ());
61+ lightClient = IEvmLightClient (lightClientAddress );
6562 }
6663
6764 /**
@@ -71,14 +68,14 @@ contract EthereumISM is OwnableUpgradeable, UUPSUpgradeable, PausableUpgradeable
7168 */
7269 function _authorizeUpgrade (address newImplementation ) internal override onlyOwner {}
7370
74- /// @inheritdoc IEthereumISM
71+ /// @inheritdoc IEvmISM
7572 function update (bytes calldata proof , bytes calldata publicValues ) external override whenNotPaused {
7673 verifier.verifyProof (programVk, publicValues, proof);
7774
7875 CircuitOutput memory output = abi.decode (publicValues, (CircuitOutput));
7976
80- // Validate that the state root matches the Ethereum light client's state at this block number
81- bytes32 expectedStateRoot = ethereumLightClient .stateRoots (output.blockNumber);
77+ // Validate that the state root matches the light client's state at this block number
78+ bytes32 expectedStateRoot = lightClient .stateRoots (output.blockNumber);
8279 require (expectedStateRoot != bytes32 (0 ) && output.stateRoot == expectedStateRoot, InvalidStateRoot ());
8380
8481 // Mark this Merkle hook root as valid for message verification
@@ -87,7 +84,7 @@ contract EthereumISM is OwnableUpgradeable, UUPSUpgradeable, PausableUpgradeable
8784 emit Updated (output.root, output.blockNumber, output.stateRoot);
8885 }
8986
90- /// @inheritdoc IEthereumISM
87+ /// @inheritdoc IEvmISM
9188 function verify (bytes calldata _metadata , bytes calldata _message )
9289 external
9390 view
@@ -143,7 +140,7 @@ contract EthereumISM is OwnableUpgradeable, UUPSUpgradeable, PausableUpgradeable
143140 }
144141
145142 /**
146- * @notice Returns the version of the EthereumISM contract
143+ * @notice Returns the version of the EvmISM contract
147144 * @return A string representing the semantic version
148145 */
149146 function version () external pure override returns (string memory ) {
0 commit comments