WETHGateway
Last updated
Last updated
Sets the WETH address and the PoolAddressesProvider address. Infinite approves pool.
Name | Type | Description |
---|---|---|
deposits WETH into the reserve, using native ETH. A corresponding amount of the overlying asset (xTokens) is minted.
_withdraws the WETH reserves of msg.sender.
repays a borrow on the WETH reserve, for the specified amount (or for the whole amount, if uint256(-1) is specified).
borrow WETH, unwraps to ETH and send both the ETH and DebtTokens to msg.sender, via approveDelegation
and onBehalf argument in Pool.borrow
.
_withdraws the WETH reserves of msg.sender.
transfer ETH to an address, revert if it fails.
transfer ERC20 from the utility contract, for ERC20 recovery in case of stuck tokens due direct transfers to the contract address.
transfer native Ether from the utility contract, for native Ether recovery in case of stuck Ether due selfdestructs or transfer ether to pre-computated contract address before deployment.
Get WETH address used by WETHGateway
Only WETH contract is allowed to transfer ETH here. Prevent other addresses to send Ether to this contract.
Revert fallback calls
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
_weth
address
Address of the Wrapped Ether contract
_pool
address
Address of the proxy pool of this contract
onBehalfOf
address
address of the user who will receive the xTokens representing the deposit
referralCode
uint16
integrators are assigned a referral code and can potentially receive rewards.
amount
uint256
amount of pWETH to withdraw and receive native ETH
to
address
address of the user who will receive native ETH
amount
uint256
the amount to repay, or uint256(-1) if the user wants to repay everything
onBehalfOf
address
the address for which msg.sender is repaying
amount
uint256
the amount of ETH to borrow
referralCode
uint16
integrators are assigned a referral code and can potentially receive rewards
amount
uint256
amount of pWETH to withdraw and receive native ETH
to
address
address of the user who will receive native ETH
deadline
uint256
validity deadline of permit and so depositWithPermit signature
permitV
uint8
V parameter of ERC712 permit sig
permitR
bytes32
R parameter of ERC712 permit sig
permitS
bytes32
S parameter of ERC712 permit sig
to
address
recipient of the transfer
value
uint256
the amount to send
token
address
token to transfer
to
address
recipient of the transfer
amount
uint256
amount to send
to
address
recipient of the transfer
amount
uint256
amount to send