Hashi integration of Hyperlane ISM
Hyperlane Interchain Security Module (ISM) is part of the modular security provided by Hyperlane. Users can define their own ISM for their security preferences.
This is a PoC of Hashi as Hyperlane ISM. With Hashi as ISM, the security is guaranteed by the Hashi Adapters.
Deployment of contracts
- HashiRegistry: A registry for Hashi Adapters pair and their corresponding fee.
- Hashi Hook: A hook contract deployed on source chain.
- Hashi ISM: An ISM contract deployed on destination chain.
- User calls
Mailbox.quoteDispatch()
to get the fee and callMailbox.dispatch()
with provided fee. - Mailbox calls
HashiHook._postDispatch()
to invoke cross-chain message passing. - Hashi calls source chain message relays to pass the message hash w.r.t message Id and the message hash is stored on destination chain adapters.
- HashiISM owner calls
HashiISM.verifyMessageHash()
with matching Hashi Message Id and Hyperlane Message Id, source and destination domain as parameters. - User calls
Mailbox.process()
to check the execute the message. - Mailbox calls
HashiISM.verify()
to check whether the message has been verified by Hashi ISM.
Install
npm install
Compile the contracts
npx hardhat compile
Test
npx hardhat test