Skip to Content
SupraNova (Bridge)Send a Message

Send a Message

An application sends a message by posting it to the message-passing layer on the source chain. Posting is free and open to any caller. The destination chain must be registered and enabled on the source chain, or the call fails.

The message-passing layer records the poster’s address in the message as its caller. The receiving side of your application uses the caller to check that the message came from you. Post from a stable address you control, such as your contract or your module’s resource account.

SupraNova will publish its EVM and Move interfaces in a GitHub repository. Until then, use the signatures on this page.

Call postMessage on the Hypernova contract:

interface IHypernova { function postMessage(bytes calldata messageData, uint64 chainId) external; } contract MessageSender { IHypernova public immutable hypernova; constructor(IHypernova hypernova_) { hypernova = hypernova_; } function send(uint64 destChainId, bytes calldata payload) external { hypernova.postMessage(payload, destChainId); } }

Hypernova emits:

event MessagePosted(address indexed caller, uint256 indexed messageId, uint64 indexed chainId, bytes messageData);
  • caller is msg.sender: here, the MessageSender contract.
  • messageId comes from a single counter shared by every caller and destination, so one application’s message IDs are not consecutive. messageId() returns the next ID.
  • chainId is the destination chain ID.

The call reverts while Hypernova is paused, or if the destination chain is not enabled.

HyperNova does not interpret the payload. Encode it in a format your receiving contract or module can decode and validate.

Last updated on