File tree 2 files changed +5
-11
lines changed 2 files changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -4,16 +4,9 @@ pragma solidity >=0.8.0;
4
4
import { IInterchainSecurityModule } from "@hyperlane-xyz/contracts/interfaces/IInterchainSecurityModule.sol " ;
5
5
6
6
contract ExampleIsm is IInterchainSecurityModule {
7
- // @dev The first 128 enum values are reserved for core Hyperlane types
8
- uint8 public constant COMMUNITY_MASK = 0x80 ;
9
-
10
- // TODO: Replace with actual community types you want to use
11
- enum CommunityTypes {
12
- EXAMPLE_ISM
13
- }
14
-
15
7
// @inheritdoc IInterchainSecurityModule
16
- uint8 public moduleType = uint8 (CommunityTypes.EXAMPLE_ISM) | COMMUNITY_MASK;
8
+ // @dev CCIP_READ is the type for CCIP read messages
9
+ uint8 public moduleType = uint8 (IInterchainSecurityModule.Types.CCIP_READ);
17
10
18
11
// @inheritdoc IInterchainSecurityModule
19
12
function verify (bytes calldata , bytes calldata ) public view returns (bool ) {
Original file line number Diff line number Diff line change 2
2
pragma solidity ^ 0.8.13 ;
3
3
4
4
import { Test } from "forge-std/Test.sol " ;
5
+ import { IInterchainSecurityModule } from "@hyperlane-xyz/contracts/interfaces/IInterchainSecurityModule.sol " ;
6
+
5
7
import { ExampleIsm } from "../src/ExampleIsm.sol " ;
6
8
7
9
contract ExampleIsmTest is Test {
8
10
ExampleIsm public exampleIsm;
9
- uint8 public constant EXAMPLE_ISM_TYPE = 128 ;
10
11
11
12
function setUp () public {
12
13
exampleIsm = new ExampleIsm ();
13
14
}
14
15
15
16
function test_moduleType () public view {
16
- assertEq (exampleIsm.moduleType (), EXAMPLE_ISM_TYPE );
17
+ assertEq (exampleIsm.moduleType (), uint8 (IInterchainSecurityModule.Types.CCIP_READ) );
17
18
}
18
19
19
20
// TODO: Implement the test for the verify function
You can’t perform that action at this time.
0 commit comments