Skip to main content

AggregationRouterV6

Derives

Functions

constructor

function constructor(
contract IWETH weth
)

Parameters:

NameTypeDescription
wethcontract IWETH

rescueFunds

function rescueFunds(
contract IERC20 token,
uint256 amount
) external

Retrieves funds accidently sent directly to the contract address.

Parameters:

NameTypeDescription
tokencontract IERC20ERC20 token to retrieve
amountuint256amount to retrieve

destroy

function destroy(
) external

Destroys the contract and sends eth to sender. Use with caution. The only case when the use of the method is justified is if there is an exploit found. And the damage from the exploit is greater than from just an urgent contract change.

Events

Swapped

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

Parameters:

NameTypeDescription
senderaddress
srcTokencontract IERC20
dstTokencontract IERC20
dstReceiveraddress
spentAmountuint256
returnAmountuint256