ETH Price: $2,690.58 (-0.24%)
Gas: 0.74 Gwei

Contract

0x0CB63835B0A8a9B561ea014c39BAd9f9D3349d55
 

Overview

ETH Balance

0.0453 ETH

Eth Value

$121.88 (@ $2,690.58/ETH)
Transaction Hash
Method
Block
From
To
Buy Traits From ...191853622024-02-08 18:55:23374 days ago1707418523IN
0x0CB63835...9D3349d55
0.0086 ETH0.0062088158.3661037
Buy Traits From ...191789222024-02-07 21:14:23375 days ago1707340463IN
0x0CB63835...9D3349d55
0.0043 ETH0.0053270550.07716572
Buy Traits From ...191788182024-02-07 20:53:11375 days ago1707339191IN
0x0CB63835...9D3349d55
0.0086 ETH0.006214550.32927888
Buy Traits From ...191093332024-01-29 2:54:35385 days ago1706496875IN
0x0CB63835...9D3349d55
0.0216 ETH0.003700648.78877591
Buy Traits From ...189754222024-01-10 8:41:47403 days ago1704876107IN
0x0CB63835...9D3349d55
0.0022 ETH0.0027105225.48036377
Withdraw Fee189269612024-01-03 12:54:47410 days ago1704286487IN
0x0CB63835...9D3349d55
0 ETH0.00337093109.03535646
Buy Traits From ...189252242024-01-03 7:02:59411 days ago1704265379IN
0x0CB63835...9D3349d55
0.0043 ETH0.001235411.61342364
Buy Traits From ...189015202023-12-30 23:12:11414 days ago1703977931IN
0x0CB63835...9D3349d55
0.0022 ETH0.0018897715.30470396
Buy Traits From ...188744712023-12-27 3:57:35418 days ago1703649455IN
0x0CB63835...9D3349d55
0.0414 ETH0.0098280712.06730649
Add Store Traits188741402023-12-27 2:50:35418 days ago1703645435IN
0x0CB63835...9D3349d55
0 ETH0.0022308414.45008399
Add Store Traits188741272023-12-27 2:47:59418 days ago1703645279IN
0x0CB63835...9D3349d55
0 ETH0.0021891814.17693164
Add Store Traits188741172023-12-27 2:45:59418 days ago1703645159IN
0x0CB63835...9D3349d55
0 ETH0.0024948516.14634022
Add Store Traits188741102023-12-27 2:44:23418 days ago1703645063IN
0x0CB63835...9D3349d55
0 ETH0.0023905915.48004446
Add Store Traits188741012023-12-27 2:42:35418 days ago1703644955IN
0x0CB63835...9D3349d55
0 ETH0.0024356415.7729391
Add Store Traits188740852023-12-27 2:39:23418 days ago1703644763IN
0x0CB63835...9D3349d55
0 ETH0.0023392715.14297096
Add Store Traits188740772023-12-27 2:37:47418 days ago1703644667IN
0x0CB63835...9D3349d55
0 ETH0.0024674415.98387513
Add Store Traits188740692023-12-27 2:36:11418 days ago1703644571IN
0x0CB63835...9D3349d55
0 ETH0.0027199617.6196568
Remove Store Tra...188740632023-12-27 2:34:59418 days ago1703644499IN
0x0CB63835...9D3349d55
0 ETH0.0003620913.2665141
Add Store Traits188740592023-12-27 2:34:11418 days ago1703644451IN
0x0CB63835...9D3349d55
0 ETH0.0020546813.30177179
Add Store Traits188740462023-12-27 2:31:35418 days ago1703644295IN
0x0CB63835...9D3349d55
0 ETH0.0021745514.0865535
Add Store Traits188740262023-12-27 2:27:35418 days ago1703644055IN
0x0CB63835...9D3349d55
0 ETH0.0024522715.87572265
Buy Traits From ...188672482023-12-26 3:40:35419 days ago1703562035IN
0x0CB63835...9D3349d55
0.0114 ETH0.0036741613.0836548
Buy Traits From ...188567042023-12-24 16:06:11420 days ago1703433971IN
0x0CB63835...9D3349d55
0.0583 ETH0.0166737220.47267442
Buy Traits From ...188535392023-12-24 5:25:47421 days ago1703395547IN
0x0CB63835...9D3349d55
0.0086 ETH0.0022017620.69771103
Add Store Traits188530632023-12-24 3:49:35421 days ago1703389775IN
0x0CB63835...9D3349d55
0 ETH0.0027663217.91442021
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block
From
To
189269612024-01-03 12:54:47410 days ago1704286487
0x0CB63835...9D3349d55
0.1854 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
HoodyTraits

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

Other Settings:
paris EvmVersion
File 1 of 8 : HoodyTraits.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "./IHoody.sol";

contract HoodyTraits is IHoody, Ownable {
    using EnumerableSet for EnumerableSet.UintSet;

    struct Attribute {
        uint8 id;
        string name;
    }

    struct Trait {
        uint8 attrID;
        bool onStore;
        HoodyTraitRarity rarity;
    }

    address public hoodyGang;
    address public hoodyTraitsMarketplace;

    uint8 public pointForCommon = 4;
    uint8 public pointForRare = 20;
    uint8 public pointForLegendary = 40;

    uint8 totalAttributeNumber;
    uint16 totalTraitsNumber;

    mapping(uint8 => Attribute) public attributes;
    mapping(uint16 => Trait) public traits;
    mapping(uint8 => EnumerableSet.UintSet) storeTraitsByAttribute;
    mapping(HoodyTraitRarity => uint8) public traitPointByRarity;

    mapping(address => mapping(uint16 => uint16)) public traitAmountByHolder;
    mapping(uint16 => uint16) public traitAmountOnStore;
    mapping(uint16 => uint256) public traitPriceOnStore;
    mapping(address => EnumerableSet.UintSet) traitsByHolder;

    modifier onlyMarketplace() {
        require(
            msg.sender == hoodyTraitsMarketplace,
            "Only Marketplace can call this function."
        );
        _;
    }

    modifier onlyHoodyGang() {
        require(
            msg.sender == hoodyGang,
            "Only HoodyGang contract can call this function."
        );
        _;
    }

    event NewAttribute(uint8 indexed attrID, string attrName);

    event NewTrait(
        uint16 indexed traitID,
        uint8 attrID,
        string name,
        HoodyTraitRarity rarity
    );

    event BuyTraitFromStore(
        address buyer,
        uint16 indexed traitID,
        uint16 amount
    );

    event UpdateNFT(address holder, uint16[] oldTraits, uint16[] newTraits);

    event TraitRemoved(uint16 traitID);

    event TraitIncreased(uint16 traitID, uint8 amount);

    constructor() Ownable(msg.sender) {}

    function addAttributes(string[] memory _attrNames) external onlyOwner {
        for (uint i; i < _attrNames.length; i++) {
            totalAttributeNumber++;
            attributes[totalAttributeNumber] = Attribute(
                totalAttributeNumber,
                _attrNames[i]
            );
            emit NewAttribute(totalAttributeNumber, _attrNames[i]);
        }
    }

    function addMintTraits(
        uint8 _attrID,
        string[] memory _traitNames,
        HoodyTraitRarity[] memory _traitRarities
    ) public onlyOwner {
        require(
            _traitNames.length == _traitRarities.length,
            "Invalid Param Counts!"
        );
        for (uint i; i < _traitNames.length; i++) {
            totalTraitsNumber++;
            addTrait(
                _attrID,
                totalTraitsNumber,
                _traitNames[i],
                false,
                _traitRarities[i]
            );
        }
    }

    function addStoreTraits(
        uint8 _attrID,
        string[] memory _traitNames,
        HoodyTraitRarity[] memory _traitRarities,
        uint256[] memory _traitPrices,
        uint16[] memory _traitAmounts
    ) public onlyOwner {
        require(_traitNames.length == _traitRarities.length, "Invalid Params!");
        require(_traitNames.length == _traitAmounts.length, "Invalid Params!");
        require(_traitNames.length == _traitPrices.length, "Invalid Params!");

        for (uint i; i < _traitNames.length; i++) {
            totalTraitsNumber++;
            addTrait(
                _attrID,
                totalTraitsNumber,
                _traitNames[i],
                true,
                _traitRarities[i]
            );
            traitAmountOnStore[totalTraitsNumber] = _traitAmounts[i];
            traitPriceOnStore[totalTraitsNumber] = _traitPrices[i];
            storeTraitsByAttribute[_attrID].add(totalTraitsNumber);
        }
    }

    function addTrait(
        uint8 _attrID,
        uint16 _traitID,
        string memory _name,
        bool _onStore,
        HoodyTraitRarity _traitRarity
    ) internal {
        traits[_traitID] = Trait(_attrID, _onStore, _traitRarity);
        emit NewTrait(_traitID, _attrID, _name, _traitRarity);
    }

    function getNFTRarity(
        uint16[] memory _traits
    ) external view returns (HoodyGangRarity rarity) {
        uint8 point = 0;
        point = getTotalPointOfTraits(_traits);
        if (point >= pointForLegendary) rarity = HoodyGangRarity.Legendary;
        else if (point >= pointForRare) rarity = HoodyGangRarity.Rare;
        else rarity = HoodyGangRarity.Common;
    }

    function increaseStoreTraitAmount(
        uint16 _traitID,
        uint8 _amount
    ) public onlyOwner {
        require(_traitID <= totalTraitsNumber, "Invalid Trait!");
        traitAmountOnStore[_traitID] += _amount;
        emit TraitIncreased(_traitID, _amount);
    }

    function removeStoreTrait(uint16 _traitID) external onlyOwner {
        require(_traitID <= totalTraitsNumber, "Invalid Trait!");
        traitAmountOnStore[_traitID] = 0;
        emit TraitRemoved(_traitID);
    }

    function setTraitPointsByRarity(
        HoodyTraitRarity[] memory _rarities,
        uint8[] memory _points
    ) external onlyOwner {
        require(_rarities.length == _points.length, "Invalid Param!");
        for (uint i; i < _rarities.length; i++) {
            traitPointByRarity[_rarities[i]] = _points[i];
        }
    }

    function setNFTRarityPoints(
        uint8 _common,
        uint8 _rare,
        uint8 _legendary
    ) external onlyOwner {
        pointForCommon = _common;
        pointForRare = _rare;
        pointForLegendary = _legendary;
    }

    function buyTraitsFromStore(
        uint16[] memory _traits,
        uint16[] memory _amounts
    ) external payable {
        require(_traits.length == _amounts.length, "Invalid param count.");
        uint256 totalPrice;
        for (uint256 i; i < _traits.length; i++) {
            totalPrice += traitPriceOnStore[_traits[i]] * _amounts[i];
        }
        require(msg.value == totalPrice, "Not enough eth amount.");

        for (uint256 i; i < _traits.length; i++) {
            require(
                traitAmountOnStore[_traits[i]] >= _amounts[i],
                "Not enough amount in store!"
            );
            traitAmountByHolder[msg.sender][_traits[i]] += _amounts[i];
            traitAmountOnStore[_traits[i]] -= _amounts[i];
            traitsByHolder[msg.sender].add(_traits[i]);

            emit BuyTraitFromStore(msg.sender, _traits[i], _amounts[i]);
        }
    }

    function buyTraitFromMarketplace(
        uint16 _traitId,
        uint16 _amount
    ) external onlyMarketplace {
        traitAmountByHolder[tx.origin][_traitId] += _amount;
        traitsByHolder[tx.origin].add(_traitId);
    }

    function downTraitsFromMarketplace(
        uint16 _traitId,
        uint16 _amount
    ) external onlyMarketplace {
        traitAmountByHolder[tx.origin][_traitId] += _amount;
    }

    function listTraitsToMarketplace(
        uint16 _traitId,
        uint16 _amount
    ) external onlyMarketplace {
        require(
            traitAmountByHolder[tx.origin][_traitId] >= _amount,
            "Not enough Traits"
        );
        traitAmountByHolder[tx.origin][_traitId] -= _amount;
    }

    function useTraitsForUpdateNFT(
        uint16[] memory _originTraits,
        uint16[] memory _newTraits
    ) external onlyHoodyGang {
        for (uint256 i; i < _originTraits.length; i++) {
            traitAmountByHolder[tx.origin][_originTraits[i]]++;
        }
        for (uint256 i; i < _newTraits.length; i++) {
            require(
                traitAmountByHolder[tx.origin][_newTraits[i]] > 0,
                "You don't have that traits."
            );
            traitAmountByHolder[tx.origin][_newTraits[i]]--;
            if (traitAmountByHolder[tx.origin][_newTraits[i]] == 0) {
                traitsByHolder[tx.origin].remove(_newTraits[i]);
            }
        }

        emit UpdateNFT(tx.origin, _originTraits, _newTraits);
    }

    function getTraitsByHolder(
        address _holder
    ) external view returns (Trait[] memory) {
        uint256 traitsCount = traitsByHolder[_holder].length();
        Trait[] memory traitsList = new Trait[](traitsCount);
        for (uint256 i; i < traitsCount; i++) {
            traitsList[i] = traits[uint16(traitsByHolder[_holder].at(i))];
        }
        return traitsList;
    }

    function getTotalPointOfTraits(
        uint16[] memory _traits
    ) public view returns (uint8 points) {
        for (uint256 i; i < _traits.length; i++) {
            points += traitPointByRarity[traits[_traits[i]].rarity];
        }
        return points;
    }

    function withdrawFee(address payable _receiver) external onlyOwner {
        _receiver.transfer(address(this).balance);
    }

    function setHoodyGang(address _hoodyGang) external onlyOwner {
        hoodyGang = _hoodyGang;
    }

    function setHoodyTraitsMarketplace(
        address _hoodyTraitsMarketplace
    ) external onlyOwner {
        hoodyTraitsMarketplace = _hoodyTraitsMarketplace;
    }
}

File 2 of 8 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)

pragma solidity ^0.8.20;

import {Context} from "../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.
 *
 * The initial owner is set to the address provided by the deployer. 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;

    /**
     * @dev The caller account is not authorized to perform an operation.
     */
    error OwnableUnauthorizedAccount(address account);

    /**
     * @dev The owner is not a valid owner account. (eg. `address(0)`)
     */
    error OwnableInvalidOwner(address owner);

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

    /**
     * @dev Initializes the contract setting the address provided by the deployer as the initial owner.
     */
    constructor(address initialOwner) {
        if (initialOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _transferOwnership(initialOwner);
    }

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        if (owner() != _msgSender()) {
            revert OwnableUnauthorizedAccount(_msgSender());
        }
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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 {
        if (newOwner == address(0)) {
            revert OwnableInvalidOwner(address(0));
        }
        _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 8 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol)

pragma solidity ^0.8.20;

/**
 * @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 4 of 8 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol)

pragma solidity ^0.8.20;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    /**
     * @dev Muldiv operation overflow.
     */
    error MathOverflowedMulDiv();

    enum Rounding {
        Floor, // Toward negative infinity
        Ceil, // Toward positive infinity
        Trunc, // Toward zero
        Expand // Away from zero
    }

    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     */
    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 subtraction of two unsigned integers, with an overflow flag.
     */
    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.
     */
    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.
     */
    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.
     */
    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 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 towards infinity instead
     * of rounding towards zero.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        if (b == 0) {
            // Guarantee the same behavior as in a regular Solidity division.
            return a / b;
        }

        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or
     * denominator == 0.
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by
     * Uniswap Labs also under MIT license.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0 = x * y; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                // Solidity will revert if denominator == 0, unlike the div opcode on its own.
                // The surrounding unchecked block does not change this fact.
                // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic.
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            if (denominator <= prod1) {
                revert MathOverflowedMulDiv();
            }

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator.
            // Always >= 1. See https://cs.stackexchange.com/q/138556/92363.

            uint256 twos = denominator & (0 - denominator);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also
            // works in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded
     * towards zero.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10 ** 64) {
                value /= 10 ** 64;
                result += 64;
            }
            if (value >= 10 ** 32) {
                value /= 10 ** 32;
                result += 32;
            }
            if (value >= 10 ** 16) {
                value /= 10 ** 16;
                result += 16;
            }
            if (value >= 10 ** 8) {
                value /= 10 ** 8;
                result += 8;
            }
            if (value >= 10 ** 4) {
                value /= 10 ** 4;
                result += 4;
            }
            if (value >= 10 ** 2) {
                value /= 10 ** 2;
                result += 2;
            }
            if (value >= 10 ** 1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256 of a positive value rounded towards zero.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 256, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0);
        }
    }

    /**
     * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers.
     */
    function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) {
        return uint8(rounding) % 2 == 1;
    }
}

File 5 of 8 : SignedMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol)

pragma solidity ^0.8.20;

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

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

    /**
     * @dev Returns the average of two signed numbers without overflow.
     * The result is rounded towards zero.
     */
    function average(int256 a, int256 b) internal pure returns (int256) {
        // Formula from the book "Hacker's Delight"
        int256 x = (a & b) + ((a ^ b) >> 1);
        return x + (int256(uint256(x) >> 255) & (a ^ b));
    }

    /**
     * @dev Returns the absolute unsigned value of a signed value.
     */
    function abs(int256 n) internal pure returns (uint256) {
        unchecked {
            // must be unchecked in order to support `n = type(int256).min`
            return uint256(n >= 0 ? n : -n);
        }
    }
}

File 6 of 8 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol)

pragma solidity ^0.8.20;

import {Math} from "./math/Math.sol";
import {SignedMath} from "./math/SignedMath.sol";

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant HEX_DIGITS = "0123456789abcdef";
    uint8 private constant ADDRESS_LENGTH = 20;

    /**
     * @dev The `value` string doesn't fit in the specified `length`.
     */
    error StringsInsufficientHexLength(uint256 value, uint256 length);

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), HEX_DIGITS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `int256` to its ASCII `string` decimal representation.
     */
    function toStringSigned(int256 value) internal pure returns (string memory) {
        return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value)));
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        uint256 localValue = value;
        bytes memory buffer = new bytes(2 * length + 2);
        buffer[0] = "0";
        buffer[1] = "x";
        for (uint256 i = 2 * length + 1; i > 1; --i) {
            buffer[i] = HEX_DIGITS[localValue & 0xf];
            localValue >>= 4;
        }
        if (localValue != 0) {
            revert StringsInsufficientHexLength(value, length);
        }
        return string(buffer);
    }

    /**
     * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal
     * representation.
     */
    function toHexString(address addr) internal pure returns (string memory) {
        return toHexString(uint256(uint160(addr)), ADDRESS_LENGTH);
    }

    /**
     * @dev Returns true if the two strings are equal.
     */
    function equal(string memory a, string memory b) internal pure returns (bool) {
        return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b));
    }
}

File 7 of 8 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (utils/structs/EnumerableSet.sol)
// This file was procedurally generated from scripts/generate/templates/EnumerableSet.js.

pragma solidity ^0.8.20;

/**
 * @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.
 *
 * ```solidity
 * 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.
 *
 * [WARNING]
 * ====
 * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure
 * unusable.
 * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info.
 *
 * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an
 * array of EnumerableSet.
 * ====
 */
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 is the index of the value in the `values` array plus 1.
        // Position 0 is used to mean a value is not in the set.
        mapping(bytes32 value => uint256) _positions;
    }

    /**
     * @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._positions[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 cache the value's position to prevent multiple reads from the same storage slot
        uint256 position = set._positions[value];

        if (position != 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 valueIndex = position - 1;
            uint256 lastIndex = set._values.length - 1;

            if (valueIndex != lastIndex) {
                bytes32 lastValue = set._values[lastIndex];

                // Move the lastValue to the index where the value to delete is
                set._values[valueIndex] = lastValue;
                // Update the tracked position of the lastValue (that was just moved)
                set._positions[lastValue] = position;
            }

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

            // Delete the tracked position for the deleted slot
            delete set._positions[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._positions[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) {
        bytes32[] memory store = _values(set._inner);
        bytes32[] memory result;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }

    // 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;

        /// @solidity memory-safe-assembly
        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 in 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;

        /// @solidity memory-safe-assembly
        assembly {
            result := store
        }

        return result;
    }
}

File 8 of 8 : IHoody.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;

interface IHoody {
    enum HoodyGangRarity {
        Common,
        Rare,
        Legendary
    }

    enum HoodyTraitRarity {
        Common,
        Rare,
        Legendary
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"uint16","name":"traitID","type":"uint16"},{"indexed":false,"internalType":"uint16","name":"amount","type":"uint16"}],"name":"BuyTraitFromStore","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint8","name":"attrID","type":"uint8"},{"indexed":false,"internalType":"string","name":"attrName","type":"string"}],"name":"NewAttribute","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint16","name":"traitID","type":"uint16"},{"indexed":false,"internalType":"uint8","name":"attrID","type":"uint8"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"enum IHoody.HoodyTraitRarity","name":"rarity","type":"uint8"}],"name":"NewTrait","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":false,"internalType":"uint16","name":"traitID","type":"uint16"},{"indexed":false,"internalType":"uint8","name":"amount","type":"uint8"}],"name":"TraitIncreased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint16","name":"traitID","type":"uint16"}],"name":"TraitRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"holder","type":"address"},{"indexed":false,"internalType":"uint16[]","name":"oldTraits","type":"uint16[]"},{"indexed":false,"internalType":"uint16[]","name":"newTraits","type":"uint16[]"}],"name":"UpdateNFT","type":"event"},{"inputs":[{"internalType":"string[]","name":"_attrNames","type":"string[]"}],"name":"addAttributes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_attrID","type":"uint8"},{"internalType":"string[]","name":"_traitNames","type":"string[]"},{"internalType":"enum IHoody.HoodyTraitRarity[]","name":"_traitRarities","type":"uint8[]"}],"name":"addMintTraits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_attrID","type":"uint8"},{"internalType":"string[]","name":"_traitNames","type":"string[]"},{"internalType":"enum IHoody.HoodyTraitRarity[]","name":"_traitRarities","type":"uint8[]"},{"internalType":"uint256[]","name":"_traitPrices","type":"uint256[]"},{"internalType":"uint16[]","name":"_traitAmounts","type":"uint16[]"}],"name":"addStoreTraits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"attributes","outputs":[{"internalType":"uint8","name":"id","type":"uint8"},{"internalType":"string","name":"name","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_traitId","type":"uint16"},{"internalType":"uint16","name":"_amount","type":"uint16"}],"name":"buyTraitFromMarketplace","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"_traits","type":"uint16[]"},{"internalType":"uint16[]","name":"_amounts","type":"uint16[]"}],"name":"buyTraitsFromStore","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_traitId","type":"uint16"},{"internalType":"uint16","name":"_amount","type":"uint16"}],"name":"downTraitsFromMarketplace","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"_traits","type":"uint16[]"}],"name":"getNFTRarity","outputs":[{"internalType":"enum IHoody.HoodyGangRarity","name":"rarity","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"_traits","type":"uint16[]"}],"name":"getTotalPointOfTraits","outputs":[{"internalType":"uint8","name":"points","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_holder","type":"address"}],"name":"getTraitsByHolder","outputs":[{"components":[{"internalType":"uint8","name":"attrID","type":"uint8"},{"internalType":"bool","name":"onStore","type":"bool"},{"internalType":"enum IHoody.HoodyTraitRarity","name":"rarity","type":"uint8"}],"internalType":"struct HoodyTraits.Trait[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hoodyGang","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hoodyTraitsMarketplace","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_traitID","type":"uint16"},{"internalType":"uint8","name":"_amount","type":"uint8"}],"name":"increaseStoreTraitAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16","name":"_traitId","type":"uint16"},{"internalType":"uint16","name":"_amount","type":"uint16"}],"name":"listTraitsToMarketplace","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pointForCommon","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pointForLegendary","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pointForRare","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"_traitID","type":"uint16"}],"name":"removeStoreTrait","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_hoodyGang","type":"address"}],"name":"setHoodyGang","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_hoodyTraitsMarketplace","type":"address"}],"name":"setHoodyTraitsMarketplace","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"_common","type":"uint8"},{"internalType":"uint8","name":"_rare","type":"uint8"},{"internalType":"uint8","name":"_legendary","type":"uint8"}],"name":"setNFTRarityPoints","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"enum IHoody.HoodyTraitRarity[]","name":"_rarities","type":"uint8[]"},{"internalType":"uint8[]","name":"_points","type":"uint8[]"}],"name":"setTraitPointsByRarity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint16","name":"","type":"uint16"}],"name":"traitAmountByHolder","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"traitAmountOnStore","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum IHoody.HoodyTraitRarity","name":"","type":"uint8"}],"name":"traitPointByRarity","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"traitPriceOnStore","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16","name":"","type":"uint16"}],"name":"traits","outputs":[{"internalType":"uint8","name":"attrID","type":"uint8"},{"internalType":"bool","name":"onStore","type":"bool"},{"internalType":"enum IHoody.HoodyTraitRarity","name":"rarity","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"_originTraits","type":"uint16[]"},{"internalType":"uint16[]","name":"_newTraits","type":"uint16[]"}],"name":"useTraitsForUpdateNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_receiver","type":"address"}],"name":"withdrawFee","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526002805462ffffff60a01b1916620a050160a21b17905534801561002757600080fd5b50338061004e57604051631e4fbdf760e01b81526000600482015260240160405180910390fd5b6100578161005d565b506100ad565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61292c80620000bd6000396000f3fe6080604052600436106101e35760003560e01c80636fe9be4c116101025780639b604e8e11610095578063c3a567d111610064578063c3a567d114610654578063e997aba614610674578063f2fde38b14610687578063fd9d5a61146106a757600080fd5b80639b604e8e146105b85780639f839852146105f4578063af8d44b114610614578063afa4320a1461063457600080fd5b80638da5cb5b116100d15780638da5cb5b14610539578063908895b81461055757806394cfb96314610578578063998eb77c1461059857600080fd5b80636fe9be4c146104b5578063715018a6146104d557806379f3b872146104ea57806381ee56a11461051857600080fd5b80634bf0414f1161017a578063602979d011610149578063602979d01461040d578063624d52741461042d5780636a1168ba146104685780636cb7d44c1461049557600080fd5b80634bf0414f1461038d57806352a8c245146103ad57806352fa6ec9146103cd5780635ab8e0bc146103ed57600080fd5b8063242ad801116101b6578063242ad801146102aa57806333c16838146102ca5780633824f3351461030e57806347bf9fcf1461033b57600080fd5b8063094cc942146101e85780630960c84d146102205780630f800a14146102505780631ac3ddeb14610288575b600080fd5b3480156101f457600080fd5b5060025461020990600160a81b900460ff1681565b60405160ff90911681526020015b60405180910390f35b34801561022c57600080fd5b5061020961023b366004611d65565b60066020526000908152604090205460ff1681565b34801561025c57600080fd5b50600154610270906001600160a01b031681565b6040516001600160a01b039091168152602001610217565b34801561029457600080fd5b506102a86102a3366004611d95565b6106c7565b005b3480156102b657600080fd5b506102a86102c5366004611d95565b610708565b3480156102d657600080fd5b506102fb6102e5366004611dcb565b60086020526000908152604090205461ffff1681565b60405161ffff9091168152602001610217565b34801561031a57600080fd5b5061032e610329366004611ec3565b610732565b6040516102179190611f34565b34801561034757600080fd5b5061037e610356366004611dcb565b60046020526000908152604090205460ff808216916101008104821691620100009091041683565b60405161021793929190611f47565b34801561039957600080fd5b506102a86103a8366004611f70565b61078c565b3480156103b957600080fd5b506102a86103c8366004611d95565b61082b565b3480156103d957600080fd5b506102096103e8366004611ec3565b610855565b3480156103f957600080fd5b506102a86104083660046120fa565b6108f8565b34801561041957600080fd5b506102a861042836600461220f565b610ac2565b34801561043957600080fd5b5061045a610448366004611dcb565b60096020526000908152604090205481565b604051908152602001610217565b34801561047457600080fd5b50610488610483366004611d95565b610bb0565b6040516102179190612283565b3480156104a157600080fd5b506102a86104b03660046122ea565b610d1d565b3480156104c157600080fd5b506102a86104d036600461232d565b610d6d565b3480156104e157600080fd5b506102a8610e5a565b3480156104f657600080fd5b5061050a610505366004612357565b610e6e565b6040516102179291906123b8565b34801561052457600080fd5b5060025461020990600160a01b900460ff1681565b34801561054557600080fd5b506000546001600160a01b0316610270565b34801561056357600080fd5b5060025461020990600160b01b900460ff1681565b34801561058457600080fd5b506102a86105933660046123d4565b610f17565b3480156105a457600080fd5b50600254610270906001600160a01b031681565b3480156105c457600080fd5b506102fb6105d3366004612409565b600760209081526000928352604080842090915290825290205461ffff1681565b34801561060057600080fd5b506102a861060f366004611f70565b61105a565b34801561062057600080fd5b506102a861062f366004611f70565b6110d2565b34801561064057600080fd5b506102a861064f366004612427565b611193565b34801561066057600080fd5b506102a861066f36600461248b565b6114b4565b6102a8610682366004612427565b611598565b34801561069357600080fd5b506102a86106a2366004611d95565b611963565b3480156106b357600080fd5b506102a86106c2366004611dcb565b6119a1565b6106cf611a4e565b6040516001600160a01b038216904780156108fc02916000818181858888f19350505050158015610704573d6000803e3d6000fd5b5050565b610710611a4e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60008061073e83610855565b60025490915060ff600160b01b9091048116908216106107615760029150610786565b60025460ff600160a81b9091048116908216106107815760019150610786565b600091505b50919050565b6002546001600160a01b031633146107bf5760405162461bcd60e51b81526004016107b69061254d565b60405180910390fd5b32600090815260076020908152604080832061ffff8087168552925282208054849391926107ef918591166125ab565b82546101009290920a61ffff818102199093169183160217909155326000908152600a602052604090206108269250908416611a7b565b505050565b610833611a4e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000805b825181101561078657600660006004600086858151811061087c5761087c6125c6565b60209081029190910181015161ffff1682528101919091526040016000205462010000900460ff1660028111156108b5576108b5611f00565b60028111156108c6576108c6611f00565b81526020810191909152604001600020546108e49060ff16836125dc565b9150806108f0816125f5565b915050610859565b610900611a4e565b82518451146109215760405162461bcd60e51b81526004016107b69061260e565b80518451146109425760405162461bcd60e51b81526004016107b69061260e565b81518451146109635760405162461bcd60e51b81526004016107b69061260e565b60005b8451811015610aba5760028054600160c01b900461ffff1690601861098a83612637565b91906101000a81548161ffff021916908361ffff160217905550506109f586600260189054906101000a900461ffff168784815181106109cc576109cc6125c6565b602002602001015160018886815181106109e8576109e86125c6565b6020026020010151611a90565b818181518110610a0757610a076125c6565b602090810291909101810151600254600160c01b900461ffff908116600090815260089093526040909220805461ffff1916929091169190911790558251839082908110610a5757610a576125c6565b6020908102919091018101516002805461ffff600160c01b918290048116600090815260098652604080822095909555925460ff8c168452600590955292909120610aa793909291900416611a7b565b5080610ab2816125f5565b915050610966565b505050505050565b610aca611a4e565b8051825114610b135760405162461bcd60e51b8152602060048201526015602482015274496e76616c696420506172616d20436f756e74732160581b60448201526064016107b6565b60005b8251811015610baa5760028054600160c01b900461ffff16906018610b3a83612637565b91906101000a81548161ffff021916908361ffff16021790555050610b9884600260189054906101000a900461ffff16858481518110610b7c57610b7c6125c6565b602002602001015160008686815181106109e8576109e86125c6565b80610ba2816125f5565b915050610b16565b50505050565b6001600160a01b0381166000908152600a6020526040812060609190610bd590611b6c565b905060008167ffffffffffffffff811115610bf257610bf2611de6565b604051908082528060200260200182016040528015610c4457816020015b610c3160408051606081018252600080825260208201819052909182015290565b815260200190600190039081610c105790505b50905060005b82811015610d15576001600160a01b0385166000908152600a6020526040812060049190610c789084611b76565b61ffff16815260208082019290925260409081016000208151606081018352815460ff8082168352610100820481161515958301959095529093919284019162010000909104166002811115610cd057610cd0611f00565b6002811115610ce157610ce1611f00565b81525050828281518110610cf757610cf76125c6565b60200260200101819052508080610d0d906125f5565b915050610c4a565b509392505050565b610d25611a4e565b6002805461ffff60a01b1916600160a01b60ff9586160260ff60a81b191617600160a81b938516939093029290921760ff60b01b1916600160b01b9190931602919091179055565b610d75611a4e565b60025461ffff600160c01b90910481169083161115610dc75760405162461bcd60e51b815260206004820152600e60248201526d496e76616c69642054726169742160901b60448201526064016107b6565b61ffff8083166000908152600860205260408120805460ff851693919291610df1918591166125ab565b92506101000a81548161ffff021916908361ffff1602179055507fdbadb3abec960d70fe3360082480ce4b44d341cf5fb9123563e849a2ee79ce7c8282604051610e4e92919061ffff92909216825260ff16602082015260400190565b60405180910390a15050565b610e62611a4e565b610e6c6000611b82565b565b6003602052600090815260409020805460018201805460ff9092169291610e9490612658565b80601f0160208091040260200160405190810160405280929190818152602001828054610ec090612658565b8015610f0d5780601f10610ee257610100808354040283529160200191610f0d565b820191906000526020600020905b815481529060010190602001808311610ef057829003601f168201915b5050505050905082565b610f1f611a4e565b60005b81518110156107045760028054600160b81b900460ff16906017610f458361268c565b91906101000a81548160ff021916908360ff160217905550506040518060400160405280600260179054906101000a900460ff1660ff168152602001838381518110610f9357610f936125c6565b602090810291909101810151909152600254600160b81b900460ff908116600090815260038352604090208351815460ff19169216919091178155908201516001820190610fe190826126f1565b50905050600260179054906101000a900460ff1660ff167f96eec869db69ac031124416627cec7cf84a8c11c07fcee912f34393ec990120c83838151811061102b5761102b6125c6565b602002602001015160405161104091906127b1565b60405180910390a280611052816125f5565b915050610f22565b6002546001600160a01b031633146110845760405162461bcd60e51b81526004016107b69061254d565b32600090815260076020908152604080832061ffff8087168552925282208054849391926110b4918591166125ab565b92506101000a81548161ffff021916908361ffff1602179055505050565b6002546001600160a01b031633146110fc5760405162461bcd60e51b81526004016107b69061254d565b32600090815260076020908152604080832061ffff8681168552925290912054818316911610156111635760405162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f7567682054726169747360781b60448201526064016107b6565b32600090815260076020908152604080832061ffff8087168552925282208054849391926110b4918591166127c4565b6001546001600160a01b031633146112055760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c7920486f6f647947616e6720636f6e74726163742063616e2063616c6c60448201526e103a3434b990333ab731ba34b7b71760891b60648201526084016107b6565b60005b82518110156112a1573260009081526007602052604081208451909190859084908110611237576112376125c6565b602002602001015161ffff1661ffff168152602001908152602001600020600081819054906101000a900461ffff168092919061127390612637565b91906101000a81548161ffff021916908361ffff160217905550508080611299906125f5565b915050611208565b5060005b815181101561148057326000908152600760205260408120835182908590859081106112d3576112d36125c6565b60209081029190910181015161ffff9081168352908201929092526040016000205416116113435760405162461bcd60e51b815260206004820152601b60248201527f596f7520646f6e277420686176652074686174207472616974732e000000000060448201526064016107b6565b3260009081526007602052604081208351909190849084908110611369576113696125c6565b602002602001015161ffff1661ffff168152602001908152602001600020600081819054906101000a900461ffff16809291906113a5906127df565b91906101000a81548161ffff021916908361ffff1602179055505060076000326001600160a01b03166001600160a01b0316815260200190815260200160002060008383815181106113f9576113f96125c6565b602002602001015161ffff1661ffff16815260200190815260200160002060009054906101000a900461ffff1661ffff1660000361146e5761146c828281518110611446576114466125c6565b602090810291909101810151326000908152600a90925260409091209061ffff16611bd2565b505b80611478816125f5565b9150506112a5565b507f6333cccb37c83475b41bb9452c7d90d1f2949930c54787663bd6a64530629327328383604051610e4e9392919061283c565b6114bc611a4e565b80518251146114fe5760405162461bcd60e51b815260206004820152600e60248201526d496e76616c696420506172616d2160901b60448201526064016107b6565b60005b82518110156108265781818151811061151c5761151c6125c6565b60200260200101516006600085848151811061153a5761153a6125c6565b6020026020010151600281111561155357611553611f00565b600281111561156457611564611f00565b81526020810191909152604001600020805460ff191660ff9290921691909117905580611590816125f5565b915050611501565b80518251146115e05760405162461bcd60e51b815260206004820152601460248201527324b73b30b634b2103830b930b69031b7bab73a1760611b60448201526064016107b6565b6000805b8351811015611668578281815181106115ff576115ff6125c6565b602002602001015161ffff1660096000868481518110611621576116216125c6565b602002602001015161ffff1661ffff1681526020019081526020016000205461164a919061287c565b6116549083612893565b915080611660816125f5565b9150506115e4565b508034146116b15760405162461bcd60e51b81526020600482015260166024820152752737ba1032b737bab3b41032ba341030b6b7bab73a1760511b60448201526064016107b6565b60005b8351811015610baa578281815181106116cf576116cf6125c6565b602002602001015161ffff16600860008684815181106116f1576116f16125c6565b60209081029190910181015161ffff908116835290820192909252604001600020541610156117625760405162461bcd60e51b815260206004820152601b60248201527f4e6f7420656e6f75676820616d6f756e7420696e2073746f726521000000000060448201526064016107b6565b828181518110611774576117746125c6565b602002602001015160076000336001600160a01b03166001600160a01b0316815260200190815260200160002060008684815181106117b5576117b56125c6565b602002602001015161ffff1661ffff16815260200190815260200160002060008282829054906101000a900461ffff166117ef91906125ab565b92506101000a81548161ffff021916908361ffff16021790555082818151811061181b5761181b6125c6565b602002602001015160086000868481518110611839576118396125c6565b602002602001015161ffff1661ffff16815260200190815260200160002060008282829054906101000a900461ffff1661187391906127c4565b92506101000a81548161ffff021916908361ffff1602179055506118c88482815181106118a2576118a26125c6565b602090810291909101810151336000908152600a90925260409091209061ffff16611a7b565b508381815181106118db576118db6125c6565b602002602001015161ffff167f18f179dda5e37beab91956829b3d0d4a43b32cd2a434bbbec3c4b314bc1c28283385848151811061191b5761191b6125c6565b60200260200101516040516119499291906001600160a01b0392909216825261ffff16602082015260400190565b60405180910390a28061195b816125f5565b9150506116b4565b61196b611a4e565b6001600160a01b03811661199557604051631e4fbdf760e01b8152600060048201526024016107b6565b61199e81611b82565b50565b6119a9611a4e565b60025461ffff600160c01b909104811690821611156119fb5760405162461bcd60e51b815260206004820152600e60248201526d496e76616c69642054726169742160901b60448201526064016107b6565b61ffff8116600081815260086020908152604091829020805461ffff1916905590519182527f74840cd75dfd4f5faf85b0e79b59950ee3ce28009282397482fedb36a11f0a17910160405180910390a150565b6000546001600160a01b03163314610e6c5760405163118cdaa760e01b81523360048201526024016107b6565b6000611a878383611bde565b90505b92915050565b60405180606001604052808660ff1681526020018315158152602001826002811115611abe57611abe611f00565b905261ffff8516600090815260046020908152604091829020835181549285015115156101000261ffff1990931660ff9091161791909117808255918301519091829062ff0000191662010000836002811115611b1d57611b1d611f00565b02179055509050508361ffff167fee68a337ee4c3c8ff99d1f4f9974d641a8b03b4f958aa0089568eb748b75f3cb868584604051611b5d939291906128a6565b60405180910390a25050505050565b6000611a8a825490565b6000611a878383611c2d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000611a878383611c57565b6000818152600183016020526040812054611c2557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611a8a565b506000611a8a565b6000826000018281548110611c4457611c446125c6565b9060005260206000200154905092915050565b60008181526001830160205260408120548015611d40576000611c7b6001836128cd565b8554909150600090611c8f906001906128cd565b9050808214611cf4576000866000018281548110611caf57611caf6125c6565b9060005260206000200154905080876000018481548110611cd257611cd26125c6565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611d0557611d056128e0565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050611a8a565b6000915050611a8a565b5092915050565b803560038110611d6057600080fd5b919050565b600060208284031215611d7757600080fd5b611a8782611d51565b6001600160a01b038116811461199e57600080fd5b600060208284031215611da757600080fd5b8135611db281611d80565b9392505050565b803561ffff81168114611d6057600080fd5b600060208284031215611ddd57600080fd5b611a8782611db9565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611e2557611e25611de6565b604052919050565b600067ffffffffffffffff821115611e4757611e47611de6565b5060051b60200190565b600082601f830112611e6257600080fd5b81356020611e77611e7283611e2d565b611dfc565b82815260059290921b84018101918181019086841115611e9657600080fd5b8286015b84811015611eb857611eab81611db9565b8352918301918301611e9a565b509695505050505050565b600060208284031215611ed557600080fd5b813567ffffffffffffffff811115611eec57600080fd5b611ef884828501611e51565b949350505050565b634e487b7160e01b600052602160045260246000fd5b6003811061199e57634e487b7160e01b600052602160045260246000fd5b60208101611f4183611f16565b91905290565b60ff84168152821515602082015260608101611f6283611f16565b826040830152949350505050565b60008060408385031215611f8357600080fd5b611f8c83611db9565b9150611f9a60208401611db9565b90509250929050565b803560ff81168114611d6057600080fd5b6000601f8381840112611fc657600080fd5b82356020611fd6611e7283611e2d565b82815260059290921b85018101918181019087841115611ff557600080fd5b8287015b8481101561208c57803567ffffffffffffffff8082111561201a5760008081fd5b818a0191508a603f83011261202f5760008081fd5b8582013560408282111561204557612045611de6565b612056828b01601f19168901611dfc565b92508183528c8183860101111561206d5760008081fd5b8181850189850137506000908201870152845250918301918301611ff9565b50979650505050505050565b600082601f8301126120a957600080fd5b813560206120b9611e7283611e2d565b82815260059290921b840181019181810190868411156120d857600080fd5b8286015b84811015611eb8576120ed81611d51565b83529183019183016120dc565b600080600080600060a0868803121561211257600080fd5b61211b86611fa3565b945060208087013567ffffffffffffffff8082111561213957600080fd5b6121458a838b01611fb4565b9650604089013591508082111561215b57600080fd5b6121678a838b01612098565b9550606089013591508082111561217d57600080fd5b818901915089601f83011261219157600080fd5b813561219f611e7282611e2d565b81815260059190911b8301840190848101908c8311156121be57600080fd5b938501935b828510156121dc578435825293850193908501906121c3565b9650505060808901359250808311156121f457600080fd5b505061220288828901611e51565b9150509295509295909350565b60008060006060848603121561222457600080fd5b61222d84611fa3565b9250602084013567ffffffffffffffff8082111561224a57600080fd5b61225687838801611fb4565b9350604086013591508082111561226c57600080fd5b5061227986828701612098565b9150509250925092565b602080825282518282018190526000919060409081850190868401855b828110156122dd578151805160ff168552868101511515878601528501516122c781611f16565b84860152606090930192908501906001016122a0565b5091979650505050505050565b6000806000606084860312156122ff57600080fd5b61230884611fa3565b925061231660208501611fa3565b915061232460408501611fa3565b90509250925092565b6000806040838503121561234057600080fd5b61234983611db9565b9150611f9a60208401611fa3565b60006020828403121561236957600080fd5b611a8782611fa3565b6000815180845260005b818110156123985760208185018101518683018201520161237c565b506000602082860101526020601f19601f83011685010191505092915050565b60ff83168152604060208201526000611ef86040830184612372565b6000602082840312156123e657600080fd5b813567ffffffffffffffff8111156123fd57600080fd5b611ef884828501611fb4565b6000806040838503121561241c57600080fd5b8235611f8c81611d80565b6000806040838503121561243a57600080fd5b823567ffffffffffffffff8082111561245257600080fd5b61245e86838701611e51565b9350602085013591508082111561247457600080fd5b5061248185828601611e51565b9150509250929050565b6000806040838503121561249e57600080fd5b823567ffffffffffffffff808211156124b657600080fd5b6124c286838701612098565b93506020915081850135818111156124d957600080fd5b85019050601f810186136124ec57600080fd5b80356124fa611e7282611e2d565b81815260059190911b8201830190838101908883111561251957600080fd5b928401925b8284101561253e5761252f84611fa3565b8252928401929084019061251e565b80955050505050509250929050565b60208082526028908201527f4f6e6c79204d61726b6574706c6163652063616e2063616c6c207468697320666040820152673ab731ba34b7b71760c11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b61ffff818116838216019080821115611d4a57611d4a612595565b634e487b7160e01b600052603260045260246000fd5b60ff8181168382160190811115611a8a57611a8a612595565b60006001820161260757612607612595565b5060010190565b6020808252600f908201526e496e76616c696420506172616d732160881b604082015260600190565b600061ffff80831681810361264e5761264e612595565b6001019392505050565b600181811c9082168061266c57607f821691505b60208210810361078657634e487b7160e01b600052602260045260246000fd5b600060ff821660ff81036126a2576126a2612595565b60010192915050565b601f82111561082657600081815260208120601f850160051c810160208610156126d25750805b601f850160051c820191505b81811015610aba578281556001016126de565b815167ffffffffffffffff81111561270b5761270b611de6565b61271f816127198454612658565b846126ab565b602080601f831160018114612754576000841561273c5750858301515b600019600386901b1c1916600185901b178555610aba565b600085815260208120601f198616915b8281101561278357888601518255948401946001909101908401612764565b50858210156127a15787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b602081526000611a876020830184612372565b61ffff828116828216039080821115611d4a57611d4a612595565b600061ffff8216806127f3576127f3612595565b6000190192915050565b600081518084526020808501945080840160005b8381101561283157815161ffff1687529582019590820190600101612811565b509495945050505050565b6001600160a01b0384168152606060208201819052600090612860908301856127fd565b828103604084015261287281856127fd565b9695505050505050565b8082028115828204841417611a8a57611a8a612595565b80820180821115611a8a57611a8a612595565b60ff841681526060602082015260006128c26060830185612372565b9050611f6283611f16565b81810381811115611a8a57611a8a612595565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220709fc95b01c83991fa18adeb875e8270d6c5b036a0cf65a5e0fb5ceee63b2b8a64736f6c63430008140033

Deployed Bytecode

0x6080604052600436106101e35760003560e01c80636fe9be4c116101025780639b604e8e11610095578063c3a567d111610064578063c3a567d114610654578063e997aba614610674578063f2fde38b14610687578063fd9d5a61146106a757600080fd5b80639b604e8e146105b85780639f839852146105f4578063af8d44b114610614578063afa4320a1461063457600080fd5b80638da5cb5b116100d15780638da5cb5b14610539578063908895b81461055757806394cfb96314610578578063998eb77c1461059857600080fd5b80636fe9be4c146104b5578063715018a6146104d557806379f3b872146104ea57806381ee56a11461051857600080fd5b80634bf0414f1161017a578063602979d011610149578063602979d01461040d578063624d52741461042d5780636a1168ba146104685780636cb7d44c1461049557600080fd5b80634bf0414f1461038d57806352a8c245146103ad57806352fa6ec9146103cd5780635ab8e0bc146103ed57600080fd5b8063242ad801116101b6578063242ad801146102aa57806333c16838146102ca5780633824f3351461030e57806347bf9fcf1461033b57600080fd5b8063094cc942146101e85780630960c84d146102205780630f800a14146102505780631ac3ddeb14610288575b600080fd5b3480156101f457600080fd5b5060025461020990600160a81b900460ff1681565b60405160ff90911681526020015b60405180910390f35b34801561022c57600080fd5b5061020961023b366004611d65565b60066020526000908152604090205460ff1681565b34801561025c57600080fd5b50600154610270906001600160a01b031681565b6040516001600160a01b039091168152602001610217565b34801561029457600080fd5b506102a86102a3366004611d95565b6106c7565b005b3480156102b657600080fd5b506102a86102c5366004611d95565b610708565b3480156102d657600080fd5b506102fb6102e5366004611dcb565b60086020526000908152604090205461ffff1681565b60405161ffff9091168152602001610217565b34801561031a57600080fd5b5061032e610329366004611ec3565b610732565b6040516102179190611f34565b34801561034757600080fd5b5061037e610356366004611dcb565b60046020526000908152604090205460ff808216916101008104821691620100009091041683565b60405161021793929190611f47565b34801561039957600080fd5b506102a86103a8366004611f70565b61078c565b3480156103b957600080fd5b506102a86103c8366004611d95565b61082b565b3480156103d957600080fd5b506102096103e8366004611ec3565b610855565b3480156103f957600080fd5b506102a86104083660046120fa565b6108f8565b34801561041957600080fd5b506102a861042836600461220f565b610ac2565b34801561043957600080fd5b5061045a610448366004611dcb565b60096020526000908152604090205481565b604051908152602001610217565b34801561047457600080fd5b50610488610483366004611d95565b610bb0565b6040516102179190612283565b3480156104a157600080fd5b506102a86104b03660046122ea565b610d1d565b3480156104c157600080fd5b506102a86104d036600461232d565b610d6d565b3480156104e157600080fd5b506102a8610e5a565b3480156104f657600080fd5b5061050a610505366004612357565b610e6e565b6040516102179291906123b8565b34801561052457600080fd5b5060025461020990600160a01b900460ff1681565b34801561054557600080fd5b506000546001600160a01b0316610270565b34801561056357600080fd5b5060025461020990600160b01b900460ff1681565b34801561058457600080fd5b506102a86105933660046123d4565b610f17565b3480156105a457600080fd5b50600254610270906001600160a01b031681565b3480156105c457600080fd5b506102fb6105d3366004612409565b600760209081526000928352604080842090915290825290205461ffff1681565b34801561060057600080fd5b506102a861060f366004611f70565b61105a565b34801561062057600080fd5b506102a861062f366004611f70565b6110d2565b34801561064057600080fd5b506102a861064f366004612427565b611193565b34801561066057600080fd5b506102a861066f36600461248b565b6114b4565b6102a8610682366004612427565b611598565b34801561069357600080fd5b506102a86106a2366004611d95565b611963565b3480156106b357600080fd5b506102a86106c2366004611dcb565b6119a1565b6106cf611a4e565b6040516001600160a01b038216904780156108fc02916000818181858888f19350505050158015610704573d6000803e3d6000fd5b5050565b610710611a4e565b600280546001600160a01b0319166001600160a01b0392909216919091179055565b60008061073e83610855565b60025490915060ff600160b01b9091048116908216106107615760029150610786565b60025460ff600160a81b9091048116908216106107815760019150610786565b600091505b50919050565b6002546001600160a01b031633146107bf5760405162461bcd60e51b81526004016107b69061254d565b60405180910390fd5b32600090815260076020908152604080832061ffff8087168552925282208054849391926107ef918591166125ab565b82546101009290920a61ffff818102199093169183160217909155326000908152600a602052604090206108269250908416611a7b565b505050565b610833611a4e565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b6000805b825181101561078657600660006004600086858151811061087c5761087c6125c6565b60209081029190910181015161ffff1682528101919091526040016000205462010000900460ff1660028111156108b5576108b5611f00565b60028111156108c6576108c6611f00565b81526020810191909152604001600020546108e49060ff16836125dc565b9150806108f0816125f5565b915050610859565b610900611a4e565b82518451146109215760405162461bcd60e51b81526004016107b69061260e565b80518451146109425760405162461bcd60e51b81526004016107b69061260e565b81518451146109635760405162461bcd60e51b81526004016107b69061260e565b60005b8451811015610aba5760028054600160c01b900461ffff1690601861098a83612637565b91906101000a81548161ffff021916908361ffff160217905550506109f586600260189054906101000a900461ffff168784815181106109cc576109cc6125c6565b602002602001015160018886815181106109e8576109e86125c6565b6020026020010151611a90565b818181518110610a0757610a076125c6565b602090810291909101810151600254600160c01b900461ffff908116600090815260089093526040909220805461ffff1916929091169190911790558251839082908110610a5757610a576125c6565b6020908102919091018101516002805461ffff600160c01b918290048116600090815260098652604080822095909555925460ff8c168452600590955292909120610aa793909291900416611a7b565b5080610ab2816125f5565b915050610966565b505050505050565b610aca611a4e565b8051825114610b135760405162461bcd60e51b8152602060048201526015602482015274496e76616c696420506172616d20436f756e74732160581b60448201526064016107b6565b60005b8251811015610baa5760028054600160c01b900461ffff16906018610b3a83612637565b91906101000a81548161ffff021916908361ffff16021790555050610b9884600260189054906101000a900461ffff16858481518110610b7c57610b7c6125c6565b602002602001015160008686815181106109e8576109e86125c6565b80610ba2816125f5565b915050610b16565b50505050565b6001600160a01b0381166000908152600a6020526040812060609190610bd590611b6c565b905060008167ffffffffffffffff811115610bf257610bf2611de6565b604051908082528060200260200182016040528015610c4457816020015b610c3160408051606081018252600080825260208201819052909182015290565b815260200190600190039081610c105790505b50905060005b82811015610d15576001600160a01b0385166000908152600a6020526040812060049190610c789084611b76565b61ffff16815260208082019290925260409081016000208151606081018352815460ff8082168352610100820481161515958301959095529093919284019162010000909104166002811115610cd057610cd0611f00565b6002811115610ce157610ce1611f00565b81525050828281518110610cf757610cf76125c6565b60200260200101819052508080610d0d906125f5565b915050610c4a565b509392505050565b610d25611a4e565b6002805461ffff60a01b1916600160a01b60ff9586160260ff60a81b191617600160a81b938516939093029290921760ff60b01b1916600160b01b9190931602919091179055565b610d75611a4e565b60025461ffff600160c01b90910481169083161115610dc75760405162461bcd60e51b815260206004820152600e60248201526d496e76616c69642054726169742160901b60448201526064016107b6565b61ffff8083166000908152600860205260408120805460ff851693919291610df1918591166125ab565b92506101000a81548161ffff021916908361ffff1602179055507fdbadb3abec960d70fe3360082480ce4b44d341cf5fb9123563e849a2ee79ce7c8282604051610e4e92919061ffff92909216825260ff16602082015260400190565b60405180910390a15050565b610e62611a4e565b610e6c6000611b82565b565b6003602052600090815260409020805460018201805460ff9092169291610e9490612658565b80601f0160208091040260200160405190810160405280929190818152602001828054610ec090612658565b8015610f0d5780601f10610ee257610100808354040283529160200191610f0d565b820191906000526020600020905b815481529060010190602001808311610ef057829003601f168201915b5050505050905082565b610f1f611a4e565b60005b81518110156107045760028054600160b81b900460ff16906017610f458361268c565b91906101000a81548160ff021916908360ff160217905550506040518060400160405280600260179054906101000a900460ff1660ff168152602001838381518110610f9357610f936125c6565b602090810291909101810151909152600254600160b81b900460ff908116600090815260038352604090208351815460ff19169216919091178155908201516001820190610fe190826126f1565b50905050600260179054906101000a900460ff1660ff167f96eec869db69ac031124416627cec7cf84a8c11c07fcee912f34393ec990120c83838151811061102b5761102b6125c6565b602002602001015160405161104091906127b1565b60405180910390a280611052816125f5565b915050610f22565b6002546001600160a01b031633146110845760405162461bcd60e51b81526004016107b69061254d565b32600090815260076020908152604080832061ffff8087168552925282208054849391926110b4918591166125ab565b92506101000a81548161ffff021916908361ffff1602179055505050565b6002546001600160a01b031633146110fc5760405162461bcd60e51b81526004016107b69061254d565b32600090815260076020908152604080832061ffff8681168552925290912054818316911610156111635760405162461bcd60e51b81526020600482015260116024820152704e6f7420656e6f7567682054726169747360781b60448201526064016107b6565b32600090815260076020908152604080832061ffff8087168552925282208054849391926110b4918591166127c4565b6001546001600160a01b031633146112055760405162461bcd60e51b815260206004820152602f60248201527f4f6e6c7920486f6f647947616e6720636f6e74726163742063616e2063616c6c60448201526e103a3434b990333ab731ba34b7b71760891b60648201526084016107b6565b60005b82518110156112a1573260009081526007602052604081208451909190859084908110611237576112376125c6565b602002602001015161ffff1661ffff168152602001908152602001600020600081819054906101000a900461ffff168092919061127390612637565b91906101000a81548161ffff021916908361ffff160217905550508080611299906125f5565b915050611208565b5060005b815181101561148057326000908152600760205260408120835182908590859081106112d3576112d36125c6565b60209081029190910181015161ffff9081168352908201929092526040016000205416116113435760405162461bcd60e51b815260206004820152601b60248201527f596f7520646f6e277420686176652074686174207472616974732e000000000060448201526064016107b6565b3260009081526007602052604081208351909190849084908110611369576113696125c6565b602002602001015161ffff1661ffff168152602001908152602001600020600081819054906101000a900461ffff16809291906113a5906127df565b91906101000a81548161ffff021916908361ffff1602179055505060076000326001600160a01b03166001600160a01b0316815260200190815260200160002060008383815181106113f9576113f96125c6565b602002602001015161ffff1661ffff16815260200190815260200160002060009054906101000a900461ffff1661ffff1660000361146e5761146c828281518110611446576114466125c6565b602090810291909101810151326000908152600a90925260409091209061ffff16611bd2565b505b80611478816125f5565b9150506112a5565b507f6333cccb37c83475b41bb9452c7d90d1f2949930c54787663bd6a64530629327328383604051610e4e9392919061283c565b6114bc611a4e565b80518251146114fe5760405162461bcd60e51b815260206004820152600e60248201526d496e76616c696420506172616d2160901b60448201526064016107b6565b60005b82518110156108265781818151811061151c5761151c6125c6565b60200260200101516006600085848151811061153a5761153a6125c6565b6020026020010151600281111561155357611553611f00565b600281111561156457611564611f00565b81526020810191909152604001600020805460ff191660ff9290921691909117905580611590816125f5565b915050611501565b80518251146115e05760405162461bcd60e51b815260206004820152601460248201527324b73b30b634b2103830b930b69031b7bab73a1760611b60448201526064016107b6565b6000805b8351811015611668578281815181106115ff576115ff6125c6565b602002602001015161ffff1660096000868481518110611621576116216125c6565b602002602001015161ffff1661ffff1681526020019081526020016000205461164a919061287c565b6116549083612893565b915080611660816125f5565b9150506115e4565b508034146116b15760405162461bcd60e51b81526020600482015260166024820152752737ba1032b737bab3b41032ba341030b6b7bab73a1760511b60448201526064016107b6565b60005b8351811015610baa578281815181106116cf576116cf6125c6565b602002602001015161ffff16600860008684815181106116f1576116f16125c6565b60209081029190910181015161ffff908116835290820192909252604001600020541610156117625760405162461bcd60e51b815260206004820152601b60248201527f4e6f7420656e6f75676820616d6f756e7420696e2073746f726521000000000060448201526064016107b6565b828181518110611774576117746125c6565b602002602001015160076000336001600160a01b03166001600160a01b0316815260200190815260200160002060008684815181106117b5576117b56125c6565b602002602001015161ffff1661ffff16815260200190815260200160002060008282829054906101000a900461ffff166117ef91906125ab565b92506101000a81548161ffff021916908361ffff16021790555082818151811061181b5761181b6125c6565b602002602001015160086000868481518110611839576118396125c6565b602002602001015161ffff1661ffff16815260200190815260200160002060008282829054906101000a900461ffff1661187391906127c4565b92506101000a81548161ffff021916908361ffff1602179055506118c88482815181106118a2576118a26125c6565b602090810291909101810151336000908152600a90925260409091209061ffff16611a7b565b508381815181106118db576118db6125c6565b602002602001015161ffff167f18f179dda5e37beab91956829b3d0d4a43b32cd2a434bbbec3c4b314bc1c28283385848151811061191b5761191b6125c6565b60200260200101516040516119499291906001600160a01b0392909216825261ffff16602082015260400190565b60405180910390a28061195b816125f5565b9150506116b4565b61196b611a4e565b6001600160a01b03811661199557604051631e4fbdf760e01b8152600060048201526024016107b6565b61199e81611b82565b50565b6119a9611a4e565b60025461ffff600160c01b909104811690821611156119fb5760405162461bcd60e51b815260206004820152600e60248201526d496e76616c69642054726169742160901b60448201526064016107b6565b61ffff8116600081815260086020908152604091829020805461ffff1916905590519182527f74840cd75dfd4f5faf85b0e79b59950ee3ce28009282397482fedb36a11f0a17910160405180910390a150565b6000546001600160a01b03163314610e6c5760405163118cdaa760e01b81523360048201526024016107b6565b6000611a878383611bde565b90505b92915050565b60405180606001604052808660ff1681526020018315158152602001826002811115611abe57611abe611f00565b905261ffff8516600090815260046020908152604091829020835181549285015115156101000261ffff1990931660ff9091161791909117808255918301519091829062ff0000191662010000836002811115611b1d57611b1d611f00565b02179055509050508361ffff167fee68a337ee4c3c8ff99d1f4f9974d641a8b03b4f958aa0089568eb748b75f3cb868584604051611b5d939291906128a6565b60405180910390a25050505050565b6000611a8a825490565b6000611a878383611c2d565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000611a878383611c57565b6000818152600183016020526040812054611c2557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611a8a565b506000611a8a565b6000826000018281548110611c4457611c446125c6565b9060005260206000200154905092915050565b60008181526001830160205260408120548015611d40576000611c7b6001836128cd565b8554909150600090611c8f906001906128cd565b9050808214611cf4576000866000018281548110611caf57611caf6125c6565b9060005260206000200154905080876000018481548110611cd257611cd26125c6565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080611d0557611d056128e0565b600190038181906000526020600020016000905590558560010160008681526020019081526020016000206000905560019350505050611a8a565b6000915050611a8a565b5092915050565b803560038110611d6057600080fd5b919050565b600060208284031215611d7757600080fd5b611a8782611d51565b6001600160a01b038116811461199e57600080fd5b600060208284031215611da757600080fd5b8135611db281611d80565b9392505050565b803561ffff81168114611d6057600080fd5b600060208284031215611ddd57600080fd5b611a8782611db9565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611e2557611e25611de6565b604052919050565b600067ffffffffffffffff821115611e4757611e47611de6565b5060051b60200190565b600082601f830112611e6257600080fd5b81356020611e77611e7283611e2d565b611dfc565b82815260059290921b84018101918181019086841115611e9657600080fd5b8286015b84811015611eb857611eab81611db9565b8352918301918301611e9a565b509695505050505050565b600060208284031215611ed557600080fd5b813567ffffffffffffffff811115611eec57600080fd5b611ef884828501611e51565b949350505050565b634e487b7160e01b600052602160045260246000fd5b6003811061199e57634e487b7160e01b600052602160045260246000fd5b60208101611f4183611f16565b91905290565b60ff84168152821515602082015260608101611f6283611f16565b826040830152949350505050565b60008060408385031215611f8357600080fd5b611f8c83611db9565b9150611f9a60208401611db9565b90509250929050565b803560ff81168114611d6057600080fd5b6000601f8381840112611fc657600080fd5b82356020611fd6611e7283611e2d565b82815260059290921b85018101918181019087841115611ff557600080fd5b8287015b8481101561208c57803567ffffffffffffffff8082111561201a5760008081fd5b818a0191508a603f83011261202f5760008081fd5b8582013560408282111561204557612045611de6565b612056828b01601f19168901611dfc565b92508183528c8183860101111561206d5760008081fd5b8181850189850137506000908201870152845250918301918301611ff9565b50979650505050505050565b600082601f8301126120a957600080fd5b813560206120b9611e7283611e2d565b82815260059290921b840181019181810190868411156120d857600080fd5b8286015b84811015611eb8576120ed81611d51565b83529183019183016120dc565b600080600080600060a0868803121561211257600080fd5b61211b86611fa3565b945060208087013567ffffffffffffffff8082111561213957600080fd5b6121458a838b01611fb4565b9650604089013591508082111561215b57600080fd5b6121678a838b01612098565b9550606089013591508082111561217d57600080fd5b818901915089601f83011261219157600080fd5b813561219f611e7282611e2d565b81815260059190911b8301840190848101908c8311156121be57600080fd5b938501935b828510156121dc578435825293850193908501906121c3565b9650505060808901359250808311156121f457600080fd5b505061220288828901611e51565b9150509295509295909350565b60008060006060848603121561222457600080fd5b61222d84611fa3565b9250602084013567ffffffffffffffff8082111561224a57600080fd5b61225687838801611fb4565b9350604086013591508082111561226c57600080fd5b5061227986828701612098565b9150509250925092565b602080825282518282018190526000919060409081850190868401855b828110156122dd578151805160ff168552868101511515878601528501516122c781611f16565b84860152606090930192908501906001016122a0565b5091979650505050505050565b6000806000606084860312156122ff57600080fd5b61230884611fa3565b925061231660208501611fa3565b915061232460408501611fa3565b90509250925092565b6000806040838503121561234057600080fd5b61234983611db9565b9150611f9a60208401611fa3565b60006020828403121561236957600080fd5b611a8782611fa3565b6000815180845260005b818110156123985760208185018101518683018201520161237c565b506000602082860101526020601f19601f83011685010191505092915050565b60ff83168152604060208201526000611ef86040830184612372565b6000602082840312156123e657600080fd5b813567ffffffffffffffff8111156123fd57600080fd5b611ef884828501611fb4565b6000806040838503121561241c57600080fd5b8235611f8c81611d80565b6000806040838503121561243a57600080fd5b823567ffffffffffffffff8082111561245257600080fd5b61245e86838701611e51565b9350602085013591508082111561247457600080fd5b5061248185828601611e51565b9150509250929050565b6000806040838503121561249e57600080fd5b823567ffffffffffffffff808211156124b657600080fd5b6124c286838701612098565b93506020915081850135818111156124d957600080fd5b85019050601f810186136124ec57600080fd5b80356124fa611e7282611e2d565b81815260059190911b8201830190838101908883111561251957600080fd5b928401925b8284101561253e5761252f84611fa3565b8252928401929084019061251e565b80955050505050509250929050565b60208082526028908201527f4f6e6c79204d61726b6574706c6163652063616e2063616c6c207468697320666040820152673ab731ba34b7b71760c11b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b61ffff818116838216019080821115611d4a57611d4a612595565b634e487b7160e01b600052603260045260246000fd5b60ff8181168382160190811115611a8a57611a8a612595565b60006001820161260757612607612595565b5060010190565b6020808252600f908201526e496e76616c696420506172616d732160881b604082015260600190565b600061ffff80831681810361264e5761264e612595565b6001019392505050565b600181811c9082168061266c57607f821691505b60208210810361078657634e487b7160e01b600052602260045260246000fd5b600060ff821660ff81036126a2576126a2612595565b60010192915050565b601f82111561082657600081815260208120601f850160051c810160208610156126d25750805b601f850160051c820191505b81811015610aba578281556001016126de565b815167ffffffffffffffff81111561270b5761270b611de6565b61271f816127198454612658565b846126ab565b602080601f831160018114612754576000841561273c5750858301515b600019600386901b1c1916600185901b178555610aba565b600085815260208120601f198616915b8281101561278357888601518255948401946001909101908401612764565b50858210156127a15787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b602081526000611a876020830184612372565b61ffff828116828216039080821115611d4a57611d4a612595565b600061ffff8216806127f3576127f3612595565b6000190192915050565b600081518084526020808501945080840160005b8381101561283157815161ffff1687529582019590820190600101612811565b509495945050505050565b6001600160a01b0384168152606060208201819052600090612860908301856127fd565b828103604084015261287281856127fd565b9695505050505050565b8082028115828204841417611a8a57611a8a612595565b80820180821115611a8a57611a8a612595565b60ff841681526060602082015260006128c26060830185612372565b9050611f6283611f16565b81810381811115611a8a57611a8a612595565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220709fc95b01c83991fa18adeb875e8270d6c5b036a0cf65a5e0fb5ceee63b2b8a64736f6c63430008140033

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  ]
[ 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.