Receive
Receive an inbound message from any Hyperlane supported network
Developers must implement the IMessageRecipient
interface in order to be able to receive interchain messages.
Interface
Security
Access control
To ensure only valid interchain messages are accepted, it is important to require that msg.sender
is a known Hyperlane Mailbox.
Developers must implement access control on handle()
in order to ensure the security of interchain messages. Only a Hyperlane Mailbox contract should have permission to call this function. An example of this access control is shown below.
Interchain security modules
Developers can override Hyperlane's default Multisig ISM-based security model by specifying their own Interchain security modules.
See the Interchain security modules documentation for more info on how to set the ISM used by your application.
Encoding
Hyperlane message senders are left-padded to bytes32
for compatibility with virtual machines that are addressed differently.
The following utility is provided in the TypeCasts
library for convenience.
Example usage
An example handle()
implementation for receiving messages is provided below.
Last updated