Skip to content
Lattice

IStargate

Git Source

The Stargate v2 send surface (Pool or OFT — both expose the same ABI).

Functions

sendToken

Sends _sendParam.amountLD of the pooled/OFT token to _sendParam.dstEid. Same as the OFT send but additionally returns the bus Ticket (empty in taxi mode).

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

Parameters

NameTypeDescription
_sendParamSendParamThe send parameters (see SendParam).
_feeMessagingFeeThe caller-supplied fee (nativeFee must accompany the call as msg.value).
_refundAddressaddressReceiver of any excess native fee on THIS chain.

Returns

NameTypeDescription
msgReceiptMessagingReceipt
oftReceiptOFTReceipt
ticketTicket

quoteSend

Quotes the LayerZero messaging fee for _sendParam (_payInLzToken selects the fee leg).

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

Parameters

NameTypeDescription
_sendParamSendParam
_payInLzTokenbool

Returns

NameTypeDescription
<none>MessagingFee

token

The underlying ERC-20 this Stargate instance moves (the pooled asset for a Pool).

function token() external view returns (address);

Returns

NameTypeDescription
<none>address