Skip to content
docs

Swap2Result

Defined in: protocols/swap2.ts:113

What swap2() returns once the source transaction is broadcast. Delivery on another chain comes later; poll ISwap2Protocol.getSwap2Status.

fees: Swap2Fee[]

Defined in: protocols/swap2.ts:119

Fees as quoted at execution.


fromTokenAmount: bigint

Defined in: protocols/swap2.ts:123

Input amount, base units.


optional hash?: string

Defined in: protocols/swap2.ts:117

Source transaction hash.


id: string

Defined in: protocols/swap2.ts:115

Id to pass to getSwap2Status; for a same-chain swap, the transaction hash.


toTokenAmount: bigint

Defined in: protocols/swap2.ts:125

Expected delivery, base units.


optional toTokenAmountMin?: bigint

Defined in: protocols/swap2.ts:127

Least delivery after slippage.


optional transactions?: Swap2Transaction[]

Defined in: protocols/swap2.ts:121

Every transaction sent so far (approval, source).