IWETH9
Inherits: IERC20
Title: IWETH9
Author: Vendored minimal subset of the canonical WETH9 (https://github.com/gnosis/canonical-weth/blob/master/contracts/WETH9.sol).
Upstream license: GPL-3.0-or-later.
Minimal vendored subset of Wrapped Ether (WETH9). The Lido adapter holds idle funds as
WETH (so the position fits the ERC-20 IStrategy ABI) and unwraps to native ETH only to
stake into Lido, re-wrapping the ETH it claims back from the withdrawal queue.
Extends IERC20 for transfer/balanceOf/approve plus the two wrap/unwrap selectors.
withdraw(uint256) sends native ETH to the caller via transfer (2,300-gas stipend — a
diamond-hosted caller must relay through WETHUnwrapper); deposit() wraps the attached ETH 1:1.
Functions
deposit
Wraps the attached native ETH 1:1, crediting the caller msg.value WETH.
function deposit() external payable;withdraw
Burns amount WETH from the caller and returns amount native ETH to the caller.
function withdraw(uint256 amount) external;Parameters
| Name | Type | Description |
|---|---|---|
| amount | uint256 | The amount of WETH to unwrap into native ETH. |