BroadcastRegistry
Introduction
BroadcastRegistry proposes a unique form of communication from one chain to all chains Superform contracts are deployed on, as opposed to BaseStateRegistry which assumes communication between only two chains.
Core Concepts
All functions in BroadcastRegistry are gated through access control to ensure that only authorized entities can perform specific actions within the contract.
setRequiredMessagingQuorum
This function allows the ProtocolAdmin to adjust the number of BroadcastAMBImplementations that must be used on a particular chain, similar to functionality in BaseStateRegistry. The default for this is 1, as WormholeSRImlementation is the only AMB supporting broadcasting.
function setRequiredMessagingQuorum(
uint64 srcChainId_,
uint256 quorum_
) external override onlyProtocolAdminsrcChainId_
uint64 EVM chain id of the src chain
quorum_
uint256 quorum to use
broadcastPayload
This function allows the appropriate configured Broadcaster to broadcast payloads to destination chains. It handles both the payload and proof broadcasting.
function broadcastPayload(
address srcSender_,
uint8[] memory ambIds_,
bytes memory message_,
bytes memory extraData_
) external payable override onlySendersrcSender_
address of the contract initiating the transaction
ambIds_
uint8 array of the AMB ids to use in broadcasting
message_
bytes message to broadcast
extraData_
bytes extraData to override individual AMB implementations
receiveBroadcastPayload
This function allows BroadcastAMBImplementations to write broadcasted payloads into the contract.
function receiveBroadcastPayload(
uint64 srcChainId_,
bytes memory message
) external;srcChainId_
uint64 EVM chain id
message
bytes message to be broadcast
processPayload
This function allows Processors to process received payloads.
function processPayload(
uint256 payloadId
) external override onlyProcessorpayloadId
uint256 payloadId to process
Last updated
Was this helpful?