Payment
Last updated
Last updated
Inherits: , , ,
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.
Unwrap WETH9 tokens into ETH and send that balance to recipient. If less than amountMinimum WETH is avialble, then revert.
Sweep entire ERC20 token balance on this contract to recipient. If less than amountMinimum balance is avialble, then revert.
Transfers specified token amount to recipient
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.
Send any ETH on this contract to msg.sender.
Internal function to pay tokens or eth.
Parameters
token
IERC20
ERC20 token to pay.
payer
address
Address of the payer.
recipient
address
Address of the recipient.
value
uint256
Amount of tokens to pay.