Function Calls
Function Call #1 – Calling The Transmitters
Caller
Explainer
The `propose` function is designed to emit a structured event containing details about a proposed interaction with a protocol on possibly another blockchain.
This event can then be caught by Transmitters, which may perform further actions such as validating the proposal, executing cross-chain calls, or any other required process as per the system's design.
Function Call #2 – Receive Prompt From End Point
Explainer
The receive
function is triggered by an End Point contract on a destination blockchain network once an operation has received consensus approval. It is restricted to ensure only authorized entities can activate it, bolstering security.
Function Parameters:
data (
bytes calldata
): Encapsulates essential details of the operation in a byte array format, which includes:protocolId: Identifier of the originating protocol.
srcChainId: ID of the source blockchain.
srcBlockNumber: Block number on the source blockchain where the operation was initiated.
srcOpTxId: Unique identifier for the operation on the source blockchain. For blockchains with 32-byte transaction IDs,
srcOpTxId[0]
holds the ID andsrcOpTxId[1]
is set to0x00
.payload: Additional operation-specific data.
Function Execution:
Data Decoding: The function uses
abi.decode
to extractsrcChainId
,srcBlockNumber
,srcOpTxId
, andpayload
from thedata
parameter.Payload Processing: Further decodes the
payload
to retrieve specific data relevant to the operation.
This function ensures secure and verified execution of approved operations from the source blockchain to the destination network.
For Web2 triggers, the srcChainId, srcBlockNumber, and srcOpTxId parameters can contain information about source identifier. This can be beneficial for processing information from various sources differently.
Last updated