Contract 0x26f0f1ECD9fB1741D65099f4952c4e973cdCd50e

 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0x0568927a18d1be189acc523e3e7b761b18e6f2029c1440e6fa6946f86412218d0x60806040181768442021-10-03 0:54:12363 days 34 mins agoCoffin Finance: Deployer IN  Create: Timelock0 FTM0.194103475645
[ Download CSV Export 
Latest 1 internal transaction
Parent Txn Hash Block From To Value
0x0568927a18d1be189acc523e3e7b761b18e6f2029c1440e6fa6946f86412218d181768442021-10-03 0:54:12363 days 34 mins ago Coffin Finance: Deployer  Contract Creation0 FTM
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Timelock

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 1 : Timelock.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.7;

contract Timelock {
    event NewAdmin(address indexed newAdmin);
    event NewPendingAdmin(address indexed newPendingAdmin);
    event NewDelay(uint256 indexed newDelay);
    event CancelTransaction(
        bytes32 indexed txHash,
        address indexed target,
        uint256 value,
        string signature,
        bytes data,
        uint256 eta
    );
    event ExecuteTransaction(
        bytes32 indexed txHash,
        address indexed target,
        uint256 value,
        string signature,
        bytes data,
        uint256 eta
    );
    event QueueTransaction(
        bytes32 indexed txHash,
        address indexed target,
        uint256 value,
        string signature,
        bytes data,
        uint256 eta
    );

    uint256 public constant GRACE_PERIOD = 14 days;
    uint256 public constant MINIMUM_DELAY = 2 hours;
    uint256 public constant MAXIMUM_DELAY = 30 days;

    address public admin;
    address public pendingAdmin;
    uint256 public delay;

    mapping(bytes32 => bool) public queuedTransactions;

    constructor(address admin_, uint256 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_;
    }

    function setDelay(uint256 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,
        uint256 value,
        string memory signature,
        bytes memory data,
        uint256 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,
        uint256 value,
        string memory signature,
        bytes memory data,
        uint256 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,
        uint256 value,
        string memory signature,
        bytes memory data,
        uint256 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);
        }

        // Execute the call
        (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 (uint256) {
        return block.timestamp;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "none",
    "useLiteralContent": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

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"}]

608060405234801561001057600080fd5b5060405161108e38038061108e83398101604081905261002f9161014e565b611c208110156100ac5760405162461bcd60e51b815260206004820152603760248201527f54696d656c6f636b3a3a636f6e7374727563746f723a2044656c6179206d757360448201527f7420657863656564206d696e696d756d2064656c61792e00000000000000000060648201526084015b60405180910390fd5b62278d008111156101255760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e60448201527f6f7420657863656564206d6178696d756d2064656c61792e000000000000000060648201526084016100a3565b600080546001600160a01b0319166001600160a01b039390931692909217909155600255610188565b6000806040838503121561016157600080fd5b82516001600160a01b038116811461017857600080fd5b6020939093015192949293505050565b610ef7806101976000396000f3fe6080604052600436106100c25760003560e01c80636a42b8f81161007f578063c1a287e211610059578063c1a287e2146101f0578063e177246e14610207578063f2b0653714610227578063f851a4401461026757600080fd5b80636a42b8f8146101ad5780637d645fab146101c3578063b1b43ae5146101da57600080fd5b80630825f38f146100c75780630e18b681146100f057806326782247146101075780633a66f9011461013f5780634dd18bf51461016d578063591fcdfe1461018d575b600080fd5b6100da6100d5366004610c7f565b610287565b6040516100e79190610e0e565b60405180910390f35b3480156100fc57600080fd5b506101056105f8565b005b34801561011357600080fd5b50600154610127906001600160a01b031681565b6040516001600160a01b0390911681526020016100e7565b34801561014b57600080fd5b5061015f61015a366004610c7f565b6106c1565b6040519081526020016100e7565b34801561017957600080fd5b50610105610188366004610c5d565b61086e565b34801561019957600080fd5b506101056101a8366004610c7f565b61092d565b3480156101b957600080fd5b5061015f60025481565b3480156101cf57600080fd5b5061015f62278d0081565b3480156101e657600080fd5b5061015f611c2081565b3480156101fc57600080fd5b5061015f6212750081565b34801561021357600080fd5b50610105610222366004610d30565b610a47565b34801561023357600080fd5b50610257610242366004610d30565b60036020526000908152604090205460ff1681565b60405190151581526020016100e7565b34801561027357600080fd5b50600054610127906001600160a01b031681565b6000546060906001600160a01b0316331461030f5760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a20436160448201527f6c6c206d75737420636f6d652066726f6d2061646d696e2e000000000000000060648201526084015b60405180910390fd5b6000868686868660405160200161032a959493929190610dc2565b60408051601f1981840301815291815281516020928301206000818152600390935291205490915060ff166103b55760405162461bcd60e51b815260206004820152603d6024820152600080516020610ecb83398151915260448201527f616e73616374696f6e206861736e2774206265656e207175657565642e0000006064820152608401610306565b824210156104275760405162461bcd60e51b81526020600482015260456024820152600080516020610ecb83398151915260448201527f616e73616374696f6e206861736e2774207375727061737365642074696d65206064820152643637b1b59760d91b608482015260a401610306565b6104346212750084610e5e565b42111561048d5760405162461bcd60e51b81526020600482015260336024820152600080516020610ecb83398151915260448201527230b739b0b1ba34b7b71034b99039ba30b6329760691b6064820152608401610306565b6000818152600360205260409020805460ff1916905584516060906104b35750836104df565b8580519060200120856040516020016104cd929190610d75565b60405160208183030381529060405290505b600080896001600160a01b031689846040516104fb9190610da6565b60006040518083038185875af1925050503d8060008114610538576040519150601f19603f3d011682016040523d82523d6000602084013e61053d565b606091505b5091509150816105a35760405162461bcd60e51b815260206004820152603d6024820152600080516020610ecb83398151915260448201527f616e73616374696f6e20657865637574696f6e2072657665727465642e0000006064820152608401610306565b896001600160a01b0316847fa560e3198060a2f10670c1ec5b403077ea6ae93ca8de1c32b451dc1a943cd6e78b8b8b8b6040516105e39493929190610e21565b60405180910390a39998505050505050505050565b6001546001600160a01b031633146106785760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a61636365707441646d696e3a2043616c6c206d75737460448201527f20636f6d652066726f6d2070656e64696e6741646d696e2e00000000000000006064820152608401610306565b60008054336001600160a01b0319918216811783556001805490921690915560405190917f71614071b88dee5e0b2ae578a9dd7b2ebbe9ae832ba419dc0242cd065a290b6c91a2565b600080546001600160a01b0316331461073b5760405162461bcd60e51b815260206004820152603660248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a2043616c6c6044820152751036bab9ba1031b7b6b290333937b69030b236b4b71760511b6064820152608401610306565b6002546107489042610e5e565b8210156107cf5760405162461bcd60e51b815260206004820152604960248201527f54696d656c6f636b3a3a71756575655472616e73616374696f6e3a204573746960448201527f6d6174656420657865637574696f6e20626c6f636b206d757374207361746973606482015268333c903232b630bc9760b91b608482015260a401610306565b600086868686866040516020016107ea959493929190610dc2565b60408051601f19818403018152828252805160209182012060008181526003909252919020805460ff1916600117905591506001600160a01b0388169082907f76e2796dc3a81d57b0e8504b647febcbeeb5f4af818e164f11eef8131a6a763f9061085c908a908a908a908a90610e21565b60405180910390a39695505050505050565b3330146108e35760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a73657450656e64696e6741646d696e3a2043616c6c2060448201527f6d75737420636f6d652066726f6d2054696d656c6f636b2e00000000000000006064820152608401610306565b600180546001600160a01b0319166001600160a01b0383169081179091556040517f69d78e38a01985fbb1462961809b4b2d65531bc93b2b94037f3334b82ca4a75690600090a250565b6000546001600160a01b031633146109ad5760405162461bcd60e51b815260206004820152603760248201527f54696d656c6f636b3a3a63616e63656c5472616e73616374696f6e3a2043616c60448201527f6c206d75737420636f6d652066726f6d2061646d696e2e0000000000000000006064820152608401610306565b600085858585856040516020016109c8959493929190610dc2565b60408051601f19818403018152828252805160209182012060008181526003909252919020805460ff1916905591506001600160a01b0387169082907f2fffc091a501fd91bfbff27141450d3acb40fb8e6d8382b243ec7a812a3aaf8790610a37908990899089908990610e21565b60405180910390a3505050505050565b333014610ab05760405162461bcd60e51b815260206004820152603160248201527f54696d656c6f636b3a3a73657444656c61793a2043616c6c206d75737420636f60448201527036b290333937b6902a34b6b2b637b1b59760791b6064820152608401610306565b611c20811015610b1f5760405162461bcd60e51b815260206004820152603460248201527f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d75737420656044820152733c31b2b2b21036b4b734b6bab6903232b630bc9760611b6064820152608401610306565b62278d00811115610b985760405162461bcd60e51b815260206004820152603860248201527f54696d656c6f636b3a3a73657444656c61793a2044656c6179206d757374206e60448201527f6f7420657863656564206d6178696d756d2064656c61792e00000000000000006064820152608401610306565b600281905560405181907f948b1f6a42ee138b7e34058ba85a37f716d55ff25ff05a763f15bed6a04c8d2c90600090a250565b600067ffffffffffffffff80841115610be657610be6610eb4565b604051601f8501601f19908116603f01168101908282118183101715610c0e57610c0e610eb4565b81604052809350858152868686011115610c2757600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b0381168114610c5857600080fd5b919050565b600060208284031215610c6f57600080fd5b610c7882610c41565b9392505050565b600080600080600060a08688031215610c9757600080fd5b610ca086610c41565b945060208601359350604086013567ffffffffffffffff80821115610cc457600080fd5b818801915088601f830112610cd857600080fd5b610ce789833560208501610bcb565b94506060880135915080821115610cfd57600080fd5b508601601f81018813610d0f57600080fd5b610d1e88823560208401610bcb565b95989497509295608001359392505050565b600060208284031215610d4257600080fd5b5035919050565b60008151808452610d61816020860160208601610e84565b601f01601f19169290920160200192915050565b6001600160e01b0319831681528151600090610d98816004850160208701610e84565b919091016004019392505050565b60008251610db8818460208701610e84565b9190910192915050565b60018060a01b038616815284602082015260a060408201526000610de960a0830186610d49565b8281036060840152610dfb8186610d49565b9150508260808301529695505050505050565b602081526000610c786020830184610d49565b848152608060208201526000610e3a6080830186610d49565b8281036040840152610e4c8186610d49565b91505082606083015295945050505050565b60008219821115610e7f57634e487b7160e01b600052601160045260246000fd5b500190565b60005b83811015610e9f578181015183820152602001610e87565b83811115610eae576000848401525b50505050565b634e487b7160e01b600052604160045260246000fdfe54696d656c6f636b3a3a657865637574655472616e73616374696f6e3a205472a164736f6c6343000807000a00000000000000000000000023ab88eef24ad383a2dff9e10aedf3a5eee71b800000000000000000000000000000000000000000000000000000000000127500

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

00000000000000000000000023ab88eef24ad383a2dff9e10aedf3a5eee71b800000000000000000000000000000000000000000000000000000000000127500

-----Decoded View---------------
Arg [0] : admin_ (address): 0x23ab88eef24ad383a2dff9e10aedf3a5eee71b80
Arg [1] : delay_ (uint256): 1209600

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 00000000000000000000000023ab88eef24ad383a2dff9e10aedf3a5eee71b80
Arg [1] : 0000000000000000000000000000000000000000000000000000000000127500


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Validator ID :
0 FTM

Amount Staked
0

Amount Delegated
0

Staking Total
0

Staking Start Epoch
0

Staking Start Time
0

Proof of Importance
0

Origination Score
0

Validation Score
0

Active
0

Online
0

Downtime
0 s
Address Amount claimed Rewards Created On Epoch Created On
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.