Contract 0x31510CB811E5ea0F484b84a04573Ba2d288d4426 1

Contract Overview

Balance:
0 AVAX
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x82e1bd5880210115cc208383a36b32341339242626ebbcf0b1d2c8a671502e69Execute Transact...46302652022-01-09 13:39:55260 days 19 hrs ago0x3f09e942b0089b8af73ccb9603da8064b6c4b637 IN 0x31510cb811e5ea0f484b84a04573ba2d288d44260 AVAX0.0011850525
0x0bd4956da5908e0ecaff9d7f1c90434bff955d15fcfb9fe9a7cff94e11bcc4b6Queue Transactio...46060162022-01-08 23:01:58261 days 9 hrs ago0x3f09e942b0089b8af73ccb9603da8064b6c4b637 IN 0x31510cb811e5ea0f484b84a04573ba2d288d44260 AVAX0.00139462525
0xd217ab9ea2d0c312418990f8df6b26bcce6c514955091bc46d0d32068019a4910x6080604043870212022-01-03 14:25:31266 days 18 hrs ago0x3f09e942b0089b8af73ccb9603da8064b6c4b637 IN  Contract Creation0 AVAX0.02355322525
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x82e1bd5880210115cc208383a36b32341339242626ebbcf0b1d2c8a671502e6946302652022-01-09 13:39:55260 days 19 hrs ago 0x31510cb811e5ea0f484b84a04573ba2d288d44260xcca7a3b74919aec8387b99f21f92221ea35cc0160 AVAX
[ Download CSV Export 
Loading

Similar Match Source Code
Note: This contract matches the deployed ByteCode of the Source Code for Contract 0xfe836357b4c31798C65265D177C0412A5138abfE

Contract Name:
Timelock

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, None license

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 1 : Timelock.sol
pragma solidity 0.8.6;


// Taken from https://github.com/compound-finance/compound-protocol/blob/master/contracts/Timelock.sol
// and updated for solidity v0.8.6
contract Timelock {
    event NewAdmin(address indexed newAdmin);
    event NewPendingAdmin(address indexed newPendingAdmin);
    event NewDelay(uint indexed newDelay);
    event CancelTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature,  bytes data, uint eta);
    event ExecuteTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature,  bytes data, uint eta);
    event QueueTransaction(bytes32 indexed txHash, address indexed target, uint value, string signature, bytes data, uint eta);

    uint public constant GRACE_PERIOD = 14 days;
    uint public constant MINIMUM_DELAY = 12 hours;
    uint public constant MAXIMUM_DELAY = 30 days;

    address public admin;
    address public pendingAdmin;
    uint public delay;

    mapping (bytes32 => bool) public queuedTransactions;


    constructor(address admin_, uint delay_) {
        require(delay_ >= MINIMUM_DELAY, "Timelock::constructor: Delay must exceed minimum delay.");
        require(delay_ <= MAXIMUM_DELAY, "Timelock::setDelay: Delay must not exceed maximum delay.");

        admin = admin_;
        delay = delay_;
    }

    receive() external payable {}

    function setDelay(uint delay_) public {
        require(msg.sender == address(this), "Timelock::setDelay: Call must come from Timelock.");
        require(delay_ >= MINIMUM_DELAY, "Timelock::setDelay: Delay must exceed minimum delay.");
        require(delay_ <= MAXIMUM_DELAY, "Timelock::setDelay: Delay must not exceed maximum delay.");
        delay = delay_;

        emit NewDelay(delay);
    }

    function acceptAdmin() public {
        require(msg.sender == pendingAdmin, "Timelock::acceptAdmin: Call must come from pendingAdmin.");
        admin = msg.sender;
        pendingAdmin = address(0);

        emit NewAdmin(admin);
    }

    function setPendingAdmin(address pendingAdmin_) public {
        require(msg.sender == address(this), "Timelock::setPendingAdmin: Call must come from Timelock.");
        pendingAdmin = pendingAdmin_;

        emit NewPendingAdmin(pendingAdmin);
    }

    function queueTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public returns (bytes32) {
        require(msg.sender == admin, "Timelock::queueTransaction: Call must come from admin.");
        require(eta >= getBlockTimestamp() + delay, "Timelock::queueTransaction: Estimated execution block must satisfy delay.");

        bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));
        queuedTransactions[txHash] = true;

        emit QueueTransaction(txHash, target, value, signature, data, eta);
        return txHash;
    }

    function cancelTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public {
        require(msg.sender == admin, "Timelock::cancelTransaction: Call must come from admin.");

        bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));
        queuedTransactions[txHash] = false;

        emit CancelTransaction(txHash, target, value, signature, data, eta);
    }

    function executeTransaction(address target, uint value, string memory signature, bytes memory data, uint eta) public payable returns (bytes memory) {
        require(msg.sender == admin, "Timelock::executeTransaction: Call must come from admin.");

        bytes32 txHash = keccak256(abi.encode(target, value, signature, data, eta));
        require(queuedTransactions[txHash], "Timelock::executeTransaction: Transaction hasn't been queued.");
        require(getBlockTimestamp() >= eta, "Timelock::executeTransaction: Transaction hasn't surpassed time lock.");
        require(getBlockTimestamp() <= eta + GRACE_PERIOD, "Timelock::executeTransaction: Transaction is stale.");

        queuedTransactions[txHash] = false;

        bytes memory callData;

        if (bytes(signature).length == 0) {
            callData = data;
        } else {
            callData = abi.encodePacked(bytes4(keccak256(bytes(signature))), data);
        }

        // solium-disable-next-line security/no-call-value
        (bool success, bytes memory returnData) = target.call{value: value}(callData);
        require(success, "Timelock::executeTransaction: Transaction execution reverted.");

        emit ExecuteTransaction(txHash, target, value, signature, data, eta);

        return returnData;
    }

    function getBlockTimestamp() internal view returns (uint) {
        // solium-disable-next-line security/no-block-members
        return block.timestamp;
    }
}

Settings
{
  "evmVersion": "istanbul",
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"address","name":"admin_","type":"address"},{"internalType":"uint256","name":"delay_","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"txHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"string","name":"signature","type":"string"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"eta","type":"uint256"}],"name":"CancelTransaction","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"txHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"string","name":"signature","type":"string"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"eta","type":"uint256"}],"name":"ExecuteTransaction","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newAdmin","type":"address"}],"name":"NewAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"newDelay","type":"uint256"}],"name":"NewDelay","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newPendingAdmin","type":"address"}],"name":"NewPendingAdmin","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"txHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"target","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"},{"indexed":false,"internalType":"string","name":"signature","type":"string"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"eta","type":"uint256"}],"name":"QueueTransaction","type":"event"},{"inputs":[],"name":"GRACE_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAXIMUM_DELAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINIMUM_DELAY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"string","name":"signature","type":"string"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"eta","type":"uint256"}],"name":"cancelTransaction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"delay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"string","name":"signature","type":"string"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"eta","type":"uint256"}],"name":"executeTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"pendingAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"string","name":"signature","type":"string"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"eta","type":"uint256"}],"name":"queueTransaction","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"queuedTransactions","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"delay_","type":"uint256"}],"name":"setDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"pendingAdmin_","type":"address"}],"name":"setPendingAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

608060405234801561001057600080fd5b506040516110c23803806110c283398101604081905261002f9161014e565b61a8c08110156100ac5760405162461bcd60e51b815260206004820152603760248201527f54696d656c6f636b3a3a636f6e7374727563746f723a2044656c6179206d757360448201527f7420657863656564206d696e696d756d2064656c61792e00000000000000000060648201526084015b60405180910390fd5b62278d008111156101255760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e60448201527f6f7420657863656564206d6178696d756d2064656c61792e000000000000000060648201526084016100a3565b600080546001600160a01b0319166001600160a01b039390931692909217909155600255610188565b6000806040838503121561016157600080fd5b82516001600160a01b038116811461017857600080fd5b6020939093015192949293505050565b610f2b806101976000396000f3fe6080604052600436106100c65760003560e01c80636a42b8f81161007f578063c1a287e211610059578063c1a287e2146101fb578063e177246e14610212578063f2b0653714610232578063f851a4401461027257600080fd5b80636a42b8f8146101b85780637d645fab146101ce578063b1b43ae5146101e557600080fd5b80630825f38f146100d25780630e18b681146100fb57806326782247146101125780633a66f9011461014a5780634dd18bf514610178578063591fcdfe1461019857600080fd5b366100cd57005b600080fd5b6100e56100e0366004610c8a565b610292565b6040516100f29190610e19565b60405180910390f35b34801561010757600080fd5b50610110610603565b005b34801561011e57600080fd5b50600154610132906001600160a01b031681565b6040516001600160a01b0390911681526020016100f2565b34801561015657600080fd5b5061016a610165366004610c8a565b6106cc565b6040519081526020016100f2565b34801561018457600080fd5b50610110610193366004610c68565b610879565b3480156101a457600080fd5b506101106101b3366004610c8a565b610938565b3480156101c457600080fd5b5061016a60025481565b3480156101da57600080fd5b5061016a62278d0081565b3480156101f157600080fd5b5061016a61a8c081565b34801561020757600080fd5b5061016a6212750081565b34801561021e57600080fd5b5061011061022d366004610d3b565b610a52565b34801561023e57600080fd5b5061026261024d366004610d3b565b60036020526000908152604090205460ff1681565b60405190151581526020016100f2565b34801561027e57600080fd5b50600054610132906001600160a01b031681565b6000546060906001600160a01b0316331461031a5760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20436160448201527f6c6c206d75737420636f6d652066726f6d2061646d696e2e000000000000000060648201526084015b60405180910390fd5b60008686868686604051602001610335959493929190610dcd565b60408051601f1981840301815291815281516020928301206000818152600390935291205490915060ff166103c05760405162461bcd60e51b815260206004820152603d6024820152600080516020610ed683398151915260448201527f616e73616374696f6e206861736e2774206265656e207175657565642e0000006064820152608401610311565b824210156104325760405162461bcd60e51b81526020600482015260456024820152600080516020610ed683398151915260448201527f616e73616374696f6e206861736e2774207375727061737365642074696d65206064820152643637b1b59760d91b608482015260a401610311565b61043f6212750084610e69565b4211156104985760405162461bcd60e51b81526020600482015260336024820152600080516020610ed683398151915260448201527230b739b0b1ba34b7b71034b99039ba30b6329760691b6064820152608401610311565b6000818152600360205260409020805460ff1916905584516060906104be5750836104ea565b8580519060200120856040516020016104d8929190610d80565b60405160208183030381529060405290505b600080896001600160a01b031689846040516105069190610db1565b60006040518083038185875af1925050503d8060008114610543576040519150601f19603f3d011682016040523d82523d6000602084013e610548565b606091505b5091509150816105ae5760405162461bcd60e51b815260206004820152603d6024820152600080516020610ed683398151915260448201527f616e73616374696f6e20657865637574696f6e2072657665727465642e0000006064820152608401610311565b896001600160a01b0316847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78b8b8b8b6040516105ee9493929190610e2c565b60405180910390a39998505050505050505050565b6001546001600160a01b031633146106835760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737460448201527f20636f6d652066726f6d2070656e64696e6741646d696e2e00000000000000006064820152608401610311565b60008054336001600160a01b0319918216811783556001805490921690915560405190917f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91a2565b600080546001600160a01b031633146107465760405162461bcd60e51b815260206004820152603660248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c6044820152751036bab9ba1031b7b6b290333937b69030b236b4b71760511b6064820152608401610311565b6002546107539042610e69565b8210156107da5760405162461bcd60e51b815260206004820152604960248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a204573746960448201527f6d6174656420657865637574696f6e20626c6f636b206d757374207361746973606482015268333c903232b630bc9760b91b608482015260a401610311565b600086868686866040516020016107f5959493929190610dcd565b60408051601f19818403018152828252805160209182012060008181526003909252919020805460ff1916600117905591506001600160a01b0388169082907f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f90610867908a908a908a908a90610e2c565b60405180910390a39695505050505050565b3330146108ee5760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c2060448201527f6d75737420636f6d652066726f6d2054696d656c6f636b2e00000000000000006064820152608401610311565b600180546001600160a01b0319166001600160a01b0383169081179091556040517f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b6000546001600160a01b031633146109b85760405162461bcd60e51b815260206004820152603760248201527f54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c60448201527f6c206d75737420636f6d652066726f6d2061646d696e2e0000000000000000006064820152608401610311565b600085858585856040516020016109d3959493929190610dcd565b60408051601f19818403018152828252805160209182012060008181526003909252919020805460ff1916905591506001600160a01b0387169082907f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8790610a42908990899089908990610e2c565b60405180910390a3505050505050565b333014610abb5760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f60448201527036b290333937b6902a34b6b2b637b1b59760791b6064820152608401610311565b61a8c0811015610b2a5760405162461bcd60e51b815260206004820152603460248201527f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420656044820152733c31b2b2b21036b4b734b6bab6903232b630bc9760611b6064820152608401610311565b62278d00811115610ba35760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e60448201527f6f7420657863656564206d6178696d756d2064656c61792e00000000000000006064820152608401610311565b600281905560405181907f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90600090a250565b600067ffffffffffffffff80841115610bf157610bf1610ebf565b604051601f8501601f19908116603f01168101908282118183101715610c1957610c19610ebf565b81604052809350858152868686011115610c3257600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b0381168114610c6357600080fd5b919050565b600060208284031215610c7a57600080fd5b610c8382610c4c565b9392505050565b600080600080600060a08688031215610ca257600080fd5b610cab86610c4c565b945060208601359350604086013567ffffffffffffffff80821115610ccf57600080fd5b818801915088601f830112610ce357600080fd5b610cf289833560208501610bd6565b94506060880135915080821115610d0857600080fd5b508601601f81018813610d1a57600080fd5b610d2988823560208401610bd6565b95989497509295608001359392505050565b600060208284031215610d4d57600080fd5b5035919050565b60008151808452610d6c816020860160208601610e8f565b601f01601f19169290920160200192915050565b6001600160e01b0319831681528151600090610da3816004850160208701610e8f565b919091016004019392505050565b60008251610dc3818460208701610e8f565b9190910192915050565b60018060a01b038616815284602082015260a060408201526000610df460a0830186610d54565b8281036060840152610e068186610d54565b9150508260808301529695505050505050565b602081526000610c836020830184610d54565b848152608060208201526000610e456080830186610d54565b8281036040840152610e578186610d54565b91505082606083015295945050505050565b60008219821115610e8a57634e487b7160e01b600052601160045260246000fd5b500190565b60005b83811015610eaa578181015183820152602001610e92565b83811115610eb9576000848401525b50505050565b634e487b7160e01b600052604160045260246000fdfe54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472a2646970667358221220226101a8631e6ea518cf5b178c6f5115e944c282af87b1d2a2d335e863e050ae64736f6c634300080600330000000000000000000000003f09e942b0089b8af73ccb9603da8064b6c4b637000000000000000000000000000000000000000000000000000000000000a8c0

Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading