WormholeSRImplementation
Introduction
WormholeSRImplementation
is a BroadcastAmbImplementation
used in BroadcastRegistry and is the data layer by which messages on one chain can be broadcast to multiple chains.
You can read more about Wormhole's Specialized Relayer (SR) here: https://docs.wormhole.com/wormhole/explore-wormhole/relayer#specialized-relayers
Core Concepts
setWormholeCore
This function allows the ProtocolAdmin
role to configure the Wormhole core contract for the respective chain found here: https://docs.wormhole.com/wormhole/blockchain-environments/contracts
broadcastPayload
This function implements the function in BroadcastAmbImplementation
and publishes a message to Wormhole.
name | description |
---|---|
| address of the sending contract |
| bytes message to broadcast |
| bytes |
receiveMessage
This function allows roles that are Wormhole VAA Relayers to receive messages in Wormhole. Despite being public, the function will revert if the caller of this function is not a Relayer.
name | description |
---|---|
| bytes message to read into contract |
setChainId
This function allows the ProtocolAdmin
to add new chain ids based on the mapping in Wormhole.
name | description |
---|---|
| internal chain id used by the Superform protocol. |
| uint16 chain id allocated to each chain by Wormhole |
setFinality
This function allows the ProtocolAdmin
to set the required finality level on the source chain for message broadcasting.
Last updated