Skip to content
docs

Swap2ExecutionPlan

Defined in: protocol-swap2-core/src/swap2/base.ts:297

What swap2() is about to sign, handed to Swap2EngineConfig.reviewExecution.

approvals: object[]

Defined in: protocol-swap2-core/src/swap2/base.ts:311

ERC-20 approvals sent first, in order (USDT on Ethereum resets to 0 first).

amount: bigint

optional chainId?: number

spender: string

token: string


destAmount: bigint

Defined in: protocol-swap2-core/src/swap2/base.ts:305


destChain: string

Defined in: protocol-swap2-core/src/swap2/base.ts:300


destToken: string

Defined in: protocol-swap2-core/src/swap2/base.ts:301


etaSeconds: number

Defined in: protocol-swap2-core/src/swap2/base.ts:308


feeUsd: number

Defined in: protocol-swap2-core/src/swap2/base.ts:307


fromChain: string

Defined in: protocol-swap2-core/src/swap2/base.ts:299


minDestAmount: bigint

Defined in: protocol-swap2-core/src/swap2/base.ts:306


provider: string

Defined in: protocol-swap2-core/src/swap2/base.ts:298


recipient: string

Defined in: protocol-swap2-core/src/swap2/base.ts:302


refundAddress: string

Defined in: protocol-swap2-core/src/swap2/base.ts:303


optional requoted?: true

Defined in: protocol-swap2-core/src/swap2/base.ts:317

true on a second review: the first quote expired while its approval was being mined, and the fresh one differs from what was reviewed (another payload, a worse output). The allowance is already in place, so approvals is empty; cancelling revokes it.


source: { cellBody?: boolean; cellBodyDecoded?: TonBodySummary; chainId?: number; data?: string; gasLimit?: bigint; kind: "call"; memo?: string; memoEncoding?: "utf8" | "hex"; to: string; value: bigint; } | { amount: bigint; kind: "token-transfer"; memo?: string; memoEncoding?: "utf8" | "hex"; recipient: string; token: string; } | { kind: "serialized"; serializedTx: string; } | { kind: "typed-order"; typedData: string; }

Defined in: protocol-swap2-core/src/swap2/base.ts:319

The source leg exactly as the account will receive it.


sourceAmount: bigint

Defined in: protocol-swap2-core/src/swap2/base.ts:304


validUntilMs: number

Defined in: protocol-swap2-core/src/swap2/base.ts:309