Payment
Inherits: State, PayableMulticall, SelfPermit, IPayment
Payment helper function that lets user sweep ERC20 tokens off the router and liquidity manager. Also provides mechanism to wrap and unwrap ETH/WETH so that it can be used in the Maverick pools.
Functions
receive
unwrapWETH9
Unwrap WETH9 tokens into ETH and send that balance to recipient. If less than amountMinimum WETH is avialble, then revert.
sweepToken
Sweep entire ERC20 token balance on this contract to recipient. If less than amountMinimum balance is avialble, then revert.
sweepTokenAmount
Transfers specified token amount to recipient
unwrapAndSweep
For tokenA and tokenB, sweep all of the non-WETH tokens to msg.sender. Any WETH balance is unwrapped to ETH and then all the ETH on this contract is sent to msg.sender.
refundETH
Send any ETH on this contract to msg.sender.
pay
Internal function to pay tokens or eth.
Parameters
Name | Type | Description |
---|---|---|
|
| ERC20 token to pay. |
|
| Address of the payer. |
|
| Address of the recipient. |
|
| Amount of tokens to pay. |
Last updated