For the complete documentation index, see llms.txt. This page is also available as Markdown.

DEXSwap

Git Source

Title: DEXSwap

Instructions on how to execute a swap on an external DEX.

struct DEXSwap {
address callDataTarget;
bytes callData;
address buyToken;
address sellToken;
uint256 buyAmount;
uint256 expectedSellAmount;
}

Properties

Name
Type
Description

callDataTarget

address

The address to call. Usually a pool or a router address.

callData

bytes

The calldata to call the target with.

buyToken

address

Address of the token being bought in the swap.

sellToken

address

Address of the token being sold in the swap.

buyAmount

uint256

The amount of buyToken expected to be received from the swap.

expectedSellAmount

uint256

The amount of sellToken expected to be sold in the swap.

Last updated

Was this helpful?