ClipperRouter
Clipper router that allows to use ClipperExchangeInterface for swaps
Derives
Permitable
EthReceiver
Functions
constructor
Parameters:
Name | Type | Description |
---|---|---|
| address | |
| contract IClipperExchangeInterface |
clipperSwapToWithPermit
Same as clipperSwapTo
but calls permit first, allowing to approve token spending and make a swap in one transaction.
Parameters:
Name | Type | Description |
---|---|---|
| address payable | Address that will receive swap funds |
| contract IERC20 | Source token |
| contract IERC20 | Destination token |
| uint256 | Amount of source tokens to swap |
| uint256 | Minimal allowed returnAmount to make transaction commit |
| bytes | Should contain valid permit that can be used in |
clipperSwap
Same as clipperSwapTo
but uses msg.sender
as recipient
Parameters:
Name | Type | Description |
---|---|---|
| contract IERC20 | Source token |
| contract IERC20 | Destination token |
| uint256 | Amount of source tokens to swap |
| uint256 | Minimal allowed returnAmount to make transaction commit |
clipperSwapTo
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 |
---|---|---|
| address payable | Address that will receive swap funds |
| contract IERC20 | Source token |
| contract IERC20 | Destination token |
| uint256 | Amount of source tokens to swap |
| uint256 | Minimal allowed returnAmount to make transaction commit |
Last updated