julien/lovepublic Fork 0
a34c2e887f1d3af813774b021d2c9bfc47d4ac10
Commits
Clone
git clone https://git.rickub.com/julien/love.git
git clone ssh://git@rickub.com/julien/love.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

IWETH.sol · 20 lines · 863 BSolidity Blame HistoryRaw
add weth registry gated on bytecode 27d0645 julienbrg 8h ago1// SPDX-License-Identifier: MIT
2pragma solidity ^0.8.30;
3
4import {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.
13interface 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}