julien/lovepublic Fork 0
main
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
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.30;

import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";

/// @title IWETH
/// @author Julien Béranger
/// @notice The wrapped-ether surface `WETHRegistry` probes: ERC-20, plus the
///         two entrypoints that make a wrapper a wrapper.
/// @dev Deliberately not the full WETH9 ABI. The registry only needs to move
///      one wei in and back out again, and a narrower interface is a narrower
///      set of assumptions about what a candidate has to implement.
interface IWETH is IERC20 {
    /// @notice Wrap the ether sent with this call, one for one.
    function deposit() external payable;

    /// @notice Unwrap `amount`, burning the wrapper token and returning ether.
    /// @param amount The wrapped ether to unwrap, in wei.
    function withdraw(uint256 amount) external;
}