IStargate

Git Source

Functions

token

function token() external view returns (address);

sendToken

function sendToken(
    SendParam calldata _sendParam,
    MessagingFee calldata _fee,
    address _refundAddress
)
    external
    payable
    returns (MessagingReceipt memory msgReceipt, OFTReceipt memory oftReceipt, Ticket memory ticket);

send

function send(
    SendParam calldata _sendParam,
    MessagingFee calldata _fee,
    address _refundAddress
)
    external
    payable
    returns (MessagingReceipt memory, OFTReceipt memory);

quoteSend

function quoteSend(SendParam calldata _sendParam, bool _payInLzToken) external view returns (MessagingFee memory);

quoteOFT

function quoteOFT(SendParam calldata _sendParam)
    external
    view
    returns (OFTLimit memory, OFTFeeDetail[] memory oftFeeDetails, OFTReceipt memory);

Structs

SendParam

struct SendParam {
    uint32 dstEid;
    bytes32 to;
    uint256 amountLD;
    uint256 minAmountLD;
    bytes extraOptions;
    bytes composeMsg;
    bytes oftCmd;
}

OFTReceipt

struct OFTReceipt {
    uint256 amountSentLD; // Amount sent in local decimals
    uint256 amountReceivedLD; // Amount to be received in local decimals
}

MessagingFee

struct MessagingFee {
    uint256 nativeFee; // Fee in native token
    uint256 lzTokenFee; // Fee in LZ token
}

MessagingReceipt

struct MessagingReceipt {
    bytes32 guid;
    uint64 nonce;
    MessagingFee fee;
}

OFTLimit

struct OFTLimit {
    uint256 minAmountLD; // Minimum amount for transfer
    uint256 maxAmountLD; // Maximum amount for transfer
}

OFTFeeDetail

struct OFTFeeDetail {
    int256 amount; // Fee amount (negative for fee, positive for reward)
    string description; // Description of the fee
}

Ticket

struct Ticket {
    uint72 ticketId; // ID for bus ticket
    bytes passengerBytes; // Passenger data
}

results matching ""

    No results matching ""