Skip to content

crosschain-alliance/hashi-ism

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

hashi-ism

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.

Workflow

Prerequisite

Deployment of contracts

  1. HashiRegistry: A registry for Hashi Adapters pair and their corresponding fee.
  2. Hashi Hook: A hook contract deployed on source chain.
  3. Hashi ISM: An ISM contract deployed on destination chain.

Call

  1. User calls Mailbox.quoteDispatch() to get the fee and call Mailbox.dispatch() with provided fee.
  2. Mailbox calls HashiHook._postDispatch() to invoke cross-chain message passing.
  3. 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.
  4. HashiISM owner calls HashiISM.verifyMessageHash()with matching Hashi Message Id and Hyperlane Message Id, source and destination domain as parameters.
  5. User calls Mailbox.process() to check the execute the message.
  6. Mailbox calls HashiISM.verify() to check whether the message has been verified by Hashi ISM.

Dev

Install

npm install

Compile the contracts

npx hardhat compile

Test

npx hardhat test

About

Hashi integration of Hyperlane ISM

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published