CompTimelockUpgradeable
Inherits: Initializable
Copyright 2020 Compound Labs, Inc. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
- Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
- Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
- Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
State Variables
GRACE_PERIOD
uint256 public constant GRACE_PERIOD = 14 days;
MINIMUM_DELAY
uint256 public constant MINIMUM_DELAY = 2 days;
MAXIMUM_DELAY
uint256 public constant MAXIMUM_DELAY = 30 days;
admin
address public admin;
pendingAdmin
address public pendingAdmin;
delay
uint256 public delay;
queuedTransactions
mapping(bytes32 => bool) public queuedTransactions;
Functions
__CompTimelock_init
function __CompTimelock_init(address admin_, uint256 delay_) internal onlyInitializing;
__CompTimelock_init_unchained
function __CompTimelock_init_unchained(address admin_, uint256 delay_) internal onlyInitializing;
receive
receive() external payable;
setDelay
function setDelay(uint256 delay_) public;
acceptAdmin
function acceptAdmin() public;
setPendingAdmin
function setPendingAdmin(address pendingAdmin_) public;
queueTransaction
function queueTransaction(address target, uint256 value, string memory signature, bytes memory data, uint256 eta)
public
returns (bytes32);
cancelTransaction
function cancelTransaction(address target, uint256 value, string memory signature, bytes memory data, uint256 eta)
public;
executeTransaction
function executeTransaction(address target, uint256 value, string memory signature, bytes memory data, uint256 eta)
public
payable
returns (bytes memory);
getBlockTimestamp
function getBlockTimestamp() internal view returns (uint256);
Events
NewAdmin
event NewAdmin(address indexed newAdmin);
NewPendingAdmin
event NewPendingAdmin(address indexed newPendingAdmin);
NewDelay
event NewDelay(uint256 indexed newDelay);
CancelTransaction
event CancelTransaction(
bytes32 indexed txHash, address indexed target, uint256 value, string signature, bytes data, uint256 eta
);
ExecuteTransaction
event ExecuteTransaction(
bytes32 indexed txHash, address indexed target, uint256 value, string signature, bytes data, uint256 eta
);
QueueTransaction
event QueueTransaction(
bytes32 indexed txHash, address indexed target, uint256 value, string signature, bytes data, uint256 eta
);