LibTransaction

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

struct Transaction {
    DataTransferType dataTransferType;
    BridgeType bridgeType;
    bytes32 fromAssetAddress;
    bytes32 toAssetAddress;
    bytes32 toAddress;
    bytes32 recipientAggregatorAddress;i
    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