Aggregation VulpeFI

Derives

Functions

constructor

function constructor(
  address weth,
  contract IClipperExchangeInterface _clipperExchange
) public

Parameters:

NameTypeDescription

weth

address

_clipperExchange

contract IClipperExchangeInterface

swap

function swap(
  contract IAggregationExecutor caller,
  struct AggregationRouterV4.SwapDescription desc,
  bytes data
) external returns (uint256 returnAmount, uint256 gasLeft)

Performs a swap, delegating all calls encoded in data to caller. See tests for usage examples

Parameters:

NameTypeDescription

caller

contract IAggregationExecutor

Aggregation executor that executes calls described in data

desc

struct AggregationRouterV4.SwapDescription

Swap description

data

bytes

Encoded calls that caller should execute in between of swaps

Return Values:

NameTypeDescription

returnAmount

uint256

Resulting token amount

gasLeft

uint256

Gas left

rescueFunds

function rescueFunds(
  contract IERC20 token,
  uint256 amount
) external

Parameters:

NameTypeDescription

token

contract IERC20

amount

uint256

destroy

unction destroy(
) external

Events

Swapped

event Swapped(
  address sender,
  contract IERC20 srcToken,
  contract IERC20 dstToken,
  address dstReceiver,
  uint256 spentAmount,
  uint256 returnAmount
)

Parameters:

NameTypeDescription

sender

address

srcToken

contract IERC20

dstToken

contract IERC20

dstReceiver

address

spentAmount

uint256

returnAmount

uint256

Last updated