UnoswapRouter
Derives
Permitable
EthReceiver
Functions
unoswapWithPermit
Same as unoswap
but calls permit first, allowing to approve token spending and make a swap in one transaction.
Parameters:
Name | Type | Description |
---|---|---|
| contract IERC20 | Source token |
| uint256 | Amount of source tokens to swap |
| uint256 | Minimal allowed returnAmount to make transaction commit |
| bytes32[] | Pools chain used for swaps. Pools src and dst tokens should match to make swap happen |
| bytes | Should contain valid permit that can be used in |
unoswap
Performs swap using Uniswap exchange. Wraps and unwraps ETH if required. Sending non-zero msg.value
for anything but ETH swaps is prohibited
Parameters:
Name | Type | Description |
---|---|---|
| contract IERC20 | Source token |
| uint256 | Amount of source tokens to swap |
| uint256 | Minimal allowed returnAmount to make transaction commit |
| bytes32[] | Pools chain used for swaps. Pools src and dst tokens should match to make swap happen |
Last updated