ETH Price: $3,643.36 (+0.67%)
 

Overview

TokenID

80

Total Transfers

-

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

The Pigeon Gang is a collection of 300 nft arts programmatically, randomly generated from over 250 assets. Each Pigeon is unique with features, identities and personalities combined from many different categories.

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
PigeonGang

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 20 runs

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

pragma solidity ^0.8.0;

import "openzeppelin-solidity/contracts/token/ERC721/ERC721.sol";
import "openzeppelin-solidity/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "openzeppelin-solidity/contracts/utils/math/SafeMath.sol";
import "openzeppelin-solidity/contracts/utils/Strings.sol";

import "./common/meta-transactions/ContentMixin.sol";
import "./common/meta-transactions/NativeMetaTransaction.sol";

/**
 * @title Pigeon Gang contract
 * @dev Extends openzeppelin ERC721 implementation
 */
contract PigeonGang is ContextMixin, ERC721Enumerable, NativeMetaTransaction {
    using SafeMath for uint256;

    uint256 public pigeonPrice = 0.06 ether;
    uint256 public pigeonSupply = 200;
    uint256 public pigeonPerWallet = 5;
    uint256 public pigeonPerTx = 2;
    uint256 public currentPledge = 0;

    bool public whitelistEnabled = false;

    mapping(address => bool) private _whitelist;
    mapping(address => uint256) public pledged;
    mapping(address => uint256) public claimed;

    address private _contractOwner;

    modifier contractOwnerOnly() {
        require(_contractOwner == _msgSender(), "PigeonGang: Caller is not the contract owner");
        _;
    }

    constructor() ERC721("Pigeon Gang", "PGN") {
        _setOwner(_msgSender());
        _initializeEIP712("Pigeon Gang");
    }

    /**
     * @dev Pledge for the purchase
     */
    function pledge(uint256 _amount) external payable {
        require((_amount + pledged[_msgSender()] + claimed[_msgSender()]) <= pigeonPerWallet, "PigeonGang: Each address can only purchase up to 5 pigeons.");
        require(_amount <= pigeonPerTx, "PigeonGang: Each address can only purchase up to 2 pigeons per transaction.");
        require(currentPledge.add(_amount) <= pigeonSupply, "PigeonGang: Purchase would exceed pigeons supply");
        require(pigeonPrice.mul(_amount) <= msg.value, "PigeonGang: Pigeon price is not correct");
        if (whitelistEnabled == true) {
            require(_whitelist[_msgSender()], "PigeonGang: Not on whitelist");
        }

        pledged[_msgSender()] += _amount;
        currentPledge += _amount;
    }

    /**
     * @dev Pigeons can be claimed anytime
     */
    function claim() external {
        uint256 supply = totalSupply();
        
        for (uint256 i = 0; i < pledged[_msgSender()]; i++) {
            _safeMint(_msgSender(), supply + i);
        }

        claimed[_msgSender()] += pledged[_msgSender()];
        pledged[_msgSender()] = 0;
    }

    /**
     * @dev Mints specific amount of pigeons to the address
     */
    function mint(uint256 _amount) public payable {
        uint256 supply = totalSupply();

        require((_amount + pledged[_msgSender()] + claimed[_msgSender()]) <= pigeonPerWallet, "PigeonGang: Each address can only purchase up to 5 pigeons.");
        require(_amount <= pigeonPerTx, "PigeonGang: Each address can only purchase up to 2 pigeons per transaction.");
        require(supply.add(_amount) <= pigeonSupply, "PigeonGang: Purchase would exceed pigeons supply");
        require(pigeonPrice.mul(_amount) <= msg.value, "PigeonGang: Pigeon price is not correct");
        if (whitelistEnabled == true) {
            require(_whitelist[_msgSender()], "PigeonGang: Not on whitelist");
        }

        uint256 i;

        for (i = 0; i < _amount; i++) {
            if (supply + i < pigeonSupply) {
                _safeMint(_msgSender(), supply + i);
            }
        }

        claimed[_msgSender()] += i;
    }

    /**
     * @dev Airdrops pigeons to the address
     * Can only be called by the current owner.
     */
    function airdropPigeons(uint256 _amount, address _recipient) public contractOwnerOnly {
        uint256 supply = totalSupply();

        require(supply.add(_amount) <= pigeonSupply, "PigeonGang: Airdrop would exceed pigeons supply");

        for (uint256 i = 0; i < _amount; i++) {
            if (supply + i < pigeonSupply) {
                _safeMint(_recipient, supply + i);
            }
        }
    }

    /**
     * @dev Airdrops one pigeon to many addresses
     * Can only be called by the current owner.
     */
    function airdropPigeonsToMany(address[] memory _recipients) external contractOwnerOnly {
        uint256 supply = totalSupply();

        require(supply.add(_recipients.length) <= pigeonSupply, "PigeonGang: Airdrop would exceed pigeons supply");

        for (uint256 i = 0; i < _recipients.length; i++) {
          airdropPigeons(1, _recipients[i]);
        }
    }

    /**
     * @dev Adds addresses to whitelist
     * Can only be called by the current owner.
     */
    function addToWhitelist(address[] memory _addresses) public contractOwnerOnly {
        for (uint256 i = 0; i < _addresses.length; i++) {
            _whitelist[_addresses[i]] = true;
        }
    }

    /**
     * @dev Removes addresses to whitelist
     * Can only be called by the current owner.
     */
    function popFromWhitelist(address[] memory _addresses) public contractOwnerOnly {
        for (uint256 i = 0; i < _addresses.length; i++) {
            _whitelist[_addresses[i]] = false;
        }
    }

    /**
     * @dev Returns true if the address is on whitelist
     */
    function isOnWhitelist(address _address) public view returns (bool) {
        return _whitelist[_address];
    }

    /**
     * @dev Flips whitelist state
     * Can only be called by the current owner.
     */
    function flipWhitelistState() public contractOwnerOnly {
        whitelistEnabled = !whitelistEnabled;
    }

    /**
     * @dev Sets a new price for the pigeon
     * Can only be called by the current owner.
     */
    function setPigeonPrice(uint256 _pigeonPrice) public contractOwnerOnly {
        pigeonPrice = _pigeonPrice;
    }

    /**
     * @dev Sets value of pigeon per wallet limit
     * Can only be called by the current owner.
     */
    function setPigeonPerWallet(uint256 _amount) public contractOwnerOnly {
        pigeonPerWallet = _amount;
    }

    /**
     * @dev Sets value of pigeon per transaction limit
     * Can only be called by the current owner.
     */
    function setPigeonPerTx(uint256 _amount) public contractOwnerOnly {
        pigeonPerTx = _amount;
    }

    /**
     * @dev Increments value of pigeons supply
     * Can only be called by the current owner.
     */
    function resupplyPigeons(uint256 _pigeonSupply) public contractOwnerOnly {
        pigeonSupply = totalSupply() + _pigeonSupply;
    }

    /**
     * @dev Withdraw specific amount from the balance.
     * Can only be called by the current owner.
     */
    function withdraw(address payable _to, uint256 _amount) public contractOwnerOnly {
        _to.transfer(_amount);
    }

    function baseTokenURI() public pure returns (string memory) {
        return "https://pigeongang.herokuapp.com/api/";
    }

    function tokenURI(uint256 _tokenId) override public pure returns (string memory) {
        return string(abi.encodePacked(baseTokenURI(), Strings.toString(_tokenId)));
    }

    /**
     * @dev Transfers ownership of the contract to a new address.
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual contractOwnerOnly {
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        _contractOwner = newOwner;
    }

    /**
     * Changes the sender of the transaction to a "0x00..." address
     */
    function _msgSender() internal override view returns (address sender) {
        return ContextMixin.msgSender();
    }

    /**
     * Declaring fallback and recieve functions when using "payable" keyword in contract, since it is neccessary since solidity 0.6.0
     */
    fallback() external payable {}

    receive() external payable {}
}

File 2 of 17 : NativeMetaTransaction.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {SafeMath} from  "openzeppelin-solidity/contracts/utils/math/SafeMath.sol";
import {EIP712Base} from "./EIP712Base.sol";

contract NativeMetaTransaction is EIP712Base {
    using SafeMath for uint256;
    bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256(
        bytes(
            "MetaTransaction(uint256 nonce,address from,bytes functionSignature)"
        )
    );
    event MetaTransactionExecuted(
        address userAddress,
        address payable relayerAddress,
        bytes functionSignature
    );
    mapping(address => uint256) nonces;

    /*
     * Meta transaction structure.
     * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas
     * He should call the desired function directly in that case.
     */
    struct MetaTransaction {
        uint256 nonce;
        address from;
        bytes functionSignature;
    }

    function executeMetaTransaction(
        address userAddress,
        bytes memory functionSignature,
        bytes32 sigR,
        bytes32 sigS,
        uint8 sigV
    ) public payable returns (bytes memory) {
        MetaTransaction memory metaTx = MetaTransaction({
            nonce: nonces[userAddress],
            from: userAddress,
            functionSignature: functionSignature
        });

        require(
            verify(userAddress, metaTx, sigR, sigS, sigV),
            "Signer and signature do not match"
        );

        // increase nonce for user (to avoid re-use)
        nonces[userAddress] = nonces[userAddress].add(1);

        emit MetaTransactionExecuted(
            userAddress,
            payable(msg.sender),
            functionSignature
        );

        // Append userAddress and relayer address at the end to extract it from calling context
        (bool success, bytes memory returnData) = address(this).call(
            abi.encodePacked(functionSignature, userAddress)
        );
        require(success, "Function call not successful");

        return returnData;
    }

    function hashMetaTransaction(MetaTransaction memory metaTx)
        internal
        pure
        returns (bytes32)
    {
        return
            keccak256(
                abi.encode(
                    META_TRANSACTION_TYPEHASH,
                    metaTx.nonce,
                    metaTx.from,
                    keccak256(metaTx.functionSignature)
                )
            );
    }

    function getNonce(address user) public view returns (uint256 nonce) {
        nonce = nonces[user];
    }

    function verify(
        address signer,
        MetaTransaction memory metaTx,
        bytes32 sigR,
        bytes32 sigS,
        uint8 sigV
    ) internal view returns (bool) {
        require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER");
        return
            signer ==
            ecrecover(
                toTypedMessageHash(hashMetaTransaction(metaTx)),
                sigV,
                sigR,
                sigS
            );
    }
}

File 3 of 17 : Initializable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

contract Initializable {
    bool inited = false;

    modifier initializer() {
        require(!inited, "already inited");
        _;
        inited = true;
    }
}

File 4 of 17 : EIP712Base.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {Initializable} from "./Initializable.sol";

contract EIP712Base is Initializable {
    struct EIP712Domain {
        string name;
        string version;
        address verifyingContract;
        bytes32 salt;
    }

    string constant public ERC712_VERSION = "1";

    bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256(
        bytes(
            "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)"
        )
    );
    bytes32 internal domainSeperator;

    // supposed to be called once while initializing.
    // one of the contracts that inherits this contract follows proxy pattern
    // so it is not possible to do this in a constructor
    function _initializeEIP712(
        string memory name
    )
        internal
        initializer
    {
        _setDomainSeperator(name);
    }

    function _setDomainSeperator(string memory name) internal {
        domainSeperator = keccak256(
            abi.encode(
                EIP712_DOMAIN_TYPEHASH,
                keccak256(bytes(name)),
                keccak256(bytes(ERC712_VERSION)),
                address(this),
                bytes32(getChainId())
            )
        );
    }

    function getDomainSeperator() public view returns (bytes32) {
        return domainSeperator;
    }

    function getChainId() public view returns (uint256) {
        uint256 id;
        assembly {
            id := chainid()
        }
        return id;
    }

    /**
     * Accept message hash and returns hash message in EIP712 compatible form
     * So that it can be used to recover signer from signature signed using EIP712 formatted data
     * https://eips.ethereum.org/EIPS/eip-712
     * "\\x19" makes the encoding deterministic
     * "\\x01" is the version byte to make it compatible to EIP-191
     */
    function toTypedMessageHash(bytes32 messageHash)
        internal
        view
        returns (bytes32)
    {
        return
            keccak256(
                abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash)
            );
    }
}

File 5 of 17 : ContentMixin.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

abstract contract ContextMixin {
    function msgSender()
        internal
        view
        returns (address payable sender)
    {
        if (msg.sender == address(this)) {
            bytes memory array = msg.data;
            uint256 index = msg.data.length;
            assembly {
                // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.
                sender := and(
                    mload(add(array, index)),
                    0xffffffffffffffffffffffffffffffffffffffff
                )
            }
        } else {
            sender = payable(msg.sender);
        }
        return sender;
    }
}

File 6 of 17 : SafeMath.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

File 8 of 17 : ERC165.sol
// SPDX-License-Identifier: MIT

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 9 of 17 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev String operations.
 */
library Strings {
    bytes16 private constant alphabet = "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] = alphabet[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

}

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

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) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 11 of 17 : Address.sol
// SPDX-License-Identifier: MIT

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;
        // solhint-disable-next-line no-inline-assembly
        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");

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (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");

        // solhint-disable-next-line avoid-low-level-calls
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return _verifyCallResult(success, returndata, errorMessage);
    }

    function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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

                // solhint-disable-next-line no-inline-assembly
                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

File 12 of 17 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

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 13 of 17 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

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 14 of 17 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./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) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

    /**
     * @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];
    }

    /**
     * @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 15 of 17 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

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 16 of 17 : IERC721.sol
// SPDX-License-Identifier: MIT

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 17 of 17 : ERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../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;

    /**
     * @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) public view virtual override 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) public view virtual override returns (string memory) {
        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}. 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) public virtual override {
        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) public view virtual override returns (address) {
        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) public virtual override {
        //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) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override {
        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 || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
    }

    /**
     * @dev Safely mints `tokenId` and transfers it 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 to, uint256 tokenId) internal virtual {
        _safeMint(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 to, uint256 tokenId, bytes memory _data) internal virtual {
        _mint(to, tokenId);
        require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Mints `tokenId` and transfers it 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 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), to, tokenId);
    }

    /**
     * @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);
    }

    /**
     * @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);
    }

    /**
     * @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);
    }

    /**
     * @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, _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 {
                    // solhint-disable-next-line no-inline-assembly
                    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` 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 { }
}

Settings
{
  "remappings": [],
  "optimizer": {
    "enabled": true,
    "runs": 20
  },
  "evmVersion": "london",
  "libraries": {},
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"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":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","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"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"addToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address","name":"_recipient","type":"address"}],"name":"airdropPigeons","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_recipients","type":"address[]"}],"name":"airdropPigeonsToMany","outputs":[],"stateMutability":"nonpayable","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":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentPledge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"flipWhitelistState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDomainSeperator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"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":[{"internalType":"address","name":"_address","type":"address"}],"name":"isOnWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"pigeonPerTx","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pigeonPerWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pigeonPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pigeonSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"pledge","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"pledged","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"popFromWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pigeonSupply","type":"uint256"}],"name":"resupplyPigeons","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":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setPigeonPerTx","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setPigeonPerWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_pigeonPrice","type":"uint256"}],"name":"setPigeonPrice","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":"pure","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":[],"name":"whitelistEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

6080604052600a805460ff1990811690915566d529ae9e860000600d5560c8600e556005600f55600260105560006011556012805490911690553480156200004657600080fd5b50604080518082018252600b81526a506967656f6e2047616e6760a81b6020808301918252835180850190945260038452622823a760e91b908401528151919291620000959160009162000298565b508051620000ab90600190602084019062000298565b505050620000e4620000c26200011760201b60201c565b601680546001600160a01b0319166001600160a01b0392909216919091179055565b60408051808201909152600b81526a506967656f6e2047616e6760a81b6020820152620001119062000133565b6200037b565b60006200012e6200019760201b620019911760201c565b905090565b600a5460ff16156200017c5760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481a5b9a5d195960921b604482015260640160405180910390fd5b6200018781620001f6565b50600a805460ff19166001179055565b600033301415620001f057600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150620001f39050565b50335b90565b6040518060800160405280604f815260200162003279604f9139805160209182012082519282019290922060408051808201825260018152603160f81b90840152805180840194909452838101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608401523060808401524660a0808501919091528151808503909101815260c090930190528151910120600b55565b828054620002a6906200033e565b90600052602060002090601f016020900481019282620002ca576000855562000315565b82601f10620002e557805160ff191683800117855562000315565b8280016001018555821562000315579182015b8281111562000315578251825591602001919060010190620002f8565b506200032392915062000327565b5090565b5b8082111562000323576000815560010162000328565b600181811c908216806200035357607f821691505b602082108114156200037557634e487b7160e01b600052602260045260246000fd5b50919050565b612eee806200038b6000396000f3fe6080604052600436106102105760003560e01c806351fb012d1161011c57806351fb012d146104f95780636352211e146105135780636b81e11b1461053357806370a08231146105605780637326c9c014610580578063742c9c79146105935780637f649783146105a957806395d89b41146105c95780639682c88b146105de578063a0712d68146105fe578063a22cb46514610611578063b88d4fde14610631578063c108df1814610651578063c1e9848114610667578063c87b56dd14610687578063c884ef83146106a7578063ce4298eb146106d4578063d547cfb7146106f4578063e985e9c514610709578063f2fde38b14610729578063f3fef3a314610749578063f6fa26ab14610769578063fde4674f1461077e57005b806301ffc9a714610219578063024d7b011461024e57806306fdde0314610272578063081812fc14610294578063095ea7b3146102cc5780630c53c51c146102ec5780630f7e5970146102ff5780631605c8961461032c57806317a6716c1461034257806318160ddd1461036257806320379ee514610377578063223954241461038c57806323b872dd146103ac5780632b740397146103cc5780632d0335ab146103e25780632f745c59146104185780633408e470146104385780633a3ab6721461044b578063425d0cff1461048457806342842e0e146104a45780634e71d92d146104c45780634f6ccce7146104d957005b3661021757005b005b34801561022557600080fd5b50610239610234366004612536565b61079e565b60405190151581526020015b60405180910390f35b34801561025a57600080fd5b50610264600f5481565b604051908152602001610245565b34801561027e57600080fd5b506102876107c9565b60405161024591906125ab565b3480156102a057600080fd5b506102b46102af3660046125be565b61085b565b6040516001600160a01b039091168152602001610245565b3480156102d857600080fd5b506102176102e73660046125ec565b6108e8565b6102876102fa3660046126cd565b610a0b565b34801561030b57600080fd5b50610287604051806040016040528060018152602001603160f81b81525081565b34801561033857600080fd5b50610264600e5481565b34801561034e57600080fd5b5061021761035d3660046125be565b610bf4565b34801561036e57600080fd5b50600854610264565b34801561038357600080fd5b50600b54610264565b34801561039857600080fd5b506102176103a73660046125be565b610c2e565b3480156103b857600080fd5b506102176103c736600461274a565b610c68565b3480156103d857600080fd5b50610264600d5481565b3480156103ee57600080fd5b506102646103fd36600461278b565b6001600160a01b03166000908152600c602052604090205490565b34801561042457600080fd5b506102646104333660046125ec565b610ca0565b34801561044457600080fd5b5046610264565b34801561045757600080fd5b5061023961046636600461278b565b6001600160a01b031660009081526013602052604090205460ff1690565b34801561049057600080fd5b5061021761049f3660046127a8565b610d36565b3480156104b057600080fd5b506102176104bf36600461274a565b610def565b3480156104d057600080fd5b50610217610e0a565b3480156104e557600080fd5b506102646104f43660046125be565b610f13565b34801561050557600080fd5b506012546102399060ff1681565b34801561051f57600080fd5b506102b461052e3660046125be565b610fa6565b34801561053f57600080fd5b5061026461054e36600461278b565b60146020526000908152604090205481565b34801561056c57600080fd5b5061026461057b36600461278b565b61101d565b61021761058e3660046125be565b6110a4565b34801561059f57600080fd5b5061026460105481565b3480156105b557600080fd5b506102176105c43660046127a8565b61125b565b3480156105d557600080fd5b506102876112fc565b3480156105ea57600080fd5b506102176105f93660046125be565b61130b565b61021761060c3660046125be565b61135a565b34801561061d57600080fd5b5061021761062c36600461284d565b61153f565b34801561063d57600080fd5b5061021761064c36600461288b565b61163d565b34801561065d57600080fd5b5061026460115481565b34801561067357600080fd5b506102176106823660046125be565b61167c565b34801561069357600080fd5b506102876106a23660046125be565b6116b6565b3480156106b357600080fd5b506102646106c236600461278b565b60156020526000908152604090205481565b3480156106e057600080fd5b506102176106ef3660046127a8565b6116f0565b34801561070057600080fd5b5061028761178d565b34801561071557600080fd5b506102396107243660046128f6565b6117ad565b34801561073557600080fd5b5061021761074436600461278b565b6117db565b34801561075557600080fd5b506102176107643660046125ec565b611831565b34801561077557600080fd5b5061021761189c565b34801561078a57600080fd5b50610217610799366004612924565b6118e5565b60006001600160e01b0319821663780e9d6360e01b14806107c357506107c3826119ee565b92915050565b6060600080546107d890612949565b80601f016020809104026020016040519081016040528092919081815260200182805461080490612949565b80156108515780601f1061082657610100808354040283529160200191610851565b820191906000526020600020905b81548152906001019060200180831161083457829003601f168201915b5050505050905090565b600061086682611a3e565b6108cc5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006108f382610fa6565b9050806001600160a01b0316836001600160a01b031614156109615760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108c3565b806001600160a01b0316610973611a5b565b6001600160a01b0316148061098f575061098f81610724611a5b565b6109fc5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b60648201526084016108c3565b610a068383611a6a565b505050565b60408051606081810183526001600160a01b0388166000818152600c602090815290859020548452830152918101869052610a498782878787611ad8565b610a9f5760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636044820152600d60fb1b60648201526084016108c3565b6001600160a01b0387166000908152600c6020526040902054610ac3906001611bc8565b6001600160a01b0388166000908152600c60205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b90610b1390899033908a90612984565b60405180910390a1600080306001600160a01b0316888a604051602001610b3b9291906129b9565b60408051601f1981840301815290829052610b55916129eb565b6000604051808303816000865af19150503d8060008114610b92576040519150601f19603f3d011682016040523d82523d6000602084013e610b97565b606091505b509150915081610be85760405162461bcd60e51b815260206004820152601c60248201527b119d5b98dd1a5bdb8818d85b1b081b9bdd081cdd58d8d95cdcd99d5b60221b60448201526064016108c3565b98975050505050505050565b610bfc611a5b565b6016546001600160a01b03908116911614610c295760405162461bcd60e51b81526004016108c390612a07565b600f55565b610c36611a5b565b6016546001600160a01b03908116911614610c635760405162461bcd60e51b81526004016108c390612a07565b600d55565b610c79610c73611a5b565b82611bdb565b610c955760405162461bcd60e51b81526004016108c390612a53565b610a06838383611ca5565b6000610cab8361101d565b8210610d0d5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016108c3565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b610d3e611a5b565b6016546001600160a01b03908116911614610d6b5760405162461bcd60e51b81526004016108c390612a07565b6000610d7660085490565b9050600e54610d8f835183611bc890919063ffffffff16565b1115610dad5760405162461bcd60e51b81526004016108c390612aa4565b60005b8251811015610a0657610ddd6001848381518110610dd057610dd0612af3565b60200260200101516118e5565b80610de781612b1f565b915050610db0565b610a068383836040518060200160405280600081525061163d565b6000610e1560085490565b905060005b60146000610e26611a5b565b6001600160a01b03166001600160a01b0316815260200190815260200160002054811015610e7a57610e68610e59611a5b565b610e638385612b3a565b611e50565b80610e7281612b1f565b915050610e1a565b5060146000610e87611a5b565b6001600160a01b03166001600160a01b031681526020019081526020016000205460156000610eb4611a5b565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610ee39190612b3a565b9091555060009050601481610ef6611a5b565b6001600160a01b0316815260208101919091526040016000205550565b6000610f1e60085490565b8210610f815760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016108c3565b60088281548110610f9457610f94612af3565b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b0316806107c35760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016108c3565b60006001600160a01b0382166110885760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016108c3565b506001600160a01b031660009081526003602052604090205490565b600f54601560006110b3611a5b565b6001600160a01b03166001600160a01b0316815260200190815260200160002054601460006110e0611a5b565b6001600160a01b031681526020810191909152604001600020546111049084612b3a565b61110e9190612b3a565b111561112c5760405162461bcd60e51b81526004016108c390612b52565b60105481111561114e5760405162461bcd60e51b81526004016108c390612bad565b600e5460115461115e9083611bc8565b111561117c5760405162461bcd60e51b81526004016108c390612c1e565b600d54349061118b9083611e6a565b11156111a95760405162461bcd60e51b81526004016108c390612c6e565b60125460ff161515600114156111fe57601360006111c5611a5b565b6001600160a01b0316815260208101919091526040016000205460ff166111fe5760405162461bcd60e51b81526004016108c390612cb5565b806014600061120b611a5b565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461123a9190612b3a565b9250508190555080601160008282546112539190612b3a565b909155505050565b611263611a5b565b6016546001600160a01b039081169116146112905760405162461bcd60e51b81526004016108c390612a07565b60005b81518110156112f8576001601360008484815181106112b4576112b4612af3565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806112f081612b1f565b915050611293565b5050565b6060600180546107d890612949565b611313611a5b565b6016546001600160a01b039081169116146113405760405162461bcd60e51b81526004016108c390612a07565b8061134a60085490565b6113549190612b3a565b600e5550565b600061136560085490565b9050600f5460156000611376611a5b565b6001600160a01b03166001600160a01b0316815260200190815260200160002054601460006113a3611a5b565b6001600160a01b031681526020810191909152604001600020546113c79085612b3a565b6113d19190612b3a565b11156113ef5760405162461bcd60e51b81526004016108c390612b52565b6010548211156114115760405162461bcd60e51b81526004016108c390612bad565b600e5461141e8284611bc8565b111561143c5760405162461bcd60e51b81526004016108c390612c1e565b600d54349061144b9084611e6a565b11156114695760405162461bcd60e51b81526004016108c390612c6e565b60125460ff161515600114156114be5760136000611485611a5b565b6001600160a01b0316815260208101919091526040016000205460ff166114be5760405162461bcd60e51b81526004016108c390612cb5565b60005b828110156114f957600e546114d68284612b3a565b10156114e7576114e7610e59611a5b565b806114f181612b1f565b9150506114c1565b8060156000611506611a5b565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546115359190612b3a565b9091555050505050565b611547611a5b565b6001600160a01b0316826001600160a01b031614156115a45760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b60448201526064016108c3565b80600560006115b1611a5b565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff1916921515929092179091556115f5611a5b565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611631911515815260200190565b60405180910390a35050565b61164e611648611a5b565b83611bdb565b61166a5760405162461bcd60e51b81526004016108c390612a53565b61167684848484611e76565b50505050565b611684611a5b565b6016546001600160a01b039081169116146116b15760405162461bcd60e51b81526004016108c390612a07565b601055565b60606116c061178d565b6116c983611ea9565b6040516020016116da929190612ceb565b6040516020818303038152906040529050919050565b6116f8611a5b565b6016546001600160a01b039081169116146117255760405162461bcd60e51b81526004016108c390612a07565b60005b81518110156112f85760006013600084848151811061174957611749612af3565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061178581612b1f565b915050611728565b6060604051806060016040528060258152602001612e9460259139905090565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6117e3611a5b565b6016546001600160a01b039081169116146118105760405162461bcd60e51b81526004016108c390612a07565b601680546001600160a01b0319166001600160a01b03831617905550565b50565b611839611a5b565b6016546001600160a01b039081169116146118665760405162461bcd60e51b81526004016108c390612a07565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610a06573d6000803e3d6000fd5b6118a4611a5b565b6016546001600160a01b039081169116146118d15760405162461bcd60e51b81526004016108c390612a07565b6012805460ff19811660ff90911615179055565b6118ed611a5b565b6016546001600160a01b0390811691161461191a5760405162461bcd60e51b81526004016108c390612a07565b600061192560085490565b600e549091506119358285611bc8565b11156119535760405162461bcd60e51b81526004016108c390612aa4565b60005b8381101561167657600e5461196b8284612b3a565b101561197f5761197f83610e638385612b3a565b8061198981612b1f565b915050611956565b6000333014156119e857600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b031691506119eb9050565b50335b90565b60006001600160e01b031982166380ac58cd60e01b1480611a1f57506001600160e01b03198216635b5e139f60e01b145b806107c357506301ffc9a760e01b6001600160e01b03198316146107c3565b6000908152600260205260409020546001600160a01b0316151590565b6000611a65611991565b905090565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611a9f82610fa6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b038616611b3e5760405162461bcd60e51b815260206004820152602560248201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360448201526424a3a722a960d91b60648201526084016108c3565b6001611b51611b4c87611fa6565b612023565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa158015611b9f573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b6000611bd48284612b3a565b9392505050565b6000611be682611a3e565b611c475760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108c3565b6000611c5283610fa6565b9050806001600160a01b0316846001600160a01b03161480611c8d5750836001600160a01b0316611c828461085b565b6001600160a01b0316145b80611c9d5750611c9d81856117ad565b949350505050565b826001600160a01b0316611cb882610fa6565b6001600160a01b031614611d205760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016108c3565b6001600160a01b038216611d825760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108c3565b611d8d838383612053565b611d98600082611a6a565b6001600160a01b0383166000908152600360205260408120805460019290611dc1908490612d1a565b90915550506001600160a01b0382166000908152600360205260408120805460019290611def908490612b3a565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6112f882826040518060200160405280600081525061210b565b6000611bd48284612d31565b611e81848484611ca5565b611e8d8484848461213e565b6116765760405162461bcd60e51b81526004016108c390612d50565b606081611ecd5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611ef75780611ee181612b1f565b9150611ef09050600a83612db8565b9150611ed1565b6000816001600160401b03811115611f1157611f11612618565b6040519080825280601f01601f191660200182016040528015611f3b576020820181803683370190505b5090505b8415611c9d57611f50600183612d1a565b9150611f5d600a86612dcc565b611f68906030612b3a565b60f81b818381518110611f7d57611f7d612af3565b60200101906001600160f81b031916908160001a905350611f9f600a86612db8565b9450611f3f565b6000604051806080016040528060438152602001612e516043913980516020918201208351848301516040808701518051908601209051612006950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b600061202e600b5490565b60405161190160f01b6020820152602281019190915260428101839052606201612006565b6001600160a01b0383166120ae576120a981600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6120d1565b816001600160a01b0316836001600160a01b0316146120d1576120d18382612252565b6001600160a01b0382166120e857610a06816122ef565b826001600160a01b0316826001600160a01b031614610a0657610a06828261239e565b61211583836123e2565b612122600084848461213e565b610a065760405162461bcd60e51b81526004016108c390612d50565b60006001600160a01b0384163b1561224757836001600160a01b031663150b7a02612167611a5b565b8786866040518563ffffffff1660e01b81526004016121899493929190612de0565b602060405180830381600087803b1580156121a357600080fd5b505af19250505080156121d3575060408051601f3d908101601f191682019092526121d091810190612e1d565b60015b61222d573d808015612201576040519150601f19603f3d011682016040523d82523d6000602084013e612206565b606091505b5080516122255760405162461bcd60e51b81526004016108c390612d50565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611c9d565b506001949350505050565b6000600161225f8461101d565b6122699190612d1a565b6000838152600760205260409020549091508082146122bc576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061230190600190612d1a565b6000838152600960205260408120546008805493945090928490811061232957612329612af3565b90600052602060002001549050806008838154811061234a5761234a612af3565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061238257612382612e3a565b6001900381819060005260206000200160009055905550505050565b60006123a98361101d565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b0382166124385760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108c3565b61244181611a3e565b1561248d5760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b60448201526064016108c3565b61249960008383612053565b6001600160a01b03821660009081526003602052604081208054600192906124c2908490612b3a565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b03198116811461182e57600080fd5b60006020828403121561254857600080fd5b8135611bd481612520565b60005b8381101561256e578181015183820152602001612556565b838111156116765750506000910152565b60008151808452612597816020860160208601612553565b601f01601f19169290920160200192915050565b602081526000611bd4602083018461257f565b6000602082840312156125d057600080fd5b5035919050565b6001600160a01b038116811461182e57600080fd5b600080604083850312156125ff57600080fd5b823561260a816125d7565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561265657612656612618565b604052919050565b600082601f83011261266f57600080fd5b81356001600160401b0381111561268857612688612618565b61269b601f8201601f191660200161262e565b8181528460208386010111156126b057600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156126e557600080fd5b85356126f0816125d7565b945060208601356001600160401b0381111561270b57600080fd5b6127178882890161265e565b9450506040860135925060608601359150608086013560ff8116811461273c57600080fd5b809150509295509295909350565b60008060006060848603121561275f57600080fd5b833561276a816125d7565b9250602084013561277a816125d7565b929592945050506040919091013590565b60006020828403121561279d57600080fd5b8135611bd4816125d7565b600060208083850312156127bb57600080fd5b82356001600160401b03808211156127d257600080fd5b818501915085601f8301126127e657600080fd5b8135818111156127f8576127f8612618565b8060051b915061280984830161262e565b818152918301840191848101908884111561282357600080fd5b938501935b83851015610be8578435925061283d836125d7565b8282529385019390850190612828565b6000806040838503121561286057600080fd5b823561286b816125d7565b91506020830135801515811461288057600080fd5b809150509250929050565b600080600080608085870312156128a157600080fd5b84356128ac816125d7565b935060208501356128bc816125d7565b92506040850135915060608501356001600160401b038111156128de57600080fd5b6128ea8782880161265e565b91505092959194509250565b6000806040838503121561290957600080fd5b8235612914816125d7565b91506020830135612880816125d7565b6000806040838503121561293757600080fd5b823591506020830135612880816125d7565b600181811c9082168061295d57607f821691505b6020821081141561297e57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b038481168252831660208201526060604082018190526000906129b09083018461257f565b95945050505050565b600083516129cb818460208801612553565b60609390931b6001600160601b0319169190920190815260140192915050565b600082516129fd818460208701612553565b9190910192915050565b6020808252602c908201527f506967656f6e47616e673a2043616c6c6572206973206e6f742074686520636f60408201526b373a3930b1ba1037bbb732b960a11b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602f908201527f506967656f6e47616e673a2041697264726f7020776f756c642065786365656460408201526e20706967656f6e7320737570706c7960881b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415612b3357612b33612b09565b5060010190565b60008219821115612b4d57612b4d612b09565b500190565b6020808252603b908201527f506967656f6e47616e673a204561636820616464726573732063616e206f6e6c60408201527a3c90383ab931b430b9b2903ab8103a37901a903834b3b2b7b7399760291b606082015260800190565b6020808252604b908201527f506967656f6e47616e673a204561636820616464726573732063616e206f6e6c60408201527f7920707572636861736520757020746f203220706967656f6e7320706572207460608201526a3930b739b0b1ba34b7b71760a91b608082015260a00190565b60208082526030908201527f506967656f6e47616e673a20507572636861736520776f756c6420657863656560408201526f6420706967656f6e7320737570706c7960801b606082015260800190565b60208082526027908201527f506967656f6e47616e673a20506967656f6e207072696365206973206e6f742060408201526618dbdc9c9958dd60ca1b606082015260800190565b6020808252601c908201527b141a59d95bdb91d85b99ce88139bdd081bdb881dda1a5d195b1a5cdd60221b604082015260600190565b60008351612cfd818460208801612553565b835190830190612d11818360208801612553565b01949350505050565b600082821015612d2c57612d2c612b09565b500390565b6000816000190483118215151615612d4b57612d4b612b09565b500290565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082612dc757612dc7612da2565b500490565b600082612ddb57612ddb612da2565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612e139083018461257f565b9695505050505050565b600060208284031215612e2f57600080fd5b8151611bd481612520565b634e487b7160e01b600052603160045260246000fdfe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e61747572652968747470733a2f2f706967656f6e67616e672e6865726f6b756170702e636f6d2f6170692fa2646970667358221220b7cddf44b8ca322fd20418381835361fda7364f58d90e49c2bad2fa3ec1e879464736f6c63430008090033454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c6164647265737320766572696679696e67436f6e74726163742c627974657333322073616c7429

Deployed Bytecode

0x6080604052600436106102105760003560e01c806351fb012d1161011c57806351fb012d146104f95780636352211e146105135780636b81e11b1461053357806370a08231146105605780637326c9c014610580578063742c9c79146105935780637f649783146105a957806395d89b41146105c95780639682c88b146105de578063a0712d68146105fe578063a22cb46514610611578063b88d4fde14610631578063c108df1814610651578063c1e9848114610667578063c87b56dd14610687578063c884ef83146106a7578063ce4298eb146106d4578063d547cfb7146106f4578063e985e9c514610709578063f2fde38b14610729578063f3fef3a314610749578063f6fa26ab14610769578063fde4674f1461077e57005b806301ffc9a714610219578063024d7b011461024e57806306fdde0314610272578063081812fc14610294578063095ea7b3146102cc5780630c53c51c146102ec5780630f7e5970146102ff5780631605c8961461032c57806317a6716c1461034257806318160ddd1461036257806320379ee514610377578063223954241461038c57806323b872dd146103ac5780632b740397146103cc5780632d0335ab146103e25780632f745c59146104185780633408e470146104385780633a3ab6721461044b578063425d0cff1461048457806342842e0e146104a45780634e71d92d146104c45780634f6ccce7146104d957005b3661021757005b005b34801561022557600080fd5b50610239610234366004612536565b61079e565b60405190151581526020015b60405180910390f35b34801561025a57600080fd5b50610264600f5481565b604051908152602001610245565b34801561027e57600080fd5b506102876107c9565b60405161024591906125ab565b3480156102a057600080fd5b506102b46102af3660046125be565b61085b565b6040516001600160a01b039091168152602001610245565b3480156102d857600080fd5b506102176102e73660046125ec565b6108e8565b6102876102fa3660046126cd565b610a0b565b34801561030b57600080fd5b50610287604051806040016040528060018152602001603160f81b81525081565b34801561033857600080fd5b50610264600e5481565b34801561034e57600080fd5b5061021761035d3660046125be565b610bf4565b34801561036e57600080fd5b50600854610264565b34801561038357600080fd5b50600b54610264565b34801561039857600080fd5b506102176103a73660046125be565b610c2e565b3480156103b857600080fd5b506102176103c736600461274a565b610c68565b3480156103d857600080fd5b50610264600d5481565b3480156103ee57600080fd5b506102646103fd36600461278b565b6001600160a01b03166000908152600c602052604090205490565b34801561042457600080fd5b506102646104333660046125ec565b610ca0565b34801561044457600080fd5b5046610264565b34801561045757600080fd5b5061023961046636600461278b565b6001600160a01b031660009081526013602052604090205460ff1690565b34801561049057600080fd5b5061021761049f3660046127a8565b610d36565b3480156104b057600080fd5b506102176104bf36600461274a565b610def565b3480156104d057600080fd5b50610217610e0a565b3480156104e557600080fd5b506102646104f43660046125be565b610f13565b34801561050557600080fd5b506012546102399060ff1681565b34801561051f57600080fd5b506102b461052e3660046125be565b610fa6565b34801561053f57600080fd5b5061026461054e36600461278b565b60146020526000908152604090205481565b34801561056c57600080fd5b5061026461057b36600461278b565b61101d565b61021761058e3660046125be565b6110a4565b34801561059f57600080fd5b5061026460105481565b3480156105b557600080fd5b506102176105c43660046127a8565b61125b565b3480156105d557600080fd5b506102876112fc565b3480156105ea57600080fd5b506102176105f93660046125be565b61130b565b61021761060c3660046125be565b61135a565b34801561061d57600080fd5b5061021761062c36600461284d565b61153f565b34801561063d57600080fd5b5061021761064c36600461288b565b61163d565b34801561065d57600080fd5b5061026460115481565b34801561067357600080fd5b506102176106823660046125be565b61167c565b34801561069357600080fd5b506102876106a23660046125be565b6116b6565b3480156106b357600080fd5b506102646106c236600461278b565b60156020526000908152604090205481565b3480156106e057600080fd5b506102176106ef3660046127a8565b6116f0565b34801561070057600080fd5b5061028761178d565b34801561071557600080fd5b506102396107243660046128f6565b6117ad565b34801561073557600080fd5b5061021761074436600461278b565b6117db565b34801561075557600080fd5b506102176107643660046125ec565b611831565b34801561077557600080fd5b5061021761189c565b34801561078a57600080fd5b50610217610799366004612924565b6118e5565b60006001600160e01b0319821663780e9d6360e01b14806107c357506107c3826119ee565b92915050565b6060600080546107d890612949565b80601f016020809104026020016040519081016040528092919081815260200182805461080490612949565b80156108515780601f1061082657610100808354040283529160200191610851565b820191906000526020600020905b81548152906001019060200180831161083457829003601f168201915b5050505050905090565b600061086682611a3e565b6108cc5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006108f382610fa6565b9050806001600160a01b0316836001600160a01b031614156109615760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016108c3565b806001600160a01b0316610973611a5b565b6001600160a01b0316148061098f575061098f81610724611a5b565b6109fc5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b60648201526084016108c3565b610a068383611a6a565b505050565b60408051606081810183526001600160a01b0388166000818152600c602090815290859020548452830152918101869052610a498782878787611ad8565b610a9f5760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636044820152600d60fb1b60648201526084016108c3565b6001600160a01b0387166000908152600c6020526040902054610ac3906001611bc8565b6001600160a01b0388166000908152600c60205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b90610b1390899033908a90612984565b60405180910390a1600080306001600160a01b0316888a604051602001610b3b9291906129b9565b60408051601f1981840301815290829052610b55916129eb565b6000604051808303816000865af19150503d8060008114610b92576040519150601f19603f3d011682016040523d82523d6000602084013e610b97565b606091505b509150915081610be85760405162461bcd60e51b815260206004820152601c60248201527b119d5b98dd1a5bdb8818d85b1b081b9bdd081cdd58d8d95cdcd99d5b60221b60448201526064016108c3565b98975050505050505050565b610bfc611a5b565b6016546001600160a01b03908116911614610c295760405162461bcd60e51b81526004016108c390612a07565b600f55565b610c36611a5b565b6016546001600160a01b03908116911614610c635760405162461bcd60e51b81526004016108c390612a07565b600d55565b610c79610c73611a5b565b82611bdb565b610c955760405162461bcd60e51b81526004016108c390612a53565b610a06838383611ca5565b6000610cab8361101d565b8210610d0d5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016108c3565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b610d3e611a5b565b6016546001600160a01b03908116911614610d6b5760405162461bcd60e51b81526004016108c390612a07565b6000610d7660085490565b9050600e54610d8f835183611bc890919063ffffffff16565b1115610dad5760405162461bcd60e51b81526004016108c390612aa4565b60005b8251811015610a0657610ddd6001848381518110610dd057610dd0612af3565b60200260200101516118e5565b80610de781612b1f565b915050610db0565b610a068383836040518060200160405280600081525061163d565b6000610e1560085490565b905060005b60146000610e26611a5b565b6001600160a01b03166001600160a01b0316815260200190815260200160002054811015610e7a57610e68610e59611a5b565b610e638385612b3a565b611e50565b80610e7281612b1f565b915050610e1a565b5060146000610e87611a5b565b6001600160a01b03166001600160a01b031681526020019081526020016000205460156000610eb4611a5b565b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610ee39190612b3a565b9091555060009050601481610ef6611a5b565b6001600160a01b0316815260208101919091526040016000205550565b6000610f1e60085490565b8210610f815760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016108c3565b60088281548110610f9457610f94612af3565b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b0316806107c35760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016108c3565b60006001600160a01b0382166110885760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016108c3565b506001600160a01b031660009081526003602052604090205490565b600f54601560006110b3611a5b565b6001600160a01b03166001600160a01b0316815260200190815260200160002054601460006110e0611a5b565b6001600160a01b031681526020810191909152604001600020546111049084612b3a565b61110e9190612b3a565b111561112c5760405162461bcd60e51b81526004016108c390612b52565b60105481111561114e5760405162461bcd60e51b81526004016108c390612bad565b600e5460115461115e9083611bc8565b111561117c5760405162461bcd60e51b81526004016108c390612c1e565b600d54349061118b9083611e6a565b11156111a95760405162461bcd60e51b81526004016108c390612c6e565b60125460ff161515600114156111fe57601360006111c5611a5b565b6001600160a01b0316815260208101919091526040016000205460ff166111fe5760405162461bcd60e51b81526004016108c390612cb5565b806014600061120b611a5b565b6001600160a01b03166001600160a01b03168152602001908152602001600020600082825461123a9190612b3a565b9250508190555080601160008282546112539190612b3a565b909155505050565b611263611a5b565b6016546001600160a01b039081169116146112905760405162461bcd60e51b81526004016108c390612a07565b60005b81518110156112f8576001601360008484815181106112b4576112b4612af3565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806112f081612b1f565b915050611293565b5050565b6060600180546107d890612949565b611313611a5b565b6016546001600160a01b039081169116146113405760405162461bcd60e51b81526004016108c390612a07565b8061134a60085490565b6113549190612b3a565b600e5550565b600061136560085490565b9050600f5460156000611376611a5b565b6001600160a01b03166001600160a01b0316815260200190815260200160002054601460006113a3611a5b565b6001600160a01b031681526020810191909152604001600020546113c79085612b3a565b6113d19190612b3a565b11156113ef5760405162461bcd60e51b81526004016108c390612b52565b6010548211156114115760405162461bcd60e51b81526004016108c390612bad565b600e5461141e8284611bc8565b111561143c5760405162461bcd60e51b81526004016108c390612c1e565b600d54349061144b9084611e6a565b11156114695760405162461bcd60e51b81526004016108c390612c6e565b60125460ff161515600114156114be5760136000611485611a5b565b6001600160a01b0316815260208101919091526040016000205460ff166114be5760405162461bcd60e51b81526004016108c390612cb5565b60005b828110156114f957600e546114d68284612b3a565b10156114e7576114e7610e59611a5b565b806114f181612b1f565b9150506114c1565b8060156000611506611a5b565b6001600160a01b03166001600160a01b0316815260200190815260200160002060008282546115359190612b3a565b9091555050505050565b611547611a5b565b6001600160a01b0316826001600160a01b031614156115a45760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b60448201526064016108c3565b80600560006115b1611a5b565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff1916921515929092179091556115f5611a5b565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611631911515815260200190565b60405180910390a35050565b61164e611648611a5b565b83611bdb565b61166a5760405162461bcd60e51b81526004016108c390612a53565b61167684848484611e76565b50505050565b611684611a5b565b6016546001600160a01b039081169116146116b15760405162461bcd60e51b81526004016108c390612a07565b601055565b60606116c061178d565b6116c983611ea9565b6040516020016116da929190612ceb565b6040516020818303038152906040529050919050565b6116f8611a5b565b6016546001600160a01b039081169116146117255760405162461bcd60e51b81526004016108c390612a07565b60005b81518110156112f85760006013600084848151811061174957611749612af3565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff19169115159190911790558061178581612b1f565b915050611728565b6060604051806060016040528060258152602001612e9460259139905090565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6117e3611a5b565b6016546001600160a01b039081169116146118105760405162461bcd60e51b81526004016108c390612a07565b601680546001600160a01b0319166001600160a01b03831617905550565b50565b611839611a5b565b6016546001600160a01b039081169116146118665760405162461bcd60e51b81526004016108c390612a07565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610a06573d6000803e3d6000fd5b6118a4611a5b565b6016546001600160a01b039081169116146118d15760405162461bcd60e51b81526004016108c390612a07565b6012805460ff19811660ff90911615179055565b6118ed611a5b565b6016546001600160a01b0390811691161461191a5760405162461bcd60e51b81526004016108c390612a07565b600061192560085490565b600e549091506119358285611bc8565b11156119535760405162461bcd60e51b81526004016108c390612aa4565b60005b8381101561167657600e5461196b8284612b3a565b101561197f5761197f83610e638385612b3a565b8061198981612b1f565b915050611956565b6000333014156119e857600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b031691506119eb9050565b50335b90565b60006001600160e01b031982166380ac58cd60e01b1480611a1f57506001600160e01b03198216635b5e139f60e01b145b806107c357506301ffc9a760e01b6001600160e01b03198316146107c3565b6000908152600260205260409020546001600160a01b0316151590565b6000611a65611991565b905090565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611a9f82610fa6565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b038616611b3e5760405162461bcd60e51b815260206004820152602560248201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360448201526424a3a722a960d91b60648201526084016108c3565b6001611b51611b4c87611fa6565b612023565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa158015611b9f573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b6000611bd48284612b3a565b9392505050565b6000611be682611a3e565b611c475760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016108c3565b6000611c5283610fa6565b9050806001600160a01b0316846001600160a01b03161480611c8d5750836001600160a01b0316611c828461085b565b6001600160a01b0316145b80611c9d5750611c9d81856117ad565b949350505050565b826001600160a01b0316611cb882610fa6565b6001600160a01b031614611d205760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016108c3565b6001600160a01b038216611d825760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016108c3565b611d8d838383612053565b611d98600082611a6a565b6001600160a01b0383166000908152600360205260408120805460019290611dc1908490612d1a565b90915550506001600160a01b0382166000908152600360205260408120805460019290611def908490612b3a565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6112f882826040518060200160405280600081525061210b565b6000611bd48284612d31565b611e81848484611ca5565b611e8d8484848461213e565b6116765760405162461bcd60e51b81526004016108c390612d50565b606081611ecd5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611ef75780611ee181612b1f565b9150611ef09050600a83612db8565b9150611ed1565b6000816001600160401b03811115611f1157611f11612618565b6040519080825280601f01601f191660200182016040528015611f3b576020820181803683370190505b5090505b8415611c9d57611f50600183612d1a565b9150611f5d600a86612dcc565b611f68906030612b3a565b60f81b818381518110611f7d57611f7d612af3565b60200101906001600160f81b031916908160001a905350611f9f600a86612db8565b9450611f3f565b6000604051806080016040528060438152602001612e516043913980516020918201208351848301516040808701518051908601209051612006950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b600061202e600b5490565b60405161190160f01b6020820152602281019190915260428101839052606201612006565b6001600160a01b0383166120ae576120a981600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6120d1565b816001600160a01b0316836001600160a01b0316146120d1576120d18382612252565b6001600160a01b0382166120e857610a06816122ef565b826001600160a01b0316826001600160a01b031614610a0657610a06828261239e565b61211583836123e2565b612122600084848461213e565b610a065760405162461bcd60e51b81526004016108c390612d50565b60006001600160a01b0384163b1561224757836001600160a01b031663150b7a02612167611a5b565b8786866040518563ffffffff1660e01b81526004016121899493929190612de0565b602060405180830381600087803b1580156121a357600080fd5b505af19250505080156121d3575060408051601f3d908101601f191682019092526121d091810190612e1d565b60015b61222d573d808015612201576040519150601f19603f3d011682016040523d82523d6000602084013e612206565b606091505b5080516122255760405162461bcd60e51b81526004016108c390612d50565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611c9d565b506001949350505050565b6000600161225f8461101d565b6122699190612d1a565b6000838152600760205260409020549091508082146122bc576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061230190600190612d1a565b6000838152600960205260408120546008805493945090928490811061232957612329612af3565b90600052602060002001549050806008838154811061234a5761234a612af3565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061238257612382612e3a565b6001900381819060005260206000200160009055905550505050565b60006123a98361101d565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b0382166124385760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108c3565b61244181611a3e565b1561248d5760405162461bcd60e51b815260206004820152601c60248201527b115490cdcc8c4e881d1bdad95b88185b1c9958591e481b5a5b9d195960221b60448201526064016108c3565b61249960008383612053565b6001600160a01b03821660009081526003602052604081208054600192906124c2908490612b3a565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b03198116811461182e57600080fd5b60006020828403121561254857600080fd5b8135611bd481612520565b60005b8381101561256e578181015183820152602001612556565b838111156116765750506000910152565b60008151808452612597816020860160208601612553565b601f01601f19169290920160200192915050565b602081526000611bd4602083018461257f565b6000602082840312156125d057600080fd5b5035919050565b6001600160a01b038116811461182e57600080fd5b600080604083850312156125ff57600080fd5b823561260a816125d7565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b038111828210171561265657612656612618565b604052919050565b600082601f83011261266f57600080fd5b81356001600160401b0381111561268857612688612618565b61269b601f8201601f191660200161262e565b8181528460208386010111156126b057600080fd5b816020850160208301376000918101602001919091529392505050565b600080600080600060a086880312156126e557600080fd5b85356126f0816125d7565b945060208601356001600160401b0381111561270b57600080fd5b6127178882890161265e565b9450506040860135925060608601359150608086013560ff8116811461273c57600080fd5b809150509295509295909350565b60008060006060848603121561275f57600080fd5b833561276a816125d7565b9250602084013561277a816125d7565b929592945050506040919091013590565b60006020828403121561279d57600080fd5b8135611bd4816125d7565b600060208083850312156127bb57600080fd5b82356001600160401b03808211156127d257600080fd5b818501915085601f8301126127e657600080fd5b8135818111156127f8576127f8612618565b8060051b915061280984830161262e565b818152918301840191848101908884111561282357600080fd5b938501935b83851015610be8578435925061283d836125d7565b8282529385019390850190612828565b6000806040838503121561286057600080fd5b823561286b816125d7565b91506020830135801515811461288057600080fd5b809150509250929050565b600080600080608085870312156128a157600080fd5b84356128ac816125d7565b935060208501356128bc816125d7565b92506040850135915060608501356001600160401b038111156128de57600080fd5b6128ea8782880161265e565b91505092959194509250565b6000806040838503121561290957600080fd5b8235612914816125d7565b91506020830135612880816125d7565b6000806040838503121561293757600080fd5b823591506020830135612880816125d7565b600181811c9082168061295d57607f821691505b6020821081141561297e57634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b038481168252831660208201526060604082018190526000906129b09083018461257f565b95945050505050565b600083516129cb818460208801612553565b60609390931b6001600160601b0319169190920190815260140192915050565b600082516129fd818460208701612553565b9190910192915050565b6020808252602c908201527f506967656f6e47616e673a2043616c6c6572206973206e6f742074686520636f60408201526b373a3930b1ba1037bbb732b960a11b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602f908201527f506967656f6e47616e673a2041697264726f7020776f756c642065786365656460408201526e20706967656f6e7320737570706c7960881b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415612b3357612b33612b09565b5060010190565b60008219821115612b4d57612b4d612b09565b500190565b6020808252603b908201527f506967656f6e47616e673a204561636820616464726573732063616e206f6e6c60408201527a3c90383ab931b430b9b2903ab8103a37901a903834b3b2b7b7399760291b606082015260800190565b6020808252604b908201527f506967656f6e47616e673a204561636820616464726573732063616e206f6e6c60408201527f7920707572636861736520757020746f203220706967656f6e7320706572207460608201526a3930b739b0b1ba34b7b71760a91b608082015260a00190565b60208082526030908201527f506967656f6e47616e673a20507572636861736520776f756c6420657863656560408201526f6420706967656f6e7320737570706c7960801b606082015260800190565b60208082526027908201527f506967656f6e47616e673a20506967656f6e207072696365206973206e6f742060408201526618dbdc9c9958dd60ca1b606082015260800190565b6020808252601c908201527b141a59d95bdb91d85b99ce88139bdd081bdb881dda1a5d195b1a5cdd60221b604082015260600190565b60008351612cfd818460208801612553565b835190830190612d11818360208801612553565b01949350505050565b600082821015612d2c57612d2c612b09565b500390565b6000816000190483118215151615612d4b57612d4b612b09565b500290565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082612dc757612dc7612da2565b500490565b600082612ddb57612ddb612da2565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612e139083018461257f565b9695505050505050565b600060208284031215612e2f57600080fd5b8151611bd481612520565b634e487b7160e01b600052603160045260246000fdfe4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e61747572652968747470733a2f2f706967656f6e67616e672e6865726f6b756170702e636f6d2f6170692fa2646970667358221220b7cddf44b8ca322fd20418381835361fda7364f58d90e49c2bad2fa3ec1e879464736f6c63430008090033

Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.