ClipperRouter
Clipper router that allows to use ClipperExchangeInterface for swaps
Last updated
Clipper router that allows to use ClipperExchangeInterface for swaps
Last updated
Permitable
EthReceiver
Parameters:
Name | Type | Description |
---|---|---|
Same as clipperSwapTo
but calls permit first, allowing to approve token spending and make a swap in one transaction.
Parameters:
Same as clipperSwapTo
but uses msg.sender
as recipient
Parameters:
Performs swap using Clipper exchange. Wraps and unwraps ETH if required. Sending non-zero msg.value
for anything but ETH swaps is prohibited
Parameters:
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
weth
address
clipperExchange
contract IClipperExchangeInterface
recipient
address payable
Address that will receive swap funds
srcToken
contract IERC20
Source token
dstToken
contract IERC20
Destination token
amount
uint256
Amount of source tokens to swap
minReturn
uint256
Minimal allowed returnAmount to make transaction commit
permit
bytes
Should contain valid permit that can be used in IERC20Permit.permit
calls. See tests for examples
srcToken
contract IERC20
Source token
dstToken
contract IERC20
Destination token
amount
uint256
Amount of source tokens to swap
minReturn
uint256
Minimal allowed returnAmount to make transaction commit
recipient
address payable
Address that will receive swap funds
srcToken
contract IERC20
Source token
dstToken
contract IERC20
Destination token
amount
uint256
Amount of source tokens to swap
minReturn
uint256
Minimal allowed returnAmount to make transaction commit