ISpecifiesInterchainSecurityModule
interface in their application.
InterchainSecurityModule
interface. This implementation can be configured, composed, and customized according to the needs of their application.
Specifically, this interface must be implemented in the same smart contract that implements handle()
.
The interface consists of two functions: verify
and moduleType
.
InterchainSecurityModule Interface
verify()
. The Mailbox will call IInterchainSecurityModule.verify()
before delivering a message to its recipient. If verify()
reverts or returns false
, the message will not be delivered.
_metadata
: consists of arbitrary bytes provided by the Relayer. Typically, these bytes are specific to the ISM. For example, the _metadata
for a Multisig ISM must include validator signatures.
_message
: consists of the Hyperlane message being verified. ISMs can use this to inspect details about the message being verified. For example, a Multisig ISM could change validator sets based on the origin chain of the message.
Message.sol
library for more information on the format of the Hyperlane message passed to
verify()
.moduleType()
.
_metadata
. ISMs must return one of the supported module types.
moduleType
to be defined. This type is branched on by the Relayer in order to determine the required metadata for that ISM. For more information on module types and their metadata formats, see Protocol.