ETH Price: $3,596.73 (+3.74%)
Gas: 5.59 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Mint210826872024-10-31 2:38:4765 days ago1730342327IN
0x83797D86...F021ee5Bc
0 ETH0.003629789.74438094
Mint210826822024-10-31 2:37:4765 days ago1730342267IN
0x83797D86...F021ee5Bc
0 ETH0.004573149.1630243
Mint210826812024-10-31 2:37:3565 days ago1730342255IN
0x83797D86...F021ee5Bc
0 ETH0.0063578.37524168
Mint210826792024-10-31 2:37:1165 days ago1730342231IN
0x83797D86...F021ee5Bc
0 ETH0.003307758.87031003
Mint210826312024-10-31 2:27:3565 days ago1730341655IN
0x83797D86...F021ee5Bc
0 ETH0.003636439.92263913
Mint210826292024-10-31 2:27:1165 days ago1730341631IN
0x83797D86...F021ee5Bc
0 ETH0.0037643410.97681449
Mint210826282024-10-31 2:26:5965 days ago1730341619IN
0x83797D86...F021ee5Bc
0 ETH0.0034903410.12148662
Mint210826272024-10-31 2:26:4765 days ago1730341607IN
0x83797D86...F021ee5Bc
0 ETH0.0043115210.72426376
Mint210826262024-10-31 2:26:3565 days ago1730341595IN
0x83797D86...F021ee5Bc
0 ETH0.00427079.78022765
Mint210826242024-10-31 2:26:1165 days ago1730341571IN
0x83797D86...F021ee5Bc
0 ETH0.003286619.63590714
Mint210826232024-10-31 2:25:5965 days ago1730341559IN
0x83797D86...F021ee5Bc
0 ETH0.003638729.62665096
Mint210826222024-10-31 2:25:4765 days ago1730341547IN
0x83797D86...F021ee5Bc
0 ETH0.0082207610.30611674
Mint210826212024-10-31 2:25:3565 days ago1730341535IN
0x83797D86...F021ee5Bc
0 ETH0.003759759.98684715
Mint210826202024-10-31 2:25:2365 days ago1730341523IN
0x83797D86...F021ee5Bc
0 ETH0.0052235810.54605108
Mint210826192024-10-31 2:25:1165 days ago1730341511IN
0x83797D86...F021ee5Bc
0 ETH0.003636679.65309535
Mint210826182024-10-31 2:24:5965 days ago1730341499IN
0x83797D86...F021ee5Bc
0 ETH0.003908629.57958699
Mint210826172024-10-31 2:24:4765 days ago1730341487IN
0x83797D86...F021ee5Bc
0 ETH0.003648459.78828851
Mint210826162024-10-31 2:24:3565 days ago1730341475IN
0x83797D86...F021ee5Bc
0 ETH0.0044495310.15065853
Mint210824962024-10-31 2:00:2365 days ago1730340023IN
0x83797D86...F021ee5Bc
0 ETH0.003260078.60140497
Mint210824952024-10-31 2:00:1165 days ago1730340011IN
0x83797D86...F021ee5Bc
0 ETH0.003318718.22921817
Mint210824942024-10-31 1:59:5965 days ago1730339999IN
0x83797D86...F021ee5Bc
0 ETH0.005540738.0326659
Mint210824932024-10-31 1:59:4765 days ago1730339987IN
0x83797D86...F021ee5Bc
0 ETH0.004502358.42372151
Mint210824922024-10-31 1:59:3565 days ago1730339975IN
0x83797D86...F021ee5Bc
0 ETH0.003009038.80131537
Mint210824912024-10-31 1:59:2365 days ago1730339963IN
0x83797D86...F021ee5Bc
0 ETH0.003466788.68492888
Mint210824902024-10-31 1:59:1165 days ago1730339951IN
0x83797D86...F021ee5Bc
0 ETH0.002977188.72945293
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
NToken

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 10000 runs

Other Settings:
default evmVersion
File 1 of 17 : NToken.sol
// SPDX-License-Identifier: GPL-3.0

/// @title The Punks ERC-721 token

/*********************************
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░██░░░████░░██░░░████░░░ *
 * ░░██████░░░████████░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 *********************************/

pragma solidity ^0.8.6;

import { Ownable } from '@openzeppelin/contracts/access/Ownable.sol';
import { ERC721Checkpointable } from './base/ERC721Checkpointable.sol';
import { IDescriptorMinimal } from './interfaces/IDescriptorMinimal.sol';
import { ISeeder } from './interfaces/ISeeder.sol';
import { IToken } from './interfaces/IToken.sol';
import { ERC721 } from './base/ERC721.sol';
import { IERC721 } from '@openzeppelin/contracts/token/ERC721/IERC721.sol';


contract NToken is IToken, Ownable, ERC721Checkpointable {
    // The punkers address (creators org)
    address public punkers;

    // An address who has permissions to mint Punks
    address public minter;

    // The Punks token URI descriptor
    IDescriptorMinimal public descriptor;

    // The Punks token seeder
    ISeeder public seeder;

    mapping(bytes32 => uint256) seedHashes;

    // Whether the minter can be updated
    bool public isMinterLocked;

    // Whether the descriptor can be updated
    bool public isDescriptorLocked;

    // Whether the seeder can be updated
    bool public isSeederLocked;

    // Whether the owner can register OG Punk hashes
    bool public isRegisterOGHashesLocked;

    // Whether the owner can change metadata
    bool public isMetadataLocked;

    // Whether the owner can change metadata
    bool public isIdShitLocked;

    // The punk seeds
    /// @notice The value is the seed hash actually
    mapping(uint256 => bytes32) internal _seeds;

    // The internal punk ID tracker
    uint256 private _currentPunkId = 0;

    // IPFS content hash of contract-level metadata
    string private _contractURIHash = 'QmcSdjhRjLCMyGCp3oXLgv95e1odo8dKHyMZYF8xY1g8n8';

    // Token name, a parent contract already declares _name
    string private __name;

    // Token symbol, a parent contract already declares _symbol
    string private __symbol;

    /**
     * @notice Require that the minter has not been locked.
     */
    modifier whenMinterNotLocked() {
        require(!isMinterLocked, 'Minter is locked');
        _;
    }

    /**
     * @notice Require that the descriptor has not been locked.
     */
    modifier whenDescriptorNotLocked() {
        require(!isDescriptorLocked, 'Descriptor is locked');
        _;
    }

    /**
     * @notice Require that the seeder has not been locked.
     */
    modifier whenSeederNotLocked() {
        require(!isSeederLocked, 'Seeder is locked');
        _;
    }

    /**
     * @notice Require that registration of OG Punk hashes is not locked.
     */
    modifier whenRegisterOGHashesNotLocked() {
        require(!isRegisterOGHashesLocked, 'RegisterOGHashes is locked');
        _;
    }

    /**
     * @notice Require that metadata is not locked.
     */
    modifier whenMetadataNotLocked() {
        require(!isMetadataLocked, 'Metadata is locked');
        _;
    }

    /**
     * @notice Require that metadata is not locked.
     */
    modifier whenIdShiftNotLocked() {
        require(!isIdShitLocked, 'Id Shifting is locked');
        _;
    }

    /**
     * @notice Require that the sender is the punkers.
     */
    modifier onlyPunkers() {
        require(msg.sender == punkers, 'Sender is not the punkers');
        _;
    }

    /**
     * @notice Require that the sender is the minter.
     */
    modifier onlyMinter() {
        require(msg.sender == minter, 'Sender is not the minter');
        _;
    }

    constructor(
        address _punkers,
        address _minter,
        IDescriptorMinimal _descriptor,
        ISeeder _seeder
    ) ERC721('', '') {
        punkers = _punkers;
        minter = _minter;
        descriptor = _descriptor;
        seeder = _seeder;
        __name = 'DAOpunks';
        __symbol = '\u03FE';
    }

    function seeds(uint256 punkId) external view returns (bytes32) {
        return _seeds[punkId - _idShift];
    }

    /**
     * @notice The IPFS URI of contract-level metadata.
     */
    function contractURI() public view returns (string memory) {
        return string(abi.encodePacked('ipfs://', _contractURIHash));
    }

    /**
     * @notice Set the _contractURIHash.
     * @dev Only callable by the owner.
     */
    function setContractURIHash(string memory newContractURIHash) external onlyOwner {
        _contractURIHash = newContractURIHash;
    }

    /**
     * @notice Mint a Punk to the minter, along with a possible Punkers reward
     * Punks. Punkers reward Punks are minted every 10 Punks,
     * until 183 punkers Punks have been minted (5 years w/ 24 hour auctions).
     * @dev Call _mintTo with the to address(es).
     */
    function mint() public override onlyMinter returns (uint256) {
        if (_currentPunkId <= 1820 && _currentPunkId % 10 == 0) {
            _mintTo(punkers, _currentPunkId++);
        }
        return _mintTo(minter, _currentPunkId++);
    }

    /**
     * @notice Burn a punk.
     */
    function burn(uint256 punkId) external override onlyMinter {
        require(punkId >= _idShift, 'ERC721: operator query for nonexistent token');
        uint256 unshiftedPunkId = punkId - _idShift;
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), unshiftedPunkId), 'PunkToken: burn caller is not owner nor approved');
        _burn(unshiftedPunkId);
        emit PunkBurned(punkId);
    }

    /**
     * @notice A distinct Uniform Resource Identifier (URI) for a given asset.
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) external view override returns (string memory) {
        require(tokenId >= _idShift, 'PunkToken: URI query for nonexistent token');
        uint256 unshiftedTokenId = tokenId - _idShift;
        require(_exists(unshiftedTokenId), 'PunkToken: URI query for nonexistent token');
        return descriptor.tokenURI(tokenId, _decodeSeedHash(_seeds[unshiftedTokenId]));
    }

    /**
     * @notice Similar to `tokenURI`, but always serves a base64 encoded data URI
     * with the JSON contents directly inlined.
     */
    function dataURI(uint256 tokenId) external view override returns (string memory) {
        require(tokenId >= _idShift, 'PunkToken: URI query for nonexistent token');
        uint256 unshiftedTokenId = tokenId - _idShift;
        require(_exists(unshiftedTokenId), 'PunkToken: URI query for nonexistent token');
        return descriptor.dataURI(tokenId, _decodeSeedHash(_seeds[unshiftedTokenId]));
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return __name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return __symbol;
    }

    /**
     * @notice Set the punkers.
     * @dev Only callable by the punkers when not locked.
     */
    function setPunkers(address _punkers) external override onlyPunkers {
        require(_punkers != address(0), "punkers cannot be null");

        punkers = _punkers;

        emit PunkersUpdated(_punkers);
    }

    /**
     * @notice Set the token minter.
     * @dev Only callable by the owner when not locked.
     */
    function setMinter(address _minter) external override onlyOwner whenMinterNotLocked {
        minter = _minter;

        emit MinterUpdated(_minter);
    }

    /**
     * @notice Lock the minter.
     * @dev This cannot be reversed and is only callable by the owner when not locked.
     */
    function lockMinter() external override onlyOwner whenMinterNotLocked {
        isMinterLocked = true;

        emit MinterLocked();
    }

    /**
     * @notice Set the token URI descriptor.
     * @dev Only callable by the owner when not locked.
     */
    function setDescriptor(IDescriptorMinimal _descriptor) external override onlyOwner whenDescriptorNotLocked {
        descriptor = _descriptor;

        emit DescriptorUpdated(_descriptor);
    }

    /**
     * @notice Lock the descriptor.
     * @dev This cannot be reversed and is only callable by the owner when not locked.
     */
    function lockDescriptor() external override onlyOwner whenDescriptorNotLocked {
        isDescriptorLocked = true;

        emit DescriptorLocked();
    }

    /**
     * @notice Set the token seeder.
     * @dev Only callable by the owner when not locked.
     */
    function setSeeder(ISeeder _seeder) external override onlyOwner whenSeederNotLocked {
        seeder = _seeder;

        emit SeederUpdated(_seeder);
    }

    /**
     * @notice Lock the seeder.
     * @dev This cannot be reversed and is only callable by the owner when not locked.
     */
    function lockSeeder() external override onlyOwner whenSeederNotLocked {
        isSeederLocked = true;

        emit SeederLocked();
    }

    /**
     * @notice Lock the seeder.
     * @dev This cannot be reversed and is only callable by the owner when not locked.
     */
    function lockRegisterOGHashes() external override onlyOwner whenRegisterOGHashesNotLocked {
        isRegisterOGHashesLocked = true;

        emit RegisterOGHashesLocked();
    }

    function setName(string memory name_) external override onlyOwner whenMetadataNotLocked {
        __name = name_;

        emit MetadataUpdated(__name, __symbol);
    }

    function setSymbol(string memory symbol_) external override onlyOwner whenMetadataNotLocked {
        __symbol = symbol_;

        emit MetadataUpdated(__name, __symbol);
    }

    /**
     * @notice Lock metadata.
     * @dev This cannot be reversed and is only callable by the owner when not locked.
     */
    function lockMetadata() external override onlyOwner whenMetadataNotLocked {
        isMetadataLocked = true;

        emit MetadataLocked();
    }

    function setIdShift(uint256 newIdShift) external override onlyOwner whenIdShiftNotLocked {
        _idShift = newIdShift;

        emit IdShiftUpdated(newIdShift);
    }

    /**
     * @notice Lock Id Shifting.
     * @dev This cannot be reversed and is only callable by the owner when not locked.
     */
    function lockIdShift() external override onlyOwner whenIdShiftNotLocked {
        isIdShitLocked = true;

        emit IdShiftLocked();
    }

    /**
     * @dev calculates seed's hash.
     * Public for testing purposes.
     * Accessories are assumed to be sorted by accType!
     * This is not hash actually, rather encoding.
     * It is assumed that there is no more than 14 accessories on a punk, accType and accId does not exceed 255.
     */
    function calculateSeedHash(ISeeder.Seed memory seed) public pure returns (bytes32) {
        unchecked {
            // 1 is non zero marker - valid seedHash is never zero
            uint256 seedHash = 1 + (uint256(seed.punkType) << 8) + (uint256(seed.skinTone) << 16) + (seed.accessories.length << 24);
            assert(seed.accessories.length < 15); // max 14 accessories
            for (uint256 i = 0 ; i < seed.accessories.length ; i ++) {
                seedHash += (uint256(seed.accessories[i].accType) << (16*i + 32)) + (uint256(seed.accessories[i].accId) << (16*i + 40));
            }
            return bytes32(seedHash);
        }
    }

    function _decodeSeedHash(bytes32 seedHash) internal pure returns (ISeeder.Seed memory) {
        uint256 value = uint256(seedHash);
        ISeeder.Seed memory seed;

        // non zero marker goes on the first byte
        seed.punkType = uint8((value >> 8) & 0xff);
        seed.skinTone = uint8((value >> 16) & 0xff);
        seed.accessories = new ISeeder.Accessory[]((value >> 24) & 0xff);

        for(uint i = 0; i < seed.accessories.length; i ++) {
            seed.accessories[i].accType = uint16((value >> (16*i + 32)) & 0xff);
            seed.accessories[i].accId = uint16((value >> (16*i + 40)) & 0xff);
        }

        return seed;
    }

    /**
     * @notice Mint a Punk with `punkId` to the provided `to` address.
     */
    function _mintTo(address to, uint256 punkId) internal returns (uint256) {
        uint256 shiftedPunkId = punkId + _idShift;
        // with sorted accessories
        ISeeder.Seed memory seed = seeder.generateSeed(shiftedPunkId, 0); // salt 0
        bytes32 seedHash = calculateSeedHash(seed);

        uint256 salt = 1;
        // there is little chance to enter the loop, the probability to make a few steps is almost astronomical
        // so the risk of high gas usage is accepted here
        while (seedHashes[seedHash] != 0) {
            seed = seeder.generateSeed(shiftedPunkId, salt ++);
            seedHash = calculateSeedHash(seed);
        }

        seedHashes[seedHash] = punkId + 2; // handles tokenId == 0 case and value 1 is for OG punks
        _seeds[punkId] = seedHash;

        _mint(owner(), to, punkId);
        emit PunkCreated(shiftedPunkId, seed);

        return punkId;
    }

    function registerOGHashes(bytes32[] calldata hashes) external onlyOwner whenRegisterOGHashesNotLocked {
        for(uint i = 0; i < hashes.length; i ++) {
            seedHashes[hashes[i]] = 1;
        }
    }

    function getPunk(uint punkId) external view returns (ISeeder.Seed memory) {
        return _decodeSeedHash(_seeds[punkId - _idShift]);
    }
}

File 2 of 17 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

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

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

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

File 3 of 17 : ERC721Checkpointable.sol
// SPDX-License-Identifier: BSD-3-Clause

/// @title Vote checkpointing for an ERC-721 token

/*********************************
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░██░░░████░░██░░░████░░░ *
 * ░░██████░░░████████░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 *********************************/

// LICENSE
// ERC721Checkpointable.sol uses and modifies part of Compound Lab's Comp.sol:
// https://github.com/compound-finance/compound-protocol/blob/ae4388e780a8d596d97619d9704a931a2752c2bc/contracts/Governance/Comp.sol
//
// Comp.sol source code Copyright 2020 Compound Labs, Inc. licensed under the BSD-3-Clause license.
// With modifications by Nounders DAO.
//
// Additional conditions of BSD-3-Clause can be found here: https://opensource.org/licenses/BSD-3-Clause
//
// MODIFICATIONS
// Checkpointing logic from Comp.sol has been used with the following modifications:
// - `delegates` is renamed to `_delegates` and is set to private
// - `delegates` is a public function that uses the `_delegates` mapping look-up, but unlike
//   Comp.sol, returns the delegator's own address if there is no delegate.
//   This avoids the delegator needing to "delegate to self" with an additional transaction
// - `_transferTokens()` is renamed `_beforeTokenTransfer()` and adapted to hook into OpenZeppelin's ERC721 hooks.
// _idShift - possible shift for token Ids.

pragma solidity ^0.8.6;

import './ERC721Enumerable.sol';

abstract contract ERC721Checkpointable is ERC721Enumerable {
    /// @notice Defines decimals as per ERC-20 convention to make integrations with 3rd party governance platforms easier
    uint8 public constant decimals = 0;

    /// @notice A record of each accounts delegate
    mapping(address => address) private _delegates;

    /// @notice A checkpoint for marking number of votes from a given block
    struct Checkpoint {
        uint32 fromBlock;
        uint96 votes;
    }

    /// @notice A record of votes checkpoints for each account, by index
    mapping(address => mapping(uint32 => Checkpoint)) public checkpoints;

    /// @notice The number of checkpoints for each account
    mapping(address => uint32) public numCheckpoints;

    /// @notice The EIP-712 typehash for the contract's domain
    bytes32 public constant DOMAIN_TYPEHASH =
        keccak256('EIP712Domain(string name,uint256 chainId,address verifyingContract)');

    /// @notice The EIP-712 typehash for the delegation struct used by the contract
    bytes32 public constant DELEGATION_TYPEHASH =
        keccak256('Delegation(address delegatee,uint256 nonce,uint256 expiry)');

    /// @notice A record of states for signing / validating signatures
    mapping(address => uint256) public nonces;

    /// @notice An event thats emitted when an account changes its delegate
    event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);

    /// @notice An event thats emitted when a delegate account's vote balance changes
    event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);

    /**
     * @notice The votes a delegator can delegate, which is the current balance of the delegator.
     * @dev Used when calling `_delegate()`
     */
    function votesToDelegate(address delegator) public view returns (uint96) {
        return safe96(balanceOf(delegator), 'ERC721Checkpointable::votesToDelegate: amount exceeds 96 bits');
    }

    /**
     * @notice Overrides the standard `Comp.sol` delegates mapping to return
     * the delegator's own address if they haven't delegated.
     * This avoids having to delegate to oneself.
     */
    function delegates(address delegator) public view returns (address) {
        address current = _delegates[delegator];
        return current == address(0) ? delegator : current;
    }

    /**
     * @notice Adapted from `_transferTokens()` in `Comp.sol` to update delegate votes.
     * @dev hooks into OpenZeppelin's `ERC721._transfer`
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal override {
        super._beforeTokenTransfer(from, to, tokenId);

        /// @notice Differs from `_transferTokens()` to use `delegates` override method to simulate auto-delegation
        _moveDelegates(delegates(from), delegates(to), 1);
    }

    /**
     * @notice Delegate votes from `msg.sender` to `delegatee`
     * @param delegatee The address to delegate votes to
     */
    function delegate(address delegatee) public {
        if (delegatee == address(0)) delegatee = msg.sender;
        return _delegate(msg.sender, delegatee);
    }

    /**
     * @notice Delegates votes from signatory to `delegatee`
     * @param delegatee The address to delegate votes to
     * @param nonce The contract state required to match the signature
     * @param expiry The time at which to expire the signature
     * @param v The recovery byte of the signature
     * @param r Half of the ECDSA signature pair
     * @param s Half of the ECDSA signature pair
     */
    function delegateBySig(
        address delegatee,
        uint256 nonce,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public {
        bytes32 domainSeparator = keccak256(
            abi.encode(DOMAIN_TYPEHASH, keccak256(bytes(name())), getChainId(), address(this))
        );
        bytes32 structHash = keccak256(abi.encode(DELEGATION_TYPEHASH, delegatee, nonce, expiry));
        bytes32 digest = keccak256(abi.encodePacked('\x19\x01', domainSeparator, structHash));
        address signatory = ecrecover(digest, v, r, s);
        require(signatory != address(0), 'ERC721Checkpointable::delegateBySig: invalid signature');
        require(nonce == nonces[signatory]++, 'ERC721Checkpointable::delegateBySig: invalid nonce');
        require(block.timestamp <= expiry, 'ERC721Checkpointable::delegateBySig: signature expired');
        return _delegate(signatory, delegatee);
    }

    /**
     * @notice Gets the current votes balance for `account`
     * @param account The address to get votes balance
     * @return The number of current votes for `account`
     */
    function getCurrentVotes(address account) external view returns (uint96) {
        uint32 nCheckpoints = numCheckpoints[account];
        return nCheckpoints > 0 ? checkpoints[account][nCheckpoints - 1].votes : 0;
    }

    /**
     * @notice Determine the prior number of votes for an account as of a block number
     * @dev Block number must be a finalized block or else this function will revert to prevent misinformation.
     * @param account The address of the account to check
     * @param blockNumber The block number to get the vote balance at
     * @return The number of votes the account had as of the given block
     */
    function getPriorVotes(address account, uint256 blockNumber) public view returns (uint96) {
        require(blockNumber < block.number, 'ERC721Checkpointable::getPriorVotes: not yet determined');

        uint32 nCheckpoints = numCheckpoints[account];
        if (nCheckpoints == 0) {
            return 0;
        }

        // First check most recent balance
        if (checkpoints[account][nCheckpoints - 1].fromBlock <= blockNumber) {
            return checkpoints[account][nCheckpoints - 1].votes;
        }

        // Next check implicit zero balance
        if (checkpoints[account][0].fromBlock > blockNumber) {
            return 0;
        }

        uint32 lower = 0;
        uint32 upper = nCheckpoints - 1;
        while (upper > lower) {
            uint32 center = upper - (upper - lower) / 2; // ceil, avoiding overflow
            Checkpoint memory cp = checkpoints[account][center];
            if (cp.fromBlock == blockNumber) {
                return cp.votes;
            } else if (cp.fromBlock < blockNumber) {
                lower = center;
            } else {
                upper = center - 1;
            }
        }
        return checkpoints[account][lower].votes;
    }

    function _delegate(address delegator, address delegatee) internal {
        /// @notice differs from `_delegate()` in `Comp.sol` to use `delegates` override method to simulate auto-delegation
        address currentDelegate = delegates(delegator);

        _delegates[delegator] = delegatee;

        emit DelegateChanged(delegator, currentDelegate, delegatee);

        uint96 amount = votesToDelegate(delegator);

        _moveDelegates(currentDelegate, delegatee, amount);
    }

    function _moveDelegates(
        address srcRep,
        address dstRep,
        uint96 amount
    ) internal {
        if (srcRep != dstRep && amount > 0) {
            if (srcRep != address(0)) {
                uint32 srcRepNum = numCheckpoints[srcRep];
                uint96 srcRepOld = srcRepNum > 0 ? checkpoints[srcRep][srcRepNum - 1].votes : 0;
                uint96 srcRepNew = sub96(srcRepOld, amount, 'ERC721Checkpointable::_moveDelegates: amount underflows');
                _writeCheckpoint(srcRep, srcRepNum, srcRepOld, srcRepNew);
            }

            if (dstRep != address(0)) {
                uint32 dstRepNum = numCheckpoints[dstRep];
                uint96 dstRepOld = dstRepNum > 0 ? checkpoints[dstRep][dstRepNum - 1].votes : 0;
                uint96 dstRepNew = add96(dstRepOld, amount, 'ERC721Checkpointable::_moveDelegates: amount overflows');
                _writeCheckpoint(dstRep, dstRepNum, dstRepOld, dstRepNew);
            }
        }
    }

    function _writeCheckpoint(
        address delegatee,
        uint32 nCheckpoints,
        uint96 oldVotes,
        uint96 newVotes
    ) internal {
        uint32 blockNumber = safe32(
            block.number,
            'ERC721Checkpointable::_writeCheckpoint: block number exceeds 32 bits'
        );

        if (nCheckpoints > 0 && checkpoints[delegatee][nCheckpoints - 1].fromBlock == blockNumber) {
            checkpoints[delegatee][nCheckpoints - 1].votes = newVotes;
        } else {
            checkpoints[delegatee][nCheckpoints] = Checkpoint(blockNumber, newVotes);
            numCheckpoints[delegatee] = nCheckpoints + 1;
        }

        emit DelegateVotesChanged(delegatee, oldVotes, newVotes);
    }

    function safe32(uint256 n, string memory errorMessage) internal pure returns (uint32) {
        require(n < 2**32, errorMessage);
        return uint32(n);
    }

    function safe96(uint256 n, string memory errorMessage) internal pure returns (uint96) {
        require(n < 2**96, errorMessage);
        return uint96(n);
    }

    function add96(
        uint96 a,
        uint96 b,
        string memory errorMessage
    ) internal pure returns (uint96) {
        uint96 c = a + b;
        require(c >= a, errorMessage);
        return c;
    }

    function sub96(
        uint96 a,
        uint96 b,
        string memory errorMessage
    ) internal pure returns (uint96) {
        require(b <= a, errorMessage);
        return a - b;
    }

    function getChainId() internal view returns (uint256) {
        uint256 chainId;
        assembly {
            chainId := chainid()
        }
        return chainId;
    }
}

File 4 of 17 : IDescriptorMinimal.sol
// SPDX-License-Identifier: GPL-3.0

/// @title Common interface for NDescriptor versions, as used by NToken and NSeeder.

/*********************************
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░██░░░████░░██░░░████░░░ *
 * ░░██████░░░████████░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 *********************************/

pragma solidity ^0.8.6;

import { ISeeder } from './ISeeder.sol';

interface IDescriptorMinimal {
    ///
    /// USED BY TOKEN
    ///

    function tokenURI(uint256 tokenId, ISeeder.Seed memory seed) external view returns (string memory);

    function dataURI(uint256 tokenId, ISeeder.Seed memory seed) external view returns (string memory);

    ///
    /// USED BY SEEDER
    ///

    function punkTypeCount() external view returns (uint256);
    function hatCount() external view returns (uint256);
    function helmetCount() external view returns (uint256);
    function hairCount() external view returns (uint256);
    function beardCount() external view returns (uint256);
    function eyesCount() external view returns (uint256);
    function glassesCount() external view returns (uint256);
    function gogglesCount() external view returns (uint256);
    function mouthCount() external view returns (uint256);
    function teethCount() external view returns (uint256);
    function lipsCount() external view returns (uint256);
    function neckCount() external view returns (uint256);
    function emotionCount() external view returns (uint256);
    function faceCount() external view returns (uint256);
    function earsCount() external view returns (uint256);
    function noseCount() external view returns (uint256);
    function cheeksCount() external view returns (uint256);
}

File 5 of 17 : ISeeder.sol
// SPDX-License-Identifier: GPL-3.0

/// @title Interface for NSeeder

/*********************************
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░██░░░████░░██░░░████░░░ *
 * ░░██████░░░████████░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 *********************************/

pragma solidity ^0.8.6;

interface ISeeder {
    struct Accessory {
        uint16 accType;
        uint16 accId;
    }
    struct Seed {
        uint8 punkType;
        uint8 skinTone;
        Accessory[] accessories;
    }

    function generateSeed(uint256 punkId, uint256 salt) external view returns (Seed memory);
}

File 6 of 17 : IToken.sol
// SPDX-License-Identifier: GPL-3.0

/// @title Interface for NToken

/*********************************
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░██░░░████░░██░░░████░░░ *
 * ░░██████░░░████████░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 *********************************/

pragma solidity ^0.8.6;

import { IERC721 } from '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import { IDescriptorMinimal } from './IDescriptorMinimal.sol';
import { ISeeder } from './ISeeder.sol';

interface IToken is IERC721 {
    event PunkCreated(uint256 indexed tokenId, ISeeder.Seed seed);

    event PunkBurned(uint256 indexed tokenId);

    event PunkersUpdated(address punkers);

    event MinterUpdated(address minter);

    event MinterLocked();

    event DescriptorUpdated(IDescriptorMinimal descriptor);

    event DescriptorLocked();

    event SeederUpdated(ISeeder seeder);

    event SeederLocked();

    event RegisterOGHashesLocked();

    event MetadataUpdated(string name, string symbol);

    event MetadataLocked();

    event IdShiftUpdated(uint256 newIdShift);

    event IdShiftLocked();

    function mint() external returns (uint256);

    function burn(uint256 tokenId) external;

    function dataURI(uint256 tokenId) external returns (string memory);

    function setPunkers(address punkers) external;

    function setMinter(address minter) external;

    function lockMinter() external;

    function setDescriptor(IDescriptorMinimal descriptor) external;

    function lockDescriptor() external;

    function setSeeder(ISeeder seeder) external;

    function lockSeeder() external;

    function lockRegisterOGHashes() external;

    function setName(string memory name_) external;

    function setSymbol(string memory symbol_) external;

    function lockMetadata() external;

    function setIdShift(uint256 newIdShift) external;

    function lockIdShift() external;
}

File 7 of 17 : ERC721.sol
// SPDX-License-Identifier: MIT

/// @title ERC721 Token Implementation

/*********************************
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░██░░░████░░██░░░████░░░ *
 * ░░██████░░░████████░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 *********************************/

// LICENSE
// ERC721.sol modifies OpenZeppelin's ERC721.sol:
// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/6618f9f18424ade44116d0221719f4c93be6a078/contracts/token/ERC721/ERC721.sol
//
// ERC721.sol source code copyright OpenZeppelin licensed under the MIT License.
// With modifications by Nounders DAO.
//
//
// MODIFICATIONS:
// `_safeMint` and `_mint` contain an additional `creator` argument and
// emit two `Transfer` logs, rather than one. The first log displays the
// transfer (mint) from `address(0)` to the `creator`. The second displays the
// transfer from the `creator` to the `to` address. This enables correct
// attribution on various NFT marketplaces.
// _idShift - possible shift for token Ids.

pragma solidity ^0.8.6;

import '@openzeppelin/contracts/token/ERC721/IERC721.sol';
import '@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol';
import '@openzeppelin/contracts/utils/Address.sol';
import '@openzeppelin/contracts/utils/Context.sol';
import '@openzeppelin/contracts/utils/Strings.sol';
import '@openzeppelin/contracts/utils/introspection/ERC165.sol';

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

    // Mapping from owner to operator approvals
    mapping(address => mapping(address => bool)) private _operatorApprovals;

    // possible shift for token ids, storage records are not affected, only input, output, external calls and events
    uint256 internal _idShift = 0;

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return
            interfaceId == type(IERC721).interfaceId ||
            interfaceId == type(IERC721Metadata).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), 'ERC721: balance query for the zero address');
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) external view override returns (address) {
        require(tokenId >= _idShift, 'ERC721: owner query for nonexistent token');
        return _ownerOf(tokenId - _idShift);
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), 'ERC721: owner query for nonexistent token');
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) external view virtual override returns (string memory) {
        require(tokenId >= _idShift, 'ERC721Metadata: URI query for nonexistent token');
        tokenId = tokenId - _idShift;

        require(_exists(tokenId), 'ERC721Metadata: URI query for nonexistent token');

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : '';
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) external override {
        require(tokenId >= _idShift, 'ERC721: owner query for nonexistent token');
        tokenId = tokenId - _idShift;

        address owner = ERC721._ownerOf(tokenId);
        require(to != owner, 'ERC721: approval to current owner');

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            'ERC721: approve caller is not owner nor approved for all'
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) external view override returns (address) {
        require(tokenId >= _idShift, 'ERC721: owner query for nonexistent token');
        tokenId = tokenId - _idShift;

        require(_exists(tokenId), 'ERC721: approved query for nonexistent token');

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(operator != _msgSender(), 'ERC721: approve to caller');

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

    /**
     * @dev See {IERC721-isApprovedForAll}.
     */
    function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
        return _operatorApprovals[owner][operator];
    }

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external override {
        require(tokenId >= _idShift, 'ERC721: operator query for nonexistent token');
        tokenId = tokenId - _idShift;

        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), 'ERC721: transfer caller is not owner nor approved');

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external override {
        require(tokenId >= _idShift, 'ERC721: operator query for nonexistent token');
        tokenId = tokenId - _idShift;

        require(_isApprovedOrOwner(_msgSender(), tokenId), 'ERC721: transfer caller is not owner nor approved');
        _safeTransfer(from, to, tokenId, '');
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) external override {
        require(tokenId >= _idShift, 'ERC721: operator query for nonexistent token');
        tokenId = tokenId - _idShift;

        require(_isApprovedOrOwner(_msgSender(), tokenId), 'ERC721: transfer caller is not owner nor approved');
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), 'ERC721: transfer to non ERC721Receiver implementer');
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), 'ERC721: operator query for nonexistent token');
        address owner = ERC721._ownerOf(tokenId);
        return (spender == owner || _tokenApprovals[tokenId] == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId`, transfers it to `to`, and emits two log events -
     * 1. Credits the `minter` with the mint.
     * 2. Shows transfer from the `minter` to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(
        address creator,
        address to,
        uint256 tokenId
    ) internal virtual {
        _safeMint(creator, to, tokenId, '');
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address creator,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(creator, to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            'ERC721: transfer to non ERC721Receiver implementer'
        );
    }

    /**
     * @dev Mints `tokenId`, transfers it to `to`, and emits two log events -
     * 1. Credits the `creator` with the mint.
     * 2. Shows transfer from the `creator` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(
        address creator,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(to != address(0), 'ERC721: mint to the zero address');
        require(!_exists(tokenId), 'ERC721: token already minted');

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), creator, tokenId + _idShift);
        emit Transfer(creator, to, tokenId + _idShift);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721._ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId + _idShift);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721._ownerOf(tokenId) == from, 'ERC721: transfer of token that is not own');
        require(to != address(0), 'ERC721: transfer to the zero address');

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId + _idShift);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721._ownerOf(tokenId), to, tokenId + _idShift);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId + _idShift, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver(to).onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert('ERC721: transfer to non ERC721Receiver implementer');
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 9 of 17 : Context.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)

pragma solidity ^0.8.0;

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

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

File 10 of 17 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

/// @title ERC721 Enumerable Extension

/*********************************
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░██░░░████░░██░░░████░░░ *
 * ░░██████░░░████████░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░██░░██░░░████░░██░░░████░░░ *
 * ░░░░░░█████████░░█████████░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ *
 *********************************/

// LICENSE
// ERC721.sol modifies OpenZeppelin's ERC721Enumerable.sol:
// https://github.com/OpenZeppelin/openzeppelin-contracts/blob/6618f9f18424ade44116d0221719f4c93be6a078/contracts/token/ERC721/extensions/ERC721Enumerable.sol
//
// ERC721Enumerable.sol source code copyright OpenZeppelin licensed under the MIT License.
// With modifications by Nounders DAO.
//
// MODIFICATIONS:
// Consumes modified `ERC721` contract. See notes in `ERC721.sol`.
// _idShift - possible shift for token Ids.

pragma solidity ^0.8.0;

import './ERC721.sol';
import '@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.sol';

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) {
        return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view override returns (uint256) {
        require(index < ERC721.balanceOf(owner), 'ERC721Enumerable: owner index out of bounds');
        return _ownedTokens[owner][index] + _idShift;
    }

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

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), 'ERC721Enumerable: global index out of bounds');
        return _allTokens[index] + _idShift;
    }

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

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 11 of 17 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 12 of 17 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 13 of 17 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

File 14 of 17 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 15 of 17 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Strings.sol)

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        // Inspired by OraclizeAPI's implementation - MIT licence
        // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol

        if (value == 0) {
            return "0";
        }
        uint256 temp = value;
        uint256 digits;
        while (temp != 0) {
            digits++;
            temp /= 10;
        }
        bytes memory buffer = new bytes(digits);
        while (value != 0) {
            digits -= 1;
            buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
            value /= 10;
        }
        return string(buffer);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        if (value == 0) {
            return "0x00";
        }
        uint256 temp = value;
        uint256 length = 0;
        while (temp != 0) {
            length++;
            temp >>= 8;
        }
        return toHexString(value, length);
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
     */
    function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
        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_SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }
}

File 16 of 17 : ERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/ERC165.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

/**
 * @dev Implementation of the {IERC165} interface.
 *
 * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
 * for the additional interface id that will be supported. For example:
 *
 * ```solidity
 * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
 *     return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
 * }
 * ```
 *
 * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
 */
abstract contract ERC165 is IERC165 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        return interfaceId == type(IERC165).interfaceId;
    }
}

File 17 of 17 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_punkers","type":"address"},{"internalType":"address","name":"_minter","type":"address"},{"internalType":"contract IDescriptorMinimal","name":"_descriptor","type":"address"},{"internalType":"contract ISeeder","name":"_seeder","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegator","type":"address"},{"indexed":true,"internalType":"address","name":"fromDelegate","type":"address"},{"indexed":true,"internalType":"address","name":"toDelegate","type":"address"}],"name":"DelegateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"DescriptorLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IDescriptorMinimal","name":"descriptor","type":"address"}],"name":"DescriptorUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"IdShiftLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newIdShift","type":"uint256"}],"name":"IdShiftUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"MetadataLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"}],"name":"MetadataUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"MinterLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minter","type":"address"}],"name":"MinterUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"PunkBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint8","name":"punkType","type":"uint8"},{"internalType":"uint8","name":"skinTone","type":"uint8"},{"components":[{"internalType":"uint16","name":"accType","type":"uint16"},{"internalType":"uint16","name":"accId","type":"uint16"}],"internalType":"struct ISeeder.Accessory[]","name":"accessories","type":"tuple[]"}],"indexed":false,"internalType":"struct ISeeder.Seed","name":"seed","type":"tuple"}],"name":"PunkCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"punkers","type":"address"}],"name":"PunkersUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"RegisterOGHashesLocked","type":"event"},{"anonymous":false,"inputs":[],"name":"SeederLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract ISeeder","name":"seeder","type":"address"}],"name":"SeederUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DELEGATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"punkId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint8","name":"punkType","type":"uint8"},{"internalType":"uint8","name":"skinTone","type":"uint8"},{"components":[{"internalType":"uint16","name":"accType","type":"uint16"},{"internalType":"uint16","name":"accId","type":"uint16"}],"internalType":"struct ISeeder.Accessory[]","name":"accessories","type":"tuple[]"}],"internalType":"struct ISeeder.Seed","name":"seed","type":"tuple"}],"name":"calculateSeedHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint32","name":"","type":"uint32"}],"name":"checkpoints","outputs":[{"internalType":"uint32","name":"fromBlock","type":"uint32"},{"internalType":"uint96","name":"votes","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"dataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"delegateBySig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegator","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"descriptor","outputs":[{"internalType":"contract IDescriptorMinimal","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getCurrentVotes","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPriorVotes","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"punkId","type":"uint256"}],"name":"getPunk","outputs":[{"components":[{"internalType":"uint8","name":"punkType","type":"uint8"},{"internalType":"uint8","name":"skinTone","type":"uint8"},{"components":[{"internalType":"uint16","name":"accType","type":"uint16"},{"internalType":"uint16","name":"accId","type":"uint16"}],"internalType":"struct ISeeder.Accessory[]","name":"accessories","type":"tuple[]"}],"internalType":"struct ISeeder.Seed","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isDescriptorLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isIdShitLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMetadataLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMinterLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isRegisterOGHashesLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSeederLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockDescriptor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockIdShift","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockRegisterOGHashes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockSeeder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"numCheckpoints","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"punkers","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"hashes","type":"bytes32[]"}],"name":"registerOGHashes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"seeder","outputs":[{"internalType":"contract ISeeder","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"punkId","type":"uint256"}],"name":"seeds","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newContractURIHash","type":"string"}],"name":"setContractURIHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IDescriptorMinimal","name":"_descriptor","type":"address"}],"name":"setDescriptor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newIdShift","type":"uint256"}],"name":"setIdShift","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name_","type":"string"}],"name":"setName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_punkers","type":"address"}],"name":"setPunkers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ISeeder","name":"_seeder","type":"address"}],"name":"setSeeder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"symbol_","type":"string"}],"name":"setSymbol","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegator","type":"address"}],"name":"votesToDelegate","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"}]

6000600781905560175560e0604052602e608081815290620059a960a0396018906200002c908262000245565b503480156200003a57600080fd5b50604051620059d7380380620059d78339810160408190526200005d916200032a565b60408051602080820183526000808352835191820190935291825290620000843362000150565b600162000092838262000245565b506002620000a1828262000245565b5050601080546001600160a01b038088166001600160a01b031992831617909255601180548784169083161790556012805486841690831617905560138054928516929091169190911790555060408051808201909152600881526744414f70756e6b7360c01b60208201526019906200011c908262000245565b5060408051808201909152600281526167df60f11b6020820152601a9062000145908262000245565b505050505062000392565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620001cb57607f821691505b602082108103620001ec57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200024057600081815260208120601f850160051c810160208610156200021b5750805b601f850160051c820191505b818110156200023c5782815560010162000227565b5050505b505050565b81516001600160401b03811115620002615762000261620001a0565b6200027981620002728454620001b6565b84620001f2565b602080601f831160018114620002b15760008415620002985750858301515b600019600386901b1c1916600185901b1785556200023c565b600085815260208120601f198616915b82811015620002e257888601518255948401946001909101908401620002c1565b5085821015620003015787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6001600160a01b03811681146200032757600080fd5b50565b600080600080608085870312156200034157600080fd5b84516200034e8162000311565b6020860151909450620003618162000311565b6040860151909350620003748162000311565b6060860151909250620003878162000311565b939692955090935050565b61560780620003a26000396000f3fe608060405234801561001057600080fd5b50600436106103c55760003560e01c806372013282116101ff578063c1b8e4e11161011a578063e7a324dc116100ad578063f0503e801161007c578063f0503e80146108a5578063f1127ed8146108b8578063f2fde38b1461092a578063fca3b5aa1461093d57600080fd5b8063e7a324dc14610827578063e8a3d4851461084e578063e9580e9114610856578063e985e9c51461086957600080fd5b8063c87b56dd116100e9578063c87b56dd146107d9578063c8fc0c23146107ec578063d50b31eb146107ff578063d7e45cd71461081257600080fd5b8063c1b8e4e114610781578063c3cda52014610793578063c47f0027146107a6578063c81d1d5b146107b957600080fd5b806395d89b4111610192578063b4b5ea5711610161578063b4b5ea5714610735578063b84c824614610748578063b88d4fde1461075b578063baedc1c41461076e57600080fd5b806395d89b41146106ff578063989bdbb6146107075780639a1986da1461070f578063a22cb4651461072257600080fd5b80637da793f0116101ce5780637da793f0146106b05780637ecebe00146106c65780638da5cb5b146106e657806391e761ef146106f757600080fd5b8063720132821461065d578063721b42871461066557806376daebe114610678578063782d6fe11461068057600080fd5b8063303e74df116102ef5780635c19a95c11610282578063684931ed11610251578063684931ed146105f45780636fcfff451461060757806370a0823114610642578063715018a61461065557600080fd5b80635c19a95c146105b25780635f295a67146105c557806362dca72e146105cd5780636352211e146105e157600080fd5b806342966c68116102be57806342966c68146105665780634f6ccce714610579578063587cde1e1461058c5780635ac1e3bb1461059f57600080fd5b8063303e74df1461051e578063313ce5671461053157806341b5d0de1461054b57806342842e0e1461055357600080fd5b8063099544541161036757806320606b701161033657806320606b70146104be57806322188a50146104e557806323b872dd146104f85780632f745c591461050b57600080fd5b806309954454146104805780631249c58b1461049357806318160ddd146104a95780631e688e10146104b157600080fd5b806306fdde03116103a357806306fdde03146104325780630754617214610447578063081812fc1461045a578063095ea7b31461046d57600080fd5b8063014336e0146103ca57806301b9a397146103fa57806301ffc9a71461040f575b600080fd5b6010546103dd906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61040d6104083660046146de565b610950565b005b61042261041d366004614729565b610a74565b60405190151581526020016103f1565b61043a610ad0565b6040516103f1919061479e565b6011546103dd906001600160a01b031681565b6103dd6104683660046147b1565b610b62565b61040d61047b3660046147ca565b610c92565b61040d61048e3660046147b1565b610e4a565b61049b610f35565b6040519081526020016103f1565b600a5461049b565b6015546104229060ff1681565b61049b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b61040d6104f33660046147f6565b611007565b61040d61050636600461486b565b61110a565b61049b6105193660046147ca565b611219565b6012546103dd906001600160a01b031681565b610539600081565b60405160ff90911681526020016103f1565b61040d6112d0565b61040d61056136600461486b565b6113d9565b61040d6105743660046147b1565b6114f6565b61049b6105873660046147b1565b61168d565b6103dd61059a3660046146de565b611737565b61043a6105ad3660046147b1565b611767565b61040d6105c03660046146de565b61190f565b61040d61192d565b601554610422906301000000900460ff1681565b6103dd6105ef3660046147b1565b611a38565b6013546103dd906001600160a01b031681565b61062d6106153660046146de565b600e6020526000908152604090205463ffffffff1681565b60405163ffffffff90911681526020016103f1565b61049b6106503660046146de565b611ac8565b61040d611b62565b61040d611bc8565b61040d6106733660046146de565b611cd9565b61040d611def565b61069361068e3660046147ca565b611ef2565b6040516bffffffffffffffffffffffff90911681526020016103f1565b6015546104229065010000000000900460ff1681565b61049b6106d43660046146de565b600f6020526000908152604090205481565b6000546001600160a01b03166103dd565b61040d6121a4565b61043a6122b1565b61040d6122c0565b61049b61071d36600461499b565b6123cf565b61040d610730366004614ac0565b612493565b6106936107433660046146de565b612575565b61040d610756366004614b5f565b6125f8565b61040d610769366004614ba8565b6126ed565b61040d61077c366004614b5f565b612802565b60155461042290610100900460ff1681565b61040d6107a1366004614c28565b61286c565b61040d6107b4366004614b5f565b612b9e565b6107cc6107c73660046147b1565b612c5f565b6040516103f19190614cfd565b61043a6107e73660046147b1565b612ca4565b6015546104229062010000900460ff1681565b61040d61080d3660046146de565b612dea565b60155461042290640100000000900460ff1681565b61049b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b61043a612f03565b6106936108643660046146de565b612f2b565b610422610877366004614d10565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b61049b6108b33660046147b1565b612f57565b6109016108c6366004614d3e565b600d60209081526000928352604080842090915290825290205463ffffffff81169064010000000090046bffffffffffffffffffffffff1682565b6040805163ffffffff90931683526bffffffffffffffffffffffff9091166020830152016103f1565b61040d6109383660046146de565b612f81565b61040d61094b3660046146de565b613060565b6000546001600160a01b031633146109af5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b601554610100900460ff1615610a075760405162461bcd60e51b815260206004820152601460248201527f44657363726970746f72206973206c6f636b656400000000000000000000000060448201526064016109a6565b601280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f6e66ab22238a5471005895947c8f57db923c2a9c9c73180eff80864c21295c1b906020015b60405180910390a150565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610aca5750610aca82613173565b92915050565b606060198054610adf90614d75565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0b90614d75565b8015610b585780601f10610b2d57610100808354040283529160200191610b58565b820191906000526020600020905b815481529060010190602001808311610b3b57829003601f168201915b5050505050905090565b6000600754821015610bdc5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e000000000000000000000000000000000000000000000060648201526084016109a6565b600754610be99083614df7565b6000818152600360205260409020549092506001600160a01b0316610c765760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016109a6565b506000908152600560205260409020546001600160a01b031690565b600754811015610d0a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e000000000000000000000000000000000000000000000060648201526084016109a6565b600754610d179082614df7565b90506000610d2482613256565b9050806001600160a01b0316836001600160a01b031603610dad5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084016109a6565b336001600160a01b0382161480610dc95750610dc98133610877565b610e3b5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016109a6565b610e4583836132e1565b505050565b6000546001600160a01b03163314610ea45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b60155465010000000000900460ff1615610f005760405162461bcd60e51b815260206004820152601560248201527f4964205368696674696e67206973206c6f636b6564000000000000000000000060448201526064016109a6565b60078190556040518181527fca24e18900ae21a8b23a8d841f6c7a531dc73b62a1c419844b20483c2d1f75fb90602001610a69565b6011546000906001600160a01b03163314610f925760405162461bcd60e51b815260206004820152601860248201527f53656e646572206973206e6f7420746865206d696e746572000000000000000060448201526064016109a6565b61071c60175411158015610fb25750600a601754610fb09190614e3d565b155b15610fe25760105460178054610fe0926001600160a01b0316916000610fd783614e51565b91905055613379565b505b60115460178054611002926001600160a01b0316916000610fd783614e51565b905090565b6000546001600160a01b031633146110615760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b6015546301000000900460ff16156110bb5760405162461bcd60e51b815260206004820152601a60248201527f52656769737465724f47486173686573206973206c6f636b656400000000000060448201526064016109a6565b60005b81811015610e45576001601460008585858181106110de576110de614e89565b90506020020135815260200190815260200160002081905550808061110290614e51565b9150506110be565b6007548110156111825760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016109a6565b60075461118f9082614df7565b905061119c335b8261356b565b61120e5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016109a6565b610e45838383613673565b600061122483611ac8565b82106112985760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e647300000000000000000000000000000000000000000060648201526084016109a6565b6007546001600160a01b03841660009081526008602090815260408083208684529091529020546112c99190614eb8565b9392505050565b6000546001600160a01b0316331461132a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b601554610100900460ff16156113825760405162461bcd60e51b815260206004820152601460248201527f44657363726970746f72206973206c6f636b656400000000000000000000000060448201526064016109a6565b601580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790556040517f593e31e306c198bef259d839f7c6dc4ff7fc10c07f76fab193a210b03704105f90600090a1565b6007548110156114515760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016109a6565b60075461145e9082614df7565b905061146933611196565b6114db5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016109a6565b610e4583838360405180602001604052806000815250613880565b6011546001600160a01b031633146115505760405162461bcd60e51b815260206004820152601860248201527f53656e646572206973206e6f7420746865206d696e746572000000000000000060448201526064016109a6565b6007548110156115c85760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016109a6565b6000600754826115d89190614df7565b90506115e333611196565b6116555760405162461bcd60e51b815260206004820152603060248201527f50756e6b546f6b656e3a206275726e2063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f7665640000000000000000000000000000000060648201526084016109a6565b61165e81613909565b60405182907fab65ccc37df5d015a04747bd3e3202af01d127d90fd3ad6e587bfeb83d9676c290600090a25050565b6000611698600a5490565b821061170c5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e6473000000000000000000000000000000000000000060648201526084016109a6565b600754600a838154811061172257611722614e89565b9060005260206000200154610aca9190614eb8565b6001600160a01b038082166000908152600c6020526040812054909116801561176057806112c9565b5090919050565b60606007548210156117e15760405162461bcd60e51b815260206004820152602a60248201527f50756e6b546f6b656e3a2055524920717565727920666f72206e6f6e6578697360448201527f74656e7420746f6b656e0000000000000000000000000000000000000000000060648201526084016109a6565b6000600754836117f19190614df7565b6000818152600360205260409020549091506001600160a01b031661187e5760405162461bcd60e51b815260206004820152602a60248201527f50756e6b546f6b656e3a2055524920717565727920666f72206e6f6e6578697360448201527f74656e7420746f6b656e0000000000000000000000000000000000000000000060648201526084016109a6565b6012546000828152601660205260409020546001600160a01b039091169063569e1e759085906118ad906139d6565b6040518363ffffffff1660e01b81526004016118ca929190614ed0565b600060405180830381865afa1580156118e7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112c99190810190614ee9565b6001600160a01b0381166119205750335b61192a3382613b3f565b50565b6000546001600160a01b031633146119875760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b60155462010000900460ff16156119e05760405162461bcd60e51b815260206004820152601060248201527f536565646572206973206c6f636b65640000000000000000000000000000000060448201526064016109a6565b601580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff16620100001790556040517ff59561f22794afcfb1e6be5c4733f5449fd167252a96b74bb06d341fb0dac7ed90600090a1565b6000600754821015611ab25760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e000000000000000000000000000000000000000000000060648201526084016109a6565b610aca60075483611ac39190614df7565b613256565b60006001600160a01b038216611b465760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f20616464726573730000000000000000000000000000000000000000000060648201526084016109a6565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b03163314611bbc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b611bc66000613bd7565b565b6000546001600160a01b03163314611c225760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b60155465010000000000900460ff1615611c7e5760405162461bcd60e51b815260206004820152601560248201527f4964205368696674696e67206973206c6f636b6564000000000000000000000060448201526064016109a6565b601580547fffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffff16650100000000001790556040517fd356368ad446c6df27158ece639eaa633cf48fa8d5c180740ba186160842d35f90600090a1565b6010546001600160a01b03163314611d335760405162461bcd60e51b815260206004820152601960248201527f53656e646572206973206e6f74207468652070756e6b6572730000000000000060448201526064016109a6565b6001600160a01b038116611d895760405162461bcd60e51b815260206004820152601660248201527f70756e6b6572732063616e6e6f74206265206e756c6c0000000000000000000060448201526064016109a6565b601080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f7fc36cb6960e80a5a890d78b315199656d692e2007ad6c2ff55ad691623168b890602001610a69565b6000546001600160a01b03163314611e495760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b60155460ff1615611e9c5760405162461bcd60e51b815260206004820152601060248201527f4d696e746572206973206c6f636b65640000000000000000000000000000000060448201526064016109a6565b601580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040517f192417b3f16b1ce69e0c59b0376549666650245ffc05e4b2569089dda8589b6690600090a1565b6000438210611f695760405162461bcd60e51b815260206004820152603760248201527f455243373231436865636b706f696e7461626c653a3a6765745072696f72566f60448201527f7465733a206e6f74207965742064657465726d696e656400000000000000000060648201526084016109a6565b6001600160a01b0383166000908152600e602052604081205463ffffffff1690819003611f9a576000915050610aca565b6001600160a01b0384166000908152600d602052604081208491611fbf600185614f60565b63ffffffff90811682526020820192909252604001600020541611612038576001600160a01b0384166000908152600d6020526040812090612002600184614f60565b63ffffffff16815260208101919091526040016000205464010000000090046bffffffffffffffffffffffff169150610aca9050565b6001600160a01b0384166000908152600d6020908152604080832083805290915290205463ffffffff16831015612073576000915050610aca565b600080612081600184614f60565b90505b8163ffffffff168163ffffffff16111561215957600060026120a68484614f60565b6120b09190614f85565b6120ba9083614f60565b6001600160a01b0388166000908152600d6020908152604080832063ffffffff8581168552908352928190208151808301909252549283168082526401000000009093046bffffffffffffffffffffffff169181019190915291925087900361212d57602001519450610aca9350505050565b805163ffffffff1687111561214457819350612152565b61214f600183614f60565b92505b5050612084565b506001600160a01b0385166000908152600d6020908152604080832063ffffffff909416835292905220546bffffffffffffffffffffffff6401000000009091041691505092915050565b6000546001600160a01b031633146121fe5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b6015546301000000900460ff16156122585760405162461bcd60e51b815260206004820152601a60248201527f52656769737465724f47486173686573206973206c6f636b656400000000000060448201526064016109a6565b601580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffff1663010000001790556040517ff7dfc2c479f1db562d95e8e6b188f0b3d7f05f6c22a0bd41f51d2008af1bdb4390600090a1565b6060601a8054610adf90614d75565b6000546001600160a01b0316331461231a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b601554640100000000900460ff16156123755760405162461bcd60e51b815260206004820152601260248201527f4d65746164617461206973206c6f636b6564000000000000000000000000000060448201526064016109a6565b601580547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff166401000000001790556040517f27de4862bfc92b76e402ed305829f40e9e5fcd597ab2206b4e6294cd24ed45c490600090a1565b6000806018836040015151901b6010846020015160ff16901b6008856000015160ff16901b60010101019050600f8360400151511061241057612410614fa8565b60005b83604001515181101561248c57806010026028018460400151828151811061243d5761243d614e89565b60200260200101516020015161ffff16901b816010026020018560400151838151811061246c5761246c614e89565b60209081029190910101515161ffff16901b019190910190600101612413565b5092915050565b336001600160a01b038316036124eb5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016109a6565b3360008181526006602090815260408083206001600160a01b0387168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6001600160a01b0381166000908152600e602052604081205463ffffffff16806125a05760006112c9565b6001600160a01b0383166000908152600d60205260408120906125c4600184614f60565b63ffffffff16815260208101919091526040016000205464010000000090046bffffffffffffffffffffffff169392505050565b6000546001600160a01b031633146126525760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b601554640100000000900460ff16156126ad5760405162461bcd60e51b815260206004820152601260248201527f4d65746164617461206973206c6f636b6564000000000000000000000000000060448201526064016109a6565b601a6126b9828261501d565b507f30f5c4b652f95e2a697bda3258896c421eee4f29adce8fe38060f47f7aed91ad6019601a604051610a699291906151b4565b6007548210156127655760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016109a6565b6007546127729083614df7565b915061277e338361356b565b6127f05760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016109a6565b6127fc84848484613880565b50505050565b6000546001600160a01b0316331461285c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b6018612868828261501d565b5050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866612897610ad0565b805190602001206128a54690565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c08401526001600160a01b038b1660e084015261010083018a90526101208084018a9052825180850390910181526101408401909252815191909301207f1901000000000000000000000000000000000000000000000000000000000000610160830152610162820183905261018282018190529192506000906101a20160408051601f198184030181528282528051602091820120600080855291840180845281905260ff8a169284019290925260608301889052608083018790529092509060019060a0016020604051602081039080840390855afa1580156129ec573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612a755760405162461bcd60e51b815260206004820152603660248201527f455243373231436865636b706f696e7461626c653a3a64656c6567617465427960448201527f5369673a20696e76616c6964207369676e61747572650000000000000000000060648201526084016109a6565b6001600160a01b0381166000908152600f60205260408120805491612a9983614e51565b919050558914612b115760405162461bcd60e51b815260206004820152603260248201527f455243373231436865636b706f696e7461626c653a3a64656c6567617465427960448201527f5369673a20696e76616c6964206e6f6e6365000000000000000000000000000060648201526084016109a6565b87421115612b875760405162461bcd60e51b815260206004820152603660248201527f455243373231436865636b706f696e7461626c653a3a64656c6567617465427960448201527f5369673a207369676e617475726520657870697265640000000000000000000060648201526084016109a6565b612b91818b613b3f565b505050505b505050505050565b6000546001600160a01b03163314612bf85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b601554640100000000900460ff1615612c535760405162461bcd60e51b815260206004820152601260248201527f4d65746164617461206973206c6f636b6564000000000000000000000000000060448201526064016109a6565b60196126b9828261501d565b60408051606080820183526000808352602083015291810191909152610aca6016600060075485612c909190614df7565b8152602001908152602001600020546139d6565b6060600754821015612d1e5760405162461bcd60e51b815260206004820152602a60248201527f50756e6b546f6b656e3a2055524920717565727920666f72206e6f6e6578697360448201527f74656e7420746f6b656e0000000000000000000000000000000000000000000060648201526084016109a6565b600060075483612d2e9190614df7565b6000818152600360205260409020549091506001600160a01b0316612dbb5760405162461bcd60e51b815260206004820152602a60248201527f50756e6b546f6b656e3a2055524920717565727920666f72206e6f6e6578697360448201527f74656e7420746f6b656e0000000000000000000000000000000000000000000060648201526084016109a6565b6012546000828152601660205260409020546001600160a01b0390911690636de1808b9085906118ad906139d6565b6000546001600160a01b03163314612e445760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b60155462010000900460ff1615612e9d5760405162461bcd60e51b815260206004820152601060248201527f536565646572206973206c6f636b65640000000000000000000000000000000060448201526064016109a6565b601380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fb3025222d01ce9a26c7f9d52bc3bfd0352366bd90a793c273fbfe1c81e0e288e90602001610a69565b60606018604051602001612f1791906151d9565b604051602081830303815290604052905090565b6000610aca612f3983611ac8565b6040518060600160405280603d815260200161555e603d9139613c3f565b60006016600060075484612f6b9190614df7565b8152602001908152602001600020549050919050565b6000546001600160a01b03163314612fdb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b6001600160a01b0381166130575760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016109a6565b61192a81613bd7565b6000546001600160a01b031633146130ba5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b60155460ff161561310d5760405162461bcd60e51b815260206004820152601060248201527f4d696e746572206973206c6f636b65640000000000000000000000000000000060448201526064016109a6565b601180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fad0f299ec81a386c98df0ac27dae11dd020ed1b56963c53a7292e7a3a314539a90602001610a69565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061320657507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610aca57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610aca565b6000818152600360205260408120546001600160a01b031680610aca5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e000000000000000000000000000000000000000000000060648201526084016109a6565b600081815260056020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03841617905560075461332d9082614eb8565b826001600160a01b031661334083613256565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806007548361338a9190614eb8565b6013546040517f041df082000000000000000000000000000000000000000000000000000000008152600481018390526000602482018190529293506001600160a01b039091169063041df08290604401600060405180830381865afa1580156133f8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052613420919081019061529c565b9050600061342d826123cf565b905060015b600082815260146020526040902054156134e1576013546001600160a01b031663041df082858361346281614e51565b94506040518363ffffffff1660e01b815260040161348a929190918252602082015260400190565b600060405180830381865afa1580156134a7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526134cf919081019061529c565b92506134da836123cf565b9150613432565b6134ec866002614eb8565b60008381526014602090815260408083209390935588825260169052208290556135286135216000546001600160a01b031690565b8888613c77565b837f1b6223a51fdc8f88a3ad726c4dbd70acc388d162c6d8ca63107e2a85831fe231846040516135589190614cfd565b60405180910390a2509395945050505050565b6000818152600360205260408120546001600160a01b03166135f55760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016109a6565b600061360083613256565b9050806001600160a01b0316846001600160a01b0316148061363b57506000838152600560205260409020546001600160a01b038581169116145b8061366b57506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661368682613256565b6001600160a01b0316146137025760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e000000000000000000000000000000000000000000000060648201526084016109a6565b6001600160a01b03821661377d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016109a6565b613788838383613dfb565b6137936000826132e1565b6001600160a01b03831660009081526004602052604081208054600192906137bc908490614df7565b90915550506001600160a01b03821660009081526004602052604081208054600192906137ea908490614eb8565b9091555050600081815260036020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03841617905560075461383b9082614eb8565b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b61388b848484613673565b61389784848484613e22565b6127fc5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016109a6565b600061391482613256565b905061392281600084613dfb565b61392d6000836132e1565b6001600160a01b0381166000908152600460205260408120805460019290613956908490614df7565b9091555050600082815260036020526040902080547fffffffffffffffffffffffff000000000000000000000000000000000000000016905560075461399c9083614eb8565b6040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60408051606080820183526000808352602080840191909152828401829052835180830185529384019190915260ff600885901c81168452601085901c81169184019190915290918391601883901c1667ffffffffffffffff811115613a3e57613a3e6148ac565b604051908082528060200260200182016040528015613a8357816020015b6040805180820190915260008082526020820152815260200190600190039081613a5c5790505b50604082015260005b816040015151811015613b3757613aa48160106153aa565b613aaf906020614eb8565b83901c60ff1682604001518281518110613acb57613acb614e89565b602090810291909101015161ffff9091169052613ae98160106153aa565b613af4906028614eb8565b83901c60ff1682604001518281518110613b1057613b10614e89565b60209081029190910181015161ffff90921691015280613b2f81614e51565b915050613a8c565b509392505050565b6000613b4a83611737565b6001600160a01b038481166000818152600c602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016888616908117909155905194955093928516927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46000613bca84612f2b565b90506127fc828483613fb7565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000816c010000000000000000000000008410613c6f5760405162461bcd60e51b81526004016109a6919061479e565b509192915050565b6001600160a01b038216613ccd5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016109a6565b6000818152600360205260409020546001600160a01b031615613d325760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016109a6565b613d3e60008383613dfb565b6001600160a01b0382166000908152600460205260408120805460019290613d67908490614eb8565b9091555050600081815260036020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038416179055600754613db89082614eb8565b6040516001600160a01b038516906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a460075461383b9082614eb8565b613e06838383614174565b610e45613e1284611737565b613e1b84611737565b6001613fb7565b60006001600160a01b0384163b15613fac576001600160a01b03841663150b7a02338760075487613e539190614eb8565b866040518563ffffffff1660e01b8152600401613e7394939291906153e7565b6020604051808303816000875af1925050508015613eae575060408051601f3d908101601f19168201909252613eab91810190615423565b60015b613f61573d808015613edc576040519150601f19603f3d011682016040523d82523d6000602084013e613ee1565b606091505b508051600003613f595760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016109a6565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061366b565b506001949350505050565b816001600160a01b0316836001600160a01b031614158015613fe757506000816bffffffffffffffffffffffff16115b15610e45576001600160a01b038316156140b2576001600160a01b0383166000908152600e602052604081205463ffffffff169081614027576000614079565b6001600160a01b0385166000908152600d602052604081209061404b600185614f60565b63ffffffff16815260208101919091526040016000205464010000000090046bffffffffffffffffffffffff165b905060006140a0828560405180606001604052806037815260200161559b6037913961422c565b90506140ae86848484614278565b5050505b6001600160a01b03821615610e45576001600160a01b0382166000908152600e602052604081205463ffffffff1690816140ed57600061413f565b6001600160a01b0384166000908152600d6020526040812090614111600185614f60565b63ffffffff16815260208101919091526040016000205464010000000090046bffffffffffffffffffffffff165b9050600061416682856040518060600160405280603681526020016154e4603691396144ba565b9050612b9685848484614278565b6001600160a01b0383166141cf576141ca81600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b6141f2565b816001600160a01b0316836001600160a01b0316146141f2576141f28382614511565b6001600160a01b03821661420957610e45816145ae565b826001600160a01b0316826001600160a01b031614610e4557610e45828261465d565b6000836bffffffffffffffffffffffff16836bffffffffffffffffffffffff161115829061426d5760405162461bcd60e51b81526004016109a6919061479e565b5061366b8385615440565b600061429c4360405180608001604052806044815260200161551a604491396146a1565b905060008463ffffffff161180156142f657506001600160a01b0385166000908152600d6020526040812063ffffffff8316916142da600188614f60565b63ffffffff908116825260208201929092526040016000205416145b1561437f576001600160a01b0385166000908152600d602052604081208391614320600188614f60565b63ffffffff168152602081019190915260400160002080546bffffffffffffffffffffffff92909216640100000000027fffffffffffffffffffffffffffffffff000000000000000000000000ffffffff909216919091179055614460565b60408051808201825263ffffffff80841682526bffffffffffffffffffffffff80861660208085019182526001600160a01b038b166000908152600d82528681208b8616825290915294909420925183549451909116640100000000027fffffffffffffffffffffffffffffffff00000000000000000000000000000000909416911617919091179055614414846001615465565b6001600160a01b0386166000908152600e6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff929092169190911790555b604080516bffffffffffffffffffffffff8086168252841660208201526001600160a01b038716917fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724910160405180910390a25050505050565b6000806144c7848661548d565b9050846bffffffffffffffffffffffff16816bffffffffffffffffffffffff16101583906145085760405162461bcd60e51b81526004016109a6919061479e565b50949350505050565b6000600161451e84611ac8565b6145289190614df7565b60008381526009602052604090205490915080821461457b576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a546000906145c090600190614df7565b6000838152600b6020526040812054600a80549394509092849081106145e8576145e8614e89565b9060005260206000200154905080600a838154811061460957614609614e89565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a805480614641576146416154b4565b6001900381819060005260206000200160009055905550505050565b600061466883611ac8565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b6000816401000000008410613c6f5760405162461bcd60e51b81526004016109a6919061479e565b6001600160a01b038116811461192a57600080fd5b6000602082840312156146f057600080fd5b81356112c9816146c9565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461192a57600080fd5b60006020828403121561473b57600080fd5b81356112c9816146fb565b60005b83811015614761578181015183820152602001614749565b838111156127fc5750506000910152565b6000815180845261478a816020860160208601614746565b601f01601f19169290920160200192915050565b6020815260006112c96020830184614772565b6000602082840312156147c357600080fd5b5035919050565b600080604083850312156147dd57600080fd5b82356147e8816146c9565b946020939093013593505050565b6000806020838503121561480957600080fd5b823567ffffffffffffffff8082111561482157600080fd5b818501915085601f83011261483557600080fd5b81358181111561484457600080fd5b8660208260051b850101111561485957600080fd5b60209290920196919550909350505050565b60008060006060848603121561488057600080fd5b833561488b816146c9565b9250602084013561489b816146c9565b929592945050506040919091013590565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff811182821017156148fe576148fe6148ac565b60405290565b6040805190810167ffffffffffffffff811182821017156148fe576148fe6148ac565b604051601f8201601f1916810167ffffffffffffffff81118282101715614950576149506148ac565b604052919050565b60ff8116811461192a57600080fd5b600067ffffffffffffffff821115614981576149816148ac565b5060051b60200190565b61ffff8116811461192a57600080fd5b600060208083850312156149ae57600080fd5b823567ffffffffffffffff808211156149c657600080fd5b90840190606082870312156149da57600080fd5b6149e26148db565b82356149ed81614958565b8152828401356149fc81614958565b8185015260408381013583811115614a1357600080fd5b80850194505087601f850112614a2857600080fd5b83359250614a3d614a3884614967565b614927565b83815260069390931b84018501928581019089851115614a5c57600080fd5b948601945b84861015614aae5782868b031215614a795760008081fd5b614a81614904565b8635614a8c8161498b565b815286880135614a9b8161498b565b8189015282529482019490860190614a61565b91830191909152509695505050505050565b60008060408385031215614ad357600080fd5b8235614ade816146c9565b915060208301358015158114614af357600080fd5b809150509250929050565b600067ffffffffffffffff821115614b1857614b186148ac565b50601f01601f191660200190565b6000614b34614a3884614afe565b9050828152838383011115614b4857600080fd5b828260208301376000602084830101529392505050565b600060208284031215614b7157600080fd5b813567ffffffffffffffff811115614b8857600080fd5b8201601f81018413614b9957600080fd5b61366b84823560208401614b26565b60008060008060808587031215614bbe57600080fd5b8435614bc9816146c9565b93506020850135614bd9816146c9565b925060408501359150606085013567ffffffffffffffff811115614bfc57600080fd5b8501601f81018713614c0d57600080fd5b614c1c87823560208401614b26565b91505092959194509250565b60008060008060008060c08789031215614c4157600080fd5b8635614c4c816146c9565b955060208701359450604087013593506060870135614c6a81614958565b9598949750929560808101359460a0909101359350915050565b60006060830160ff8351168452602060ff8185015116818601526040808501516060828801528381518086526080890191508483019550600092505b80831015614cf1578551805161ffff9081168452908601511685830152948401946001929092019190830190614cc0565b50979650505050505050565b6020815260006112c96020830184614c84565b60008060408385031215614d2357600080fd5b8235614d2e816146c9565b91506020830135614af3816146c9565b60008060408385031215614d5157600080fd5b8235614d5c816146c9565b9150602083013563ffffffff81168114614af357600080fd5b600181811c90821680614d8957607f821691505b602082108103614dc2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015614e0957614e09614dc8565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082614e4c57614e4c614e0e565b500690565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614e8257614e82614dc8565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008219821115614ecb57614ecb614dc8565b500190565b82815260406020820152600061366b6040830184614c84565b600060208284031215614efb57600080fd5b815167ffffffffffffffff811115614f1257600080fd5b8201601f81018413614f2357600080fd5b8051614f31614a3882614afe565b818152856020838501011115614f4657600080fd5b614f57826020830160208601614746565b95945050505050565b600063ffffffff83811690831681811015614f7d57614f7d614dc8565b039392505050565b600063ffffffff80841680614f9c57614f9c614e0e565b92169190910492915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b601f821115610e4557600081815260208120601f850160051c81016020861015614ffe5750805b601f850160051c820191505b81811015612b965782815560010161500a565b815167ffffffffffffffff811115615037576150376148ac565b61504b816150458454614d75565b84614fd7565b602080601f83116001811461509e57600084156150685750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555612b96565b600085815260208120601f198616915b828110156150cd578886015182559484019460019091019084016150ae565b508582101561510957878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b6000815461512681614d75565b808552602060018381168015615143576001811461517b576151a9565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838901528284151560051b89010195506151a9565b866000528260002060005b858110156151a15781548a8201860152908301908401615186565b890184019650505b505050505092915050565b6040815260006151c76040830185615119565b8281036020840152614f578185615119565b7f697066733a2f2f000000000000000000000000000000000000000000000000008152600060076000845461520d81614d75565b60018281168015615225576001811461525c5761528f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00841686890152858315158402890101945061528f565b8860005260208060002060005b858110156152845781548b82018a0152908401908201615269565b505050858389010194505b5092979650505050505050565b600060208083850312156152af57600080fd5b825167ffffffffffffffff808211156152c757600080fd5b90840190606082870312156152db57600080fd5b6152e36148db565b82516152ee81614958565b8152828401516152fd81614958565b818501526040838101518381111561531457600080fd5b80850194505087601f85011261532957600080fd5b83519250615339614a3884614967565b83815260069390931b8401850192858101908985111561535857600080fd5b948601945b84861015614aae5782868b0312156153755760008081fd5b61537d614904565b86516153888161498b565b8152868801516153978161498b565b818901528252948201949086019061535d565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156153e2576153e2614dc8565b500290565b60006001600160a01b038087168352808616602084015250836040830152608060608301526154196080830184614772565b9695505050505050565b60006020828403121561543557600080fd5b81516112c9816146fb565b60006bffffffffffffffffffffffff83811690831681811015614f7d57614f7d614dc8565b600063ffffffff80831681851680830382111561548457615484614dc8565b01949350505050565b60006bffffffffffffffffffffffff80831681851680830382111561548457615484614dc8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfe455243373231436865636b706f696e7461626c653a3a5f6d6f766544656c6567617465733a20616d6f756e74206f766572666c6f7773455243373231436865636b706f696e7461626c653a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473455243373231436865636b706f696e7461626c653a3a766f746573546f44656c65676174653a20616d6f756e7420657863656564732039362062697473455243373231436865636b706f696e7461626c653a3a5f6d6f766544656c6567617465733a20616d6f756e7420756e646572666c6f7773a2646970667358221220f40a182e25a27ae0e1c0fb79dbd5ba1f2a5cb54399ce42daf8374a93c442765d64736f6c634300080f0033516d6353646a68526a4c434d79474370336f584c6776393565316f646f38644b48794d5a59463878593167386e38000000000000000000000000cfbf2e7005d4f204392929c993281ec99e61c5a700000000000000000000000016cc4c29f647df6b55b53d5d419891c86417d8d80000000000000000000000007745a96ba4e1bb84631dfc9f183cf5bdf082388a0000000000000000000000006f7995977748bc9e7a5786004c45c5d4e7957245

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106103c55760003560e01c806372013282116101ff578063c1b8e4e11161011a578063e7a324dc116100ad578063f0503e801161007c578063f0503e80146108a5578063f1127ed8146108b8578063f2fde38b1461092a578063fca3b5aa1461093d57600080fd5b8063e7a324dc14610827578063e8a3d4851461084e578063e9580e9114610856578063e985e9c51461086957600080fd5b8063c87b56dd116100e9578063c87b56dd146107d9578063c8fc0c23146107ec578063d50b31eb146107ff578063d7e45cd71461081257600080fd5b8063c1b8e4e114610781578063c3cda52014610793578063c47f0027146107a6578063c81d1d5b146107b957600080fd5b806395d89b4111610192578063b4b5ea5711610161578063b4b5ea5714610735578063b84c824614610748578063b88d4fde1461075b578063baedc1c41461076e57600080fd5b806395d89b41146106ff578063989bdbb6146107075780639a1986da1461070f578063a22cb4651461072257600080fd5b80637da793f0116101ce5780637da793f0146106b05780637ecebe00146106c65780638da5cb5b146106e657806391e761ef146106f757600080fd5b8063720132821461065d578063721b42871461066557806376daebe114610678578063782d6fe11461068057600080fd5b8063303e74df116102ef5780635c19a95c11610282578063684931ed11610251578063684931ed146105f45780636fcfff451461060757806370a0823114610642578063715018a61461065557600080fd5b80635c19a95c146105b25780635f295a67146105c557806362dca72e146105cd5780636352211e146105e157600080fd5b806342966c68116102be57806342966c68146105665780634f6ccce714610579578063587cde1e1461058c5780635ac1e3bb1461059f57600080fd5b8063303e74df1461051e578063313ce5671461053157806341b5d0de1461054b57806342842e0e1461055357600080fd5b8063099544541161036757806320606b701161033657806320606b70146104be57806322188a50146104e557806323b872dd146104f85780632f745c591461050b57600080fd5b806309954454146104805780631249c58b1461049357806318160ddd146104a95780631e688e10146104b157600080fd5b806306fdde03116103a357806306fdde03146104325780630754617214610447578063081812fc1461045a578063095ea7b31461046d57600080fd5b8063014336e0146103ca57806301b9a397146103fa57806301ffc9a71461040f575b600080fd5b6010546103dd906001600160a01b031681565b6040516001600160a01b0390911681526020015b60405180910390f35b61040d6104083660046146de565b610950565b005b61042261041d366004614729565b610a74565b60405190151581526020016103f1565b61043a610ad0565b6040516103f1919061479e565b6011546103dd906001600160a01b031681565b6103dd6104683660046147b1565b610b62565b61040d61047b3660046147ca565b610c92565b61040d61048e3660046147b1565b610e4a565b61049b610f35565b6040519081526020016103f1565b600a5461049b565b6015546104229060ff1681565b61049b7f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a86681565b61040d6104f33660046147f6565b611007565b61040d61050636600461486b565b61110a565b61049b6105193660046147ca565b611219565b6012546103dd906001600160a01b031681565b610539600081565b60405160ff90911681526020016103f1565b61040d6112d0565b61040d61056136600461486b565b6113d9565b61040d6105743660046147b1565b6114f6565b61049b6105873660046147b1565b61168d565b6103dd61059a3660046146de565b611737565b61043a6105ad3660046147b1565b611767565b61040d6105c03660046146de565b61190f565b61040d61192d565b601554610422906301000000900460ff1681565b6103dd6105ef3660046147b1565b611a38565b6013546103dd906001600160a01b031681565b61062d6106153660046146de565b600e6020526000908152604090205463ffffffff1681565b60405163ffffffff90911681526020016103f1565b61049b6106503660046146de565b611ac8565b61040d611b62565b61040d611bc8565b61040d6106733660046146de565b611cd9565b61040d611def565b61069361068e3660046147ca565b611ef2565b6040516bffffffffffffffffffffffff90911681526020016103f1565b6015546104229065010000000000900460ff1681565b61049b6106d43660046146de565b600f6020526000908152604090205481565b6000546001600160a01b03166103dd565b61040d6121a4565b61043a6122b1565b61040d6122c0565b61049b61071d36600461499b565b6123cf565b61040d610730366004614ac0565b612493565b6106936107433660046146de565b612575565b61040d610756366004614b5f565b6125f8565b61040d610769366004614ba8565b6126ed565b61040d61077c366004614b5f565b612802565b60155461042290610100900460ff1681565b61040d6107a1366004614c28565b61286c565b61040d6107b4366004614b5f565b612b9e565b6107cc6107c73660046147b1565b612c5f565b6040516103f19190614cfd565b61043a6107e73660046147b1565b612ca4565b6015546104229062010000900460ff1681565b61040d61080d3660046146de565b612dea565b60155461042290640100000000900460ff1681565b61049b7fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf81565b61043a612f03565b6106936108643660046146de565b612f2b565b610422610877366004614d10565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205460ff1690565b61049b6108b33660046147b1565b612f57565b6109016108c6366004614d3e565b600d60209081526000928352604080842090915290825290205463ffffffff81169064010000000090046bffffffffffffffffffffffff1682565b6040805163ffffffff90931683526bffffffffffffffffffffffff9091166020830152016103f1565b61040d6109383660046146de565b612f81565b61040d61094b3660046146de565b613060565b6000546001600160a01b031633146109af5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b601554610100900460ff1615610a075760405162461bcd60e51b815260206004820152601460248201527f44657363726970746f72206973206c6f636b656400000000000000000000000060448201526064016109a6565b601280547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f6e66ab22238a5471005895947c8f57db923c2a9c9c73180eff80864c21295c1b906020015b60405180910390a150565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f780e9d63000000000000000000000000000000000000000000000000000000001480610aca5750610aca82613173565b92915050565b606060198054610adf90614d75565b80601f0160208091040260200160405190810160405280929190818152602001828054610b0b90614d75565b8015610b585780601f10610b2d57610100808354040283529160200191610b58565b820191906000526020600020905b815481529060010190602001808311610b3b57829003601f168201915b5050505050905090565b6000600754821015610bdc5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e000000000000000000000000000000000000000000000060648201526084016109a6565b600754610be99083614df7565b6000818152600360205260409020549092506001600160a01b0316610c765760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016109a6565b506000908152600560205260409020546001600160a01b031690565b600754811015610d0a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e000000000000000000000000000000000000000000000060648201526084016109a6565b600754610d179082614df7565b90506000610d2482613256565b9050806001600160a01b0316836001600160a01b031603610dad5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084016109a6565b336001600160a01b0382161480610dc95750610dc98133610877565b610e3b5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016109a6565b610e4583836132e1565b505050565b6000546001600160a01b03163314610ea45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b60155465010000000000900460ff1615610f005760405162461bcd60e51b815260206004820152601560248201527f4964205368696674696e67206973206c6f636b6564000000000000000000000060448201526064016109a6565b60078190556040518181527fca24e18900ae21a8b23a8d841f6c7a531dc73b62a1c419844b20483c2d1f75fb90602001610a69565b6011546000906001600160a01b03163314610f925760405162461bcd60e51b815260206004820152601860248201527f53656e646572206973206e6f7420746865206d696e746572000000000000000060448201526064016109a6565b61071c60175411158015610fb25750600a601754610fb09190614e3d565b155b15610fe25760105460178054610fe0926001600160a01b0316916000610fd783614e51565b91905055613379565b505b60115460178054611002926001600160a01b0316916000610fd783614e51565b905090565b6000546001600160a01b031633146110615760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b6015546301000000900460ff16156110bb5760405162461bcd60e51b815260206004820152601a60248201527f52656769737465724f47486173686573206973206c6f636b656400000000000060448201526064016109a6565b60005b81811015610e45576001601460008585858181106110de576110de614e89565b90506020020135815260200190815260200160002081905550808061110290614e51565b9150506110be565b6007548110156111825760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016109a6565b60075461118f9082614df7565b905061119c335b8261356b565b61120e5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016109a6565b610e45838383613673565b600061122483611ac8565b82106112985760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e647300000000000000000000000000000000000000000060648201526084016109a6565b6007546001600160a01b03841660009081526008602090815260408083208684529091529020546112c99190614eb8565b9392505050565b6000546001600160a01b0316331461132a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b601554610100900460ff16156113825760405162461bcd60e51b815260206004820152601460248201527f44657363726970746f72206973206c6f636b656400000000000000000000000060448201526064016109a6565b601580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790556040517f593e31e306c198bef259d839f7c6dc4ff7fc10c07f76fab193a210b03704105f90600090a1565b6007548110156114515760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016109a6565b60075461145e9082614df7565b905061146933611196565b6114db5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016109a6565b610e4583838360405180602001604052806000815250613880565b6011546001600160a01b031633146115505760405162461bcd60e51b815260206004820152601860248201527f53656e646572206973206e6f7420746865206d696e746572000000000000000060448201526064016109a6565b6007548110156115c85760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016109a6565b6000600754826115d89190614df7565b90506115e333611196565b6116555760405162461bcd60e51b815260206004820152603060248201527f50756e6b546f6b656e3a206275726e2063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f7665640000000000000000000000000000000060648201526084016109a6565b61165e81613909565b60405182907fab65ccc37df5d015a04747bd3e3202af01d127d90fd3ad6e587bfeb83d9676c290600090a25050565b6000611698600a5490565b821061170c5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e6473000000000000000000000000000000000000000060648201526084016109a6565b600754600a838154811061172257611722614e89565b9060005260206000200154610aca9190614eb8565b6001600160a01b038082166000908152600c6020526040812054909116801561176057806112c9565b5090919050565b60606007548210156117e15760405162461bcd60e51b815260206004820152602a60248201527f50756e6b546f6b656e3a2055524920717565727920666f72206e6f6e6578697360448201527f74656e7420746f6b656e0000000000000000000000000000000000000000000060648201526084016109a6565b6000600754836117f19190614df7565b6000818152600360205260409020549091506001600160a01b031661187e5760405162461bcd60e51b815260206004820152602a60248201527f50756e6b546f6b656e3a2055524920717565727920666f72206e6f6e6578697360448201527f74656e7420746f6b656e0000000000000000000000000000000000000000000060648201526084016109a6565b6012546000828152601660205260409020546001600160a01b039091169063569e1e759085906118ad906139d6565b6040518363ffffffff1660e01b81526004016118ca929190614ed0565b600060405180830381865afa1580156118e7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112c99190810190614ee9565b6001600160a01b0381166119205750335b61192a3382613b3f565b50565b6000546001600160a01b031633146119875760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b60155462010000900460ff16156119e05760405162461bcd60e51b815260206004820152601060248201527f536565646572206973206c6f636b65640000000000000000000000000000000060448201526064016109a6565b601580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffff16620100001790556040517ff59561f22794afcfb1e6be5c4733f5449fd167252a96b74bb06d341fb0dac7ed90600090a1565b6000600754821015611ab25760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e000000000000000000000000000000000000000000000060648201526084016109a6565b610aca60075483611ac39190614df7565b613256565b60006001600160a01b038216611b465760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f20616464726573730000000000000000000000000000000000000000000060648201526084016109a6565b506001600160a01b031660009081526004602052604090205490565b6000546001600160a01b03163314611bbc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b611bc66000613bd7565b565b6000546001600160a01b03163314611c225760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b60155465010000000000900460ff1615611c7e5760405162461bcd60e51b815260206004820152601560248201527f4964205368696674696e67206973206c6f636b6564000000000000000000000060448201526064016109a6565b601580547fffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffffff16650100000000001790556040517fd356368ad446c6df27158ece639eaa633cf48fa8d5c180740ba186160842d35f90600090a1565b6010546001600160a01b03163314611d335760405162461bcd60e51b815260206004820152601960248201527f53656e646572206973206e6f74207468652070756e6b6572730000000000000060448201526064016109a6565b6001600160a01b038116611d895760405162461bcd60e51b815260206004820152601660248201527f70756e6b6572732063616e6e6f74206265206e756c6c0000000000000000000060448201526064016109a6565b601080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f7fc36cb6960e80a5a890d78b315199656d692e2007ad6c2ff55ad691623168b890602001610a69565b6000546001600160a01b03163314611e495760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b60155460ff1615611e9c5760405162461bcd60e51b815260206004820152601060248201527f4d696e746572206973206c6f636b65640000000000000000000000000000000060448201526064016109a6565b601580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001660011790556040517f192417b3f16b1ce69e0c59b0376549666650245ffc05e4b2569089dda8589b6690600090a1565b6000438210611f695760405162461bcd60e51b815260206004820152603760248201527f455243373231436865636b706f696e7461626c653a3a6765745072696f72566f60448201527f7465733a206e6f74207965742064657465726d696e656400000000000000000060648201526084016109a6565b6001600160a01b0383166000908152600e602052604081205463ffffffff1690819003611f9a576000915050610aca565b6001600160a01b0384166000908152600d602052604081208491611fbf600185614f60565b63ffffffff90811682526020820192909252604001600020541611612038576001600160a01b0384166000908152600d6020526040812090612002600184614f60565b63ffffffff16815260208101919091526040016000205464010000000090046bffffffffffffffffffffffff169150610aca9050565b6001600160a01b0384166000908152600d6020908152604080832083805290915290205463ffffffff16831015612073576000915050610aca565b600080612081600184614f60565b90505b8163ffffffff168163ffffffff16111561215957600060026120a68484614f60565b6120b09190614f85565b6120ba9083614f60565b6001600160a01b0388166000908152600d6020908152604080832063ffffffff8581168552908352928190208151808301909252549283168082526401000000009093046bffffffffffffffffffffffff169181019190915291925087900361212d57602001519450610aca9350505050565b805163ffffffff1687111561214457819350612152565b61214f600183614f60565b92505b5050612084565b506001600160a01b0385166000908152600d6020908152604080832063ffffffff909416835292905220546bffffffffffffffffffffffff6401000000009091041691505092915050565b6000546001600160a01b031633146121fe5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b6015546301000000900460ff16156122585760405162461bcd60e51b815260206004820152601a60248201527f52656769737465724f47486173686573206973206c6f636b656400000000000060448201526064016109a6565b601580547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffff1663010000001790556040517ff7dfc2c479f1db562d95e8e6b188f0b3d7f05f6c22a0bd41f51d2008af1bdb4390600090a1565b6060601a8054610adf90614d75565b6000546001600160a01b0316331461231a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b601554640100000000900460ff16156123755760405162461bcd60e51b815260206004820152601260248201527f4d65746164617461206973206c6f636b6564000000000000000000000000000060448201526064016109a6565b601580547fffffffffffffffffffffffffffffffffffffffffffffffffffffff00ffffffff166401000000001790556040517f27de4862bfc92b76e402ed305829f40e9e5fcd597ab2206b4e6294cd24ed45c490600090a1565b6000806018836040015151901b6010846020015160ff16901b6008856000015160ff16901b60010101019050600f8360400151511061241057612410614fa8565b60005b83604001515181101561248c57806010026028018460400151828151811061243d5761243d614e89565b60200260200101516020015161ffff16901b816010026020018560400151838151811061246c5761246c614e89565b60209081029190910101515161ffff16901b019190910190600101612413565b5092915050565b336001600160a01b038316036124eb5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016109a6565b3360008181526006602090815260408083206001600160a01b0387168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6001600160a01b0381166000908152600e602052604081205463ffffffff16806125a05760006112c9565b6001600160a01b0383166000908152600d60205260408120906125c4600184614f60565b63ffffffff16815260208101919091526040016000205464010000000090046bffffffffffffffffffffffff169392505050565b6000546001600160a01b031633146126525760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b601554640100000000900460ff16156126ad5760405162461bcd60e51b815260206004820152601260248201527f4d65746164617461206973206c6f636b6564000000000000000000000000000060448201526064016109a6565b601a6126b9828261501d565b507f30f5c4b652f95e2a697bda3258896c421eee4f29adce8fe38060f47f7aed91ad6019601a604051610a699291906151b4565b6007548210156127655760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016109a6565b6007546127729083614df7565b915061277e338361356b565b6127f05760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016109a6565b6127fc84848484613880565b50505050565b6000546001600160a01b0316331461285c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b6018612868828261501d565b5050565b60007f8cad95687ba82c2ce50e74f7b754645e5117c3a5bec8151c0726d5857980a866612897610ad0565b805190602001206128a54690565b60408051602080820195909552808201939093526060830191909152306080808401919091528151808403909101815260a0830182528051908401207fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60c08401526001600160a01b038b1660e084015261010083018a90526101208084018a9052825180850390910181526101408401909252815191909301207f1901000000000000000000000000000000000000000000000000000000000000610160830152610162820183905261018282018190529192506000906101a20160408051601f198184030181528282528051602091820120600080855291840180845281905260ff8a169284019290925260608301889052608083018790529092509060019060a0016020604051602081039080840390855afa1580156129ec573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116612a755760405162461bcd60e51b815260206004820152603660248201527f455243373231436865636b706f696e7461626c653a3a64656c6567617465427960448201527f5369673a20696e76616c6964207369676e61747572650000000000000000000060648201526084016109a6565b6001600160a01b0381166000908152600f60205260408120805491612a9983614e51565b919050558914612b115760405162461bcd60e51b815260206004820152603260248201527f455243373231436865636b706f696e7461626c653a3a64656c6567617465427960448201527f5369673a20696e76616c6964206e6f6e6365000000000000000000000000000060648201526084016109a6565b87421115612b875760405162461bcd60e51b815260206004820152603660248201527f455243373231436865636b706f696e7461626c653a3a64656c6567617465427960448201527f5369673a207369676e617475726520657870697265640000000000000000000060648201526084016109a6565b612b91818b613b3f565b505050505b505050505050565b6000546001600160a01b03163314612bf85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b601554640100000000900460ff1615612c535760405162461bcd60e51b815260206004820152601260248201527f4d65746164617461206973206c6f636b6564000000000000000000000000000060448201526064016109a6565b60196126b9828261501d565b60408051606080820183526000808352602083015291810191909152610aca6016600060075485612c909190614df7565b8152602001908152602001600020546139d6565b6060600754821015612d1e5760405162461bcd60e51b815260206004820152602a60248201527f50756e6b546f6b656e3a2055524920717565727920666f72206e6f6e6578697360448201527f74656e7420746f6b656e0000000000000000000000000000000000000000000060648201526084016109a6565b600060075483612d2e9190614df7565b6000818152600360205260409020549091506001600160a01b0316612dbb5760405162461bcd60e51b815260206004820152602a60248201527f50756e6b546f6b656e3a2055524920717565727920666f72206e6f6e6578697360448201527f74656e7420746f6b656e0000000000000000000000000000000000000000000060648201526084016109a6565b6012546000828152601660205260409020546001600160a01b0390911690636de1808b9085906118ad906139d6565b6000546001600160a01b03163314612e445760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b60155462010000900460ff1615612e9d5760405162461bcd60e51b815260206004820152601060248201527f536565646572206973206c6f636b65640000000000000000000000000000000060448201526064016109a6565b601380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fb3025222d01ce9a26c7f9d52bc3bfd0352366bd90a793c273fbfe1c81e0e288e90602001610a69565b60606018604051602001612f1791906151d9565b604051602081830303815290604052905090565b6000610aca612f3983611ac8565b6040518060600160405280603d815260200161555e603d9139613c3f565b60006016600060075484612f6b9190614df7565b8152602001908152602001600020549050919050565b6000546001600160a01b03163314612fdb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b6001600160a01b0381166130575760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016109a6565b61192a81613bd7565b6000546001600160a01b031633146130ba5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016109a6565b60155460ff161561310d5760405162461bcd60e51b815260206004820152601060248201527f4d696e746572206973206c6f636b65640000000000000000000000000000000060448201526064016109a6565b601180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fad0f299ec81a386c98df0ac27dae11dd020ed1b56963c53a7292e7a3a314539a90602001610a69565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd00000000000000000000000000000000000000000000000000000000148061320657507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610aca57507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610aca565b6000818152600360205260408120546001600160a01b031680610aca5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e000000000000000000000000000000000000000000000060648201526084016109a6565b600081815260056020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03841617905560075461332d9082614eb8565b826001600160a01b031661334083613256565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806007548361338a9190614eb8565b6013546040517f041df082000000000000000000000000000000000000000000000000000000008152600481018390526000602482018190529293506001600160a01b039091169063041df08290604401600060405180830381865afa1580156133f8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052613420919081019061529c565b9050600061342d826123cf565b905060015b600082815260146020526040902054156134e1576013546001600160a01b031663041df082858361346281614e51565b94506040518363ffffffff1660e01b815260040161348a929190918252602082015260400190565b600060405180830381865afa1580156134a7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526134cf919081019061529c565b92506134da836123cf565b9150613432565b6134ec866002614eb8565b60008381526014602090815260408083209390935588825260169052208290556135286135216000546001600160a01b031690565b8888613c77565b837f1b6223a51fdc8f88a3ad726c4dbd70acc388d162c6d8ca63107e2a85831fe231846040516135589190614cfd565b60405180910390a2509395945050505050565b6000818152600360205260408120546001600160a01b03166135f55760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084016109a6565b600061360083613256565b9050806001600160a01b0316846001600160a01b0316148061363b57506000838152600560205260409020546001600160a01b038581169116145b8061366b57506001600160a01b0380821660009081526006602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661368682613256565b6001600160a01b0316146137025760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e000000000000000000000000000000000000000000000060648201526084016109a6565b6001600160a01b03821661377d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016109a6565b613788838383613dfb565b6137936000826132e1565b6001600160a01b03831660009081526004602052604081208054600192906137bc908490614df7565b90915550506001600160a01b03821660009081526004602052604081208054600192906137ea908490614eb8565b9091555050600081815260036020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03841617905560075461383b9082614eb8565b826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b61388b848484613673565b61389784848484613e22565b6127fc5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016109a6565b600061391482613256565b905061392281600084613dfb565b61392d6000836132e1565b6001600160a01b0381166000908152600460205260408120805460019290613956908490614df7565b9091555050600082815260036020526040902080547fffffffffffffffffffffffff000000000000000000000000000000000000000016905560075461399c9083614eb8565b6040516000906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60408051606080820183526000808352602080840191909152828401829052835180830185529384019190915260ff600885901c81168452601085901c81169184019190915290918391601883901c1667ffffffffffffffff811115613a3e57613a3e6148ac565b604051908082528060200260200182016040528015613a8357816020015b6040805180820190915260008082526020820152815260200190600190039081613a5c5790505b50604082015260005b816040015151811015613b3757613aa48160106153aa565b613aaf906020614eb8565b83901c60ff1682604001518281518110613acb57613acb614e89565b602090810291909101015161ffff9091169052613ae98160106153aa565b613af4906028614eb8565b83901c60ff1682604001518281518110613b1057613b10614e89565b60209081029190910181015161ffff90921691015280613b2f81614e51565b915050613a8c565b509392505050565b6000613b4a83611737565b6001600160a01b038481166000818152600c602052604080822080547fffffffffffffffffffffffff000000000000000000000000000000000000000016888616908117909155905194955093928516927f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a46000613bca84612f2b565b90506127fc828483613fb7565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000816c010000000000000000000000008410613c6f5760405162461bcd60e51b81526004016109a6919061479e565b509192915050565b6001600160a01b038216613ccd5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016109a6565b6000818152600360205260409020546001600160a01b031615613d325760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016109a6565b613d3e60008383613dfb565b6001600160a01b0382166000908152600460205260408120805460019290613d67908490614eb8565b9091555050600081815260036020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b038416179055600754613db89082614eb8565b6040516001600160a01b038516906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a460075461383b9082614eb8565b613e06838383614174565b610e45613e1284611737565b613e1b84611737565b6001613fb7565b60006001600160a01b0384163b15613fac576001600160a01b03841663150b7a02338760075487613e539190614eb8565b866040518563ffffffff1660e01b8152600401613e7394939291906153e7565b6020604051808303816000875af1925050508015613eae575060408051601f3d908101601f19168201909252613eab91810190615423565b60015b613f61573d808015613edc576040519150601f19603f3d011682016040523d82523d6000602084013e613ee1565b606091505b508051600003613f595760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016109a6565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061366b565b506001949350505050565b816001600160a01b0316836001600160a01b031614158015613fe757506000816bffffffffffffffffffffffff16115b15610e45576001600160a01b038316156140b2576001600160a01b0383166000908152600e602052604081205463ffffffff169081614027576000614079565b6001600160a01b0385166000908152600d602052604081209061404b600185614f60565b63ffffffff16815260208101919091526040016000205464010000000090046bffffffffffffffffffffffff165b905060006140a0828560405180606001604052806037815260200161559b6037913961422c565b90506140ae86848484614278565b5050505b6001600160a01b03821615610e45576001600160a01b0382166000908152600e602052604081205463ffffffff1690816140ed57600061413f565b6001600160a01b0384166000908152600d6020526040812090614111600185614f60565b63ffffffff16815260208101919091526040016000205464010000000090046bffffffffffffffffffffffff165b9050600061416682856040518060600160405280603681526020016154e4603691396144ba565b9050612b9685848484614278565b6001600160a01b0383166141cf576141ca81600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b6141f2565b816001600160a01b0316836001600160a01b0316146141f2576141f28382614511565b6001600160a01b03821661420957610e45816145ae565b826001600160a01b0316826001600160a01b031614610e4557610e45828261465d565b6000836bffffffffffffffffffffffff16836bffffffffffffffffffffffff161115829061426d5760405162461bcd60e51b81526004016109a6919061479e565b5061366b8385615440565b600061429c4360405180608001604052806044815260200161551a604491396146a1565b905060008463ffffffff161180156142f657506001600160a01b0385166000908152600d6020526040812063ffffffff8316916142da600188614f60565b63ffffffff908116825260208201929092526040016000205416145b1561437f576001600160a01b0385166000908152600d602052604081208391614320600188614f60565b63ffffffff168152602081019190915260400160002080546bffffffffffffffffffffffff92909216640100000000027fffffffffffffffffffffffffffffffff000000000000000000000000ffffffff909216919091179055614460565b60408051808201825263ffffffff80841682526bffffffffffffffffffffffff80861660208085019182526001600160a01b038b166000908152600d82528681208b8616825290915294909420925183549451909116640100000000027fffffffffffffffffffffffffffffffff00000000000000000000000000000000909416911617919091179055614414846001615465565b6001600160a01b0386166000908152600e6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffff000000001663ffffffff929092169190911790555b604080516bffffffffffffffffffffffff8086168252841660208201526001600160a01b038716917fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724910160405180910390a25050505050565b6000806144c7848661548d565b9050846bffffffffffffffffffffffff16816bffffffffffffffffffffffff16101583906145085760405162461bcd60e51b81526004016109a6919061479e565b50949350505050565b6000600161451e84611ac8565b6145289190614df7565b60008381526009602052604090205490915080821461457b576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a546000906145c090600190614df7565b6000838152600b6020526040812054600a80549394509092849081106145e8576145e8614e89565b9060005260206000200154905080600a838154811061460957614609614e89565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a805480614641576146416154b4565b6001900381819060005260206000200160009055905550505050565b600061466883611ac8565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b6000816401000000008410613c6f5760405162461bcd60e51b81526004016109a6919061479e565b6001600160a01b038116811461192a57600080fd5b6000602082840312156146f057600080fd5b81356112c9816146c9565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461192a57600080fd5b60006020828403121561473b57600080fd5b81356112c9816146fb565b60005b83811015614761578181015183820152602001614749565b838111156127fc5750506000910152565b6000815180845261478a816020860160208601614746565b601f01601f19169290920160200192915050565b6020815260006112c96020830184614772565b6000602082840312156147c357600080fd5b5035919050565b600080604083850312156147dd57600080fd5b82356147e8816146c9565b946020939093013593505050565b6000806020838503121561480957600080fd5b823567ffffffffffffffff8082111561482157600080fd5b818501915085601f83011261483557600080fd5b81358181111561484457600080fd5b8660208260051b850101111561485957600080fd5b60209290920196919550909350505050565b60008060006060848603121561488057600080fd5b833561488b816146c9565b9250602084013561489b816146c9565b929592945050506040919091013590565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6040516060810167ffffffffffffffff811182821017156148fe576148fe6148ac565b60405290565b6040805190810167ffffffffffffffff811182821017156148fe576148fe6148ac565b604051601f8201601f1916810167ffffffffffffffff81118282101715614950576149506148ac565b604052919050565b60ff8116811461192a57600080fd5b600067ffffffffffffffff821115614981576149816148ac565b5060051b60200190565b61ffff8116811461192a57600080fd5b600060208083850312156149ae57600080fd5b823567ffffffffffffffff808211156149c657600080fd5b90840190606082870312156149da57600080fd5b6149e26148db565b82356149ed81614958565b8152828401356149fc81614958565b8185015260408381013583811115614a1357600080fd5b80850194505087601f850112614a2857600080fd5b83359250614a3d614a3884614967565b614927565b83815260069390931b84018501928581019089851115614a5c57600080fd5b948601945b84861015614aae5782868b031215614a795760008081fd5b614a81614904565b8635614a8c8161498b565b815286880135614a9b8161498b565b8189015282529482019490860190614a61565b91830191909152509695505050505050565b60008060408385031215614ad357600080fd5b8235614ade816146c9565b915060208301358015158114614af357600080fd5b809150509250929050565b600067ffffffffffffffff821115614b1857614b186148ac565b50601f01601f191660200190565b6000614b34614a3884614afe565b9050828152838383011115614b4857600080fd5b828260208301376000602084830101529392505050565b600060208284031215614b7157600080fd5b813567ffffffffffffffff811115614b8857600080fd5b8201601f81018413614b9957600080fd5b61366b84823560208401614b26565b60008060008060808587031215614bbe57600080fd5b8435614bc9816146c9565b93506020850135614bd9816146c9565b925060408501359150606085013567ffffffffffffffff811115614bfc57600080fd5b8501601f81018713614c0d57600080fd5b614c1c87823560208401614b26565b91505092959194509250565b60008060008060008060c08789031215614c4157600080fd5b8635614c4c816146c9565b955060208701359450604087013593506060870135614c6a81614958565b9598949750929560808101359460a0909101359350915050565b60006060830160ff8351168452602060ff8185015116818601526040808501516060828801528381518086526080890191508483019550600092505b80831015614cf1578551805161ffff9081168452908601511685830152948401946001929092019190830190614cc0565b50979650505050505050565b6020815260006112c96020830184614c84565b60008060408385031215614d2357600080fd5b8235614d2e816146c9565b91506020830135614af3816146c9565b60008060408385031215614d5157600080fd5b8235614d5c816146c9565b9150602083013563ffffffff81168114614af357600080fd5b600181811c90821680614d8957607f821691505b602082108103614dc2577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600082821015614e0957614e09614dc8565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b600082614e4c57614e4c614e0e565b500690565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203614e8257614e82614dc8565b5060010190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b60008219821115614ecb57614ecb614dc8565b500190565b82815260406020820152600061366b6040830184614c84565b600060208284031215614efb57600080fd5b815167ffffffffffffffff811115614f1257600080fd5b8201601f81018413614f2357600080fd5b8051614f31614a3882614afe565b818152856020838501011115614f4657600080fd5b614f57826020830160208601614746565b95945050505050565b600063ffffffff83811690831681811015614f7d57614f7d614dc8565b039392505050565b600063ffffffff80841680614f9c57614f9c614e0e565b92169190910492915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052600160045260246000fd5b601f821115610e4557600081815260208120601f850160051c81016020861015614ffe5750805b601f850160051c820191505b81811015612b965782815560010161500a565b815167ffffffffffffffff811115615037576150376148ac565b61504b816150458454614d75565b84614fd7565b602080601f83116001811461509e57600084156150685750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555612b96565b600085815260208120601f198616915b828110156150cd578886015182559484019460019091019084016150ae565b508582101561510957878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b6000815461512681614d75565b808552602060018381168015615143576001811461517b576151a9565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008516838901528284151560051b89010195506151a9565b866000528260002060005b858110156151a15781548a8201860152908301908401615186565b890184019650505b505050505092915050565b6040815260006151c76040830185615119565b8281036020840152614f578185615119565b7f697066733a2f2f000000000000000000000000000000000000000000000000008152600060076000845461520d81614d75565b60018281168015615225576001811461525c5761528f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00841686890152858315158402890101945061528f565b8860005260208060002060005b858110156152845781548b82018a0152908401908201615269565b505050858389010194505b5092979650505050505050565b600060208083850312156152af57600080fd5b825167ffffffffffffffff808211156152c757600080fd5b90840190606082870312156152db57600080fd5b6152e36148db565b82516152ee81614958565b8152828401516152fd81614958565b818501526040838101518381111561531457600080fd5b80850194505087601f85011261532957600080fd5b83519250615339614a3884614967565b83815260069390931b8401850192858101908985111561535857600080fd5b948601945b84861015614aae5782868b0312156153755760008081fd5b61537d614904565b86516153888161498b565b8152868801516153978161498b565b818901528252948201949086019061535d565b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156153e2576153e2614dc8565b500290565b60006001600160a01b038087168352808616602084015250836040830152608060608301526154196080830184614772565b9695505050505050565b60006020828403121561543557600080fd5b81516112c9816146fb565b60006bffffffffffffffffffffffff83811690831681811015614f7d57614f7d614dc8565b600063ffffffff80831681851680830382111561548457615484614dc8565b01949350505050565b60006bffffffffffffffffffffffff80831681851680830382111561548457615484614dc8565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfe455243373231436865636b706f696e7461626c653a3a5f6d6f766544656c6567617465733a20616d6f756e74206f766572666c6f7773455243373231436865636b706f696e7461626c653a3a5f7772697465436865636b706f696e743a20626c6f636b206e756d62657220657863656564732033322062697473455243373231436865636b706f696e7461626c653a3a766f746573546f44656c65676174653a20616d6f756e7420657863656564732039362062697473455243373231436865636b706f696e7461626c653a3a5f6d6f766544656c6567617465733a20616d6f756e7420756e646572666c6f7773a2646970667358221220f40a182e25a27ae0e1c0fb79dbd5ba1f2a5cb54399ce42daf8374a93c442765d64736f6c634300080f0033

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

000000000000000000000000cfbf2e7005d4f204392929c993281ec99e61c5a700000000000000000000000016cc4c29f647df6b55b53d5d419891c86417d8d80000000000000000000000007745a96ba4e1bb84631dfc9f183cf5bdf082388a0000000000000000000000006f7995977748bc9e7a5786004c45c5d4e7957245

-----Decoded View---------------
Arg [0] : _punkers (address): 0xcfbF2E7005d4f204392929c993281Ec99E61c5a7
Arg [1] : _minter (address): 0x16cC4C29F647Df6B55B53D5D419891c86417d8D8
Arg [2] : _descriptor (address): 0x7745A96Ba4E1bb84631Dfc9F183cf5Bdf082388A
Arg [3] : _seeder (address): 0x6F7995977748bC9E7A5786004c45C5D4e7957245

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000cfbf2e7005d4f204392929c993281ec99e61c5a7
Arg [1] : 00000000000000000000000016cc4c29f647df6b55b53d5d419891c86417d8d8
Arg [2] : 0000000000000000000000007745a96ba4e1bb84631dfc9f183cf5bdf082388a
Arg [3] : 0000000000000000000000006f7995977748bc9e7a5786004c45c5d4e7957245


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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