ETH Price: $3,089.33 (-2.60%)
Gas: 4.3 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Approve205142202024-08-12 18:07:23169 days ago1723486043IN
ENS Nametradinghourscoin.eth
0 ETH0.000357567.70105755
Approve199931222024-05-31 23:34:35242 days ago1717198475IN
ENS Nametradinghourscoin.eth
0 ETH0.000297056.3978536
Approve198402982024-05-10 14:41:23264 days ago1715352083IN
ENS Nametradinghourscoin.eth
0 ETH0.00041378.9102168
Approve197340522024-04-25 18:04:23278 days ago1714068263IN
ENS Nametradinghourscoin.eth
0 ETH0.0003847115.93285683
Approve197340222024-04-25 17:58:23278 days ago1714067903IN
ENS Nametradinghourscoin.eth
0 ETH0.0006788614.62128479
Approve196948472024-04-20 6:29:47284 days ago1713594587IN
ENS Nametradinghourscoin.eth
0 ETH0.000340247.32817251
Approve193862832024-03-07 22:29:35327 days ago1709850575IN
ENS Nametradinghourscoin.eth
0 ETH0.0029166363.16071363
Approve193767612024-03-06 14:34:59329 days ago1709735699IN
ENS Nametradinghourscoin.eth
0 ETH0.00278176104.61686453
Approve193767612024-03-06 14:34:59329 days ago1709735699IN
ENS Nametradinghourscoin.eth
0 ETH0.00278176104.61686453
Approve193767612024-03-06 14:34:59329 days ago1709735699IN
ENS Nametradinghourscoin.eth
0 ETH0.00486363104.61686453
Approve193533342024-03-03 8:04:59332 days ago1709453099IN
ENS Nametradinghourscoin.eth
0 ETH0.0021713746.70626433
Approve193532962024-03-03 7:57:23332 days ago1709452643IN
ENS Nametradinghourscoin.eth
0 ETH0.0019948442.96449922
Approve193344192024-02-29 16:40:23334 days ago1709224823IN
ENS Nametradinghourscoin.eth
0 ETH0.0033240671.89038897
Approve193340692024-02-29 15:29:47334 days ago1709220587IN
ENS Nametradinghourscoin.eth
0 ETH0.0036764379.51117946
Approve193055312024-02-25 15:35:59338 days ago1708875359IN
ENS Nametradinghourscoin.eth
0 ETH0.0015302832.95893104
Approve192783382024-02-21 20:14:35342 days ago1708546475IN
ENS Nametradinghourscoin.eth
0 ETH0.0020307643.97696058
Approve192773592024-02-21 16:56:47342 days ago1708534607IN
ENS Nametradinghourscoin.eth
0 ETH0.0022373248.18709015
Approve192698242024-02-20 15:32:35343 days ago1708443155IN
ENS Nametradinghourscoin.eth
0 ETH0.0036724179.09579863
Approve192321892024-02-15 8:38:35349 days ago1707986315IN
ENS Nametradinghourscoin.eth
0 ETH0.000878718.90092626
Approve192321522024-02-15 8:31:11349 days ago1707985871IN
ENS Nametradinghourscoin.eth
0 ETH0.0008824319.00570284
Approve192321272024-02-15 8:26:11349 days ago1707985571IN
ENS Nametradinghourscoin.eth
0 ETH0.0009621620.72287448
Approve191638142024-02-05 18:22:59358 days ago1707157379IN
ENS Nametradinghourscoin.eth
0 ETH0.0011258524.38067333
Approve190859722024-01-25 20:19:35369 days ago1706213975IN
ENS Nametradinghourscoin.eth
0 ETH0.0007014323.91511537
Approve190859612024-01-25 20:17:23369 days ago1706213843IN
ENS Nametradinghourscoin.eth
0 ETH0.001056522.89671047
Approve189853742024-01-11 18:10:11383 days ago1704996611IN
ENS Nametradinghourscoin.eth
0 ETH0.0013310728.66839863
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
TradingHoursCoin

Compiler Version
v0.8.23+commit.f704f362

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 5 : TradingHoursCoin.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.23;

import {ERC20} from 'lib/solmate/src/tokens/ERC20.sol';
import {Ownable} from 'lib/openzeppelin-contracts/contracts/access/Ownable.sol';
import {BokkyPooBahsDateTimeLibrary} from "./BokkyPooBahsDateTimeLibrary.sol";

/*
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•— β–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•—β–ˆβ–ˆβ•—  β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β–ˆβ–ˆβ•”β•β•β•β•β•β•šβ•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•”β•β•β•β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ•—  β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘ β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•”β•β•β•β•β•
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β–ˆβ–ˆβ•— β–ˆβ–ˆβ•‘β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β• β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•—
β•šβ•β•β•β•β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘β•šβ–ˆβ–ˆβ•—β–ˆβ–ˆβ•‘β–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•— β•šβ•β•β•β•β–ˆβ–ˆβ•‘
β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘   β–ˆβ–ˆβ•‘   β•šβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•”β•β–ˆβ–ˆβ•‘ β•šβ–ˆβ–ˆβ–ˆβ–ˆβ•‘β–ˆβ–ˆβ•‘  β–ˆβ–ˆβ•—β–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ–ˆβ•‘
β•šβ•β•β•β•β•β•β•   β•šβ•β•    β•šβ•β•β•β•β•β• β•šβ•β•  β•šβ•β•β•β•β•šβ•β•  β•šβ•β•β•šβ•β•β•β•β•β•β•
*/

/**
 * @title Trading hours ERC20 Token
 * @notice A fun and innovative approach to balanced crypto trading. Operates only during standard trading hours.
 * @dev ERC20 Token that can be transferred only during standard trading hours,
 * taking into account Daylight Saving Time adjustments.
 * Inherits from solmate ERC20 and openzeppelin Ownable contracts.
 */
contract TradingHoursCoin is ERC20, Ownable {
    using BokkyPooBahsDateTimeLibrary for uint256;

    uint256 public hoursToSub; 

    // 32 byte error string
    string private constant ERROR_STRING = "Trading closed. Try again later.";

    constructor() ERC20('Trading Hours Coin', 'THC', 18) {
        // one billion coin total supply
        _mint(msg.sender, 1000000000 ether);
        adjustDST();
    }
    /**
    * @notice Function to manually trigger DST adjustment based on the current date
    * any wallet can call this function by design
    */
    function adjustDST() public {
        uint256 timestamp = block.timestamp;
        uint256 month = BokkyPooBahsDateTimeLibrary.getMonth(timestamp);
        uint256 day = BokkyPooBahsDateTimeLibrary.getDay(timestamp);

        if ((month > 3 && month < 11) 
        || (month == 3 && day >= secondSundayOfMarch(BokkyPooBahsDateTimeLibrary.getYear(timestamp))) 
        || (month == 11 && day < firstSundayOfNovember(BokkyPooBahsDateTimeLibrary.getYear(timestamp)))) {
            hoursToSub = 4; // DST is UTC-4
        } else {
            hoursToSub = 5; // Non-DST is UTC-5
        }
    }

    // Helper functions to determine the second Sunday of March and the first Sunday of November
    function secondSundayOfMarch(uint year) private pure returns (uint) {
        uint256 day = 8; // March 8 is the earliest possible second Sunday
        while (BokkyPooBahsDateTimeLibrary.getDayOfWeek(BokkyPooBahsDateTimeLibrary.timestampFromDate(year, 3, day)) != 7) {
            unchecked {
                day++;
            }
        }
        return day;
    }

    function firstSundayOfNovember(uint year) private pure returns (uint) {
        uint256 day = 1; // November 1 is the earliest possible first Sunday
        while (BokkyPooBahsDateTimeLibrary.getDayOfWeek(BokkyPooBahsDateTimeLibrary.timestampFromDate(year, 11, day)) != 7) {
            unchecked{
                day++;
            }
        }
        return day;
    }

    // Override ERC20 transfer functions to check if trading is closed
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public override returns (bool) {
        if(isTradingClosed()){
            revert(ERROR_STRING);
        }
        return super.transferFrom(from, to, amount);
    }

    function transfer(address to, uint256 amount) public override returns (bool) {
        if(isTradingClosed()){
            revert(ERROR_STRING);
        }
        return super.transfer(to, amount);
    }

    function isTradingClosed() public view returns(bool) {
        uint256 timestamp = getAdjustedTimestamp();
        bool isWeekend = BokkyPooBahsDateTimeLibrary.isWeekEnd(timestamp);

        if(isWeekend) {
            return true;
        }

        uint256 hour = BokkyPooBahsDateTimeLibrary.getHour(timestamp);
        uint256 minute = BokkyPooBahsDateTimeLibrary.getMinute(timestamp);

        if(hour < 9 || hour > 15) {
            return true;
        }

        if(hour == 9 && minute < 30) {
            return true;
        }

        return false;
    }

    function getAdjustedTimestamp() public view returns(uint timestamp) {
        return BokkyPooBahsDateTimeLibrary.subHours(block.timestamp, hoursToSub);
    }
}

File 2 of 5 : ERC20.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/transmissions11/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
    /*//////////////////////////////////////////////////////////////
                                 EVENTS
    //////////////////////////////////////////////////////////////*/

    event Transfer(address indexed from, address indexed to, uint256 amount);

    event Approval(address indexed owner, address indexed spender, uint256 amount);

    /*//////////////////////////////////////////////////////////////
                            METADATA STORAGE
    //////////////////////////////////////////////////////////////*/

    string public name;

    string public symbol;

    uint8 public immutable decimals;

    /*//////////////////////////////////////////////////////////////
                              ERC20 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 public totalSupply;

    mapping(address => uint256) public balanceOf;

    mapping(address => mapping(address => uint256)) public allowance;

    /*//////////////////////////////////////////////////////////////
                            EIP-2612 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 internal immutable INITIAL_CHAIN_ID;

    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;

    mapping(address => uint256) public nonces;

    /*//////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _decimals
    ) {
        name = _name;
        symbol = _symbol;
        decimals = _decimals;

        INITIAL_CHAIN_ID = block.chainid;
        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
    }

    /*//////////////////////////////////////////////////////////////
                               ERC20 LOGIC
    //////////////////////////////////////////////////////////////*/

    function approve(address spender, uint256 amount) public virtual returns (bool) {
        allowance[msg.sender][spender] = amount;

        emit Approval(msg.sender, spender, amount);

        return true;
    }

    function transfer(address to, uint256 amount) public virtual returns (bool) {
        balanceOf[msg.sender] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(msg.sender, to, amount);

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual returns (bool) {
        uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.

        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;

        balanceOf[from] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(from, to, amount);

        return true;
    }

    /*//////////////////////////////////////////////////////////////
                             EIP-2612 LOGIC
    //////////////////////////////////////////////////////////////*/

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual {
        require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED");

        // Unchecked because the only math done is incrementing
        // the owner's nonce which cannot realistically overflow.
        unchecked {
            address recoveredAddress = ecrecover(
                keccak256(
                    abi.encodePacked(
                        "\x19\x01",
                        DOMAIN_SEPARATOR(),
                        keccak256(
                            abi.encode(
                                keccak256(
                                    "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)"
                                ),
                                owner,
                                spender,
                                value,
                                nonces[owner]++,
                                deadline
                            )
                        )
                    )
                ),
                v,
                r,
                s
            );

            require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER");

            allowance[recoveredAddress][spender] = value;
        }

        emit Approval(owner, spender, value);
    }

    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();
    }

    function computeDomainSeparator() internal view virtual returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                    keccak256(bytes(name)),
                    keccak256("1"),
                    block.chainid,
                    address(this)
                )
            );
    }

    /*//////////////////////////////////////////////////////////////
                        INTERNAL MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 amount) internal virtual {
        totalSupply += amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(address(0), to, amount);
    }

    function _burn(address from, uint256 amount) internal virtual {
        balanceOf[from] -= amount;

        // Cannot underflow because a user's balance
        // will never be larger than the total supply.
        unchecked {
            totalSupply -= amount;
        }

        emit Transfer(from, address(0), amount);
    }
}

File 3 of 5 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 4 of 5 : BokkyPooBahsDateTimeLibrary.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.9.0;

// ----------------------------------------------------------------------------
// BokkyPooBah's DateTime Library v1.01
//
// A gas-efficient Solidity date and time library
//
// https://github.com/bokkypoobah/BokkyPooBahsDateTimeLibrary
//
// Tested date range 1970/01/01 to 2345/12/31
//
// Conventions:
// Unit      | Range         | Notes
// :-------- |:-------------:|:-----
// timestamp | >= 0          | Unix timestamp, number of seconds since 1970/01/01 00:00:00 UTC
// year      | 1970 ... 2345 |
// month     | 1 ... 12      |
// day       | 1 ... 31      |
// hour      | 0 ... 23      |
// minute    | 0 ... 59      |
// second    | 0 ... 59      |
// dayOfWeek | 1 ... 7       | 1 = Monday, ..., 7 = Sunday
//
//
// Enjoy. (c) BokkyPooBah / Bok Consulting Pty Ltd 2018-2019. The MIT Licence.
// ----------------------------------------------------------------------------

library BokkyPooBahsDateTimeLibrary {

    uint constant SECONDS_PER_DAY = 24 * 60 * 60;
    uint constant SECONDS_PER_HOUR = 60 * 60;
    uint constant SECONDS_PER_MINUTE = 60;
    int constant OFFSET19700101 = 2440588;

    uint constant DOW_MON = 1;
    uint constant DOW_TUE = 2;
    uint constant DOW_WED = 3;
    uint constant DOW_THU = 4;
    uint constant DOW_FRI = 5;
    uint constant DOW_SAT = 6;
    uint constant DOW_SUN = 7;

    // ------------------------------------------------------------------------
    // Calculate the number of days from 1970/01/01 to year/month/day using
    // the date conversion algorithm from
    //   https://aa.usno.navy.mil/faq/JD_formula.html
    // and subtracting the offset 2440588 so that 1970/01/01 is day 0
    //
    // days = day
    //      - 32075
    //      + 1461 * (year + 4800 + (month - 14) / 12) / 4
    //      + 367 * (month - 2 - (month - 14) / 12 * 12) / 12
    //      - 3 * ((year + 4900 + (month - 14) / 12) / 100) / 4
    //      - offset
    // ------------------------------------------------------------------------
    function _daysFromDate(uint year, uint month, uint day) internal pure returns (uint _days) {
        require(year >= 1970);
        int _year = int(year);
        int _month = int(month);
        int _day = int(day);

        int __days = _day
          - 32075
          + 1461 * (_year + 4800 + (_month - 14) / 12) / 4
          + 367 * (_month - 2 - (_month - 14) / 12 * 12) / 12
          - 3 * ((_year + 4900 + (_month - 14) / 12) / 100) / 4
          - OFFSET19700101;

        _days = uint(__days);
    }

    // ------------------------------------------------------------------------
    // Calculate year/month/day from the number of days since 1970/01/01 using
    // the date conversion algorithm from
    //   http://aa.usno.navy.mil/faq/docs/JD_Formula.php
    // and adding the offset 2440588 so that 1970/01/01 is day 0
    //
    // int L = days + 68569 + offset
    // int N = 4 * L / 146097
    // L = L - (146097 * N + 3) / 4
    // year = 4000 * (L + 1) / 1461001
    // L = L - 1461 * year / 4 + 31
    // month = 80 * L / 2447
    // dd = L - 2447 * month / 80
    // L = month / 11
    // month = month + 2 - 12 * L
    // year = 100 * (N - 49) + year + L
    // ------------------------------------------------------------------------
    function _daysToDate(uint _days) internal pure returns (uint year, uint month, uint day) {
        int __days = int(_days);

        int L = __days + 68569 + OFFSET19700101;
        int N = 4 * L / 146097;
        L = L - (146097 * N + 3) / 4;
        int _year = 4000 * (L + 1) / 1461001;
        L = L - 1461 * _year / 4 + 31;
        int _month = 80 * L / 2447;
        int _day = L - 2447 * _month / 80;
        L = _month / 11;
        _month = _month + 2 - 12 * L;
        _year = 100 * (N - 49) + _year + L;

        year = uint(_year);
        month = uint(_month);
        day = uint(_day);
    }

    function timestampFromDate(uint year, uint month, uint day) internal pure returns (uint timestamp) {
        timestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY;
    }
    function timestampFromDateTime(uint year, uint month, uint day, uint hour, uint minute, uint second) internal pure returns (uint timestamp) {
        timestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY + hour * SECONDS_PER_HOUR + minute * SECONDS_PER_MINUTE + second;
    }
    function timestampToDate(uint timestamp) internal pure returns (uint year, uint month, uint day) {
        (year, month, day) = _daysToDate(timestamp / SECONDS_PER_DAY);
    }
    function timestampToDateTime(uint timestamp) internal pure returns (uint year, uint month, uint day, uint hour, uint minute, uint second) {
        (year, month, day) = _daysToDate(timestamp / SECONDS_PER_DAY);
        uint secs = timestamp % SECONDS_PER_DAY;
        hour = secs / SECONDS_PER_HOUR;
        secs = secs % SECONDS_PER_HOUR;
        minute = secs / SECONDS_PER_MINUTE;
        second = secs % SECONDS_PER_MINUTE;
    }

    function isValidDate(uint year, uint month, uint day) internal pure returns (bool valid) {
        if (year >= 1970 && month > 0 && month <= 12) {
            uint daysInMonth = _getDaysInMonth(year, month);
            if (day > 0 && day <= daysInMonth) {
                valid = true;
            }
        }
    }
    function isValidDateTime(uint year, uint month, uint day, uint hour, uint minute, uint second) internal pure returns (bool valid) {
        if (isValidDate(year, month, day)) {
            if (hour < 24 && minute < 60 && second < 60) {
                valid = true;
            }
        }
    }
    function isLeapYear(uint timestamp) internal pure returns (bool leapYear) {
        (uint year,,) = _daysToDate(timestamp / SECONDS_PER_DAY);
        leapYear = _isLeapYear(year);
    }
    function _isLeapYear(uint year) internal pure returns (bool leapYear) {
        leapYear = ((year % 4 == 0) && (year % 100 != 0)) || (year % 400 == 0);
    }
    function isWeekDay(uint timestamp) internal pure returns (bool weekDay) {
        weekDay = getDayOfWeek(timestamp) <= DOW_FRI;
    }
    function isWeekEnd(uint timestamp) internal pure returns (bool weekEnd) {
        weekEnd = getDayOfWeek(timestamp) >= DOW_SAT;
    }
    function getDaysInMonth(uint timestamp) internal pure returns (uint daysInMonth) {
        (uint year, uint month,) = _daysToDate(timestamp / SECONDS_PER_DAY);
        daysInMonth = _getDaysInMonth(year, month);
    }
    function _getDaysInMonth(uint year, uint month) internal pure returns (uint daysInMonth) {
        if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12) {
            daysInMonth = 31;
        } else if (month != 2) {
            daysInMonth = 30;
        } else {
            daysInMonth = _isLeapYear(year) ? 29 : 28;
        }
    }
    // 1 = Monday, 7 = Sunday
    function getDayOfWeek(uint timestamp) internal pure returns (uint dayOfWeek) {
        uint _days = timestamp / SECONDS_PER_DAY;
        dayOfWeek = (_days + 3) % 7 + 1;
    }

    function getYear(uint timestamp) internal pure returns (uint year) {
        (year,,) = _daysToDate(timestamp / SECONDS_PER_DAY);
    }
    function getMonth(uint timestamp) internal pure returns (uint month) {
        (,month,) = _daysToDate(timestamp / SECONDS_PER_DAY);
    }
    function getDay(uint timestamp) internal pure returns (uint day) {
        (,,day) = _daysToDate(timestamp / SECONDS_PER_DAY);
    }
    function getHour(uint timestamp) internal pure returns (uint hour) {
        uint secs = timestamp % SECONDS_PER_DAY;
        hour = secs / SECONDS_PER_HOUR;
    }
    function getMinute(uint timestamp) internal pure returns (uint minute) {
        uint secs = timestamp % SECONDS_PER_HOUR;
        minute = secs / SECONDS_PER_MINUTE;
    }
    function getSecond(uint timestamp) internal pure returns (uint second) {
        second = timestamp % SECONDS_PER_MINUTE;
    }

    function addYears(uint timestamp, uint _years) internal pure returns (uint newTimestamp) {
        (uint year, uint month, uint day) = _daysToDate(timestamp / SECONDS_PER_DAY);
        year += _years;
        uint daysInMonth = _getDaysInMonth(year, month);
        if (day > daysInMonth) {
            day = daysInMonth;
        }
        newTimestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY + timestamp % SECONDS_PER_DAY;
        require(newTimestamp >= timestamp);
    }
    function addMonths(uint timestamp, uint _months) internal pure returns (uint newTimestamp) {
        (uint year, uint month, uint day) = _daysToDate(timestamp / SECONDS_PER_DAY);
        month += _months;
        year += (month - 1) / 12;
        month = (month - 1) % 12 + 1;
        uint daysInMonth = _getDaysInMonth(year, month);
        if (day > daysInMonth) {
            day = daysInMonth;
        }
        newTimestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY + timestamp % SECONDS_PER_DAY;
        require(newTimestamp >= timestamp);
    }
    function addDays(uint timestamp, uint _days) internal pure returns (uint newTimestamp) {
        newTimestamp = timestamp + _days * SECONDS_PER_DAY;
        require(newTimestamp >= timestamp);
    }
    function addHours(uint timestamp, uint _hours) internal pure returns (uint newTimestamp) {
        newTimestamp = timestamp + _hours * SECONDS_PER_HOUR;
        require(newTimestamp >= timestamp);
    }
    function addMinutes(uint timestamp, uint _minutes) internal pure returns (uint newTimestamp) {
        newTimestamp = timestamp + _minutes * SECONDS_PER_MINUTE;
        require(newTimestamp >= timestamp);
    }
    function addSeconds(uint timestamp, uint _seconds) internal pure returns (uint newTimestamp) {
        newTimestamp = timestamp + _seconds;
        require(newTimestamp >= timestamp);
    }

    function subYears(uint timestamp, uint _years) internal pure returns (uint newTimestamp) {
        (uint year, uint month, uint day) = _daysToDate(timestamp / SECONDS_PER_DAY);
        year -= _years;
        uint daysInMonth = _getDaysInMonth(year, month);
        if (day > daysInMonth) {
            day = daysInMonth;
        }
        newTimestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY + timestamp % SECONDS_PER_DAY;
        require(newTimestamp <= timestamp);
    }
    function subMonths(uint timestamp, uint _months) internal pure returns (uint newTimestamp) {
        (uint year, uint month, uint day) = _daysToDate(timestamp / SECONDS_PER_DAY);
        uint yearMonth = year * 12 + (month - 1) - _months;
        year = yearMonth / 12;
        month = yearMonth % 12 + 1;
        uint daysInMonth = _getDaysInMonth(year, month);
        if (day > daysInMonth) {
            day = daysInMonth;
        }
        newTimestamp = _daysFromDate(year, month, day) * SECONDS_PER_DAY + timestamp % SECONDS_PER_DAY;
        require(newTimestamp <= timestamp);
    }
    function subDays(uint timestamp, uint _days) internal pure returns (uint newTimestamp) {
        newTimestamp = timestamp - _days * SECONDS_PER_DAY;
        require(newTimestamp <= timestamp);
    }
    function subHours(uint timestamp, uint _hours) internal pure returns (uint newTimestamp) {
        newTimestamp = timestamp - _hours * SECONDS_PER_HOUR;
        require(newTimestamp <= timestamp);
    }
    function subMinutes(uint timestamp, uint _minutes) internal pure returns (uint newTimestamp) {
        newTimestamp = timestamp - _minutes * SECONDS_PER_MINUTE;
        require(newTimestamp <= timestamp);
    }
    function subSeconds(uint timestamp, uint _seconds) internal pure returns (uint newTimestamp) {
        newTimestamp = timestamp - _seconds;
        require(newTimestamp <= timestamp);
    }

    function diffYears(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _years) {
        require(fromTimestamp <= toTimestamp);
        (uint fromYear,,) = _daysToDate(fromTimestamp / SECONDS_PER_DAY);
        (uint toYear,,) = _daysToDate(toTimestamp / SECONDS_PER_DAY);
        _years = toYear - fromYear;
    }
    function diffMonths(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _months) {
        require(fromTimestamp <= toTimestamp);
        (uint fromYear, uint fromMonth,) = _daysToDate(fromTimestamp / SECONDS_PER_DAY);
        (uint toYear, uint toMonth,) = _daysToDate(toTimestamp / SECONDS_PER_DAY);
        _months = toYear * 12 + toMonth - fromYear * 12 - fromMonth;
    }
    function diffDays(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _days) {
        require(fromTimestamp <= toTimestamp);
        _days = (toTimestamp - fromTimestamp) / SECONDS_PER_DAY;
    }
    function diffHours(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _hours) {
        require(fromTimestamp <= toTimestamp);
        _hours = (toTimestamp - fromTimestamp) / SECONDS_PER_HOUR;
    }
    function diffMinutes(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _minutes) {
        require(fromTimestamp <= toTimestamp);
        _minutes = (toTimestamp - fromTimestamp) / SECONDS_PER_MINUTE;
    }
    function diffSeconds(uint fromTimestamp, uint toTimestamp) internal pure returns (uint _seconds) {
        require(fromTimestamp <= toTimestamp);
        _seconds = toTimestamp - fromTimestamp;
    }
}

File 5 of 5 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

Settings
{
  "remappings": [
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/",
    "solmate/=lib/solmate/src/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "useLiteralContent": false,
    "bytecodeHash": "ipfs",
    "appendCBOR": true
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "paris",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"adjustDST","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAdjustedTimestamp","outputs":[{"internalType":"uint256","name":"timestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hoursToSub","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isTradingClosed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60e06040523480156200001157600080fd5b50604051806040016040528060128152602001712a3930b234b733902437bab9399021b7b4b760711b8152506040518060400160405280600381526020016254484360e81b815250601282600090816200006c9190620007a7565b5060016200007b8382620007a7565b5060ff81166080524660a05262000091620000cc565b60c05250620000a4915033905062000168565b620000bc336b033b2e3c9fd0803ce8000000620001ba565b620000c662000227565b62000a3a565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f600060405162000100919062000873565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8060026000828254620001ce919062000907565b90915550506001600160a01b0382166000818152600360209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b4260006200023582620002c9565b905060006200024483620002ec565b9050600382118015620002575750600b82105b806200028357508160031480156200028357506200027f620002798462000309565b62000327565b8110155b80620002ae575081600b148015620002ae5750620002ab620002a58462000309565b6200035b565b81105b15620002be576004600755505050565b60056007555b505050565b6000620002e4620002de620151808462000933565b62000383565b509392505050565b600062000301620002de620151808462000933565b949350505050565b60006200031e620002de620151808462000933565b50909392505050565b600060085b620003446200033e846003846200052f565b6200054e565b60071462000355576001016200032c565b92915050565b600060015b620003726200033e84600b846200052f565b600714620003555760010162000360565b60008080838162253d8c6200039c8362010bd96200094a565b620003a891906200094a565b9050600062023ab1620003bd83600462000975565b620003c99190620009ab565b90506004620003dc8262023ab162000975565b620003e99060036200094a565b620003f59190620009ab565b620004019083620009df565b9150600062164b09620004168460016200094a565b6200042490610fa062000975565b620004309190620009ab565b9050600462000442826105b562000975565b6200044e9190620009ab565b6200045a9084620009df565b6200046790601f6200094a565b9250600061098f6200047b85605062000975565b620004879190620009ab565b9050600060506200049b8361098f62000975565b620004a79190620009ab565b620004b39086620009df565b9050620004c2600b83620009ab565b9450620004d185600c62000975565b620004de8360026200094a565b620004ea9190620009df565b91508483620004fb603187620009df565b6200050890606462000975565b6200051491906200094a565b6200052091906200094a565b9a919950975095505050505050565b6000620151806200054285858562000591565b62000301919062000a09565b60008062000560620151808462000933565b905060076200057182600362000907565b6200057d919062000a23565b6200058a90600162000907565b9392505050565b60006107b2841015620005a357600080fd5b838383600062253d8c60046064600c620005bf600e88620009df565b620005cb9190620009ab565b620005d9886113246200094a565b620005e591906200094a565b620005f19190620009ab565b620005fe90600362000975565b6200060a9190620009ab565b600c806200061a600e88620009df565b620006269190620009ab565b6200063390600c62000975565b62000640600288620009df565b6200064c9190620009df565b6200065a9061016f62000975565b620006669190620009ab565b6004600c62000677600e89620009df565b620006839190620009ab565b62000691896112c06200094a565b6200069d91906200094a565b620006ab906105b562000975565b620006b79190620009ab565b620006c5617d4b87620009df565b620006d191906200094a565b620006dd91906200094a565b620006e99190620009df565b620006f59190620009df565b98975050505050505050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200072c57607f821691505b6020821081036200074d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002c4576000816000526020600020601f850160051c810160208610156200077e5750805b601f850160051c820191505b818110156200079f578281556001016200078a565b505050505050565b81516001600160401b03811115620007c357620007c362000701565b620007db81620007d4845462000717565b8462000753565b602080601f831160018114620008135760008415620007fa5750858301515b600019600386901b1c1916600185901b1785556200079f565b600085815260208120601f198616915b82811015620008445788860151825594840194600190910190840162000823565b5085821015620008635787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6000808354620008838162000717565b600182811680156200089e5760018114620008b457620008e5565b60ff1984168752821515830287019450620008e5565b8760005260208060002060005b85811015620008dc5781548a820152908401908201620008c1565b50505082870194505b50929695505050505050565b634e487b7160e01b600052601160045260246000fd5b80820180821115620003555762000355620008f1565b634e487b7160e01b600052601260045260246000fd5b6000826200094557620009456200091d565b500490565b80820182811260008312801582168215821617156200096d576200096d620008f1565b505092915050565b80820260008212600160ff1b84141615620009945762000994620008f1565b8181058314821517620003555762000355620008f1565b600082620009bd57620009bd6200091d565b600160ff1b821460001984141615620009da57620009da620008f1565b500590565b818103600083128015838313168383128216171562000a025762000a02620008f1565b5092915050565b8082028115828204841417620003555762000355620008f1565b60008262000a355762000a356200091d565b500690565b60805160a05160c0516113a962000a6a60003960006104ff015260006104ca0152600061019e01526113a96000f3fe608060405234801561001057600080fd5b50600436106101215760003560e01c8063715018a6116100ad578063a9059cbb11610071578063a9059cbb14610258578063d505accf1461026b578063dd62ed3e1461027e578063e589ee67146102a9578063f2fde38b146102b157600080fd5b8063715018a6146102045780637ecebe001461020c5780638da5cb5b1461022c57806390ec5dd11461024757806395d89b411461025057600080fd5b8063299f9e73116100f4578063299f9e7314610191578063313ce567146101995780633644e515146101d25780636c62ecca146101da57806370a08231146101e457600080fd5b806306fdde0314610126578063095ea7b31461014457806318160ddd1461016757806323b872dd1461017e575b600080fd5b61012e6102c4565b60405161013b9190610fc8565b60405180910390f35b610157610152366004611033565b610352565b604051901515815260200161013b565b61017060025481565b60405190815260200161013b565b61015761018c36600461105d565b6103bf565b610157610439565b6101c07f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff909116815260200161013b565b6101706104c6565b6101e2610521565b005b6101706101f2366004611099565b60036020526000908152604090205481565b6101e26105b0565b61017061021a366004611099565b60056020526000908152604090205481565b6006546040516001600160a01b03909116815260200161013b565b61017060075481565b61012e6105c4565b610157610266366004611033565b6105d1565b6101e26102793660046110b4565b610640565b61017061028c366004611127565b600460209081526000928352604080842090915290825290205481565b610170610884565b6101e26102bf366004611099565b610892565b600080546102d19061115a565b80601f01602080910402602001604051908101604052809291908181526020018280546102fd9061115a565b801561034a5780601f1061031f5761010080835404028352916020019161034a565b820191906000526020600020905b81548152906001019060200180831161032d57829003601f168201915b505050505081565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103ad9086815260200190565b60405180910390a35060015b92915050565b60006103c9610439565b15610426576040518060400160405280602081526020017f54726164696e6720636c6f7365642e2054727920616761696e206c617465722e81525060405162461bcd60e51b815260040161041d9190610fc8565b60405180910390fd5b61043184848461090b565b949350505050565b600080610444610884565b90506000610451826109fd565b905080156104625760019250505090565b600061046d83610a12565b9050600061047a84610a30565b9050600982108061048b5750600f82115b1561049b57600194505050505090565b8160091480156104ab5750601e81105b156104bb57600194505050505090565b600094505050505090565b60007f000000000000000000000000000000000000000000000000000000000000000046146104fc576104f7610a4c565b905090565b507f000000000000000000000000000000000000000000000000000000000000000090565b42600061052d82610ae6565b9050600061053a83610b05565b905060038211801561054c5750600b82105b806105725750816003148015610572575061056e61056984610b17565b610b32565b8110155b80610597575081600b148015610597575061059461058f84610b17565b610b5a565b81105b156105a6576004600755505050565b6005600755505050565b6105b8610b7d565b6105c26000610bd7565b565b600180546102d19061115a565b60006105db610439565b1561062f576040518060400160405280602081526020017f54726164696e6720636c6f7365642e2054727920616761696e206c617465722e81525060405162461bcd60e51b815260040161041d9190610fc8565b6106398383610c29565b9392505050565b428410156106905760405162461bcd60e51b815260206004820152601760248201527f5045524d49545f444541444c494e455f45585049524544000000000000000000604482015260640161041d565b6000600161069c6104c6565b6001600160a01b038a811660008181526005602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156107a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906107de5750876001600160a01b0316816001600160a01b0316145b61081b5760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b604482015260640161041d565b6001600160a01b0390811660009081526004602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b60006104f742600754610ca1565b61089a610b7d565b6001600160a01b0381166108ff5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161041d565b61090881610bd7565b50565b6001600160a01b038316600090815260046020908152604080832033845290915281205460001981146109675761094283826111aa565b6001600160a01b03861660009081526004602090815260408083203384529091529020555b6001600160a01b0385166000908152600360205260408120805485929061098f9084906111aa565b90915550506001600160a01b03808516600081815260036020526040908190208054870190555190918716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906109ea9087815260200190565b60405180910390a3506001949350505050565b60006006610a0a83610cc8565b101592915050565b600080610a2262015180846111d3565b9050610639610e10826111e7565b600080610a3f610e10846111d3565b9050610639603c826111e7565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6000604051610a7e91906111fb565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6000610afd610af862015180846111e7565b610cfc565b509392505050565b6000610431610af862015180846111e7565b6000610b29610af862015180846111e7565b50909392505050565b600060085b610b4b610b4684600384610e70565b610cc8565b6007146103b957600101610b37565b600060015b610b6e610b4684600b84610e70565b6007146103b957600101610b5f565b6006546001600160a01b031633146105c25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161041d565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b33600090815260036020526040812080548391908390610c4a9084906111aa565b90915550506001600160a01b038316600081815260036020526040908190208054850190555133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906103ad9086815260200190565b6000610caf610e108361129c565b610cb990846111aa565b9050828111156103b957600080fd5b600080610cd862015180846111e7565b90506007610ce78260036112b3565b610cf191906111d3565b6106399060016112b3565b60008080838162253d8c610d138362010bd96112c6565b610d1d91906112c6565b9050600062023ab1610d308360046112ee565b610d3a919061131e565b90506004610d4b8262023ab16112ee565b610d569060036112c6565b610d60919061131e565b610d6a908361134c565b9150600062164b09610d7d8460016112c6565b610d8990610fa06112ee565b610d93919061131e565b90506004610da3826105b56112ee565b610dad919061131e565b610db7908461134c565b610dc290601f6112c6565b9250600061098f610dd48560506112ee565b610dde919061131e565b905060006050610df08361098f6112ee565b610dfa919061131e565b610e04908661134c565b9050610e11600b8361131e565b9450610e1e85600c6112ee565b610e298360026112c6565b610e33919061134c565b91508483610e4260318761134c565b610e4d9060646112ee565b610e5791906112c6565b610e6191906112c6565b9a919950975095505050505050565b600062015180610e81858585610e8b565b610431919061129c565b60006107b2841015610e9c57600080fd5b838383600062253d8c60046064600c610eb6600e8861134c565b610ec0919061131e565b610ecc886113246112c6565b610ed691906112c6565b610ee0919061131e565b610eeb9060036112ee565b610ef5919061131e565b600c80610f03600e8861134c565b610f0d919061131e565b610f1890600c6112ee565b610f2360028861134c565b610f2d919061134c565b610f399061016f6112ee565b610f43919061131e565b6004600c610f52600e8961134c565b610f5c919061131e565b610f68896112c06112c6565b610f7291906112c6565b610f7e906105b56112ee565b610f88919061131e565b610f94617d4b8761134c565b610f9e91906112c6565b610fa891906112c6565b610fb2919061134c565b610fbc919061134c565b98975050505050505050565b60006020808352835180602085015260005b81811015610ff657858101830151858201604001528201610fda565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461102e57600080fd5b919050565b6000806040838503121561104657600080fd5b61104f83611017565b946020939093013593505050565b60008060006060848603121561107257600080fd5b61107b84611017565b925061108960208501611017565b9150604084013590509250925092565b6000602082840312156110ab57600080fd5b61063982611017565b600080600080600080600060e0888a0312156110cf57600080fd5b6110d888611017565b96506110e660208901611017565b95506040880135945060608801359350608088013560ff8116811461110a57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561113a57600080fd5b61114383611017565b915061115160208401611017565b90509250929050565b600181811c9082168061116e57607f821691505b60208210810361118e57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156103b9576103b9611194565b634e487b7160e01b600052601260045260246000fd5b6000826111e2576111e26111bd565b500690565b6000826111f6576111f66111bd565b500490565b60008083548160018260011c9150600183168061121957607f831692505b6020808410820361123857634e487b7160e01b86526022600452602486fd5b81801561124c57600181146112615761128e565b60ff198616895284151585028901965061128e565b60008a81526020902060005b868110156112865781548b82015290850190830161126d565b505084890196505b509498975050505050505050565b80820281158282048414176103b9576103b9611194565b808201808211156103b9576103b9611194565b80820182811260008312801582168215821617156112e6576112e6611194565b505092915050565b80820260008212600160ff1b8414161561130a5761130a611194565b81810583148215176103b9576103b9611194565b60008261132d5761132d6111bd565b600160ff1b82146000198414161561134757611347611194565b500590565b818103600083128015838313168383128216171561136c5761136c611194565b509291505056fea2646970667358221220b4f803f6f86d3645443536c42792cb57bbd5dcd60c6223db0772056f6f17c6b564736f6c63430008170033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101215760003560e01c8063715018a6116100ad578063a9059cbb11610071578063a9059cbb14610258578063d505accf1461026b578063dd62ed3e1461027e578063e589ee67146102a9578063f2fde38b146102b157600080fd5b8063715018a6146102045780637ecebe001461020c5780638da5cb5b1461022c57806390ec5dd11461024757806395d89b411461025057600080fd5b8063299f9e73116100f4578063299f9e7314610191578063313ce567146101995780633644e515146101d25780636c62ecca146101da57806370a08231146101e457600080fd5b806306fdde0314610126578063095ea7b31461014457806318160ddd1461016757806323b872dd1461017e575b600080fd5b61012e6102c4565b60405161013b9190610fc8565b60405180910390f35b610157610152366004611033565b610352565b604051901515815260200161013b565b61017060025481565b60405190815260200161013b565b61015761018c36600461105d565b6103bf565b610157610439565b6101c07f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff909116815260200161013b565b6101706104c6565b6101e2610521565b005b6101706101f2366004611099565b60036020526000908152604090205481565b6101e26105b0565b61017061021a366004611099565b60056020526000908152604090205481565b6006546040516001600160a01b03909116815260200161013b565b61017060075481565b61012e6105c4565b610157610266366004611033565b6105d1565b6101e26102793660046110b4565b610640565b61017061028c366004611127565b600460209081526000928352604080842090915290825290205481565b610170610884565b6101e26102bf366004611099565b610892565b600080546102d19061115a565b80601f01602080910402602001604051908101604052809291908181526020018280546102fd9061115a565b801561034a5780601f1061031f5761010080835404028352916020019161034a565b820191906000526020600020905b81548152906001019060200180831161032d57829003601f168201915b505050505081565b3360008181526004602090815260408083206001600160a01b038716808552925280832085905551919290917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925906103ad9086815260200190565b60405180910390a35060015b92915050565b60006103c9610439565b15610426576040518060400160405280602081526020017f54726164696e6720636c6f7365642e2054727920616761696e206c617465722e81525060405162461bcd60e51b815260040161041d9190610fc8565b60405180910390fd5b61043184848461090b565b949350505050565b600080610444610884565b90506000610451826109fd565b905080156104625760019250505090565b600061046d83610a12565b9050600061047a84610a30565b9050600982108061048b5750600f82115b1561049b57600194505050505090565b8160091480156104ab5750601e81105b156104bb57600194505050505090565b600094505050505090565b60007f000000000000000000000000000000000000000000000000000000000000000146146104fc576104f7610a4c565b905090565b507f8a3d3ff5db408b87501465ba9ca52c4a56640571cadab15c26b80d43f8a5481890565b42600061052d82610ae6565b9050600061053a83610b05565b905060038211801561054c5750600b82105b806105725750816003148015610572575061056e61056984610b17565b610b32565b8110155b80610597575081600b148015610597575061059461058f84610b17565b610b5a565b81105b156105a6576004600755505050565b6005600755505050565b6105b8610b7d565b6105c26000610bd7565b565b600180546102d19061115a565b60006105db610439565b1561062f576040518060400160405280602081526020017f54726164696e6720636c6f7365642e2054727920616761696e206c617465722e81525060405162461bcd60e51b815260040161041d9190610fc8565b6106398383610c29565b9392505050565b428410156106905760405162461bcd60e51b815260206004820152601760248201527f5045524d49545f444541444c494e455f45585049524544000000000000000000604482015260640161041d565b6000600161069c6104c6565b6001600160a01b038a811660008181526005602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c98184015280840194909452938d166060840152608083018c905260a083019390935260c08083018b90528151808403909101815260e08301909152805192019190912061190160f01b6101008301526101028201929092526101228101919091526101420160408051601f198184030181528282528051602091820120600084529083018083525260ff871690820152606081018590526080810184905260a0016020604051602081039080840390855afa1580156107a8573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116158015906107de5750876001600160a01b0316816001600160a01b0316145b61081b5760405162461bcd60e51b815260206004820152600e60248201526d24a72b20a624a22fa9a4a3a722a960911b604482015260640161041d565b6001600160a01b0390811660009081526004602090815260408083208a8516808552908352928190208990555188815291928a16917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a350505050505050565b60006104f742600754610ca1565b61089a610b7d565b6001600160a01b0381166108ff5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161041d565b61090881610bd7565b50565b6001600160a01b038316600090815260046020908152604080832033845290915281205460001981146109675761094283826111aa565b6001600160a01b03861660009081526004602090815260408083203384529091529020555b6001600160a01b0385166000908152600360205260408120805485929061098f9084906111aa565b90915550506001600160a01b03808516600081815260036020526040908190208054870190555190918716907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906109ea9087815260200190565b60405180910390a3506001949350505050565b60006006610a0a83610cc8565b101592915050565b600080610a2262015180846111d3565b9050610639610e10826111e7565b600080610a3f610e10846111d3565b9050610639603c826111e7565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6000604051610a7e91906111fb565b6040805191829003822060208301939093528101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608201524660808201523060a082015260c00160405160208183030381529060405280519060200120905090565b6000610afd610af862015180846111e7565b610cfc565b509392505050565b6000610431610af862015180846111e7565b6000610b29610af862015180846111e7565b50909392505050565b600060085b610b4b610b4684600384610e70565b610cc8565b6007146103b957600101610b37565b600060015b610b6e610b4684600b84610e70565b6007146103b957600101610b5f565b6006546001600160a01b031633146105c25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161041d565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b33600090815260036020526040812080548391908390610c4a9084906111aa565b90915550506001600160a01b038316600081815260036020526040908190208054850190555133907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906103ad9086815260200190565b6000610caf610e108361129c565b610cb990846111aa565b9050828111156103b957600080fd5b600080610cd862015180846111e7565b90506007610ce78260036112b3565b610cf191906111d3565b6106399060016112b3565b60008080838162253d8c610d138362010bd96112c6565b610d1d91906112c6565b9050600062023ab1610d308360046112ee565b610d3a919061131e565b90506004610d4b8262023ab16112ee565b610d569060036112c6565b610d60919061131e565b610d6a908361134c565b9150600062164b09610d7d8460016112c6565b610d8990610fa06112ee565b610d93919061131e565b90506004610da3826105b56112ee565b610dad919061131e565b610db7908461134c565b610dc290601f6112c6565b9250600061098f610dd48560506112ee565b610dde919061131e565b905060006050610df08361098f6112ee565b610dfa919061131e565b610e04908661134c565b9050610e11600b8361131e565b9450610e1e85600c6112ee565b610e298360026112c6565b610e33919061134c565b91508483610e4260318761134c565b610e4d9060646112ee565b610e5791906112c6565b610e6191906112c6565b9a919950975095505050505050565b600062015180610e81858585610e8b565b610431919061129c565b60006107b2841015610e9c57600080fd5b838383600062253d8c60046064600c610eb6600e8861134c565b610ec0919061131e565b610ecc886113246112c6565b610ed691906112c6565b610ee0919061131e565b610eeb9060036112ee565b610ef5919061131e565b600c80610f03600e8861134c565b610f0d919061131e565b610f1890600c6112ee565b610f2360028861134c565b610f2d919061134c565b610f399061016f6112ee565b610f43919061131e565b6004600c610f52600e8961134c565b610f5c919061131e565b610f68896112c06112c6565b610f7291906112c6565b610f7e906105b56112ee565b610f88919061131e565b610f94617d4b8761134c565b610f9e91906112c6565b610fa891906112c6565b610fb2919061134c565b610fbc919061134c565b98975050505050505050565b60006020808352835180602085015260005b81811015610ff657858101830151858201604001528201610fda565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b038116811461102e57600080fd5b919050565b6000806040838503121561104657600080fd5b61104f83611017565b946020939093013593505050565b60008060006060848603121561107257600080fd5b61107b84611017565b925061108960208501611017565b9150604084013590509250925092565b6000602082840312156110ab57600080fd5b61063982611017565b600080600080600080600060e0888a0312156110cf57600080fd5b6110d888611017565b96506110e660208901611017565b95506040880135945060608801359350608088013560ff8116811461110a57600080fd5b9699959850939692959460a0840135945060c09093013592915050565b6000806040838503121561113a57600080fd5b61114383611017565b915061115160208401611017565b90509250929050565b600181811c9082168061116e57607f821691505b60208210810361118e57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b818103818111156103b9576103b9611194565b634e487b7160e01b600052601260045260246000fd5b6000826111e2576111e26111bd565b500690565b6000826111f6576111f66111bd565b500490565b60008083548160018260011c9150600183168061121957607f831692505b6020808410820361123857634e487b7160e01b86526022600452602486fd5b81801561124c57600181146112615761128e565b60ff198616895284151585028901965061128e565b60008a81526020902060005b868110156112865781548b82015290850190830161126d565b505084890196505b509498975050505050505050565b80820281158282048414176103b9576103b9611194565b808201808211156103b9576103b9611194565b80820182811260008312801582168215821617156112e6576112e6611194565b505092915050565b80820260008212600160ff1b8414161561130a5761130a611194565b81810583148215176103b9576103b9611194565b60008261132d5761132d6111bd565b600160ff1b82146000198414161561134757611347611194565b500590565b818103600083128015838313168383128216171561136c5761136c611194565b509291505056fea2646970667358221220b4f803f6f86d3645443536c42792cb57bbd5dcd60c6223db0772056f6f17c6b564736f6c63430008170033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.