ETH Price: $3,419.18 (+3.60%)

Token

ShinyClub (SCLUB)
 

Overview

Max Total Supply

0 SCLUB

Holders

118

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
shinyzero.eth
Balance
3 SCLUB
0x6a56f8613c494C95de6aDCcBF9747b37f67aF0c2
Loading...
Loading
Loading...
Loading
Loading...
Loading

Click here to update the token information / general information
# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
ShinyToken

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 10000 runs

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

/// @title The Shiny Club ERC-721 Token

/*********************************
 * ・゚・゚✧.・・゚shiny.club・✫・゜・゚✧ *
 *********************************/

pragma solidity ^0.8.9;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol";
import "@openzeppelin/contracts/governance/utils/Votes.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import { IShinyDescriptor } from './interfaces/IShinyDescriptor.sol';
import { IShinySeeder } from './interfaces/IShinySeeder.sol';
import { IShinyState } from './interfaces/IShinyState.sol';
import { IShinyToken } from './interfaces/IShinyToken.sol';


contract ShinyToken is IShinyToken, ERC721, Ownable, EIP712, Votes {
    using Counters for Counters.Counter;

    Counters.Counter private _tokenIdCounter;

    //  Contract-level metadata as base64 encoded string
    string private _contractURI = '';

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

    // The Shiny token URI descriptor
    IShinyDescriptor public descriptor;

    // The Shiny token seeder
    IShinySeeder public seeder;

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

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

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

    // Mapping owner address to voting balance. Voting balance is
    // based on the number of times the token has been reconfigured.
    mapping(address => uint256) private _votingBalances;

    // The Shiny seeds
    mapping(uint256 => IShinySeeder.Seed) public seeds;

    // The Shiny shiny states (whether or not a shiny is actually shiny)
    mapping(uint256 => IShinyState.State) public shinyStates;

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

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

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

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

    constructor(
        address _minter,
        IShinyDescriptor _descriptor,
        IShinySeeder _seeder
    ) ERC721("ShinyClub", "SCLUB") EIP712("ShinyClub", "1") {
        minter = _minter;
        descriptor = _descriptor;
        seeder = _seeder;
    }

    /**
     * @notice A distinct Uniform Resource Identifier (URI) for a given asset.
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view override returns (string memory) {
        require(_exists(tokenId), 'ShinyToken: URI query for nonexistent token');
        return descriptor.tokenURI(tokenId, seeds[tokenId], shinyStates[tokenId].isShiny);
    }

    /**
     * @notice Similar to `tokenURI`, but always serves a base64 encoded data URI
     * with the JSON contents directly inlined.
     */
    function dataURI(uint256 tokenId) public view override returns (string memory) {
        require(_exists(tokenId), 'ShinyToken: URI query for nonexistent token');
        return descriptor.dataURI(tokenId, seeds[tokenId], shinyStates[tokenId].isShiny);
    }

    /**
     * @notice Mint a Shiny to the purchaser.
     * @dev Call _mintTo with the to address(es).
     */
    function mint(address to, uint16 shinyChanceBasisPoints) public override onlyMinter returns (uint256) {
        return _mintTo(to, shinyChanceBasisPoints);
    }

    /**
     * @notice Allows the tokenId owner to reconfigure (specify a new seed) for their shiny. If the Shiny is "shiny" they can modify the special "shinyAccessory" layer as well.
     */
    function reconfigureShiny(uint256 tokenId,
                              address msgSender,
                              IShinySeeder.Seed calldata newSeed) public onlyMinter returns (IShinySeeder.Seed memory) {
        IShinyState.State storage state = shinyStates[tokenId];

        if (newSeed.shinyAccessory != 0) {
            require(state.isShiny == true, 'ShinyToken: cannot change shinyAccessory for non-shiny token');
        }

        IShinySeeder.Seed memory validNewSeed =
                seeder.generateSeedWithValues(newSeed,
                                              descriptor,
                                              state.isShiny);

        seeds[tokenId] = validNewSeed;

        // Count this reconfig to add to voting units for this token.
        state.reconfigurationCount += 1;
        // Track voting balance by address.
        _votingBalances[msgSender] += 1;
        // Give a new vote each time Shiny is reconfigured.
        _transferVotingUnits(address(0), msgSender, 1);

        // If undelegated, delegate to self.
        if (delegates(msgSender) == address(0)) {
            _delegate(msgSender, msgSender);
        }

        emit ShinyReconfigured(tokenId, validNewSeed, state.reconfigurationCount);
        return validNewSeed;
    }

    /**
     * @notice Reveals whether a Shiny is "shiny" or not.
     */
    function revealShiny(uint256 tokenId) external override returns (bool) {
        // Anyone can call this, even if not token owner
        // Verify token exists
        require(_exists(tokenId), 'ERC721: operator query for nonexistent token');
        // Look up state, get block number
        IShinyState.State storage state = shinyStates[tokenId];
        uint256 shinyChanceBlockId = state.mintedBlock + 1;

        // Require 7 blocks after mint for finality
        require(block.number >= shinyChanceBlockId, 'ShinyToken: reveal must wait at least 1 block post-mint');
        uint256 blockHash = uint256(blockhash(shinyChanceBlockId));

        require(blockHash != 0, 'ShinyToken: block number is too far in the past');

        // Hash block with tokenId and check if shiny based on shiny basis points
        uint256 randomness = uint256(
            keccak256(abi.encodePacked(blockHash, tokenId))
        );

        // If good, make shiny!
        if (randomness % 10_000 <= state.shinyChanceBasisPoints) {
            state.isShiny = true;
            // Make shiny state visible (user can change this later)
            seeds[tokenId].shinyAccessory = uint16(1);
        }

        emit ShinyRevealed(tokenId, state.isShiny);
        return state.isShiny;
    }

    /**
     * @notice Return whether a token is shiny or not.
     */
    function tokenShinyState(uint256 tokenId) public view virtual returns (bool) {
        require(_exists(tokenId), 'ERC721: operator query for nonexistent token');
        return shinyStates[tokenId].isShiny;
    }

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

        emit MinterUpdated(_minter);
    }

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

        emit MinterLocked();
    }

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

        emit DescriptorUpdated(_descriptor);
    }

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

        emit DescriptorLocked();
    }

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

        emit SeederUpdated(_seeder);
    }

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

        emit SeederLocked();
    }

    /**
     * @notice Mint a Shiny with `tokenId` to the provided `to` address.
     */
    function _mintTo(address to, uint16 shinyChanceBasisPoints) internal returns (uint256) {
        uint256 tokenId = _tokenIdCounter.current();
        _tokenIdCounter.increment();

        // Establish initial Shiny state
        bool isShiny = shinyChanceBasisPoints == 10_000 ? true : false;
        shinyStates[tokenId] = IShinyState.State({
            isShiny: isShiny,
            mintedBlock: block.number,
            shinyChanceBasisPoints: shinyChanceBasisPoints,
            reconfigurationCount: 0
        });

        IShinySeeder.Seed memory seed = seeds[tokenId] = seeder.generateSeedForMint(tokenId, descriptor, isShiny);

        _safeMint(to, tokenId);
        emit ShinyCreated(tokenId, seed, shinyChanceBasisPoints);
        return tokenId;
    }

    /**
     * @dev Returns the voting balance of `account`.
     */
    function _getVotingUnits(address account) internal view virtual override returns (uint256) {
        return _votingBalances[account];
    }

    function totalVotingUnits() public view virtual returns (uint256) {
        return _getTotalSupply();
    }

    /**
     * @dev Adjusts votes when tokens are transferred.
     *
     * Emits a {Votes-DelegateVotesChanged} event.
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override(ERC721) {
        // Maintain votingBalances for quick lookup.
        _votingBalances[from] -= shinyStates[tokenId].reconfigurationCount;
        if (to != address(0)) { // Don't transfer votes to null address.
            _votingBalances[to] += shinyStates[tokenId].reconfigurationCount;
        }
        // Transfer voting rights of delegated votes.
        _transferVotingUnits(from, to, shinyStates[tokenId].reconfigurationCount);
        super._afterTokenTransfer(from, to, tokenId);
    }

    /**
     * @notice Returns the contract metadata
     */
    function contractURI() public view returns (string memory) {
        return _contractURI;
    }

    /**
     * @dev Sets the contract metadata as a base64 encoded URI
     */
    function setContractURI(string memory contractURI_) public onlyOwner {
        _contractURI = contractURI_;
        emit ContractMetadataUpdated(_contractURI);
    }
}

File 2 of 23 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)

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}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overriden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) 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 {
        _setApprovalForAll(_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);

        _afterTokenTransfer(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);

        _afterTokenTransfer(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 from incorrect owner");
        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);

        _afterTokenTransfer(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 Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @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.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

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

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

File 3 of 23 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 4 of 23 : draft-EIP712.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol)

pragma solidity ^0.8.0;

import "./ECDSA.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * _Available since v3.4._
 */
abstract contract EIP712 {
    /* solhint-disable var-name-mixedcase */
    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
    uint256 private immutable _CACHED_CHAIN_ID;
    address private immutable _CACHED_THIS;

    bytes32 private immutable _HASHED_NAME;
    bytes32 private immutable _HASHED_VERSION;
    bytes32 private immutable _TYPE_HASH;

    /* solhint-enable var-name-mixedcase */

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        bytes32 hashedName = keccak256(bytes(name));
        bytes32 hashedVersion = keccak256(bytes(version));
        bytes32 typeHash = keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
        _HASHED_NAME = hashedName;
        _HASHED_VERSION = hashedVersion;
        _CACHED_CHAIN_ID = block.chainid;
        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
        _CACHED_THIS = address(this);
        _TYPE_HASH = typeHash;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {
            return _CACHED_DOMAIN_SEPARATOR;
        } else {
            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
        }
    }

    function _buildDomainSeparator(
        bytes32 typeHash,
        bytes32 nameHash,
        bytes32 versionHash
    ) private view returns (bytes32) {
        return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }
}

File 5 of 23 : Votes.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (governance/utils/Votes.sol)
pragma solidity ^0.8.0;

import "../../utils/Context.sol";
import "../../utils/Counters.sol";
import "../../utils/Checkpoints.sol";
import "../../utils/cryptography/draft-EIP712.sol";
import "./IVotes.sol";

/**
 * @dev This is a base abstract contract that tracks voting units, which are a measure of voting power that can be
 * transferred, and provides a system of vote delegation, where an account can delegate its voting units to a sort of
 * "representative" that will pool delegated voting units from different accounts and can then use it to vote in
 * decisions. In fact, voting units _must_ be delegated in order to count as actual votes, and an account has to
 * delegate those votes to itself if it wishes to participate in decisions and does not have a trusted representative.
 *
 * This contract is often combined with a token contract such that voting units correspond to token units. For an
 * example, see {ERC721Votes}.
 *
 * The full history of delegate votes is tracked on-chain so that governance protocols can consider votes as distributed
 * at a particular block number to protect against flash loans and double voting. The opt-in delegate system makes the
 * cost of this history tracking optional.
 *
 * When using this module the derived contract must implement {_getVotingUnits} (for example, make it return
 * {ERC721-balanceOf}), and can use {_transferVotingUnits} to track a change in the distribution of those units (in the
 * previous example, it would be included in {ERC721-_beforeTokenTransfer}).
 *
 * _Available since v4.5._
 */
abstract contract Votes is IVotes, Context, EIP712 {
    using Checkpoints for Checkpoints.History;
    using Counters for Counters.Counter;

    bytes32 private constant _DELEGATION_TYPEHASH =
        keccak256("Delegation(address delegatee,uint256 nonce,uint256 expiry)");

    mapping(address => address) private _delegation;
    mapping(address => Checkpoints.History) private _delegateCheckpoints;
    Checkpoints.History private _totalCheckpoints;

    mapping(address => Counters.Counter) private _nonces;

    /**
     * @dev Returns the current amount of votes that `account` has.
     */
    function getVotes(address account) public view virtual override returns (uint256) {
        return _delegateCheckpoints[account].latest();
    }

    /**
     * @dev Returns the amount of votes that `account` had at the end of a past block (`blockNumber`).
     *
     * Requirements:
     *
     * - `blockNumber` must have been already mined
     */
    function getPastVotes(address account, uint256 blockNumber) public view virtual override returns (uint256) {
        return _delegateCheckpoints[account].getAtBlock(blockNumber);
    }

    /**
     * @dev Returns the total supply of votes available at the end of a past block (`blockNumber`).
     *
     * NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes.
     * Votes that have not been delegated are still part of total supply, even though they would not participate in a
     * vote.
     *
     * Requirements:
     *
     * - `blockNumber` must have been already mined
     */
    function getPastTotalSupply(uint256 blockNumber) public view virtual override returns (uint256) {
        require(blockNumber < block.number, "Votes: block not yet mined");
        return _totalCheckpoints.getAtBlock(blockNumber);
    }

    /**
     * @dev Returns the current total supply of votes.
     */
    function _getTotalSupply() internal view virtual returns (uint256) {
        return _totalCheckpoints.latest();
    }

    /**
     * @dev Returns the delegate that `account` has chosen.
     */
    function delegates(address account) public view virtual override returns (address) {
        return _delegation[account];
    }

    /**
     * @dev Delegates votes from the sender to `delegatee`.
     */
    function delegate(address delegatee) public virtual override {
        address account = _msgSender();
        _delegate(account, delegatee);
    }

    /**
     * @dev Delegates votes from signer to `delegatee`.
     */
    function delegateBySig(
        address delegatee,
        uint256 nonce,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual override {
        require(block.timestamp <= expiry, "Votes: signature expired");
        address signer = ECDSA.recover(
            _hashTypedDataV4(keccak256(abi.encode(_DELEGATION_TYPEHASH, delegatee, nonce, expiry))),
            v,
            r,
            s
        );
        require(nonce == _useNonce(signer), "Votes: invalid nonce");
        _delegate(signer, delegatee);
    }

    /**
     * @dev Delegate all of `account`'s voting units to `delegatee`.
     *
     * Emits events {DelegateChanged} and {DelegateVotesChanged}.
     */
    function _delegate(address account, address delegatee) internal virtual {
        address oldDelegate = delegates(account);
        _delegation[account] = delegatee;

        emit DelegateChanged(account, oldDelegate, delegatee);
        _moveDelegateVotes(oldDelegate, delegatee, _getVotingUnits(account));
    }

    /**
     * @dev Transfers, mints, or burns voting units. To register a mint, `from` should be zero. To register a burn, `to`
     * should be zero. Total supply of voting units will be adjusted with mints and burns.
     */
    function _transferVotingUnits(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        if (from == address(0)) {
            _totalCheckpoints.push(_add, amount);
        }
        if (to == address(0)) {
            _totalCheckpoints.push(_subtract, amount);
        }
        _moveDelegateVotes(delegates(from), delegates(to), amount);
    }

    /**
     * @dev Moves delegated votes from one delegate to another.
     */
    function _moveDelegateVotes(
        address from,
        address to,
        uint256 amount
    ) private {
        if (from != to && amount > 0) {
            if (from != address(0)) {
                (uint256 oldValue, uint256 newValue) = _delegateCheckpoints[from].push(_subtract, amount);
                emit DelegateVotesChanged(from, oldValue, newValue);
            }
            if (to != address(0)) {
                (uint256 oldValue, uint256 newValue) = _delegateCheckpoints[to].push(_add, amount);
                emit DelegateVotesChanged(to, oldValue, newValue);
            }
        }
    }

    function _add(uint256 a, uint256 b) private pure returns (uint256) {
        return a + b;
    }

    function _subtract(uint256 a, uint256 b) private pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Consumes a nonce.
     *
     * Returns the current value and increments nonce.
     */
    function _useNonce(address owner) internal virtual returns (uint256 current) {
        Counters.Counter storage nonce = _nonces[owner];
        current = nonce.current();
        nonce.increment();
    }

    /**
     * @dev Returns an address nonce.
     */
    function nonces(address owner) public view virtual returns (uint256) {
        return _nonces[owner].current();
    }

    /**
     * @dev Returns the contract's {EIP712} domain separator.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32) {
        return _domainSeparatorV4();
    }

    /**
     * @dev Must return the voting units held by an account.
     */
    function _getVotingUnits(address) internal virtual returns (uint256);
}

File 6 of 23 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 7 of 23 : IShinyDescriptor.sol
// SPDX-License-Identifier: GPL-3.0

/// @title Interface for ShinyDescriptor

/*********************************
 * ・゚・゚✧.・・゚shiny.club・✫・゜・゚✧ *
 *********************************/

pragma solidity ^0.8.9;

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

interface IShinyDescriptor {
    event PartsLocked();

    function arePartsLocked() external returns (bool);

    function palettes(uint8 paletteIndex, uint256 colorIndex) external view returns (string memory);

    function backgrounds(uint256 index) external view returns (string memory);

    function bodies(uint256 index) external view returns (bytes memory);

    function accessories(uint256 index) external view returns (bytes memory);

    function heads(uint256 index) external view returns (bytes memory);

    function eyes(uint256 index) external view returns (bytes memory);

    function noses(uint256 index) external view returns (bytes memory);

    function mouths(uint256 index) external view returns (bytes memory);

    function shinyAccessories(uint256 index) external view returns (bytes memory);

    function backgroundCount() external view returns (uint256);

    function bodyCount() external view returns (uint256);

    function accessoryCount() external view returns (uint256);

    function headCount() external view returns (uint256);

    function eyesCount() external view returns (uint256);

    function nosesCount() external view returns (uint256);

    function mouthsCount() external view returns (uint256);

    function shinyAccessoriesCount() external view returns (uint256);

    function addManyColorsToPalette(uint8 paletteIndex, string[] calldata newColors) external;

    function addManyBackgrounds(string[] calldata backgrounds) external;

    function addManyBodies(bytes[] calldata bodies) external;

    function addManyAccessories(bytes[] calldata accessories) external;

    function addManyHeads(bytes[] calldata heads) external;

    function addManyEyes(bytes[] calldata eyes) external;

    function addManyNoses(bytes[] calldata noses) external;

    function addManyMouths(bytes[] calldata mouths) external;

    function addManyShinyAccessories(bytes[] calldata shinyAccessories) external;

    function addColorToPalette(uint8 paletteIndex, string calldata color) external;

    function addBackground(string calldata background) external;

    function addBody(bytes calldata body) external;

    function addAccessory(bytes calldata accessory) external;

    function addHead(bytes calldata head) external;

    function addEyes(bytes calldata eyes) external;

    function addNoses(bytes calldata noses) external;

    function addMouths(bytes calldata mouths) external;

    function lockParts() external;

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

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

    function genericDataURI(
        string calldata name,
        string calldata description,
        IShinySeeder.Seed memory seed,
        bool isShiny
    ) external view returns (string memory);

    function generateSVGImage(IShinySeeder.Seed memory seed) external view returns (string memory);
}

File 8 of 23 : IShinySeeder.sol
// SPDX-License-Identifier: GPL-3.0

/// @title Interface for ShinySeeder

/*********************************
 * ・゚・゚✧.・・゚shiny.club・✫・゜・゚✧ *
 *********************************/

pragma solidity ^0.8.9;

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

interface IShinySeeder {
    struct Seed {
        uint16 background;
        uint16 body;
        uint16 accessory;
        uint16 head;
        uint16 eyes;
        uint16 nose;
        uint16 mouth;
        uint16 shinyAccessory;
    }

    function generateSeedForMint(uint256 tokenId, IShinyDescriptor descriptor, bool isShiny) external view returns (Seed memory);

    function generateSeedWithValues(Seed memory newSeed,
                                    IShinyDescriptor descriptor,
                                    bool isShiny) external view returns (Seed memory);
}

File 9 of 23 : IShinyState.sol
// SPDX-License-Identifier: GPL-3.0

/// @title Interface for ShinyState

/*********************************
 * ・゚・゚✧.・・゚shiny.club・✫・゜・゚✧ *
 *********************************/

pragma solidity ^0.8.9;

interface IShinyState {
    struct State {
        bool isShiny;
        uint16 shinyChanceBasisPoints;
        uint256 mintedBlock;
        uint256 reconfigurationCount;
    }
}

File 10 of 23 : IShinyToken.sol
// SPDX-License-Identifier: GPL-3.0

/// @title Interface for ShinyToken

/*********************************
 * ・゚・゚✧.・・゚shiny.club・✫・゜・゚✧ *
 *********************************/

pragma solidity ^0.8.9;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import { IShinyDescriptor } from './IShinyDescriptor.sol';
import { IShinySeeder } from './IShinySeeder.sol';

interface IShinyToken is IERC721 {
    event ShinyCreated(uint256 indexed tokenId, IShinySeeder.Seed seed, uint16 shinyChanceBasisPoints);

    event ShinyReconfigured(uint256 indexed tokenId, IShinySeeder.Seed seed, uint256 reconfigurationCount);

    event ShinyRevealed(uint256 tokenId, bool isShiny);

    event MinterUpdated(address minter);

    event MinterLocked();

    event DescriptorUpdated(IShinyDescriptor descriptor);

    event DescriptorLocked();

    event SeederUpdated(IShinySeeder seeder);

    event SeederLocked();

    event ContractMetadataUpdated(string contractURI);

    function mint(address to, uint16 shinyChanceBasisPoints) external returns (uint256);

    function reconfigureShiny(uint256 tokenId, address owner, IShinySeeder.Seed memory newSeed) external returns (IShinySeeder.Seed memory);

    function revealShiny(uint256 tokenId) external returns (bool);

    function tokenShinyState(uint256 tokenId) external returns (bool);

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

    function setMinter(address minter) external;

    function lockMinter() external;

    function setDescriptor(IShinyDescriptor descriptor) external;

    function lockDescriptor() external;

    function setSeeder(IShinySeeder seeder) external;

    function lockSeeder() external;

    function totalVotingUnits() external returns (uint256);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 14 of 23 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @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
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

File 16 of 23 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 19 of 23 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        } else if (error == RecoverError.InvalidSignatureV) {
            revert("ECDSA: invalid signature 'v' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return tryRecover(hash, r, vs);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }
        if (v != 27 && v != 28) {
            return (address(0), RecoverError.InvalidSignatureV);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 20 of 23 : Checkpoints.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Checkpoints.sol)
pragma solidity ^0.8.0;

import "./math/Math.sol";
import "./math/SafeCast.sol";

/**
 * @dev This library defines the `History` struct, for checkpointing values as they change at different points in
 * time, and later looking up past values by block number. See {Votes} as an example.
 *
 * To create a history of checkpoints define a variable type `Checkpoints.History` in your contract, and store a new
 * checkpoint for the current transaction block using the {push} function.
 *
 * _Available since v4.5._
 */
library Checkpoints {
    struct Checkpoint {
        uint32 _blockNumber;
        uint224 _value;
    }

    struct History {
        Checkpoint[] _checkpoints;
    }

    /**
     * @dev Returns the value in the latest checkpoint, or zero if there are no checkpoints.
     */
    function latest(History storage self) internal view returns (uint256) {
        uint256 pos = self._checkpoints.length;
        return pos == 0 ? 0 : self._checkpoints[pos - 1]._value;
    }

    /**
     * @dev Returns the value at a given block number. If a checkpoint is not available at that block, the closest one
     * before it is returned, or zero otherwise.
     */
    function getAtBlock(History storage self, uint256 blockNumber) internal view returns (uint256) {
        require(blockNumber < block.number, "Checkpoints: block not yet mined");

        uint256 high = self._checkpoints.length;
        uint256 low = 0;
        while (low < high) {
            uint256 mid = Math.average(low, high);
            if (self._checkpoints[mid]._blockNumber > blockNumber) {
                high = mid;
            } else {
                low = mid + 1;
            }
        }
        return high == 0 ? 0 : self._checkpoints[high - 1]._value;
    }

    /**
     * @dev Pushes a value onto a History so that it is stored as the checkpoint for the current block.
     *
     * Returns previous value and new value.
     */
    function push(History storage self, uint256 value) internal returns (uint256, uint256) {
        uint256 pos = self._checkpoints.length;
        uint256 old = latest(self);
        if (pos > 0 && self._checkpoints[pos - 1]._blockNumber == block.number) {
            self._checkpoints[pos - 1]._value = SafeCast.toUint224(value);
        } else {
            self._checkpoints.push(
                Checkpoint({_blockNumber: SafeCast.toUint32(block.number), _value: SafeCast.toUint224(value)})
            );
        }
        return (old, value);
    }

    /**
     * @dev Pushes a value onto a History, by updating the latest value using binary operation `op`. The new value will
     * be set to `op(latest, delta)`.
     *
     * Returns previous value and new value.
     */
    function push(
        History storage self,
        function(uint256, uint256) view returns (uint256) op,
        uint256 delta
    ) internal returns (uint256, uint256) {
        return push(self, op(latest(self), delta));
    }
}

File 21 of 23 : IVotes.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (governance/utils/IVotes.sol)
pragma solidity ^0.8.0;

/**
 * @dev Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts.
 *
 * _Available since v4.5._
 */
interface IVotes {
    /**
     * @dev Emitted when an account changes their delegate.
     */
    event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate);

    /**
     * @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of votes.
     */
    event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance);

    /**
     * @dev Returns the current amount of votes that `account` has.
     */
    function getVotes(address account) external view returns (uint256);

    /**
     * @dev Returns the amount of votes that `account` had at the end of a past block (`blockNumber`).
     */
    function getPastVotes(address account, uint256 blockNumber) external view returns (uint256);

    /**
     * @dev Returns the total supply of votes available at the end of a past block (`blockNumber`).
     *
     * NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes.
     * Votes that have not been delegated are still part of total supply, even though they would not participate in a
     * vote.
     */
    function getPastTotalSupply(uint256 blockNumber) external view returns (uint256);

    /**
     * @dev Returns the delegate that `account` has chosen.
     */
    function delegates(address account) external view returns (address);

    /**
     * @dev Delegates votes from the sender to `delegatee`.
     */
    function delegate(address delegatee) external;

    /**
     * @dev Delegates votes from signer to `delegatee`.
     */
    function delegateBySig(
        address delegatee,
        uint256 nonce,
        uint256 expiry,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;
}

File 22 of 23 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

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

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

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

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

File 23 of 23 : SafeCast.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeCast.sol)

pragma solidity ^0.8.0;

/**
 * @dev Wrappers over Solidity's uintXX/intXX casting operators with added overflow
 * checks.
 *
 * Downcasting from uint256/int256 in Solidity does not revert on overflow. This can
 * easily result in undesired exploitation or bugs, since developers usually
 * assume that overflows raise errors. `SafeCast` restores this intuition by
 * reverting the transaction when such an operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 *
 * Can be combined with {SafeMath} and {SignedSafeMath} to extend it to smaller types, by performing
 * all math on `uint256` and `int256` and then downcasting.
 */
library SafeCast {
    /**
     * @dev Returns the downcasted uint224 from uint256, reverting on
     * overflow (when the input is greater than largest uint224).
     *
     * Counterpart to Solidity's `uint224` operator.
     *
     * Requirements:
     *
     * - input must fit into 224 bits
     */
    function toUint224(uint256 value) internal pure returns (uint224) {
        require(value <= type(uint224).max, "SafeCast: value doesn't fit in 224 bits");
        return uint224(value);
    }

    /**
     * @dev Returns the downcasted uint128 from uint256, reverting on
     * overflow (when the input is greater than largest uint128).
     *
     * Counterpart to Solidity's `uint128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     */
    function toUint128(uint256 value) internal pure returns (uint128) {
        require(value <= type(uint128).max, "SafeCast: value doesn't fit in 128 bits");
        return uint128(value);
    }

    /**
     * @dev Returns the downcasted uint96 from uint256, reverting on
     * overflow (when the input is greater than largest uint96).
     *
     * Counterpart to Solidity's `uint96` operator.
     *
     * Requirements:
     *
     * - input must fit into 96 bits
     */
    function toUint96(uint256 value) internal pure returns (uint96) {
        require(value <= type(uint96).max, "SafeCast: value doesn't fit in 96 bits");
        return uint96(value);
    }

    /**
     * @dev Returns the downcasted uint64 from uint256, reverting on
     * overflow (when the input is greater than largest uint64).
     *
     * Counterpart to Solidity's `uint64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     */
    function toUint64(uint256 value) internal pure returns (uint64) {
        require(value <= type(uint64).max, "SafeCast: value doesn't fit in 64 bits");
        return uint64(value);
    }

    /**
     * @dev Returns the downcasted uint32 from uint256, reverting on
     * overflow (when the input is greater than largest uint32).
     *
     * Counterpart to Solidity's `uint32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     */
    function toUint32(uint256 value) internal pure returns (uint32) {
        require(value <= type(uint32).max, "SafeCast: value doesn't fit in 32 bits");
        return uint32(value);
    }

    /**
     * @dev Returns the downcasted uint16 from uint256, reverting on
     * overflow (when the input is greater than largest uint16).
     *
     * Counterpart to Solidity's `uint16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     */
    function toUint16(uint256 value) internal pure returns (uint16) {
        require(value <= type(uint16).max, "SafeCast: value doesn't fit in 16 bits");
        return uint16(value);
    }

    /**
     * @dev Returns the downcasted uint8 from uint256, reverting on
     * overflow (when the input is greater than largest uint8).
     *
     * Counterpart to Solidity's `uint8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits.
     */
    function toUint8(uint256 value) internal pure returns (uint8) {
        require(value <= type(uint8).max, "SafeCast: value doesn't fit in 8 bits");
        return uint8(value);
    }

    /**
     * @dev Converts a signed int256 into an unsigned uint256.
     *
     * Requirements:
     *
     * - input must be greater than or equal to 0.
     */
    function toUint256(int256 value) internal pure returns (uint256) {
        require(value >= 0, "SafeCast: value must be positive");
        return uint256(value);
    }

    /**
     * @dev Returns the downcasted int128 from int256, reverting on
     * overflow (when the input is less than smallest int128 or
     * greater than largest int128).
     *
     * Counterpart to Solidity's `int128` operator.
     *
     * Requirements:
     *
     * - input must fit into 128 bits
     *
     * _Available since v3.1._
     */
    function toInt128(int256 value) internal pure returns (int128) {
        require(value >= type(int128).min && value <= type(int128).max, "SafeCast: value doesn't fit in 128 bits");
        return int128(value);
    }

    /**
     * @dev Returns the downcasted int64 from int256, reverting on
     * overflow (when the input is less than smallest int64 or
     * greater than largest int64).
     *
     * Counterpart to Solidity's `int64` operator.
     *
     * Requirements:
     *
     * - input must fit into 64 bits
     *
     * _Available since v3.1._
     */
    function toInt64(int256 value) internal pure returns (int64) {
        require(value >= type(int64).min && value <= type(int64).max, "SafeCast: value doesn't fit in 64 bits");
        return int64(value);
    }

    /**
     * @dev Returns the downcasted int32 from int256, reverting on
     * overflow (when the input is less than smallest int32 or
     * greater than largest int32).
     *
     * Counterpart to Solidity's `int32` operator.
     *
     * Requirements:
     *
     * - input must fit into 32 bits
     *
     * _Available since v3.1._
     */
    function toInt32(int256 value) internal pure returns (int32) {
        require(value >= type(int32).min && value <= type(int32).max, "SafeCast: value doesn't fit in 32 bits");
        return int32(value);
    }

    /**
     * @dev Returns the downcasted int16 from int256, reverting on
     * overflow (when the input is less than smallest int16 or
     * greater than largest int16).
     *
     * Counterpart to Solidity's `int16` operator.
     *
     * Requirements:
     *
     * - input must fit into 16 bits
     *
     * _Available since v3.1._
     */
    function toInt16(int256 value) internal pure returns (int16) {
        require(value >= type(int16).min && value <= type(int16).max, "SafeCast: value doesn't fit in 16 bits");
        return int16(value);
    }

    /**
     * @dev Returns the downcasted int8 from int256, reverting on
     * overflow (when the input is less than smallest int8 or
     * greater than largest int8).
     *
     * Counterpart to Solidity's `int8` operator.
     *
     * Requirements:
     *
     * - input must fit into 8 bits.
     *
     * _Available since v3.1._
     */
    function toInt8(int256 value) internal pure returns (int8) {
        require(value >= type(int8).min && value <= type(int8).max, "SafeCast: value doesn't fit in 8 bits");
        return int8(value);
    }

    /**
     * @dev Converts an unsigned uint256 into a signed int256.
     *
     * Requirements:
     *
     * - input must be less than or equal to maxInt256.
     */
    function toInt256(uint256 value) internal pure returns (int256) {
        // Note: Unsafe cast below is okay because `type(int256).max` is guaranteed to be positive
        require(value <= uint256(type(int256).max), "SafeCast: value doesn't fit in an int256");
        return int256(value);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_minter","type":"address"},{"internalType":"contract IShinyDescriptor","name":"_descriptor","type":"address"},{"internalType":"contract IShinySeeder","name":"_seeder","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"contractURI","type":"string"}],"name":"ContractMetadataUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegator","type":"address"},{"indexed":true,"internalType":"address","name":"fromDelegate","type":"address"},{"indexed":true,"internalType":"address","name":"toDelegate","type":"address"}],"name":"DelegateChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"delegate","type":"address"},{"indexed":false,"internalType":"uint256","name":"previousBalance","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newBalance","type":"uint256"}],"name":"DelegateVotesChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"DescriptorLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IShinyDescriptor","name":"descriptor","type":"address"}],"name":"DescriptorUpdated","type":"event"},{"anonymous":false,"inputs":[],"name":"MinterLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minter","type":"address"}],"name":"MinterUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[],"name":"SeederLocked","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"contract IShinySeeder","name":"seeder","type":"address"}],"name":"SeederUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint16","name":"background","type":"uint16"},{"internalType":"uint16","name":"body","type":"uint16"},{"internalType":"uint16","name":"accessory","type":"uint16"},{"internalType":"uint16","name":"head","type":"uint16"},{"internalType":"uint16","name":"eyes","type":"uint16"},{"internalType":"uint16","name":"nose","type":"uint16"},{"internalType":"uint16","name":"mouth","type":"uint16"},{"internalType":"uint16","name":"shinyAccessory","type":"uint16"}],"indexed":false,"internalType":"struct IShinySeeder.Seed","name":"seed","type":"tuple"},{"indexed":false,"internalType":"uint16","name":"shinyChanceBasisPoints","type":"uint16"}],"name":"ShinyCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint16","name":"background","type":"uint16"},{"internalType":"uint16","name":"body","type":"uint16"},{"internalType":"uint16","name":"accessory","type":"uint16"},{"internalType":"uint16","name":"head","type":"uint16"},{"internalType":"uint16","name":"eyes","type":"uint16"},{"internalType":"uint16","name":"nose","type":"uint16"},{"internalType":"uint16","name":"mouth","type":"uint16"},{"internalType":"uint16","name":"shinyAccessory","type":"uint16"}],"indexed":false,"internalType":"struct IShinySeeder.Seed","name":"seed","type":"tuple"},{"indexed":false,"internalType":"uint256","name":"reconfigurationCount","type":"uint256"}],"name":"ShinyReconfigured","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isShiny","type":"bool"}],"name":"ShinyRevealed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"dataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"}],"name":"delegate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"delegatee","type":"address"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"expiry","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"delegateBySig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"delegates","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"descriptor","outputs":[{"internalType":"contract IShinyDescriptor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPastTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"blockNumber","type":"uint256"}],"name":"getPastVotes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getVotes","outputs":[{"internalType":"uint256","name":"","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":[],"name":"isDescriptorLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMinterLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSeederLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockDescriptor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"lockSeeder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint16","name":"shinyChanceBasisPoints","type":"uint16"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"msgSender","type":"address"},{"components":[{"internalType":"uint16","name":"background","type":"uint16"},{"internalType":"uint16","name":"body","type":"uint16"},{"internalType":"uint16","name":"accessory","type":"uint16"},{"internalType":"uint16","name":"head","type":"uint16"},{"internalType":"uint16","name":"eyes","type":"uint16"},{"internalType":"uint16","name":"nose","type":"uint16"},{"internalType":"uint16","name":"mouth","type":"uint16"},{"internalType":"uint16","name":"shinyAccessory","type":"uint16"}],"internalType":"struct IShinySeeder.Seed","name":"newSeed","type":"tuple"}],"name":"reconfigureShiny","outputs":[{"components":[{"internalType":"uint16","name":"background","type":"uint16"},{"internalType":"uint16","name":"body","type":"uint16"},{"internalType":"uint16","name":"accessory","type":"uint16"},{"internalType":"uint16","name":"head","type":"uint16"},{"internalType":"uint16","name":"eyes","type":"uint16"},{"internalType":"uint16","name":"nose","type":"uint16"},{"internalType":"uint16","name":"mouth","type":"uint16"},{"internalType":"uint16","name":"shinyAccessory","type":"uint16"}],"internalType":"struct IShinySeeder.Seed","name":"","type":"tuple"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"revealShiny","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"seeder","outputs":[{"internalType":"contract IShinySeeder","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"seeds","outputs":[{"internalType":"uint16","name":"background","type":"uint16"},{"internalType":"uint16","name":"body","type":"uint16"},{"internalType":"uint16","name":"accessory","type":"uint16"},{"internalType":"uint16","name":"head","type":"uint16"},{"internalType":"uint16","name":"eyes","type":"uint16"},{"internalType":"uint16","name":"nose","type":"uint16"},{"internalType":"uint16","name":"mouth","type":"uint16"},{"internalType":"uint16","name":"shinyAccessory","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"contractURI_","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IShinyDescriptor","name":"_descriptor","type":"address"}],"name":"setDescriptor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"setMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IShinySeeder","name":"_seeder","type":"address"}],"name":"setSeeder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"shinyStates","outputs":[{"internalType":"bool","name":"isShiny","type":"bool"},{"internalType":"uint16","name":"shinyChanceBasisPoints","type":"uint16"},{"internalType":"uint256","name":"mintedBlock","type":"uint256"},{"internalType":"uint256","name":"reconfigurationCount","type":"uint256"}],"stateMutability":"view","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":"tokenId","type":"uint256"}],"name":"tokenShinyState","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalVotingUnits","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"}]

610160604081905260006101408190526200001d91600c916200023f565b503480156200002b57600080fd5b5060405162004d2a38038062004d2a8339810160408190526200004e91620002fe565b6040518060400160405280600981526020016829b434b73ca1b63ab160b91b815250604051806040016040528060018152602001603160f81b8152506040518060400160405280600981526020016829b434b73ca1b63ab160b91b8152506040518060400160405280600581526020016429a1a62aa160d91b8152508160009080519060200190620000e29291906200023f565b508051620000f89060019060208401906200023f565b505050620001156200010f620001e960201b60201c565b620001ed565b815160208084019190912082518383012060e08290526101008190524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f81880181905281830187905260608201869052608082019490945230818401528151808203909301835260c00190528051940193909320919290916080523060c052610120525050600d80546001600160a01b039687166001600160a01b031991821617909155600e8054958716958216959095179094555050600f80549190931691161790556200038f565b3390565b600680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200024d9062000352565b90600052602060002090601f016020900481019282620002715760008555620002bc565b82601f106200028c57805160ff1916838001178555620002bc565b82800160010185558215620002bc579182015b82811115620002bc5782518255916020019190600101906200029f565b50620002ca929150620002ce565b5090565b5b80821115620002ca5760008155600101620002cf565b6001600160a01b0381168114620002fb57600080fd5b50565b6000806000606084860312156200031457600080fd5b83516200032181620002e5565b60208501519093506200033481620002e5565b60408501519092506200034781620002e5565b809150509250925092565b600181811c908216806200036757607f821691505b602082108114156200038957634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e051610100516101205161494b620003df60003960006127a9015260006127f8015260006127d30152600061272c0152600061275601526000612780015261494b6000f3fe608060405234801561001057600080fd5b506004361061030a5760003560e01c8063768bb3a81161019c578063c1b8e4e1116100ee578063e8a3d48511610097578063f0503e8011610071578063f0503e80146106fc578063f2fde38b146107d7578063fca3b5aa146107ea57600080fd5b8063e8a3d48514610698578063e985e9c5146106a0578063ea93e490146106dc57600080fd5b8063c8fc0c23116100c8578063c8fc0c231461064b578063ca14f45514610672578063d50b31eb1461068557600080fd5b8063c1b8e4e1146105ff578063c3cda52014610625578063c87b56dd1461063857600080fd5b8063938e3d7b11610150578063a22cb4651161012a578063a22cb465146105c6578063ad0be4bd146105d9578063b88d4fde146105ec57600080fd5b8063938e3d7b1461059857806395d89b41146105ab5780639ab24eb0146105b357600080fd5b80637ecebe00116101815780637ecebe00146105615780638da5cb5b146105745780638e539e8c1461058557600080fd5b8063768bb3a8146104f757806376daebe11461055957600080fd5b80633a46b1a8116102605780635f295a671161020957806368ccb3e3116101e357806368ccb3e3146104d457806370a08231146104dc578063715018a6146104ef57600080fd5b80635f295a67146104a65780636352211e146104ae578063684931ed146104c157600080fd5b8063587cde1e1161023a578063587cde1e146104545780635ac1e3bb146104805780635c19a95c1461049357600080fd5b80633a46b1a81461042657806341b5d0de1461043957806342842e0e1461044157600080fd5b8063095ea7b3116102c25780632a4af3ee1161029c5780632a4af3ee146103ea578063303e74df146103fd5780633644e5151461041057600080fd5b8063095ea7b31461039f5780631e688e10146103b257806323b872dd146103d757600080fd5b806306fdde03116102f357806306fdde031461034c5780630754617214610361578063081812fc1461038c57600080fd5b806301b9a3971461030f57806301ffc9a714610324575b600080fd5b61032261031d366004613dc6565b6107fd565b005b610337610332366004613e11565b610935565b60405190151581526020015b60405180910390f35b610354610a1a565b6040516103439190613e86565b600d54610374906001600160a01b031681565b6040516001600160a01b039091168152602001610343565b61037461039a366004613e99565b610aac565b6103226103ad366004613eb2565b610b52565b600f546103379074010000000000000000000000000000000000000000900460ff1681565b6103226103e5366004613ede565b610c84565b6103376103f8366004613e99565b610d0b565b600e54610374906001600160a01b031681565b610418610dab565b604051908152602001610343565b610418610434366004613eb2565b610dba565b610322610de3565b61032261044f366004613ede565b610f14565b610374610462366004613dc6565b6001600160a01b039081166000908152600760205260409020541690565b61035461048e366004613e99565b610f2f565b6103226104a1366004613dc6565b611079565b610322611088565b6103746104bc366004613e99565b6111bb565b600f54610374906001600160a01b031681565b610418611246565b6104186104ea366004613dc6565b611250565b6103226112ea565b610534610505366004613e99565b60126020526000908152604090208054600182015460029092015460ff82169261010090920461ffff16919084565b60408051941515855261ffff9093166020850152918301526060820152608001610343565b610322611350565b61041861056f366004613dc6565b61147f565b6006546001600160a01b0316610374565b610418610593366004613e99565b61149d565b6103226105a6366004613fe5565b6114f9565b610354611597565b6104186105c1366004613dc6565b6115a6565b6103226105d436600461402e565b6115c7565b6104186105e736600461408c565b6115d2565b6103226105fa3660046140ba565b611667565b600f54610337907501000000000000000000000000000000000000000000900460ff1681565b61032261063336600461413a565b6116f5565b610354610646366004613e99565b61182b565b600f5461033790760100000000000000000000000000000000000000000000900460ff1681565b610337610680366004613e99565b611921565b610322610693366004613dc6565b611bb9565b610354611ce6565b6103376106ae36600461419c565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6106ef6106ea3660046141ca565b611cf5565b6040516103439190614234565b61078a61070a366004613e99565b60116020526000908152604090205461ffff808216916201000081048216916401000000008204811691660100000000000081048216916801000000000000000082048116916a010000000000000000000081048216916c0100000000000000000000000082048116916e01000000000000000000000000000090041688565b6040805161ffff998a16815297891660208901529588169587019590955292861660608601529085166080850152841660a0840152831660c083015290911660e082015261010001610343565b6103226107e5366004613dc6565b612199565b6103226107f8366004613dc6565b61227b565b6006546001600160a01b0316331461085c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600f547501000000000000000000000000000000000000000000900460ff16156108c85760405162461bcd60e51b815260206004820181905260248201527f5368696e79546f6b656e3a2044657363726970746f72206973206c6f636b65646044820152606401610853565b600e80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f6e66ab22238a5471005895947c8f57db923c2a9c9c73180eff80864c21295c1b906020015b60405180910390a150565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd0000000000000000000000000000000000000000000000000000000014806109c857507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610a1457507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b606060008054610a29906142a0565b80601f0160208091040260200160405190810160405280929190818152602001828054610a55906142a0565b8015610aa25780601f10610a7757610100808354040283529160200191610aa2565b820191906000526020600020905b815481529060010190602001808311610a8557829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610b365760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610853565b506000908152600460205260409020546001600160a01b031690565b6000610b5d826111bb565b9050806001600160a01b0316836001600160a01b03161415610be75760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610853565b336001600160a01b0382161480610c035750610c0381336106ae565b610c755760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610853565b610c7f83836123a6565b505050565b610c8e338261242c565b610d005760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610853565b610c7f838383612534565b6000818152600260205260408120546001600160a01b0316610d955760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610853565b5060009081526012602052604090205460ff1690565b6000610db561271f565b905090565b6001600160a01b0382166000908152600860205260408120610ddc9083612846565b9392505050565b6006546001600160a01b03163314610e3d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610853565b600f547501000000000000000000000000000000000000000000900460ff1615610ea95760405162461bcd60e51b815260206004820181905260248201527f5368696e79546f6b656e3a2044657363726970746f72206973206c6f636b65646044820152606401610853565b600f80547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790556040517f593e31e306c198bef259d839f7c6dc4ff7fc10c07f76fab193a210b03704105f90600090a1565b610c7f83838360405180602001604052806000815250611667565b6000818152600260205260409020546060906001600160a01b0316610fbc5760405162461bcd60e51b815260206004820152602b60248201527f5368696e79546f6b656e3a2055524920717565727920666f72206e6f6e65786960448201527f7374656e7420746f6b656e0000000000000000000000000000000000000000006064820152608401610853565b600e5460008381526011602090815260408083206012909252918290205491517fd6e3d97e0000000000000000000000000000000000000000000000000000000081526001600160a01b039093169263d6e3d97e92611025928792909160ff16906004016142ee565b60006040518083038186803b15801561103d57600080fd5b505afa158015611051573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a1491908101906143a0565b33611084818361297f565b5050565b6006546001600160a01b031633146110e25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610853565b600f54760100000000000000000000000000000000000000000000900460ff161561114f5760405162461bcd60e51b815260206004820152601c60248201527f5368696e79546f6b656e3a20536565646572206973206c6f636b6564000000006044820152606401610853565b600f80547fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff167601000000000000000000000000000000000000000000001790556040517ff59561f22794afcfb1e6be5c4733f5449fd167252a96b74bb06d341fb0dac7ed90600090a1565b6000818152600260205260408120546001600160a01b031680610a145760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610853565b6000610db5612a1f565b60006001600160a01b0382166112ce5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610853565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b031633146113445760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610853565b61134e6000612a2b565b565b6006546001600160a01b031633146113aa5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610853565b600f5474010000000000000000000000000000000000000000900460ff16156114155760405162461bcd60e51b815260206004820152601c60248201527f5368696e79546f6b656e3a204d696e746572206973206c6f636b6564000000006044820152606401610853565b600f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790556040517f192417b3f16b1ce69e0c59b0376549666650245ffc05e4b2569089dda8589b6690600090a1565b6001600160a01b0381166000908152600a6020526040812054610a14565b60004382106114ee5760405162461bcd60e51b815260206004820152601a60248201527f566f7465733a20626c6f636b206e6f7420796574206d696e65640000000000006044820152606401610853565b610a14600983612846565b6006546001600160a01b031633146115535760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610853565b805161156690600c906020840190613d21565b507f4bad971e573541e528d22030efb9d17c582463e49e6d0f0f0b26c9a7fd291ccd600c60405161092a9190614417565b606060018054610a29906142a0565b6001600160a01b0381166000908152600860205260408120610a1490612a95565b611084338383612b1b565b600d546000906001600160a01b0316336001600160a01b03161461165d5760405162461bcd60e51b8152602060048201526024808201527f5368696e79546f6b656e3a2053656e646572206973206e6f7420746865206d6960448201527f6e746572000000000000000000000000000000000000000000000000000000006064820152608401610853565b610ddc8383612c08565b611671338361242c565b6116e35760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610853565b6116ef84848484613020565b50505050565b834211156117455760405162461bcd60e51b815260206004820152601860248201527f566f7465733a207369676e6174757265206578706972656400000000000000006044820152606401610853565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b0388169181019190915260608101869052608081018590526000906117bf906117b79060a001604051602081830303815290604052805190602001206130a9565b858585613112565b90506117ca8161313a565b86146118185760405162461bcd60e51b815260206004820152601460248201527f566f7465733a20696e76616c6964206e6f6e63650000000000000000000000006044820152606401610853565b611822818861297f565b50505050505050565b6000818152600260205260409020546060906001600160a01b03166118b85760405162461bcd60e51b815260206004820152602b60248201527f5368696e79546f6b656e3a2055524920717565727920666f72206e6f6e65786960448201527f7374656e7420746f6b656e0000000000000000000000000000000000000000006064820152608401610853565b600e5460008381526011602090815260408083206012909252918290205491517f07d6e0b50000000000000000000000000000000000000000000000000000000081526001600160a01b03909316926307d6e0b592611025928792909160ff16906004016142ee565b6000818152600260205260408120546001600160a01b03166119ab5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610853565b60008281526012602052604081206001808201549192916119cb91614525565b905080431015611a435760405162461bcd60e51b815260206004820152603760248201527f5368696e79546f6b656e3a2072657665616c206d75737420776169742061742060448201527f6c65617374203120626c6f636b20706f73742d6d696e740000000000000000006064820152608401610853565b804080611ab85760405162461bcd60e51b815260206004820152602f60248201527f5368696e79546f6b656e3a20626c6f636b206e756d62657220697320746f6f2060448201527f66617220696e20746865207061737400000000000000000000000000000000006064820152608401610853565b604080516020808201849052818301889052825180830384018152606090920190925280519101208354610100900461ffff16611af76127108361456c565b11611b6b5783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001178455600086815260116020526040902080547fffffffffffffffffffffffffffffffff0000ffffffffffffffffffffffffffff166e0100000000000000000000000000001790555b83546040805188815260ff909216151560208301527f709aad71c189f3ce6c1566d78d9a8149df6b440ff67132e5542569b68a28668f910160405180910390a15050905460ff169392505050565b6006546001600160a01b03163314611c135760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610853565b600f54760100000000000000000000000000000000000000000000900460ff1615611c805760405162461bcd60e51b815260206004820152601c60248201527f5368696e79546f6b656e3a20536565646572206973206c6f636b6564000000006044820152606401610853565b600f80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fb3025222d01ce9a26c7f9d52bc3bfd0352366bd90a793c273fbfe1c81e0e288e9060200161092a565b6060600c8054610a29906142a0565b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810191909152600d546001600160a01b0316336001600160a01b031614611dbe5760405162461bcd60e51b8152602060048201526024808201527f5368696e79546f6b656e3a2053656e646572206973206e6f7420746865206d6960448201527f6e746572000000000000000000000000000000000000000000000000000000006064820152608401610853565b6000848152601260205260409020611ddd610100840160e08501614580565b61ffff1615611e6257805460ff161515600114611e625760405162461bcd60e51b815260206004820152603c60248201527f5368696e79546f6b656e3a2063616e6e6f74206368616e6765207368696e794160448201527f63636573736f727920666f72206e6f6e2d7368696e7920746f6b656e000000006064820152608401610853565b600f54600e5482546040517f3dfbf8870000000000000000000000000000000000000000000000000000000081526000936001600160a01b0390811693633dfbf88793611ebd938a939092169160ff9091169060040161459d565b6101006040518083038186803b158015611ed657600080fd5b505afa158015611eea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f0e9190614671565b60008781526011602090815260408083208451815493860151928601516060870151608088015160a089015160c08a015160e08b015161ffff9081166e010000000000000000000000000000027fffffffffffffffffffffffffffffffff0000ffffffffffffffffffffffffffff9282166c0100000000000000000000000002929092167fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff9382166a0100000000000000000000027fffffffffffffffffffffffffffffffffffffffff0000ffffffffffffffffffff9583166801000000000000000002959095167fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff9683166601000000000000027fffffffffffffffffffffffffffffffffffffffffffffffff0000ffffffffffff98841664010000000002989098167fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff9b841662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000909d1693909916929092179a909a1798909816959095179390931791909116949094179390931792909216929092171790556002840180549293506001929091906120e8908490614525565b90915550506001600160a01b0385166000908152601060205260408120805460019290612116908490614525565b9091555061212990506000866001613162565b6001600160a01b038581166000908152600760205260409020541661215257612152858661297f565b857f1e6b80782a438543dcb43e9cb7f6ef0c7b44cfe074ecb4a3c751ce36d88cd5c382846002015460405161218892919061473b565b60405180910390a295945050505050565b6006546001600160a01b031633146121f35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610853565b6001600160a01b03811661226f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610853565b61227881612a2b565b50565b6006546001600160a01b031633146122d55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610853565b600f5474010000000000000000000000000000000000000000900460ff16156123405760405162461bcd60e51b815260206004820152601c60248201527f5368696e79546f6b656e3a204d696e746572206973206c6f636b6564000000006044820152606401610853565b600d80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fad0f299ec81a386c98df0ac27dae11dd020ed1b56963c53a7292e7a3a314539a9060200161092a565b600081815260046020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03841690811790915581906123f3826111bb565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166124b65760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610853565b60006124c1836111bb565b9050806001600160a01b0316846001600160a01b031614806124fc5750836001600160a01b03166124f184610aac565b6001600160a01b0316145b8061252c57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612547826111bb565b6001600160a01b0316146125c35760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610853565b6001600160a01b03821661263e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610853565b6126496000826123a6565b6001600160a01b03831660009081526003602052604081208054600192906126729084906147b5565b90915550506001600160a01b03821660009081526003602052604081208054600192906126a0908490614525565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610c7f8383836131d2565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561277857507f000000000000000000000000000000000000000000000000000000000000000046145b156127a257507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b60004382106128975760405162461bcd60e51b815260206004820181905260248201527f436865636b706f696e74733a20626c6f636b206e6f7420796574206d696e65646044820152606401610853565b825460005b818110156128fc5760006128b0828461327d565b9050848660000182815481106128c8576128c86147cc565b60009182526020909120015463ffffffff1611156128e8578092506128f6565b6128f3816001614525565b91505b5061289c565b8115612955578461290e6001846147b5565b8154811061291e5761291e6147cc565b60009182526020909120015464010000000090047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16612958565b60005b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1695945050505050565b6001600160a01b0382811660008181526007602052604080822080548686167fffffffffffffffffffffffff0000000000000000000000000000000000000000821681179092559151919094169392849290917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4610c7f8183612a1a866001600160a01b031660009081526010602052604090205490565b613298565b6000610db56009612a95565b600680546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80546000908015612af35782612aac6001836147b5565b81548110612abc57612abc6147cc565b60009182526020909120015464010000000090047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16612af6565b60005b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169392505050565b816001600160a01b0316836001600160a01b03161415612b7d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610853565b6001600160a01b0383811660008181526005602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600080612c14600b5490565b9050612c24600b80546001019055565b60008361ffff1661271014612c3a576000612c3d565b60015b6040805160808101825282151580825261ffff8881166020808501918252438587019081526000606087018181528b825260129093528781209651875494517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000009095169015157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ff16176101009490951693909302939093178555915160018501559051600290930192909255600f54600e5493517f801328cc000000000000000000000000000000000000000000000000000000008152600481018890526001600160a01b03948516602482015260448101929092529394509092919091169063801328cc906064016101006040518083038186803b158015612d5f57600080fd5b505afa158015612d73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d979190614671565b6011600085815260200190815260200160002060008201518160000160006101000a81548161ffff021916908361ffff16021790555060208201518160000160026101000a81548161ffff021916908361ffff16021790555060408201518160000160046101000a81548161ffff021916908361ffff16021790555060608201518160000160066101000a81548161ffff021916908361ffff16021790555060808201518160000160086101000a81548161ffff021916908361ffff16021790555060a082015181600001600a6101000a81548161ffff021916908361ffff16021790555060c082015181600001600c6101000a81548161ffff021916908361ffff16021790555060e082015181600001600e6101000a81548161ffff021916908361ffff1602179055509050604051806101000160405290816000820160009054906101000a900461ffff1661ffff1661ffff1681526020016000820160029054906101000a900461ffff1661ffff1661ffff1681526020016000820160049054906101000a900461ffff1661ffff1661ffff1681526020016000820160069054906101000a900461ffff1661ffff1661ffff1681526020016000820160089054906101000a900461ffff1661ffff1661ffff16815260200160008201600a9054906101000a900461ffff1661ffff1661ffff16815260200160008201600c9054906101000a900461ffff1661ffff1661ffff16815260200160008201600e9054906101000a900461ffff1661ffff1661ffff16815250509050612fdc86846133d5565b827fab4eb24ace9cf4a41523d1c8674356f48151363cb120961cac4313265602e847828760405161300e9291906147fb565b60405180910390a25090949350505050565b61302b848484612534565b613037848484846133ef565b6116ef5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610853565b6000610a146130b661271f565b836040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061312387878787613599565b9150915061313081613686565b5095945050505050565b6001600160a01b0381166000908152600a602052604090208054600181018255905b50919050565b6001600160a01b0383166131815761317e600961387783613883565b50505b6001600160a01b0382166131a05761319d60096138b183613883565b50505b6001600160a01b03838116600090815260076020526040808220548584168352912054610c7f92918216911683613298565b6000818152601260209081526040808320600201546001600160a01b03871684526010909252822080549192909161320b9084906147b5565b90915550506001600160a01b0382161561325e576000818152601260209081526040808320600201546001600160a01b038616845260109092528220805491929091613258908490614525565b90915550505b600081815260126020526040902060020154610c7f9084908490613162565b600061328c6002848418614879565b610ddc90848416614525565b816001600160a01b0316836001600160a01b0316141580156132ba5750600081115b15610c7f576001600160a01b03831615613348576001600160a01b038316600090815260086020526040812081906132f5906138b185613883565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724838360405161333d929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615610c7f576001600160a01b0382166000908152600860205260408120819061337e9061387785613883565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72483836040516133c6929190918252602082015260400190565b60405180910390a25050505050565b6110848282604051806020016040528060008152506138bd565b60006001600160a01b0384163b15613591576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a029061344c90339089908890889060040161488d565b602060405180830381600087803b15801561346657600080fd5b505af1925050508015613496575060408051601f3d908101601f19168201909252613493918101906148c9565b60015b613546573d8080156134c4576040519150601f19603f3d011682016040523d82523d6000602084013e6134c9565b606091505b50805161353e5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610853565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061252c565b50600161252c565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156135d0575060009050600361367d565b8460ff16601b141580156135e857508460ff16601c14155b156135f9575060009050600461367d565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561364d573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166136765760006001925092505061367d565b9150600090505b94509492505050565b600081600481111561369a5761369a6148e6565b14156136a35750565b60018160048111156136b7576136b76148e6565b14156137055760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610853565b6002816004811115613719576137196148e6565b14156137675760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610853565b600381600481111561377b5761377b6148e6565b14156137ef5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610853565b6004816004811115613803576138036148e6565b14156122785760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610853565b6000610ddc8284614525565b6000806138a5856138a061389688612a95565b868863ffffffff16565b613946565b91509150935093915050565b6000610ddc82846147b5565b6138c78383613aab565b6138d460008484846133ef565b610c7f5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610853565b815460009081908161395786612a95565b9050600082118015613995575043866139716001856147b5565b81548110613981576139816147cc565b60009182526020909120015463ffffffff16145b15613a1f576139a385613c0d565b866139af6001856147b5565b815481106139bf576139bf6147cc565b9060005260206000200160000160046101000a8154817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff02191690837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff160217905550613aa2565b856000016040518060400160405280613a3743613ca5565b63ffffffff168152602001613a4b88613c0d565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b95939450505050565b6001600160a01b038216613b015760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610853565b6000818152600260205260409020546001600160a01b031615613b665760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610853565b6001600160a01b0382166000908152600360205260408120805460019290613b8f908490614525565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4611084600083836131d2565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff821115613ca15760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203260448201527f32342062697473000000000000000000000000000000000000000000000000006064820152608401610853565b5090565b600063ffffffff821115613ca15760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201527f32206269747300000000000000000000000000000000000000000000000000006064820152608401610853565b828054613d2d906142a0565b90600052602060002090601f016020900481019282613d4f5760008555613d95565b82601f10613d6857805160ff1916838001178555613d95565b82800160010185558215613d95579182015b82811115613d95578251825591602001919060010190613d7a565b50613ca19291505b80821115613ca15760008155600101613d9d565b6001600160a01b038116811461227857600080fd5b600060208284031215613dd857600080fd5b8135610ddc81613db1565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461227857600080fd5b600060208284031215613e2357600080fd5b8135610ddc81613de3565b60005b83811015613e49578181015183820152602001613e31565b838111156116ef5750506000910152565b60008151808452613e72816020860160208601613e2e565b601f01601f19169290920160200192915050565b602081526000610ddc6020830184613e5a565b600060208284031215613eab57600080fd5b5035919050565b60008060408385031215613ec557600080fd5b8235613ed081613db1565b946020939093013593505050565b600080600060608486031215613ef357600080fd5b8335613efe81613db1565b92506020840135613f0e81613db1565b929592945050506040919091013590565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613f7757613f77613f1f565b604052919050565b600067ffffffffffffffff821115613f9957613f99613f1f565b50601f01601f191660200190565b6000613fba613fb584613f7f565b613f4e565b9050828152838383011115613fce57600080fd5b828260208301376000602084830101529392505050565b600060208284031215613ff757600080fd5b813567ffffffffffffffff81111561400e57600080fd5b8201601f8101841361401f57600080fd5b61252c84823560208401613fa7565b6000806040838503121561404157600080fd5b823561404c81613db1565b91506020830135801515811461406157600080fd5b809150509250929050565b61ffff8116811461227857600080fd5b80356140878161406c565b919050565b6000806040838503121561409f57600080fd5b82356140aa81613db1565b915060208301356140618161406c565b600080600080608085870312156140d057600080fd5b84356140db81613db1565b935060208501356140eb81613db1565b925060408501359150606085013567ffffffffffffffff81111561410e57600080fd5b8501601f8101871361411f57600080fd5b61412e87823560208401613fa7565b91505092959194509250565b60008060008060008060c0878903121561415357600080fd5b863561415e81613db1565b95506020870135945060408701359350606087013560ff8116811461418257600080fd5b9598949750929560808101359460a0909101359350915050565b600080604083850312156141af57600080fd5b82356141ba81613db1565b9150602083013561406181613db1565b60008060008385036101408112156141e157600080fd5b8435935060208501356141f381613db1565b92506101007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08201121561422657600080fd5b506040840190509250925092565b6101008101610a14828461ffff8082511683528060208301511660208401528060408301511660408401528060608301511660608401528060808301511660808401528060a08301511660a08401528060c08301511660c08401528060e08301511660e0840152505050565b600181811c908216806142b457607f821691505b6020821081141561315c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b838152825461ffff8082166020840152601082901c811660408401526101408301919061432660608501828460201c1661ffff169052565b61433b60808501828460301c1661ffff169052565b61435060a08501828460401c1661ffff169052565b61436560c08501828460501c1661ffff169052565b61437a60e08501828460601c1661ffff169052565b6143906101008501828460701c1661ffff169052565b505082151561012083015261252c565b6000602082840312156143b257600080fd5b815167ffffffffffffffff8111156143c957600080fd5b8201601f810184136143da57600080fd5b80516143e8613fb582613f7f565b8181528560208385010111156143fd57600080fd5b61440e826020830160208601613e2e565b95945050505050565b600060208083526000845481600182811c91508083168061443957607f831692505b858310811415614470577f4e487b710000000000000000000000000000000000000000000000000000000085526022600452602485fd5b87860183815260200181801561448d57600181146144bc576144e7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008616825287820196506144e7565b60008b81526020902060005b868110156144e1578154848201529085019089016144c8565b83019750505b50949998505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115614538576145386144f6565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261457b5761457b61453d565b500690565b60006020828403121561459257600080fd5b8135610ddc8161406c565b610140810184356145ad8161406c565b61ffff90811683526020860135906145c48261406c565b1660208301526145d66040860161407c565b61ffff1660408301526145eb6060860161407c565b61ffff1660608301526146006080860161407c565b61ffff16608083015261461560a0860161407c565b61ffff1660a083015261462a60c0860161407c565b61ffff1660c083015261463f60e0860161407c565b61ffff1660e08301526001600160a01b03841661010083015282151561012083015261252c565b80516140878161406c565b600061010080838503121561468557600080fd5b6040519081019067ffffffffffffffff821181831017156146a8576146a8613f1f565b81604052835191506146b98261406c565b8181526146c860208501614666565b60208201526146d960408501614666565b60408201526146ea60608501614666565b60608201526146fb60808501614666565b608082015261470c60a08501614666565b60a082015261471d60c08501614666565b60c082015261472e60e08501614666565b60e0820152949350505050565b61012081016147a7828561ffff8082511683528060208301511660208401528060408301511660408401528060608301511660608401528060808301511660808401528060a08301511660a08401528060c08301511660c08401528060e08301511660e0840152505050565b826101008301529392505050565b6000828210156147c7576147c76144f6565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6101208101614867828561ffff8082511683528060208301511660208401528060408301511660408401528060608301511660608401528060808301511660808401528060a08301511660a08401528060c08301511660c08401528060e08301511660e0840152505050565b61ffff83166101008301529392505050565b6000826148885761488861453d565b500490565b60006001600160a01b038087168352808616602084015250836040830152608060608301526148bf6080830184613e5a565b9695505050505050565b6000602082840312156148db57600080fd5b8151610ddc81613de3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea26469706673582212205e507a4e8c5fb1ba1563a570201431539fa172c65d8adad9d34c7ef51d188fe864736f6c634300080900330000000000000000000000006109daa49fe6c55f3870031123b00c5ac189e7d5000000000000000000000000d5ea493519496db32308e27ddf41b18ea72fe2e500000000000000000000000099dca73f6afbe03c91dad22a8144a2316531d256

Deployed Bytecode

0x608060405234801561001057600080fd5b506004361061030a5760003560e01c8063768bb3a81161019c578063c1b8e4e1116100ee578063e8a3d48511610097578063f0503e8011610071578063f0503e80146106fc578063f2fde38b146107d7578063fca3b5aa146107ea57600080fd5b8063e8a3d48514610698578063e985e9c5146106a0578063ea93e490146106dc57600080fd5b8063c8fc0c23116100c8578063c8fc0c231461064b578063ca14f45514610672578063d50b31eb1461068557600080fd5b8063c1b8e4e1146105ff578063c3cda52014610625578063c87b56dd1461063857600080fd5b8063938e3d7b11610150578063a22cb4651161012a578063a22cb465146105c6578063ad0be4bd146105d9578063b88d4fde146105ec57600080fd5b8063938e3d7b1461059857806395d89b41146105ab5780639ab24eb0146105b357600080fd5b80637ecebe00116101815780637ecebe00146105615780638da5cb5b146105745780638e539e8c1461058557600080fd5b8063768bb3a8146104f757806376daebe11461055957600080fd5b80633a46b1a8116102605780635f295a671161020957806368ccb3e3116101e357806368ccb3e3146104d457806370a08231146104dc578063715018a6146104ef57600080fd5b80635f295a67146104a65780636352211e146104ae578063684931ed146104c157600080fd5b8063587cde1e1161023a578063587cde1e146104545780635ac1e3bb146104805780635c19a95c1461049357600080fd5b80633a46b1a81461042657806341b5d0de1461043957806342842e0e1461044157600080fd5b8063095ea7b3116102c25780632a4af3ee1161029c5780632a4af3ee146103ea578063303e74df146103fd5780633644e5151461041057600080fd5b8063095ea7b31461039f5780631e688e10146103b257806323b872dd146103d757600080fd5b806306fdde03116102f357806306fdde031461034c5780630754617214610361578063081812fc1461038c57600080fd5b806301b9a3971461030f57806301ffc9a714610324575b600080fd5b61032261031d366004613dc6565b6107fd565b005b610337610332366004613e11565b610935565b60405190151581526020015b60405180910390f35b610354610a1a565b6040516103439190613e86565b600d54610374906001600160a01b031681565b6040516001600160a01b039091168152602001610343565b61037461039a366004613e99565b610aac565b6103226103ad366004613eb2565b610b52565b600f546103379074010000000000000000000000000000000000000000900460ff1681565b6103226103e5366004613ede565b610c84565b6103376103f8366004613e99565b610d0b565b600e54610374906001600160a01b031681565b610418610dab565b604051908152602001610343565b610418610434366004613eb2565b610dba565b610322610de3565b61032261044f366004613ede565b610f14565b610374610462366004613dc6565b6001600160a01b039081166000908152600760205260409020541690565b61035461048e366004613e99565b610f2f565b6103226104a1366004613dc6565b611079565b610322611088565b6103746104bc366004613e99565b6111bb565b600f54610374906001600160a01b031681565b610418611246565b6104186104ea366004613dc6565b611250565b6103226112ea565b610534610505366004613e99565b60126020526000908152604090208054600182015460029092015460ff82169261010090920461ffff16919084565b60408051941515855261ffff9093166020850152918301526060820152608001610343565b610322611350565b61041861056f366004613dc6565b61147f565b6006546001600160a01b0316610374565b610418610593366004613e99565b61149d565b6103226105a6366004613fe5565b6114f9565b610354611597565b6104186105c1366004613dc6565b6115a6565b6103226105d436600461402e565b6115c7565b6104186105e736600461408c565b6115d2565b6103226105fa3660046140ba565b611667565b600f54610337907501000000000000000000000000000000000000000000900460ff1681565b61032261063336600461413a565b6116f5565b610354610646366004613e99565b61182b565b600f5461033790760100000000000000000000000000000000000000000000900460ff1681565b610337610680366004613e99565b611921565b610322610693366004613dc6565b611bb9565b610354611ce6565b6103376106ae36600461419c565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6106ef6106ea3660046141ca565b611cf5565b6040516103439190614234565b61078a61070a366004613e99565b60116020526000908152604090205461ffff808216916201000081048216916401000000008204811691660100000000000081048216916801000000000000000082048116916a010000000000000000000081048216916c0100000000000000000000000082048116916e01000000000000000000000000000090041688565b6040805161ffff998a16815297891660208901529588169587019590955292861660608601529085166080850152841660a0840152831660c083015290911660e082015261010001610343565b6103226107e5366004613dc6565b612199565b6103226107f8366004613dc6565b61227b565b6006546001600160a01b0316331461085c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b600f547501000000000000000000000000000000000000000000900460ff16156108c85760405162461bcd60e51b815260206004820181905260248201527f5368696e79546f6b656e3a2044657363726970746f72206973206c6f636b65646044820152606401610853565b600e80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527f6e66ab22238a5471005895947c8f57db923c2a9c9c73180eff80864c21295c1b906020015b60405180910390a150565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd0000000000000000000000000000000000000000000000000000000014806109c857507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610a1457507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff000000000000000000000000000000000000000000000000000000008316145b92915050565b606060008054610a29906142a0565b80601f0160208091040260200160405190810160405280929190818152602001828054610a55906142a0565b8015610aa25780601f10610a7757610100808354040283529160200191610aa2565b820191906000526020600020905b815481529060010190602001808311610a8557829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610b365760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610853565b506000908152600460205260409020546001600160a01b031690565b6000610b5d826111bb565b9050806001600160a01b0316836001600160a01b03161415610be75760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610853565b336001600160a01b0382161480610c035750610c0381336106ae565b610c755760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610853565b610c7f83836123a6565b505050565b610c8e338261242c565b610d005760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610853565b610c7f838383612534565b6000818152600260205260408120546001600160a01b0316610d955760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610853565b5060009081526012602052604090205460ff1690565b6000610db561271f565b905090565b6001600160a01b0382166000908152600860205260408120610ddc9083612846565b9392505050565b6006546001600160a01b03163314610e3d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610853565b600f547501000000000000000000000000000000000000000000900460ff1615610ea95760405162461bcd60e51b815260206004820181905260248201527f5368696e79546f6b656e3a2044657363726970746f72206973206c6f636b65646044820152606401610853565b600f80547fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff1675010000000000000000000000000000000000000000001790556040517f593e31e306c198bef259d839f7c6dc4ff7fc10c07f76fab193a210b03704105f90600090a1565b610c7f83838360405180602001604052806000815250611667565b6000818152600260205260409020546060906001600160a01b0316610fbc5760405162461bcd60e51b815260206004820152602b60248201527f5368696e79546f6b656e3a2055524920717565727920666f72206e6f6e65786960448201527f7374656e7420746f6b656e0000000000000000000000000000000000000000006064820152608401610853565b600e5460008381526011602090815260408083206012909252918290205491517fd6e3d97e0000000000000000000000000000000000000000000000000000000081526001600160a01b039093169263d6e3d97e92611025928792909160ff16906004016142ee565b60006040518083038186803b15801561103d57600080fd5b505afa158015611051573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610a1491908101906143a0565b33611084818361297f565b5050565b6006546001600160a01b031633146110e25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610853565b600f54760100000000000000000000000000000000000000000000900460ff161561114f5760405162461bcd60e51b815260206004820152601c60248201527f5368696e79546f6b656e3a20536565646572206973206c6f636b6564000000006044820152606401610853565b600f80547fffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffff167601000000000000000000000000000000000000000000001790556040517ff59561f22794afcfb1e6be5c4733f5449fd167252a96b74bb06d341fb0dac7ed90600090a1565b6000818152600260205260408120546001600160a01b031680610a145760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610853565b6000610db5612a1f565b60006001600160a01b0382166112ce5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610853565b506001600160a01b031660009081526003602052604090205490565b6006546001600160a01b031633146113445760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610853565b61134e6000612a2b565b565b6006546001600160a01b031633146113aa5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610853565b600f5474010000000000000000000000000000000000000000900460ff16156114155760405162461bcd60e51b815260206004820152601c60248201527f5368696e79546f6b656e3a204d696e746572206973206c6f636b6564000000006044820152606401610853565b600f80547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff16740100000000000000000000000000000000000000001790556040517f192417b3f16b1ce69e0c59b0376549666650245ffc05e4b2569089dda8589b6690600090a1565b6001600160a01b0381166000908152600a6020526040812054610a14565b60004382106114ee5760405162461bcd60e51b815260206004820152601a60248201527f566f7465733a20626c6f636b206e6f7420796574206d696e65640000000000006044820152606401610853565b610a14600983612846565b6006546001600160a01b031633146115535760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610853565b805161156690600c906020840190613d21565b507f4bad971e573541e528d22030efb9d17c582463e49e6d0f0f0b26c9a7fd291ccd600c60405161092a9190614417565b606060018054610a29906142a0565b6001600160a01b0381166000908152600860205260408120610a1490612a95565b611084338383612b1b565b600d546000906001600160a01b0316336001600160a01b03161461165d5760405162461bcd60e51b8152602060048201526024808201527f5368696e79546f6b656e3a2053656e646572206973206e6f7420746865206d6960448201527f6e746572000000000000000000000000000000000000000000000000000000006064820152608401610853565b610ddc8383612c08565b611671338361242c565b6116e35760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610853565b6116ef84848484613020565b50505050565b834211156117455760405162461bcd60e51b815260206004820152601860248201527f566f7465733a207369676e6174757265206578706972656400000000000000006044820152606401610853565b604080517fe48329057bfd03d55e49b547132e39cffd9c1820ad7b9d4c5307691425d15adf60208201526001600160a01b0388169181019190915260608101869052608081018590526000906117bf906117b79060a001604051602081830303815290604052805190602001206130a9565b858585613112565b90506117ca8161313a565b86146118185760405162461bcd60e51b815260206004820152601460248201527f566f7465733a20696e76616c6964206e6f6e63650000000000000000000000006044820152606401610853565b611822818861297f565b50505050505050565b6000818152600260205260409020546060906001600160a01b03166118b85760405162461bcd60e51b815260206004820152602b60248201527f5368696e79546f6b656e3a2055524920717565727920666f72206e6f6e65786960448201527f7374656e7420746f6b656e0000000000000000000000000000000000000000006064820152608401610853565b600e5460008381526011602090815260408083206012909252918290205491517f07d6e0b50000000000000000000000000000000000000000000000000000000081526001600160a01b03909316926307d6e0b592611025928792909160ff16906004016142ee565b6000818152600260205260408120546001600160a01b03166119ab5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610853565b60008281526012602052604081206001808201549192916119cb91614525565b905080431015611a435760405162461bcd60e51b815260206004820152603760248201527f5368696e79546f6b656e3a2072657665616c206d75737420776169742061742060448201527f6c65617374203120626c6f636b20706f73742d6d696e740000000000000000006064820152608401610853565b804080611ab85760405162461bcd60e51b815260206004820152602f60248201527f5368696e79546f6b656e3a20626c6f636b206e756d62657220697320746f6f2060448201527f66617220696e20746865207061737400000000000000000000000000000000006064820152608401610853565b604080516020808201849052818301889052825180830384018152606090920190925280519101208354610100900461ffff16611af76127108361456c565b11611b6b5783547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001178455600086815260116020526040902080547fffffffffffffffffffffffffffffffff0000ffffffffffffffffffffffffffff166e0100000000000000000000000000001790555b83546040805188815260ff909216151560208301527f709aad71c189f3ce6c1566d78d9a8149df6b440ff67132e5542569b68a28668f910160405180910390a15050905460ff169392505050565b6006546001600160a01b03163314611c135760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610853565b600f54760100000000000000000000000000000000000000000000900460ff1615611c805760405162461bcd60e51b815260206004820152601c60248201527f5368696e79546f6b656e3a20536565646572206973206c6f636b6564000000006044820152606401610853565b600f80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fb3025222d01ce9a26c7f9d52bc3bfd0352366bd90a793c273fbfe1c81e0e288e9060200161092a565b6060600c8054610a29906142a0565b6040805161010081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e0810191909152600d546001600160a01b0316336001600160a01b031614611dbe5760405162461bcd60e51b8152602060048201526024808201527f5368696e79546f6b656e3a2053656e646572206973206e6f7420746865206d6960448201527f6e746572000000000000000000000000000000000000000000000000000000006064820152608401610853565b6000848152601260205260409020611ddd610100840160e08501614580565b61ffff1615611e6257805460ff161515600114611e625760405162461bcd60e51b815260206004820152603c60248201527f5368696e79546f6b656e3a2063616e6e6f74206368616e6765207368696e794160448201527f63636573736f727920666f72206e6f6e2d7368696e7920746f6b656e000000006064820152608401610853565b600f54600e5482546040517f3dfbf8870000000000000000000000000000000000000000000000000000000081526000936001600160a01b0390811693633dfbf88793611ebd938a939092169160ff9091169060040161459d565b6101006040518083038186803b158015611ed657600080fd5b505afa158015611eea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f0e9190614671565b60008781526011602090815260408083208451815493860151928601516060870151608088015160a089015160c08a015160e08b015161ffff9081166e010000000000000000000000000000027fffffffffffffffffffffffffffffffff0000ffffffffffffffffffffffffffff9282166c0100000000000000000000000002929092167fffffffffffffffffffffffffffffffff00000000ffffffffffffffffffffffff9382166a0100000000000000000000027fffffffffffffffffffffffffffffffffffffffff0000ffffffffffffffffffff9583166801000000000000000002959095167fffffffffffffffffffffffffffffffffffffffff00000000ffffffffffffffff9683166601000000000000027fffffffffffffffffffffffffffffffffffffffffffffffff0000ffffffffffff98841664010000000002989098167fffffffffffffffffffffffffffffffffffffffffffffffff00000000ffffffff9b841662010000027fffffffffffffffffffffffffffffffffffffffffffffffffffffffff00000000909d1693909916929092179a909a1798909816959095179390931791909116949094179390931792909216929092171790556002840180549293506001929091906120e8908490614525565b90915550506001600160a01b0385166000908152601060205260408120805460019290612116908490614525565b9091555061212990506000866001613162565b6001600160a01b038581166000908152600760205260409020541661215257612152858661297f565b857f1e6b80782a438543dcb43e9cb7f6ef0c7b44cfe074ecb4a3c751ce36d88cd5c382846002015460405161218892919061473b565b60405180910390a295945050505050565b6006546001600160a01b031633146121f35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610853565b6001600160a01b03811661226f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610853565b61227881612a2b565b50565b6006546001600160a01b031633146122d55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610853565b600f5474010000000000000000000000000000000000000000900460ff16156123405760405162461bcd60e51b815260206004820152601c60248201527f5368696e79546f6b656e3a204d696e746572206973206c6f636b6564000000006044820152606401610853565b600d80547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040519081527fad0f299ec81a386c98df0ac27dae11dd020ed1b56963c53a7292e7a3a314539a9060200161092a565b600081815260046020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03841690811790915581906123f3826111bb565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166124b65760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610853565b60006124c1836111bb565b9050806001600160a01b0316846001600160a01b031614806124fc5750836001600160a01b03166124f184610aac565b6001600160a01b0316145b8061252c57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316612547826111bb565b6001600160a01b0316146125c35760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610853565b6001600160a01b03821661263e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610853565b6126496000826123a6565b6001600160a01b03831660009081526003602052604081208054600192906126729084906147b5565b90915550506001600160a01b03821660009081526003602052604081208054600192906126a0908490614525565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610c7f8383836131d2565b6000306001600160a01b037f0000000000000000000000009f4303fd6f46f65cfc79ef715b40a29ced57731b1614801561277857507f000000000000000000000000000000000000000000000000000000000000000146145b156127a257507f8da7cf6dfbb2f9fa36ea5c2c2889c27f28472313130d41182b727d2bf1b3856690565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527fd8205bfdd9053e42d127b95cf53d5e7f7ff99ffea752ff980d5f32e85fd222e1828401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b60004382106128975760405162461bcd60e51b815260206004820181905260248201527f436865636b706f696e74733a20626c6f636b206e6f7420796574206d696e65646044820152606401610853565b825460005b818110156128fc5760006128b0828461327d565b9050848660000182815481106128c8576128c86147cc565b60009182526020909120015463ffffffff1611156128e8578092506128f6565b6128f3816001614525565b91505b5061289c565b8115612955578461290e6001846147b5565b8154811061291e5761291e6147cc565b60009182526020909120015464010000000090047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16612958565b60005b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1695945050505050565b6001600160a01b0382811660008181526007602052604080822080548686167fffffffffffffffffffffffff0000000000000000000000000000000000000000821681179092559151919094169392849290917f3134e8a2e6d97e929a7e54011ea5485d7d196dd5f0ba4d4ef95803e8e3fc257f9190a4610c7f8183612a1a866001600160a01b031660009081526010602052604090205490565b613298565b6000610db56009612a95565b600680546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b80546000908015612af35782612aac6001836147b5565b81548110612abc57612abc6147cc565b60009182526020909120015464010000000090047bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16612af6565b60005b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff169392505050565b816001600160a01b0316836001600160a01b03161415612b7d5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610853565b6001600160a01b0383811660008181526005602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b600080612c14600b5490565b9050612c24600b80546001019055565b60008361ffff1661271014612c3a576000612c3d565b60015b6040805160808101825282151580825261ffff8881166020808501918252438587019081526000606087018181528b825260129093528781209651875494517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000009095169015157fffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000ff16176101009490951693909302939093178555915160018501559051600290930192909255600f54600e5493517f801328cc000000000000000000000000000000000000000000000000000000008152600481018890526001600160a01b03948516602482015260448101929092529394509092919091169063801328cc906064016101006040518083038186803b158015612d5f57600080fd5b505afa158015612d73573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d979190614671565b6011600085815260200190815260200160002060008201518160000160006101000a81548161ffff021916908361ffff16021790555060208201518160000160026101000a81548161ffff021916908361ffff16021790555060408201518160000160046101000a81548161ffff021916908361ffff16021790555060608201518160000160066101000a81548161ffff021916908361ffff16021790555060808201518160000160086101000a81548161ffff021916908361ffff16021790555060a082015181600001600a6101000a81548161ffff021916908361ffff16021790555060c082015181600001600c6101000a81548161ffff021916908361ffff16021790555060e082015181600001600e6101000a81548161ffff021916908361ffff1602179055509050604051806101000160405290816000820160009054906101000a900461ffff1661ffff1661ffff1681526020016000820160029054906101000a900461ffff1661ffff1661ffff1681526020016000820160049054906101000a900461ffff1661ffff1661ffff1681526020016000820160069054906101000a900461ffff1661ffff1661ffff1681526020016000820160089054906101000a900461ffff1661ffff1661ffff16815260200160008201600a9054906101000a900461ffff1661ffff1661ffff16815260200160008201600c9054906101000a900461ffff1661ffff1661ffff16815260200160008201600e9054906101000a900461ffff1661ffff1661ffff16815250509050612fdc86846133d5565b827fab4eb24ace9cf4a41523d1c8674356f48151363cb120961cac4313265602e847828760405161300e9291906147fb565b60405180910390a25090949350505050565b61302b848484612534565b613037848484846133ef565b6116ef5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610853565b6000610a146130b661271f565b836040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061312387878787613599565b9150915061313081613686565b5095945050505050565b6001600160a01b0381166000908152600a602052604090208054600181018255905b50919050565b6001600160a01b0383166131815761317e600961387783613883565b50505b6001600160a01b0382166131a05761319d60096138b183613883565b50505b6001600160a01b03838116600090815260076020526040808220548584168352912054610c7f92918216911683613298565b6000818152601260209081526040808320600201546001600160a01b03871684526010909252822080549192909161320b9084906147b5565b90915550506001600160a01b0382161561325e576000818152601260209081526040808320600201546001600160a01b038616845260109092528220805491929091613258908490614525565b90915550505b600081815260126020526040902060020154610c7f9084908490613162565b600061328c6002848418614879565b610ddc90848416614525565b816001600160a01b0316836001600160a01b0316141580156132ba5750600081115b15610c7f576001600160a01b03831615613348576001600160a01b038316600090815260086020526040812081906132f5906138b185613883565b91509150846001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a724838360405161333d929190918252602082015260400190565b60405180910390a250505b6001600160a01b03821615610c7f576001600160a01b0382166000908152600860205260408120819061337e9061387785613883565b91509150836001600160a01b03167fdec2bacdd2f05b59de34da9b523dff8be42e5e38e818c82fdb0bae774387a72483836040516133c6929190918252602082015260400190565b60405180910390a25050505050565b6110848282604051806020016040528060008152506138bd565b60006001600160a01b0384163b15613591576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a029061344c90339089908890889060040161488d565b602060405180830381600087803b15801561346657600080fd5b505af1925050508015613496575060408051601f3d908101601f19168201909252613493918101906148c9565b60015b613546573d8080156134c4576040519150601f19603f3d011682016040523d82523d6000602084013e6134c9565b606091505b50805161353e5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610853565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a020000000000000000000000000000000000000000000000000000000014905061252c565b50600161252c565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156135d0575060009050600361367d565b8460ff16601b141580156135e857508460ff16601c14155b156135f9575060009050600461367d565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561364d573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166136765760006001925092505061367d565b9150600090505b94509492505050565b600081600481111561369a5761369a6148e6565b14156136a35750565b60018160048111156136b7576136b76148e6565b14156137055760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610853565b6002816004811115613719576137196148e6565b14156137675760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610853565b600381600481111561377b5761377b6148e6565b14156137ef5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610853565b6004816004811115613803576138036148e6565b14156122785760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f75650000000000000000000000000000000000000000000000000000000000006064820152608401610853565b6000610ddc8284614525565b6000806138a5856138a061389688612a95565b868863ffffffff16565b613946565b91509150935093915050565b6000610ddc82846147b5565b6138c78383613aab565b6138d460008484846133ef565b610c7f5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610853565b815460009081908161395786612a95565b9050600082118015613995575043866139716001856147b5565b81548110613981576139816147cc565b60009182526020909120015463ffffffff16145b15613a1f576139a385613c0d565b866139af6001856147b5565b815481106139bf576139bf6147cc565b9060005260206000200160000160046101000a8154817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff02191690837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff160217905550613aa2565b856000016040518060400160405280613a3743613ca5565b63ffffffff168152602001613a4b88613c0d565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff90811690915282546001810184556000938452602093849020835194909301519091166401000000000263ffffffff909316929092179101555b95939450505050565b6001600160a01b038216613b015760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610853565b6000818152600260205260409020546001600160a01b031615613b665760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610853565b6001600160a01b0382166000908152600360205260408120805460019290613b8f908490614525565b909155505060008181526002602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4611084600083836131d2565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff821115613ca15760405162461bcd60e51b815260206004820152602760248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203260448201527f32342062697473000000000000000000000000000000000000000000000000006064820152608401610853565b5090565b600063ffffffff821115613ca15760405162461bcd60e51b815260206004820152602660248201527f53616665436173743a2076616c756520646f65736e27742066697420696e203360448201527f32206269747300000000000000000000000000000000000000000000000000006064820152608401610853565b828054613d2d906142a0565b90600052602060002090601f016020900481019282613d4f5760008555613d95565b82601f10613d6857805160ff1916838001178555613d95565b82800160010185558215613d95579182015b82811115613d95578251825591602001919060010190613d7a565b50613ca19291505b80821115613ca15760008155600101613d9d565b6001600160a01b038116811461227857600080fd5b600060208284031215613dd857600080fd5b8135610ddc81613db1565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461227857600080fd5b600060208284031215613e2357600080fd5b8135610ddc81613de3565b60005b83811015613e49578181015183820152602001613e31565b838111156116ef5750506000910152565b60008151808452613e72816020860160208601613e2e565b601f01601f19169290920160200192915050565b602081526000610ddc6020830184613e5a565b600060208284031215613eab57600080fd5b5035919050565b60008060408385031215613ec557600080fd5b8235613ed081613db1565b946020939093013593505050565b600080600060608486031215613ef357600080fd5b8335613efe81613db1565b92506020840135613f0e81613db1565b929592945050506040919091013590565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715613f7757613f77613f1f565b604052919050565b600067ffffffffffffffff821115613f9957613f99613f1f565b50601f01601f191660200190565b6000613fba613fb584613f7f565b613f4e565b9050828152838383011115613fce57600080fd5b828260208301376000602084830101529392505050565b600060208284031215613ff757600080fd5b813567ffffffffffffffff81111561400e57600080fd5b8201601f8101841361401f57600080fd5b61252c84823560208401613fa7565b6000806040838503121561404157600080fd5b823561404c81613db1565b91506020830135801515811461406157600080fd5b809150509250929050565b61ffff8116811461227857600080fd5b80356140878161406c565b919050565b6000806040838503121561409f57600080fd5b82356140aa81613db1565b915060208301356140618161406c565b600080600080608085870312156140d057600080fd5b84356140db81613db1565b935060208501356140eb81613db1565b925060408501359150606085013567ffffffffffffffff81111561410e57600080fd5b8501601f8101871361411f57600080fd5b61412e87823560208401613fa7565b91505092959194509250565b60008060008060008060c0878903121561415357600080fd5b863561415e81613db1565b95506020870135945060408701359350606087013560ff8116811461418257600080fd5b9598949750929560808101359460a0909101359350915050565b600080604083850312156141af57600080fd5b82356141ba81613db1565b9150602083013561406181613db1565b60008060008385036101408112156141e157600080fd5b8435935060208501356141f381613db1565b92506101007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc08201121561422657600080fd5b506040840190509250925092565b6101008101610a14828461ffff8082511683528060208301511660208401528060408301511660408401528060608301511660608401528060808301511660808401528060a08301511660a08401528060c08301511660c08401528060e08301511660e0840152505050565b600181811c908216806142b457607f821691505b6020821081141561315c577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b838152825461ffff8082166020840152601082901c811660408401526101408301919061432660608501828460201c1661ffff169052565b61433b60808501828460301c1661ffff169052565b61435060a08501828460401c1661ffff169052565b61436560c08501828460501c1661ffff169052565b61437a60e08501828460601c1661ffff169052565b6143906101008501828460701c1661ffff169052565b505082151561012083015261252c565b6000602082840312156143b257600080fd5b815167ffffffffffffffff8111156143c957600080fd5b8201601f810184136143da57600080fd5b80516143e8613fb582613f7f565b8181528560208385010111156143fd57600080fd5b61440e826020830160208601613e2e565b95945050505050565b600060208083526000845481600182811c91508083168061443957607f831692505b858310811415614470577f4e487b710000000000000000000000000000000000000000000000000000000085526022600452602485fd5b87860183815260200181801561448d57600181146144bc576144e7565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008616825287820196506144e7565b60008b81526020902060005b868110156144e1578154848201529085019089016144c8565b83019750505b50949998505050505050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008219821115614538576145386144f6565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261457b5761457b61453d565b500690565b60006020828403121561459257600080fd5b8135610ddc8161406c565b610140810184356145ad8161406c565b61ffff90811683526020860135906145c48261406c565b1660208301526145d66040860161407c565b61ffff1660408301526145eb6060860161407c565b61ffff1660608301526146006080860161407c565b61ffff16608083015261461560a0860161407c565b61ffff1660a083015261462a60c0860161407c565b61ffff1660c083015261463f60e0860161407c565b61ffff1660e08301526001600160a01b03841661010083015282151561012083015261252c565b80516140878161406c565b600061010080838503121561468557600080fd5b6040519081019067ffffffffffffffff821181831017156146a8576146a8613f1f565b81604052835191506146b98261406c565b8181526146c860208501614666565b60208201526146d960408501614666565b60408201526146ea60608501614666565b60608201526146fb60808501614666565b608082015261470c60a08501614666565b60a082015261471d60c08501614666565b60c082015261472e60e08501614666565b60e0820152949350505050565b61012081016147a7828561ffff8082511683528060208301511660208401528060408301511660408401528060608301511660608401528060808301511660808401528060a08301511660a08401528060c08301511660c08401528060e08301511660e0840152505050565b826101008301529392505050565b6000828210156147c7576147c76144f6565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b6101208101614867828561ffff8082511683528060208301511660208401528060408301511660408401528060608301511660608401528060808301511660808401528060a08301511660a08401528060c08301511660c08401528060e08301511660e0840152505050565b61ffff83166101008301529392505050565b6000826148885761488861453d565b500490565b60006001600160a01b038087168352808616602084015250836040830152608060608301526148bf6080830184613e5a565b9695505050505050565b6000602082840312156148db57600080fd5b8151610ddc81613de3565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea26469706673582212205e507a4e8c5fb1ba1563a570201431539fa172c65d8adad9d34c7ef51d188fe864736f6c63430008090033

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

0000000000000000000000006109daa49fe6c55f3870031123b00c5ac189e7d5000000000000000000000000d5ea493519496db32308e27ddf41b18ea72fe2e500000000000000000000000099dca73f6afbe03c91dad22a8144a2316531d256

-----Decoded View---------------
Arg [0] : _minter (address): 0x6109Daa49FE6C55F3870031123b00C5AC189e7D5
Arg [1] : _descriptor (address): 0xd5EA493519496DB32308e27DdF41B18EA72fE2E5
Arg [2] : _seeder (address): 0x99dCa73f6aFbe03C91Dad22a8144A2316531d256

-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000006109daa49fe6c55f3870031123b00c5ac189e7d5
Arg [1] : 000000000000000000000000d5ea493519496db32308e27ddf41b18ea72fe2e5
Arg [2] : 00000000000000000000000099dca73f6afbe03c91dad22a8144a2316531d256


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ 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.