/
IPeripheryPaymentsExtended.sol
executable file
·29 lines (24 loc) · 1.56 KB
/
IPeripheryPaymentsExtended.sol
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.7.5;
import '@uniswap/v3-periphery/contracts/interfaces/IPeripheryPayments.sol';
/// @title Periphery Payments Extended
/// @notice Functions to ease deposits and withdrawals of ETH and tokens
interface IPeripheryPaymentsExtended is IPeripheryPayments {
/// @notice Unwraps the contract's WETH9 balance and sends it to msg.sender as ETH.
/// @dev The amountMinimum parameter prevents malicious contracts from stealing WETH9 from users.
/// @param amountMinimum The minimum amount of WETH9 to unwrap
function unwrapWETH9(uint256 amountMinimum) external payable;
/// @notice Wraps the contract's ETH balance into WETH9
/// @dev The resulting WETH9 is custodied by the router, thus will require further distribution
/// @param value The amount of ETH to wrap
function wrapETH(uint256 value) external payable;
/// @notice Transfers the full amount of a token held by this contract to msg.sender
/// @dev The amountMinimum parameter prevents malicious contracts from stealing the token from users
/// @param token The contract address of the token which will be transferred to msg.sender
/// @param amountMinimum The minimum amount of token required for a transfer
function sweepToken(address token, uint256 amountMinimum) external payable;
/// @notice Transfers the specified amount of a token from the msg.sender to address(this)
/// @param token The token to pull
/// @param value The amount to pay
function pull(address token, uint256 value) external payable;
}