LibTransaction

The LibTransaction library provides functions for encoding and decoding a Transaction struct into a byte array.

struct Transaction {
    DataTransferType dataTransferType;
    BridgeType bridgeType;
    uint16 recipientNetworkId;
    bytes32 fromAssetAddress;
    bytes32 toAssetAddress;
    bytes32 toAddress;
    bytes32 recipientAggregatorAddress;
    uint256 amountOutMin;
    uint256 swapOutGasFee;
    uint64 tokenSequence;
}
struct TransactionValidation {
    bytes32 fromAssetAddress;
    bytes32 toAssetAddress;
    bytes32 toAddress;
    uint256 amountOutMin;
    uint256 swapOutGasFee;
}

encode()

The encode function takes a Transaction struct and converts it into a byte array.

Input

Output

decode()

The decode function takes a byte array and converts it back into a Transaction struct.

Input

Output

Last updated