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.
srcSender_
address of the sending contract
message_
bytes message to broadcast
extraData_
bytes extraData
to override
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.
encodedMessage
bytes message to read into contract
setChainId
This function allows the ProtocolAdmin
to add new chain ids based on the mapping in Wormhole.
superChainId_
internal chain id used by the Superform protocol. block.chainid
casted to uint64
ambChainId_
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