ETH Price: $3,433.34 (+4.02%)

Contract

0xBB811A6ded7D10522c00d91c5854bf0CE885D4a1
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Unstake All199770102024-05-29 17:29:23178 days ago1717003763IN
0xBB811A6d...CE885D4a1
0 ETH0.0018190814.80845857
Claim All Reward...199769962024-05-29 17:26:35178 days ago1717003595IN
0xBB811A6d...CE885D4a1
0 ETH0.000930214.68915179
Approve194843922024-03-21 17:03:23247 days ago1711040603IN
0xBB811A6d...CE885D4a1
0 ETH0.001015841.75277325
Approve182690822023-10-03 9:21:11417 days ago1696324871IN
0xBB811A6d...CE885D4a1
0 ETH0.000349097.53378897
Unstake All182690362023-10-03 9:11:59417 days ago1696324319IN
0xBB811A6d...CE885D4a1
0 ETH0.001006249.51609492
Claim All Reward...182690332023-10-03 9:11:23417 days ago1696324283IN
0xBB811A6d...CE885D4a1
0 ETH0.000599899.47316332
Unstake All178591742023-08-06 23:25:11474 days ago1691364311IN
0xBB811A6d...CE885D4a1
0 ETH0.0122971615.39131473
Claim All Reward...178591652023-08-06 23:23:23474 days ago1691364203IN
0xBB811A6d...CE885D4a1
0 ETH0.005814915.28429245
Approve178390082023-08-04 3:41:35477 days ago1691120495IN
0xBB811A6d...CE885D4a1
0 ETH0.0003718915.28590088
Claim All Reward...175365012023-06-22 17:00:11520 days ago1687453211IN
0xBB811A6d...CE885D4a1
0 ETH0.001229319.41236355
Claim All Reward...175352902023-06-22 12:54:59520 days ago1687438499IN
0xBB811A6d...CE885D4a1
0 ETH0.0065531517.29407966
Transfer170554362023-04-15 22:47:11587 days ago1681598831IN
0xBB811A6d...CE885D4a1
0 ETH0.001087123.22619971
Approve168965372023-03-24 9:42:23610 days ago1679650943IN
0xBB811A6d...CE885D4a1
0 ETH0.0004118916.93001514
Stakeapes By Ids167173572023-02-27 5:09:23635 days ago1677474563IN
0xBB811A6d...CE885D4a1
0 ETH0.003418519.16136885
Claim All Reward...165405422023-02-02 10:32:35660 days ago1675333955IN
0xBB811A6d...CE885D4a1
0 ETH0.0012951120.45150816
Claim All Reward...164708152023-01-23 16:51:23670 days ago1674492683IN
0xBB811A6d...CE885D4a1
0 ETH0.0018474529.17373033
Claim All Reward...164357512023-01-18 19:22:35674 days ago1674069755IN
0xBB811A6d...CE885D4a1
0 ETH0.0029784338.62378199
Claim All Reward...164283182023-01-17 18:29:11675 days ago1673980151IN
0xBB811A6d...CE885D4a1
0 ETH0.0015605924.13276658
Claim All Reward...163704182023-01-09 16:24:11684 days ago1673281451IN
0xBB811A6d...CE885D4a1
0 ETH0.0023790237.56791509
Stakeapes By Ids163582862023-01-07 23:47:59685 days ago1673135279IN
0xBB811A6d...CE885D4a1
0 ETH0.0054468918.88948686
Claim All Reward...163552382023-01-07 13:35:23686 days ago1673098523IN
0xBB811A6d...CE885D4a1
0 ETH0.0057750115.24053501
Stakeapes By Ids163384022023-01-05 5:08:47688 days ago1672895327IN
0xBB811A6d...CE885D4a1
0 ETH0.0022877317.7939395
Claim All Reward...163316002023-01-04 6:21:59689 days ago1672813319IN
0xBB811A6d...CE885D4a1
0 ETH0.0005077616.8414431
Stakeapes By Ids163154622023-01-02 0:20:11691 days ago1672618811IN
0xBB811A6d...CE885D4a1
0 ETH0.0018316414.24652795
Unstake All163133372023-01-01 17:13:59692 days ago1672593239IN
0xBB811A6d...CE885D4a1
0 ETH0.0012140615.92696943
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:
THCToken

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 13 : THCToken.sol
// SPDX-License-Identifier: MIT

/////////////     ////        ////        ///////////
    ////          ////        ////        ///
    ////          ////        ////        ///
    ////          ////////////////        ///
    ////          ////        ////        ///
    ////          ////        ////        ///
    ////          ////        ////        ///////////


////        ////    //////////////    /////////////     ////        ////
////        ////         ////         ////              ////        ////
////        ////         ////         ////              ////        ////
////////////////         ////         ////   ///////    ////////////////
////        ////         ////         ////      ////    ////        ////
////        ////         ////         ////      ////    ////        ////
////        ////     /////////////    //////////////    ////        ////


      /////          /////////////    //////////////    ////////////////
   ////  ////        ///       ///    ////              ////
////       ////      ///       ///    ////              ////
///         ///      ///       ///    ////              ////
///////////////      /////////////    ///////////       ////////////////
/// /////// ///      ///              ////                          ////
///         ///      ///              ////                          ////
///         ///      ///              //////////////    ////////////////


// Advancement of CHEETH Anonymice Contract, Credits to the devs

pragma solidity ^0.8.7;

import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract THCToken is ERC20Burnable, Ownable {

    struct StakedHighApe {
        uint256 tokenId;
        uint256 stakedSince;
        uint256 jointEmision;
    }

    using EnumerableSet for EnumerableSet.UintSet;
    uint256 public constant HighApesLimit = 25;

    address public highApes;

    mapping (uint256 => string) private _initialAccessSetter;

    // Staked Apes

    mapping(address => EnumerableSet.UintSet) private stakedApes;

    // Staked Apes to Timestamp Staked

    mapping(uint256 => uint256) public apesStakeTimes;
    mapping(uint256 => uint256) public apesClaimTimes;

    constructor() ERC20("Joint", "JOINT") {
    }

    function stakeapesByIds(uint256[] memory _apesIds) external {
        require(
            _apesIds.length + stakedApes[msg.sender].length() <= HighApesLimit,
            "THC: Can stake maximum of 25 Apes!"
        );
        
        for (uint256 i = 0; i < _apesIds.length; i++) {
            _stakeHighApe(_apesIds[i]);
        }
    }

    function unstakeapesByIds(uint256[] memory _apesIds) public {
        for (uint256 i = 0; i < _apesIds.length; i++) {
            _unstakeHighApe(_apesIds[i]);
        }
    }

    function claimRewardsByIds(uint256[] memory _apesIds) external {
        uint256 runningjointAllowance;

        for (uint256 i = 0; i < _apesIds.length; i++) {
            uint256 thisApeID = _apesIds[i];
            require(
                stakedApes[msg.sender].contains(thisApeID),
                "THC: You can only claim Apes you've staked!"
            );
            runningjointAllowance += getjointOwedToThisHighApe(thisApeID);

            apesClaimTimes[thisApeID] = block.timestamp;
        }
        _mint(msg.sender, runningjointAllowance);
    }

    function claimAllRewards() external {
        uint256 runningjointAllowance;

        for (uint256 i = 0; i < stakedApes[msg.sender].length(); i++) {
            uint256 thisApeID = stakedApes[msg.sender].at(i);
            runningjointAllowance += getjointOwedToThisHighApe(thisApeID);

            apesClaimTimes[thisApeID] = block.timestamp;
        }
        _mint(msg.sender, runningjointAllowance);
    }

    function unstakeAll() external {
        unstakeapesByIds(stakedApes[msg.sender].values());
    }

    function _stakeHighApe(uint256 _ApesID) internal onlyApesOwner(_ApesID) {

        // Transfer their token

        IERC721Enumerable(highApes).transferFrom(
            msg.sender,
            address(this),
            _ApesID
        );

        // Add the apes to the owner's set

        stakedApes[msg.sender].add(_ApesID);

        // Set this HighApeId timestamp to now

        apesStakeTimes[_ApesID] = block.timestamp;
        apesClaimTimes[_ApesID] = 0;
    }

    function _unstakeHighApe(uint256 _ApesID)
        internal
        onlyApesStaker(_ApesID)
    {
        uint256 jointOwedToThisHighApe = getjointOwedToThisHighApe(_ApesID);
        _mint(msg.sender, jointOwedToThisHighApe);

        IERC721(highApes).transferFrom(
            address(this),
            msg.sender,
            _ApesID
        );

        stakedApes[msg.sender].remove(_ApesID);
    }

    // GETTERS

    function getStakedapesData(address _address)
        external
        view
        returns (StakedHighApe[] memory)
    {
        uint256[] memory ids = stakedApes[_address].values();
        StakedHighApe[] memory stakedapes = new StakedHighApe[](ids.length);
        for (uint256 index = 0; index < ids.length; index++) {
            uint256 _ApesID = ids[index];
            stakedapes[index] = StakedHighApe(
                _ApesID,
                apesStakeTimes[_ApesID],
                getApesJointEmission(_ApesID)
            );
        }

        return stakedapes;
    }

    function tokensStaked(address _address)
        external
        view
        returns (uint256[] memory)
    {
        return stakedApes[_address].values();
    }

    function stakedapesQuantity(address _address)
        external
        view
        returns (uint256)
    {
        return stakedApes[_address].length();
    }

    function getjointOwedToThisHighApe(uint256 _ApesID)
        public
        view
        returns (uint256)
    {
        uint256 elapsedTime = block.timestamp - apesStakeTimes[_ApesID];
        uint256 elapsedDays = elapsedTime < 1 days ? 0 : elapsedTime / 1 days;
        uint256 leftoverSeconds = elapsedTime - elapsedDays * 1 days;

        if (apesClaimTimes[_ApesID] == 0) {
            return _calculatejoint(elapsedDays, leftoverSeconds);
        }

        uint256 elapsedTimeSinceClaim = apesClaimTimes[_ApesID] -
            apesStakeTimes[_ApesID];
        uint256 elapsedDaysSinceClaim = elapsedTimeSinceClaim < 1 days
            ? 0
            : elapsedTimeSinceClaim / 1 days;
        uint256 leftoverSecondsSinceClaim = elapsedTimeSinceClaim -
            elapsedDaysSinceClaim *
            1 days;

       return _calculatejoint(elapsedDays, leftoverSeconds) - _calculatejoint(elapsedDaysSinceClaim, leftoverSecondsSinceClaim);
        
    }

    function getTotalRewardsForUser(address _address)
        external
        view
        returns (uint256)
    {
        uint256 runningjointTotal;
        uint256[] memory apesIds = stakedApes[_address].values();
        for (uint256 i = 0; i < apesIds.length; i++) {
            runningjointTotal += getjointOwedToThisHighApe(apesIds[i]);
        }
        return runningjointTotal;
    }

    function getApesJointEmission(uint256 _ApesID)
        public
        view
        returns (uint256)
    {
        uint256 elapsedTime = block.timestamp - apesStakeTimes[_ApesID];
        uint256 elapsedDays = elapsedTime < 1 days ? 0 : elapsedTime / 1 days;
        return _jointDailyIncrement(elapsedDays);
    }

    function _calculatejoint(uint256 _days, uint256 _leftoverSeconds)
        internal
        pure
        returns (uint256)
    {
        uint256 progressiveDays = Math.min(_days, 100);
        uint256 progressiveReward = progressiveDays == 0
            ? 0
            : (progressiveDays *
                (80.2 ether + 0.2 ether * (progressiveDays - 1) + 80.2 ether)) /
                2;

        uint256 dailyIncrement = _jointDailyIncrement(_days);
        uint256 leftoverReward = _leftoverSeconds > 0
            ? (dailyIncrement * _leftoverSeconds) / 1 days
            : 0;

        if (_days <= 100) {
            return progressiveReward + leftoverReward;
        }
        return progressiveReward + (_days - 100) * 100 ether + leftoverReward;
    }

    function _jointDailyIncrement(uint256 _days)
        internal
        pure
        returns (uint256)
    {
        return _days > 100 ? 100 ether : 80 ether + _days * 0.2 ether;
    }
  
    // Only THC Boss

    function setAddresses(address _highApes)
        public
        onlyOwner
    {
        highApes = _highApes;
    }

    function initialSupplyCreation(address to, uint256 amount) public onlyOwner {

        require(bytes(_initialAccessSetter[0]).length == 0, "THC: Access is Disabled Permanently");

        // Will not work after condition is set

        _mint(to, amount);
    }

    function setInitialAccess(string memory setaccess) public onlyOwner {
          _initialAccessSetter[0] = setaccess;
       }

    // Apes Modifiers

    modifier onlyApesOwner(uint256 _ApesID) {
        require(
            IERC721Enumerable(highApes).ownerOf(_ApesID) == msg.sender,
            "THC: You can only stake the Apes you own!"
        );
        _;
    }

    modifier onlyApesStaker(uint256 _ApesID) {
        require(
            stakedApes[msg.sender].contains(_ApesID),
            "THC: You can only unstake the Apes you staked!"
        );
        _;
    }
}

File 2 of 13 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        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 3 of 13 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a >= b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a / b + (a % b == 0 ? 0 : 1);
    }
}

File 4 of 13 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 5 of 13 : ERC20Burnable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        _spendAllowance(account, _msgSender(), amount);
        _burn(account, amount);
    }
}

File 6 of 13 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

File 7 of 13 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 8 of 13 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

File 9 of 13 : 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;
    }
}

File 10 of 13 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, _allowances[owner][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = _allowances[owner][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Spend `amount` form the allowance of `owner` toward `spender`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

File 11 of 13 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

File 12 of 13 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 13 of 13 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

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

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":"value","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":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"HighApesLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"apesClaimTimes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"apesStakeTimes","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":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimAllRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_apesIds","type":"uint256[]"}],"name":"claimRewardsByIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_ApesID","type":"uint256"}],"name":"getApesJointEmission","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getStakedapesData","outputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"stakedSince","type":"uint256"},{"internalType":"uint256","name":"jointEmision","type":"uint256"}],"internalType":"struct THCToken.StakedHighApe[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getTotalRewardsForUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_ApesID","type":"uint256"}],"name":"getjointOwedToThisHighApe","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"highApes","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"initialSupplyCreation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_highApes","type":"address"}],"name":"setAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"setaccess","type":"string"}],"name":"setInitialAccess","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_apesIds","type":"uint256[]"}],"name":"stakeapesByIds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"stakedapesQuantity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"tokensStaked","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"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"},{"inputs":[],"name":"unstakeAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_apesIds","type":"uint256[]"}],"name":"unstakeapesByIds","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405180604001604052806005815260200164129bda5b9d60da1b815250604051806040016040528060058152602001641293d2539560da1b815250816003908051906020019062000066929190620000f5565b5080516200007c906004906020840190620000f5565b50505062000099620000936200009f60201b60201c565b620000a3565b620001d8565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b82805462000103906200019b565b90600052602060002090601f01602090048101928262000127576000855562000172565b82601f106200014257805160ff191683800117855562000172565b8280016001018555821562000172579182015b828111156200017257825182559160200191906001019062000155565b506200018092915062000184565b5090565b5b8082111562000180576000815560010162000185565b600181811c90821680620001b057607f821691505b60208210811415620001d257634e487b7160e01b600052602260045260246000fd5b50919050565b61232180620001e86000396000f3fe608060405234801561001057600080fd5b50600436106102265760003560e01c8063715018a61161012a578063a9059cbb116100bd578063d325309e1161008c578063eaa4f9b511610071578063eaa4f9b5146104d2578063ee17c855146104e5578063f2fde38b1461050557600080fd5b8063d325309e14610486578063dd62ed3e1461049957600080fd5b8063a9059cbb1461043a578063ad003bef1461044d578063ae9c33d914610460578063b06725cd1461047357600080fd5b80638da5cb5b116100f95780638da5cb5b146103f257806395d89b4114610417578063a19a51e21461041f578063a457c2d71461042757600080fd5b8063715018a6146103b157806379cc6790146103b957806381d3c435146103cc5780638cf326f6146103df57600080fd5b8063319266f8116101bd5780634d4ace811161018c57806366503312116101715780636650331214610355578063697154d61461036857806370a082311461038857600080fd5b80634d4ace811461032f5780635415eb341461034257600080fd5b8063319266f8146102ee57806335322f3714610301578063395093511461030957806342966c681461031c57600080fd5b806318160ddd116101f957806318160ddd146102a457806323b872dd146102ac5780632cf01b55146102bf578063313ce567146102df57600080fd5b806306fdde031461022b578063095ea7b3146102495780630b83a7271461026c57806311c0262d14610276575b600080fd5b610233610518565b6040516102409190612132565b60405180910390f35b61025c610257366004611f0e565b6105aa565b6040519015158152602001610240565b6102746105c4565b005b61029661028436600461207c565b60096020526000908152604090205481565b604051908152602001610240565b600254610296565b61025c6102ba366004611ecd565b610649565b6102d26102cd366004611e5a565b61066d565b60405161024091906120ee565b60405160128152602001610240565b6102746102fc366004611fe7565b610691565b610274610730565b61025c610317366004611f0e565b61074e565b61027461032a36600461207c565b61078d565b61027461033d366004611f0e565b610797565b610274610350366004611f3a565b6108a5565b610296610363366004611e5a565b6108e5565b61029661037636600461207c565b600a6020526000908152604090205481565b610296610396366004611e5a565b6001600160a01b031660009081526020819052604090205490565b610274610961565b6102746103c7366004611f0e565b6109c5565b6102746103da366004611e5a565b6109da565b6102966103ed36600461207c565b610a63565b6005546001600160a01b03165b6040516001600160a01b039091168152602001610240565b610233610ab4565b610296601981565b61025c610435366004611f0e565b610ac3565b61025c610448366004611f0e565b610b6d565b61027461045b366004611f3a565b610b7b565b61029661046e366004611e5a565b610c7b565b610274610481366004611f3a565b610c9c565b61029661049436600461207c565b610d77565b6102966104a7366004611e94565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6006546103ff906001600160a01b031681565b6104f86104f3366004611e5a565b610e87565b6040516102409190612095565b610274610513366004611e5a565b610fbb565b60606003805461052790612228565b80601f016020809104026020016040519081016040528092919081815260200182805461055390612228565b80156105a05780601f10610575576101008083540402835291602001916105a0565b820191906000526020600020905b81548152906001019060200180831161058357829003601f168201915b5050505050905090565b6000336105b881858561109a565b60019150505b92915050565b6000805b3360009081526008602052604090206105e0906111f3565b81101561063b5733600090815260086020526040812061060090836111fd565b905061060b81610d77565b61061590846121b8565b6000918252600a602052604090912042905591508061063381612263565b9150506105c8565b506106463382611210565b50565b6000336106578582856112ef565b610662858585611381565b506001949350505050565b6001600160a01b03811660009081526008602052604090206060906105be90611598565b6005546001600160a01b031633146106f05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6000805260076020908152815161072c917f6d5257204ebe7d88fd91ae87941cb2dd9d8062b64ae5a2bd2d28ec40b9fbf6df9190840190611dc1565b5050565b33600090815260086020526040902061074c9061035090611598565b565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091906105b890829086906107889087906121b8565b61109a565b61064633826115a5565b6005546001600160a01b031633146107f15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106e7565b6000805260076020527f6d5257204ebe7d88fd91ae87941cb2dd9d8062b64ae5a2bd2d28ec40b9fbf6df805461082690612228565b15905061089b5760405162461bcd60e51b815260206004820152602360248201527f5448433a204163636573732069732044697361626c6564205065726d616e656e60448201527f746c79000000000000000000000000000000000000000000000000000000000060648201526084016106e7565b61072c8282611210565b60005b815181101561072c576108d38282815181106108c6576108c66122aa565b6020026020010151611722565b806108dd81612263565b9150506108a8565b6001600160a01b03811660009081526008602052604081208190819061090a90611598565b905060005b81518110156109585761093a82828151811061092d5761092d6122aa565b6020026020010151610d77565b61094490846121b8565b92508061095081612263565b91505061090f565b50909392505050565b6005546001600160a01b031633146109bb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106e7565b61074c600061184a565b6109d08233836112ef565b61072c82826115a5565b6005546001600160a01b03163314610a345760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106e7565b6006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000818152600960205260408120548190610a7e9042612211565b90506000620151808210610a9e57610a9962015180836121d0565b610aa1565b60005b9050610aac816118a9565b949350505050565b60606004805461052790612228565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919083811015610b605760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016106e7565b610662828686840361109a565b6000336105b8818585611381565b6000805b8251811015610c70576000838281518110610b9c57610b9c6122aa565b60209081029190910181015133600090815260089092526040909120909150610bc590826118ed565b610c375760405162461bcd60e51b815260206004820152602b60248201527f5448433a20596f752063616e206f6e6c7920636c61696d204170657320796f7560448201527f277665207374616b65642100000000000000000000000000000000000000000060648201526084016106e7565b610c4081610d77565b610c4a90846121b8565b6000918252600a6020526040909120429055915080610c6881612263565b915050610b7f565b5061072c3382611210565b6001600160a01b03811660009081526008602052604081206105be906111f3565b336000908152600860205260409020601990610cb7906111f3565b8251610cc391906121b8565b1115610d375760405162461bcd60e51b815260206004820152602260248201527f5448433a2043616e207374616b65206d6178696d756d206f662032352041706560448201527f732100000000000000000000000000000000000000000000000000000000000060648201526084016106e7565b60005b815181101561072c57610d65828281518110610d5857610d586122aa565b6020026020010151611905565b80610d6f81612263565b915050610d3a565b6000818152600960205260408120548190610d929042612211565b90506000620151808210610db257610dad62015180836121d0565b610db5565b60005b90506000610dc682620151806121f2565b610dd09084612211565b6000868152600a6020526040902054909150610df957610df08282611abe565b95945050505050565b600085815260096020908152604080832054600a909252822054610e1d9190612211565b90506000620151808210610e3d57610e3862015180836121d0565b610e40565b60005b90506000610e5182620151806121f2565b610e5b9084612211565b9050610e678282611abe565b610e718686611abe565b610e7b9190612211565b98975050505050505050565b6001600160a01b038116600090815260086020526040812060609190610eac90611598565b90506000815167ffffffffffffffff811115610eca57610eca6122c0565b604051908082528060200260200182016040528015610f1f57816020015b610f0c60405180606001604052806000815260200160008152602001600081525090565b815260200190600190039081610ee85790505b50905060005b8251811015610fb3576000838281518110610f4257610f426122aa565b60200260200101519050604051806060016040528082815260200160096000848152602001908152602001600020548152602001610f7f83610a63565b815250838381518110610f9457610f946122aa565b6020026020010181905250508080610fab90612263565b915050610f25565b509392505050565b6005546001600160a01b031633146110155760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106e7565b6001600160a01b0381166110915760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016106e7565b6106468161184a565b6001600160a01b0383166111155760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016106e7565b6001600160a01b0382166111915760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016106e7565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b60006105be825490565b60006112098383611bcb565b9392505050565b6001600160a01b0382166112665760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016106e7565b806002600082825461127891906121b8565b90915550506001600160a01b038216600090815260208190526040812080548392906112a59084906121b8565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811461137b578181101561136e5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016106e7565b61137b848484840361109a565b50505050565b6001600160a01b0383166113fd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016106e7565b6001600160a01b0382166114795760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016106e7565b6001600160a01b038316600090815260208190526040902054818110156115085760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016106e7565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061153f9084906121b8565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161158b91815260200190565b60405180910390a361137b565b6060600061120983611bf5565b6001600160a01b0382166116215760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016106e7565b6001600160a01b038216600090815260208190526040902054818110156116b05760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016106e7565b6001600160a01b03831660009081526020819052604081208383039055600280548492906116df908490612211565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016111e6565b336000908152600860205260409020819061173d90826118ed565b6117af5760405162461bcd60e51b815260206004820152602e60248201527f5448433a20596f752063616e206f6e6c7920756e7374616b652074686520417060448201527f657320796f75207374616b65642100000000000000000000000000000000000060648201526084016106e7565b60006117ba83610d77565b90506117c63382611210565b6006546040516323b872dd60e01b8152306004820152336024820152604481018590526001600160a01b03909116906323b872dd90606401600060405180830381600087803b15801561181857600080fd5b505af115801561182c573d6000803e3d6000fd5b505033600090815260086020526040902061137b9250905084611c51565b600580546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000606482116118dd576118c5826702c68af0bb1400006121f2565b6118d8906804563918244f4000006121b8565b6105be565b68056bc75e2d6310000092915050565b60008181526001830160205260408120541515611209565b6006546040517f6352211e00000000000000000000000000000000000000000000000000000000815260048101839052829133916001600160a01b0390911690636352211e9060240160206040518083038186803b15801561196657600080fd5b505afa15801561197a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061199e9190611e77565b6001600160a01b031614611a1a5760405162461bcd60e51b815260206004820152602960248201527f5448433a20596f752063616e206f6e6c79207374616b6520746865204170657360448201527f20796f75206f776e21000000000000000000000000000000000000000000000060648201526084016106e7565b6006546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd90606401600060405180830381600087803b158015611a6c57600080fd5b505af1158015611a80573d6000803e3d6000fd5b5050336000908152600860205260409020611a9e9250905083611c5d565b50506000908152600960209081526040808320429055600a909152812055565b600080611acc846064611c69565b905060008115611b34576002611ae3600184612211565b611af5906702c68af0bb1400006121f2565b611b0890680458ffa3150a5400006121b8565b611b1b90680458ffa3150a5400006121b8565b611b2590846121f2565b611b2f91906121d0565b611b37565b60005b90506000611b44866118a9565b90506000808611611b56576000611b6e565b62015180611b6487846121f2565b611b6e91906121d0565b905060648711611b8d57611b8281846121b8565b9450505050506105be565b80611b99606489612211565b611bac9068056bc75e2d631000006121f2565b611bb690856121b8565b611bc091906121b8565b979650505050505050565b6000826000018281548110611be257611be26122aa565b9060005260206000200154905092915050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611c4557602002820191906000526020600020905b815481526020019060010190808311611c31575b50505050509050919050565b60006112098383611c7f565b60006112098383611d72565b6000818310611c785781611209565b5090919050565b60008181526001830160205260408120548015611d68576000611ca3600183612211565b8554909150600090611cb790600190612211565b9050818114611d1c576000866000018281548110611cd757611cd76122aa565b9060005260206000200154905080876000018481548110611cfa57611cfa6122aa565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611d2d57611d2d612294565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506105be565b60009150506105be565b6000818152600183016020526040812054611db9575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556105be565b5060006105be565b828054611dcd90612228565b90600052602060002090601f016020900481019282611def5760008555611e35565b82601f10611e0857805160ff1916838001178555611e35565b82800160010185558215611e35579182015b82811115611e35578251825591602001919060010190611e1a565b50611e41929150611e45565b5090565b5b80821115611e415760008155600101611e46565b600060208284031215611e6c57600080fd5b8135611209816122d6565b600060208284031215611e8957600080fd5b8151611209816122d6565b60008060408385031215611ea757600080fd5b8235611eb2816122d6565b91506020830135611ec2816122d6565b809150509250929050565b600080600060608486031215611ee257600080fd5b8335611eed816122d6565b92506020840135611efd816122d6565b929592945050506040919091013590565b60008060408385031215611f2157600080fd5b8235611f2c816122d6565b946020939093013593505050565b60006020808385031215611f4d57600080fd5b823567ffffffffffffffff80821115611f6557600080fd5b818501915085601f830112611f7957600080fd5b813581811115611f8b57611f8b6122c0565b8060051b9150611f9c848301612187565b8181528481019084860184860187018a1015611fb757600080fd5b600095505b83861015611fda578035835260019590950194918601918601611fbc565b5098975050505050505050565b60006020808385031215611ffa57600080fd5b823567ffffffffffffffff8082111561201257600080fd5b818501915085601f83011261202657600080fd5b813581811115612038576120386122c0565b61204a601f8201601f19168501612187565b9150808252868482850101111561206057600080fd5b8084840185840137600090820190930192909252509392505050565b60006020828403121561208e57600080fd5b5035919050565b602080825282518282018190526000919060409081850190868401855b828110156120e157815180518552868101518786015285015185850152606090930192908501906001016120b2565b5091979650505050505050565b6020808252825182820181905260009190848201906040850190845b818110156121265783518352928401929184019160010161210a565b50909695505050505050565b600060208083528351808285015260005b8181101561215f57858101830151858201604001528201612143565b81811115612171576000604083870101525b50601f01601f1916929092016040019392505050565b604051601f8201601f1916810167ffffffffffffffff811182821017156121b0576121b06122c0565b604052919050565b600082198211156121cb576121cb61227e565b500190565b6000826121ed57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561220c5761220c61227e565b500290565b6000828210156122235761222361227e565b500390565b600181811c9082168061223c57607f821691505b6020821081141561225d57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156122775761227761227e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461064657600080fdfea2646970667358221220bf798edbfd8606463c57b3c84124fbf34663768624f9f756bc64e6b864f59acb64736f6c63430008070033

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102265760003560e01c8063715018a61161012a578063a9059cbb116100bd578063d325309e1161008c578063eaa4f9b511610071578063eaa4f9b5146104d2578063ee17c855146104e5578063f2fde38b1461050557600080fd5b8063d325309e14610486578063dd62ed3e1461049957600080fd5b8063a9059cbb1461043a578063ad003bef1461044d578063ae9c33d914610460578063b06725cd1461047357600080fd5b80638da5cb5b116100f95780638da5cb5b146103f257806395d89b4114610417578063a19a51e21461041f578063a457c2d71461042757600080fd5b8063715018a6146103b157806379cc6790146103b957806381d3c435146103cc5780638cf326f6146103df57600080fd5b8063319266f8116101bd5780634d4ace811161018c57806366503312116101715780636650331214610355578063697154d61461036857806370a082311461038857600080fd5b80634d4ace811461032f5780635415eb341461034257600080fd5b8063319266f8146102ee57806335322f3714610301578063395093511461030957806342966c681461031c57600080fd5b806318160ddd116101f957806318160ddd146102a457806323b872dd146102ac5780632cf01b55146102bf578063313ce567146102df57600080fd5b806306fdde031461022b578063095ea7b3146102495780630b83a7271461026c57806311c0262d14610276575b600080fd5b610233610518565b6040516102409190612132565b60405180910390f35b61025c610257366004611f0e565b6105aa565b6040519015158152602001610240565b6102746105c4565b005b61029661028436600461207c565b60096020526000908152604090205481565b604051908152602001610240565b600254610296565b61025c6102ba366004611ecd565b610649565b6102d26102cd366004611e5a565b61066d565b60405161024091906120ee565b60405160128152602001610240565b6102746102fc366004611fe7565b610691565b610274610730565b61025c610317366004611f0e565b61074e565b61027461032a36600461207c565b61078d565b61027461033d366004611f0e565b610797565b610274610350366004611f3a565b6108a5565b610296610363366004611e5a565b6108e5565b61029661037636600461207c565b600a6020526000908152604090205481565b610296610396366004611e5a565b6001600160a01b031660009081526020819052604090205490565b610274610961565b6102746103c7366004611f0e565b6109c5565b6102746103da366004611e5a565b6109da565b6102966103ed36600461207c565b610a63565b6005546001600160a01b03165b6040516001600160a01b039091168152602001610240565b610233610ab4565b610296601981565b61025c610435366004611f0e565b610ac3565b61025c610448366004611f0e565b610b6d565b61027461045b366004611f3a565b610b7b565b61029661046e366004611e5a565b610c7b565b610274610481366004611f3a565b610c9c565b61029661049436600461207c565b610d77565b6102966104a7366004611e94565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6006546103ff906001600160a01b031681565b6104f86104f3366004611e5a565b610e87565b6040516102409190612095565b610274610513366004611e5a565b610fbb565b60606003805461052790612228565b80601f016020809104026020016040519081016040528092919081815260200182805461055390612228565b80156105a05780601f10610575576101008083540402835291602001916105a0565b820191906000526020600020905b81548152906001019060200180831161058357829003601f168201915b5050505050905090565b6000336105b881858561109a565b60019150505b92915050565b6000805b3360009081526008602052604090206105e0906111f3565b81101561063b5733600090815260086020526040812061060090836111fd565b905061060b81610d77565b61061590846121b8565b6000918252600a602052604090912042905591508061063381612263565b9150506105c8565b506106463382611210565b50565b6000336106578582856112ef565b610662858585611381565b506001949350505050565b6001600160a01b03811660009081526008602052604090206060906105be90611598565b6005546001600160a01b031633146106f05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6000805260076020908152815161072c917f6d5257204ebe7d88fd91ae87941cb2dd9d8062b64ae5a2bd2d28ec40b9fbf6df9190840190611dc1565b5050565b33600090815260086020526040902061074c9061035090611598565b565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091906105b890829086906107889087906121b8565b61109a565b61064633826115a5565b6005546001600160a01b031633146107f15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106e7565b6000805260076020527f6d5257204ebe7d88fd91ae87941cb2dd9d8062b64ae5a2bd2d28ec40b9fbf6df805461082690612228565b15905061089b5760405162461bcd60e51b815260206004820152602360248201527f5448433a204163636573732069732044697361626c6564205065726d616e656e60448201527f746c79000000000000000000000000000000000000000000000000000000000060648201526084016106e7565b61072c8282611210565b60005b815181101561072c576108d38282815181106108c6576108c66122aa565b6020026020010151611722565b806108dd81612263565b9150506108a8565b6001600160a01b03811660009081526008602052604081208190819061090a90611598565b905060005b81518110156109585761093a82828151811061092d5761092d6122aa565b6020026020010151610d77565b61094490846121b8565b92508061095081612263565b91505061090f565b50909392505050565b6005546001600160a01b031633146109bb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106e7565b61074c600061184a565b6109d08233836112ef565b61072c82826115a5565b6005546001600160a01b03163314610a345760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106e7565b6006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6000818152600960205260408120548190610a7e9042612211565b90506000620151808210610a9e57610a9962015180836121d0565b610aa1565b60005b9050610aac816118a9565b949350505050565b60606004805461052790612228565b3360008181526001602090815260408083206001600160a01b038716845290915281205490919083811015610b605760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f00000000000000000000000000000000000000000000000000000060648201526084016106e7565b610662828686840361109a565b6000336105b8818585611381565b6000805b8251811015610c70576000838281518110610b9c57610b9c6122aa565b60209081029190910181015133600090815260089092526040909120909150610bc590826118ed565b610c375760405162461bcd60e51b815260206004820152602b60248201527f5448433a20596f752063616e206f6e6c7920636c61696d204170657320796f7560448201527f277665207374616b65642100000000000000000000000000000000000000000060648201526084016106e7565b610c4081610d77565b610c4a90846121b8565b6000918252600a6020526040909120429055915080610c6881612263565b915050610b7f565b5061072c3382611210565b6001600160a01b03811660009081526008602052604081206105be906111f3565b336000908152600860205260409020601990610cb7906111f3565b8251610cc391906121b8565b1115610d375760405162461bcd60e51b815260206004820152602260248201527f5448433a2043616e207374616b65206d6178696d756d206f662032352041706560448201527f732100000000000000000000000000000000000000000000000000000000000060648201526084016106e7565b60005b815181101561072c57610d65828281518110610d5857610d586122aa565b6020026020010151611905565b80610d6f81612263565b915050610d3a565b6000818152600960205260408120548190610d929042612211565b90506000620151808210610db257610dad62015180836121d0565b610db5565b60005b90506000610dc682620151806121f2565b610dd09084612211565b6000868152600a6020526040902054909150610df957610df08282611abe565b95945050505050565b600085815260096020908152604080832054600a909252822054610e1d9190612211565b90506000620151808210610e3d57610e3862015180836121d0565b610e40565b60005b90506000610e5182620151806121f2565b610e5b9084612211565b9050610e678282611abe565b610e718686611abe565b610e7b9190612211565b98975050505050505050565b6001600160a01b038116600090815260086020526040812060609190610eac90611598565b90506000815167ffffffffffffffff811115610eca57610eca6122c0565b604051908082528060200260200182016040528015610f1f57816020015b610f0c60405180606001604052806000815260200160008152602001600081525090565b815260200190600190039081610ee85790505b50905060005b8251811015610fb3576000838281518110610f4257610f426122aa565b60200260200101519050604051806060016040528082815260200160096000848152602001908152602001600020548152602001610f7f83610a63565b815250838381518110610f9457610f946122aa565b6020026020010181905250508080610fab90612263565b915050610f25565b509392505050565b6005546001600160a01b031633146110155760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106e7565b6001600160a01b0381166110915760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016106e7565b6106468161184a565b6001600160a01b0383166111155760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016106e7565b6001600160a01b0382166111915760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f737300000000000000000000000000000000000000000000000000000000000060648201526084016106e7565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b60006105be825490565b60006112098383611bcb565b9392505050565b6001600160a01b0382166112665760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016106e7565b806002600082825461127891906121b8565b90915550506001600160a01b038216600090815260208190526040812080548392906112a59084906121b8565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6001600160a01b03838116600090815260016020908152604080832093861683529290522054600019811461137b578181101561136e5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016106e7565b61137b848484840361109a565b50505050565b6001600160a01b0383166113fd5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f647265737300000000000000000000000000000000000000000000000000000060648201526084016106e7565b6001600160a01b0382166114795760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f657373000000000000000000000000000000000000000000000000000000000060648201526084016106e7565b6001600160a01b038316600090815260208190526040902054818110156115085760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e6365000000000000000000000000000000000000000000000000000060648201526084016106e7565b6001600160a01b0380851660009081526020819052604080822085850390559185168152908120805484929061153f9084906121b8565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161158b91815260200190565b60405180910390a361137b565b6060600061120983611bf5565b6001600160a01b0382166116215760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f730000000000000000000000000000000000000000000000000000000000000060648201526084016106e7565b6001600160a01b038216600090815260208190526040902054818110156116b05760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f636500000000000000000000000000000000000000000000000000000000000060648201526084016106e7565b6001600160a01b03831660009081526020819052604081208383039055600280548492906116df908490612211565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906020016111e6565b336000908152600860205260409020819061173d90826118ed565b6117af5760405162461bcd60e51b815260206004820152602e60248201527f5448433a20596f752063616e206f6e6c7920756e7374616b652074686520417060448201527f657320796f75207374616b65642100000000000000000000000000000000000060648201526084016106e7565b60006117ba83610d77565b90506117c63382611210565b6006546040516323b872dd60e01b8152306004820152336024820152604481018590526001600160a01b03909116906323b872dd90606401600060405180830381600087803b15801561181857600080fd5b505af115801561182c573d6000803e3d6000fd5b505033600090815260086020526040902061137b9250905084611c51565b600580546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000606482116118dd576118c5826702c68af0bb1400006121f2565b6118d8906804563918244f4000006121b8565b6105be565b68056bc75e2d6310000092915050565b60008181526001830160205260408120541515611209565b6006546040517f6352211e00000000000000000000000000000000000000000000000000000000815260048101839052829133916001600160a01b0390911690636352211e9060240160206040518083038186803b15801561196657600080fd5b505afa15801561197a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061199e9190611e77565b6001600160a01b031614611a1a5760405162461bcd60e51b815260206004820152602960248201527f5448433a20596f752063616e206f6e6c79207374616b6520746865204170657360448201527f20796f75206f776e21000000000000000000000000000000000000000000000060648201526084016106e7565b6006546040516323b872dd60e01b8152336004820152306024820152604481018490526001600160a01b03909116906323b872dd90606401600060405180830381600087803b158015611a6c57600080fd5b505af1158015611a80573d6000803e3d6000fd5b5050336000908152600860205260409020611a9e9250905083611c5d565b50506000908152600960209081526040808320429055600a909152812055565b600080611acc846064611c69565b905060008115611b34576002611ae3600184612211565b611af5906702c68af0bb1400006121f2565b611b0890680458ffa3150a5400006121b8565b611b1b90680458ffa3150a5400006121b8565b611b2590846121f2565b611b2f91906121d0565b611b37565b60005b90506000611b44866118a9565b90506000808611611b56576000611b6e565b62015180611b6487846121f2565b611b6e91906121d0565b905060648711611b8d57611b8281846121b8565b9450505050506105be565b80611b99606489612211565b611bac9068056bc75e2d631000006121f2565b611bb690856121b8565b611bc091906121b8565b979650505050505050565b6000826000018281548110611be257611be26122aa565b9060005260206000200154905092915050565b606081600001805480602002602001604051908101604052809291908181526020018280548015611c4557602002820191906000526020600020905b815481526020019060010190808311611c31575b50505050509050919050565b60006112098383611c7f565b60006112098383611d72565b6000818310611c785781611209565b5090919050565b60008181526001830160205260408120548015611d68576000611ca3600183612211565b8554909150600090611cb790600190612211565b9050818114611d1c576000866000018281548110611cd757611cd76122aa565b9060005260206000200154905080876000018481548110611cfa57611cfa6122aa565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611d2d57611d2d612294565b6001900381819060005260206000200160009055905585600101600086815260200190815260200160002060009055600193505050506105be565b60009150506105be565b6000818152600183016020526040812054611db9575081546001818101845560008481526020808220909301849055845484825282860190935260409020919091556105be565b5060006105be565b828054611dcd90612228565b90600052602060002090601f016020900481019282611def5760008555611e35565b82601f10611e0857805160ff1916838001178555611e35565b82800160010185558215611e35579182015b82811115611e35578251825591602001919060010190611e1a565b50611e41929150611e45565b5090565b5b80821115611e415760008155600101611e46565b600060208284031215611e6c57600080fd5b8135611209816122d6565b600060208284031215611e8957600080fd5b8151611209816122d6565b60008060408385031215611ea757600080fd5b8235611eb2816122d6565b91506020830135611ec2816122d6565b809150509250929050565b600080600060608486031215611ee257600080fd5b8335611eed816122d6565b92506020840135611efd816122d6565b929592945050506040919091013590565b60008060408385031215611f2157600080fd5b8235611f2c816122d6565b946020939093013593505050565b60006020808385031215611f4d57600080fd5b823567ffffffffffffffff80821115611f6557600080fd5b818501915085601f830112611f7957600080fd5b813581811115611f8b57611f8b6122c0565b8060051b9150611f9c848301612187565b8181528481019084860184860187018a1015611fb757600080fd5b600095505b83861015611fda578035835260019590950194918601918601611fbc565b5098975050505050505050565b60006020808385031215611ffa57600080fd5b823567ffffffffffffffff8082111561201257600080fd5b818501915085601f83011261202657600080fd5b813581811115612038576120386122c0565b61204a601f8201601f19168501612187565b9150808252868482850101111561206057600080fd5b8084840185840137600090820190930192909252509392505050565b60006020828403121561208e57600080fd5b5035919050565b602080825282518282018190526000919060409081850190868401855b828110156120e157815180518552868101518786015285015185850152606090930192908501906001016120b2565b5091979650505050505050565b6020808252825182820181905260009190848201906040850190845b818110156121265783518352928401929184019160010161210a565b50909695505050505050565b600060208083528351808285015260005b8181101561215f57858101830151858201604001528201612143565b81811115612171576000604083870101525b50601f01601f1916929092016040019392505050565b604051601f8201601f1916810167ffffffffffffffff811182821017156121b0576121b06122c0565b604052919050565b600082198211156121cb576121cb61227e565b500190565b6000826121ed57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561220c5761220c61227e565b500290565b6000828210156122235761222361227e565b500390565b600181811c9082168061223c57607f821691505b6020821081141561225d57634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156122775761227761227e565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461064657600080fdfea2646970667358221220bf798edbfd8606463c57b3c84124fbf34663768624f9f756bc64e6b864f59acb64736f6c63430008070033

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.