function depositETH(address lendingPool, address onBehalfOf, uint16 referralCode)
msg.value
amount of ETH into the protocol, minting the same amount of corresponding aWETH, and transferring them to the onBehalfOf
address.referralCode
input explanations, please refer to the referral program section of the documentation. During testing, you can use the referral code: 0
.depositETH()
transaction also includes the amount of ETH you are depositing in the msg.value
.lendingPool
onBehalfOf
msg.sender
when the aTokens should be sent to the caller.function withdrawETH(address lendingPool, uint256 amount, address to)
amount
of the WETH, unwraps it to ETH, and transfers the ETH to the to
address.WETHGateway
contract can burn the associated aWETH.lendingPool
amount
type(uint).max
to withdraw the entire balance.to
function repayETH(address lendingPool, uint256 amount, uint256 rateMode, address onBehalfOf)
onBehalfOf
's debt amount
of ETH which has a rateMode
.repayETH()
transaction also includes the amount of ETH you are repaying in the msg.value
.lendingPool
amount
uint(-1)
to repay the entire debt, ONLY when the repayment is not executed on behalf of a 3rd party. _amount
slightly higher than the current borrowed amount.rateMode
onBehalfOf
msg.sender
when not calling on behalf of a different user.function borrowETH(address lendingPool, uint256 amount, uint256 interestRateMode, uint16 referralCode)
amount
of WETH with interestRateMode
, sending the amount
of unwrapped WETH to msg.sender
.lendingPool
amount
interestRateMode
function getWETHAddress()