LibDataTransfer

This is a Solidity smart contract library that provides functions related to data transfer between different blockchain networks or layers.

getOriginalPayload()

this function is responsible for extracting the original payload from the extended payload by slicing the extendedPayload from the 42nd byte to the end. It removes the extended part of the payload and returns the original payload.

Input

Output

dataTransfer()

this function is responsible for executing data transfer operations based on the specified protocols. It increments the core sequence, creates a transfer key, generates the extended payload, and processes each protocol in dataTransferInArgs.protocols. Depending on the protocol's dataTransferType, either the Wormhole or LayerZero data transfer function is called. If an unrecognised dataTransferType is encountered, the function reverts with an error.

Input

Output

getPayload()

this function is responsible for obtaining the transfer key and payload based on the specified data transfer type. Depending on the dataTransferType in dataTransferOutArgs, either the Wormhole or LayerZero library functions are called to obtain the payload.

Input

Output

Last updated