generated from EthSign/forge-hardhat-template-old
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from hyperlane-xyz/kunal/example-ism
feat: example `ISM`
- Loading branch information
Showing
12 changed files
with
5,025 additions
and
6,992 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,5 +14,4 @@ cache_forge | |
*.log | ||
.DS_Store | ||
.pnp.* | ||
lcov.info | ||
pnpm-lock.yaml | ||
lcov.info |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/ | ||
@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/ | ||
@hyperlane-xyz/=node_modules/@hyperlane-xyz/core/ | ||
ds-test/=node_modules/ds-test/src | ||
forge-std/=node_modules/forge-std/src |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// SPDX-License-Identifier: MIT OR Apache-2.0 | ||
pragma solidity >=0.8.0; | ||
|
||
import { IInterchainSecurityModule } from "@hyperlane-xyz/contracts/interfaces/IInterchainSecurityModule.sol"; | ||
|
||
contract ExampleIsm is IInterchainSecurityModule { | ||
// @inheritdoc IInterchainSecurityModule | ||
// @dev CCIP_READ is the type for CCIP read messages | ||
uint8 public moduleType = uint8(IInterchainSecurityModule.Types.CCIP_READ); | ||
|
||
// @inheritdoc IInterchainSecurityModule | ||
function verify(bytes calldata, bytes calldata) public view returns (bool) { | ||
// TODO: Implement the verification logic for incoming messages and return true if the message is valid | ||
// check AbstractMultisigIsm.sol for a reference implementation | ||
return true; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// SPDX-License-Identifier: MIT or Apache-2.0 | ||
pragma solidity ^0.8.13; | ||
|
||
import { Test } from "forge-std/Test.sol"; | ||
import { IInterchainSecurityModule } from "@hyperlane-xyz/contracts/interfaces/IInterchainSecurityModule.sol"; | ||
|
||
import { ExampleIsm } from "../src/ExampleIsm.sol"; | ||
|
||
contract ExampleIsmTest is Test { | ||
ExampleIsm public exampleIsm; | ||
|
||
function setUp() public { | ||
exampleIsm = new ExampleIsm(); | ||
} | ||
|
||
function test_moduleType() public view { | ||
assertEq(exampleIsm.moduleType(), uint8(IInterchainSecurityModule.Types.CCIP_READ)); | ||
} | ||
|
||
// TODO: Implement the test for the verify function | ||
function test_verify() public view { | ||
assertTrue(exampleIsm.verify(abi.encode(""), abi.encode(""))); | ||
} | ||
} |
Oops, something went wrong.