File tree Expand file tree Collapse file tree 8 files changed +5024
-55
lines changed Expand file tree Collapse file tree 8 files changed +5024
-55
lines changed Original file line number Diff line number Diff line change 1
1
{
2
- "name" : " @ethsign/ " ,
2
+ "name" : " @hyperlane-xyz/community " ,
3
3
"version" : " 1.0.0" ,
4
- "description" : " " ,
5
- "repository" : {
6
- "type" : " git" ,
7
- "url" : " git+https://github.com/EthSign"
8
- },
4
+ "description" : " A repository for community-contributions to Hyperlane protocol." ,
5
+ "repository" : " https://github.com/hyperlane-xyz/community-isms" ,
6
+ "license" : " Apache-2.0" ,
7
+ "keywords" : [
8
+ " Hyperlane" ,
9
+ " Solidity"
10
+ ],
9
11
"scripts" : {
10
12
"prepare" : " husky" ,
11
13
"clean" : " forge clean && hardhat clean && rm -rf cache_hardhat" ,
18
20
"test:coverage" : " forge coverage" ,
19
21
"test:gas" : " forge test --gas-report"
20
22
},
21
- "author" : " " ,
22
- "license" : " ISC" ,
23
23
"dependencies" : {
24
+ "@hyperlane-xyz/core" : " ^5.8.0" ,
24
25
"@openzeppelin/contracts" : " 5.0.2" ,
25
26
"@openzeppelin/contracts-upgradeable" : " 5.0.2"
26
27
},
Original file line number Diff line number Diff line change 1
1
@openzeppelin/contracts/=node_modules/@openzeppelin/contracts/
2
2
@openzeppelin/contracts-upgradeable/=node_modules/@openzeppelin/contracts-upgradeable/
3
+ @hyperlane-xyz/=node_modules/@hyperlane-xyz/core/
3
4
ds-test/=node_modules/ds-test/src
4
5
forge-std/=node_modules/forge-std/src
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // SPDX-License-Identifier: MIT OR Apache-2.0
2
+ pragma solidity >= 0.8.0 ;
3
+
4
+ import { IInterchainSecurityModule } from "@hyperlane-xyz/contracts/interfaces/IInterchainSecurityModule.sol " ;
5
+
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
+ // @inheritdoc IInterchainSecurityModule
16
+ uint8 public moduleType = uint8 (CommunityTypes.EXAMPLE_ISM) | COMMUNITY_MASK;
17
+
18
+ // @inheritdoc IInterchainSecurityModule
19
+ function verify (bytes calldata , bytes calldata ) public view returns (bool ) {
20
+ // TODO: Implement the verification logic for incoming messages and return true if the message is valid
21
+ // check AbstractMultisigIsm.sol for a reference implementation
22
+ return true ;
23
+ }
24
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change
1
+ // SPDX-License-Identifier: MIT or Apache-2.0
2
+ pragma solidity ^ 0.8.13 ;
3
+
4
+ import { Test } from "forge-std/Test.sol " ;
5
+ import { ExampleIsm } from "../src/ExampleIsm.sol " ;
6
+
7
+ contract ExampleIsmTest is Test {
8
+ ExampleIsm public exampleIsm;
9
+ uint8 public constant EXAMPLE_ISM_TYPE = 128 ;
10
+
11
+ function setUp () public {
12
+ exampleIsm = new ExampleIsm ();
13
+ }
14
+
15
+ function test_moduleType () public view {
16
+ assertEq (exampleIsm.moduleType (), EXAMPLE_ISM_TYPE);
17
+ }
18
+
19
+ // TODO: Implement the test for the verify function
20
+ function test_verify () public view {
21
+ assertTrue (exampleIsm.verify (abi.encode ("" ), abi.encode ("" )));
22
+ }
23
+ }
You can’t perform that action at this time.
0 commit comments