generated from EthSign/forge-hardhat-template
-
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.
- Loading branch information
1 parent
249d1eb
commit 0d55121
Showing
8 changed files
with
5,024 additions
and
55 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
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,24 @@ | ||
// 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 { | ||
// @dev The first 128 enum values are reserved for core Hyperlane types | ||
uint8 public constant COMMUNITY_MASK = 0x80; | ||
|
||
// TODO: Replace with actual community types you want to use | ||
enum CommunityTypes { | ||
EXAMPLE_ISM | ||
} | ||
|
||
// @inheritdoc IInterchainSecurityModule | ||
uint8 public moduleType = uint8(CommunityTypes.EXAMPLE_ISM) | COMMUNITY_MASK; | ||
|
||
// @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,23 @@ | ||
// SPDX-License-Identifier: MIT or Apache-2.0 | ||
pragma solidity ^0.8.13; | ||
|
||
import { Test } from "forge-std/Test.sol"; | ||
import { ExampleIsm } from "../src/ExampleIsm.sol"; | ||
|
||
contract ExampleIsmTest is Test { | ||
ExampleIsm public exampleIsm; | ||
uint8 public constant EXAMPLE_ISM_TYPE = 128; | ||
|
||
function setUp() public { | ||
exampleIsm = new ExampleIsm(); | ||
} | ||
|
||
function test_moduleType() public view { | ||
assertEq(exampleIsm.moduleType(), EXAMPLE_ISM_TYPE); | ||
} | ||
|
||
// TODO: Implement the test for the verify function | ||
function test_verify() public view { | ||
assertTrue(exampleIsm.verify(abi.encode(""), abi.encode(""))); | ||
} | ||
} |
Oops, something went wrong.