| add weth registry gated on bytecode 27d0645 julienbrg 4h ago | 1 | // SPDX-License-Identifier: MIT |
| 2 | pragma solidity ^0.8.30; |
| 3 | |
| 4 | import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol"; |
| 5 | |
| 6 | /// @title IWETH |
| 7 | /// @author Julien Béranger |
| 8 | /// @notice The wrapped-ether surface `WETHRegistry` probes: ERC-20, plus the |
| 9 | /// two entrypoints that make a wrapper a wrapper. |
| 10 | /// @dev Deliberately not the full WETH9 ABI. The registry only needs to move |
| 11 | /// one wei in and back out again, and a narrower interface is a narrower |
| 12 | /// set of assumptions about what a candidate has to implement. |
| 13 | interface IWETH is IERC20 { |
| 14 | /// @notice Wrap the ether sent with this call, one for one. |
| 15 | function deposit() external payable; |
| 16 | |
| 17 | /// @notice Unwrap `amount`, burning the wrapper token and returning ether. |
| 18 | /// @param amount The wrapped ether to unwrap, in wei. |
| 19 | function withdraw(uint256 amount) external; |
| 20 | } |