github.com/ethereum-optimism/optimism@v1.7.2/packages/contracts-bedrock/src/dispute/interfaces/IDelayedWETH.sol (about) 1 // SPDX-License-Identifier: MIT 2 pragma solidity ^0.8.0; 3 4 import { IWETH } from "src/dispute/interfaces/IWETH.sol"; 5 6 /// @title IDelayedWETH 7 /// @notice Interface for the DelayedWETH contract. 8 interface IDelayedWETH is IWETH { 9 /// @notice Represents a withdrawal request. 10 struct WithdrawalRequest { 11 uint256 amount; 12 uint256 timestamp; 13 } 14 15 /// @notice Emitted when an unwrap is started. 16 /// @param src The address that started the unwrap. 17 /// @param wad The amount of WETH that was unwrapped. 18 event Unwrap(address indexed src, uint256 wad); 19 20 /// @notice Returns the withdrawal delay in seconds. 21 /// @return The withdrawal delay in seconds. 22 function delay() external view returns (uint256); 23 24 /// @notice Returns a withdrawal request for the given address. 25 /// @param _owner The address to query the withdrawal request of. 26 /// @param _guy Sub-account to query the withdrawal request of. 27 /// @return The withdrawal request for the given address-subaccount pair. 28 function withdrawals(address _owner, address _guy) external view returns (uint256, uint256); 29 30 /// @notice Unlocks withdrawals for the sender's account, after a time delay. 31 /// @param _guy Sub-account to unlock. 32 /// @param _wad The amount of WETH to unlock. 33 function unlock(address _guy, uint256 _wad) external; 34 35 /// @notice Extension to withdrawal, must provide a sub-account to withdraw from. 36 /// @param _guy Sub-account to withdraw from. 37 /// @param _wad The amount of WETH to withdraw. 38 function withdraw(address _guy, uint256 _wad) external; 39 40 /// @notice Allows the owner to recover from error cases by pulling ETH out of the contract. 41 /// @param _wad The amount of WETH to recover. 42 function recover(uint256 _wad) external; 43 44 /// @notice Allows the owner to recover from error cases by pulling ETH from a specific owner. 45 /// @param _guy The address to recover the WETH from. 46 /// @param _wad The amount of WETH to recover. 47 function hold(address _guy, uint256 _wad) external; 48 }