SendParam
Title: IStargate (Stargate v2 pool / OFT send surface) — minimal ABI-equivalent interface
Authors: David Dada <daveproxy80@gmail.com> (https://github.com/dadadave80), Vendored minimal struct subset of LayerZero's IOFT (https://github.com/LayerZero-Labs/LayerZero-v2). Upstream license: MIT., ABI-equivalent interface authored fresh from Stargate v2's public ABI (https://github.com/stargate-protocol/stargate-v2) — upstream sources are BUSL-1.1 and were NOT copied.
Minimal Stargate v2 surface the Lattice adapter dispatches through: the 3-tuple sendToken
(Stargate's OFT send variant that additionally returns the bus Ticket), the quoteSend fee
quote, and the token read (the pooled ERC-20 a Pool wraps). IStargate extends LayerZero's
IOFT upstream; only the members this adapter calls are declared here.
LICENSING SPLIT (deliberate): the SendParam / OFTReceipt structs are vendored VERBATIM from
LayerZero-v2's MIT IOFT.sol (packages/layerzero-v2/evm/oapp/contracts/oft/interfaces/IOFT.sol);
the shared MessagingFee / MessagingReceipt structs are imported from the repo's existing MIT
ILayerZeroEndpointV2 vendored subset. The IStargate interface itself and the Ticket struct are
AUTHORED FRESH against Stargate v2's public ABI, because stargate-protocol/stargate-v2 sources
(including src/interfaces/IStargate.sol) are BUSL-1.1 — no upstream Stargate text is copied. ABIs
are not copyrightable expression; signatures match the canonical deployment EXACTLY. Do NOT add a
stargate-v2 dependency.
Token parameters of an OFT send/sendToken: destination endpoint id, 32-byte recipient, the
amount and slippage floor in LOCAL decimals, plus the executor extraOptions, optional
composeMsg (destination lzCompose payload) and oftCmd (Stargate: empty = taxi, non-empty =
bus).
Note:
- lattice-source: Stargate
struct SendParam {
uint32 dstEid; // Destination endpoint ID.
bytes32 to; // Recipient address.
uint256 amountLD; // Amount to send in local decimals.
uint256 minAmountLD; // Minimum amount to send in local decimals.
bytes extraOptions; // Additional options supplied by the caller to be used in the LayerZero message.
bytes composeMsg; // The composed message for the send() operation.
bytes oftCmd; // The OFT command to be executed, unused in default OFT implementations.
}Properties
| Name | Type | Description |
|---|---|---|
| dstEid | uint32 | |
| to | bytes32 | |
| amountLD | uint256 | |
| minAmountLD | uint256 | |
| extraOptions | bytes | |
| composeMsg | bytes | |
| oftCmd | bytes |