ETH Price: $2,459.72 (-3.69%)
Gas: 2.27 Gwei

Token

Metamorphoses (MMP)
 

Overview

Max Total Supply

21 MMP

Holders

16

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
ttc.eth
Balance
3 MMP
0x2fcC020F72E5d2EdD2a24D04f3Dc90D7fDFbD1DD
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:
MMP

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 100 runs

Other Settings:
default evmVersion
File 1 of 39 : MMP.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;

// ooo        ooooo ooo        ooooo ooooooooo.
// `88.       .888' `88.       .888' `888   `Y88.
//  888b     d'888   888b     d'888   888   .d88'
//  8 Y88. .P  888   8 Y88. .P  888   888ooo88P'
//  8  `888'   888   8  `888'   888   888
//  8    Y     888   8    Y     888   888
// o8o        o888o o8o        o888o o888o

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Royalty.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Base64.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "operator-filter-registry/src/DefaultOperatorFilterer.sol";
import "@chainlink/contracts/src/v0.8/ChainlinkClient.sol";

contract MMP is ERC721, ERC721URIStorage, ERC721Enumerable, ERC721Royalty, Ownable, DefaultOperatorFilterer, PaymentSplitter, ChainlinkClient, ReentrancyGuard {
    error InvalidPrice(address emitter);
    error SaleNotStarted(address emitter);
    error SoldOut(address emitter);
    error EtherTransferFail(address emitter);

    event Sold(address indexed to, uint256 price, uint256 tokenId);
    event MetadataUpdate(uint256 _tokenId);
    event StableDilutionMetadataRequested(uint256 _tokenId);
    event StableDilutionMetadataReceived(uint256 _tokenId);
    event PermanentURI(string _value, uint256 indexed _id);

    using Strings for uint256;
    using Chainlink for Chainlink.Request;

    uint256 public constant getExpiryTime = 5 minutes;

    uint256 private constant STARTING_INDEX = 0;
    uint256 public constant MAX_SUPPLY = 101;
    uint256 public constant AUCTION_PRICE_CHANGE_TIME = 10 minutes;
    uint256[] public AUCTION_PRICES = [0.48 ether, 0.41 ether, 0.36 ether, 0.31 ether, 0.26 ether, 0.23 ether, 0.19 ether];

    bool metadataFrozen = false;
    bool preminted = false;
    uint256 private currentMintTokenId = STARTING_INDEX;

    string public placeholderTokenUri;
    string public baseUri;
    uint256 public saleStartTime;

    bytes32 private jobId;
    uint256 private fee;

    mapping(bytes32 => uint256) requestToTokenId;
    mapping(bytes32 => uint256) requestToExpiration;
    mapping(uint256 => bytes32) tokenIdToRequest;

    struct ChainlinkInformation {
        address chainlinkToken;
        address chainlinkOracle;
        bytes32 jobId;
        uint256 fee;
    }

    constructor(
        string memory _name,
        string memory _symbol,
        string memory _placeholderTokenUri,
        string memory _baseUri,
        uint256 _saleStartTime,
        address _royalReceiver,
        uint96 _royalFeeNumerator,
        address[] memory payees,
        uint256[] memory shares_,
        ChainlinkInformation memory chainlinkInformation
    ) payable ERC721(_name, _symbol) PaymentSplitter(payees, shares_) {
        placeholderTokenUri = _placeholderTokenUri;
        baseUri = _baseUri;
        saleStartTime = _saleStartTime;

        if (_royalReceiver != address(0)) {
            _setDefaultRoyalty(_royalReceiver, _royalFeeNumerator);
        }

        setChainlinkToken(chainlinkInformation.chainlinkToken);
        setChainlinkOracle(chainlinkInformation.chainlinkOracle);
        jobId = chainlinkInformation.jobId;
        fee = chainlinkInformation.fee;
    }

    function preMint(address to) public onlyOwner {
        if (totalSupply() >= MAX_SUPPLY) revert SoldOut(address(this));
        require(!preminted, "Only one premint is allowed");
        preminted = true;
        mintInternal(to);
    }

    function mint() nonReentrant public payable {
        if (totalSupply() >= MAX_SUPPLY) revert SoldOut(address(this));
        if (block.timestamp < saleStartTime) {
            revert SaleNotStarted(address(this));
        }

        uint256 price = currentPrice();
        if (msg.value < price) revert InvalidPrice(address(this));
        uint256 refund = msg.value - price;
        if(refund > 0) {
            (bool success, ) = msg.sender.call{value:refund}("");
            require(success, "Refund failed");
        }
        emit Sold(msg.sender, price, currentMintTokenId);
        mintInternal(msg.sender);
    }

    function setLinkFee(uint256 _fee) public onlyOwner {
        fee = _fee;
    }

    function mintInternal(address to) private {
        _safeMint(to, currentMintTokenId);
        requestStableDilutionMetadata(currentMintTokenId, to);
        _setTokenURI(currentMintTokenId, placeholderTokenUri);
        ++currentMintTokenId;
    }

    function currentPrice() public view returns (uint256) {
        if (block.timestamp < saleStartTime)
            return AUCTION_PRICES[0];

        uint256 index = (block.timestamp - saleStartTime) / AUCTION_PRICE_CHANGE_TIME;
        uint256 priceIndex = index >= AUCTION_PRICES.length ? AUCTION_PRICES.length - 1 : index;
        return AUCTION_PRICES[priceIndex];
    }

    function auctionPrices() public view returns (uint256[] memory) {
        uint256 priceCount = AUCTION_PRICES.length;
        uint256[] memory _prices = new uint256[](priceCount);
        for (uint256 i; i < priceCount; ++i) {
            _prices[i] = AUCTION_PRICES[i];
        }
        return _prices;
    }

    function requestStableDilutionMetadata(uint256 tokenId, address to) private returns (bytes32 requestId) {
        emit StableDilutionMetadataRequested(tokenId);

        Chainlink.Request memory req = buildChainlinkRequest(
            jobId,
            address(this),
            this.fulfill.selector
        );

        req.add(
            "get",
                string(abi.encodePacked(baseUri, Strings.toString(tokenId), "/", Strings.toHexString(uint256(uint160(to)), 20)))
        );

        req.add("path", "metadataUrl");
        requestId = sendChainlinkRequest(req, fee);
        requestToTokenId[requestId] = tokenId;
        requestToExpiration[requestId] = block.timestamp + getExpiryTime;
        tokenIdToRequest[tokenId] = requestId;
    }

    function cancelPendingChainlinkRequests(
    ) public onlyOwner {
        for(uint256 tokenId = STARTING_INDEX; tokenId < totalSupply() + STARTING_INDEX; tokenId++) {
            bytes32 requestId = tokenIdToRequest[tokenId];
            if(requestId != 0 && block.timestamp > requestToExpiration[requestId]) {
                cancelChainlinkRequest(requestId, fee, this.fulfill.selector, requestToExpiration[requestId]);
                tokenIdToRequest[tokenId] = 0;
                requestToExpiration[requestId] = 0;
            }
        }
    }

    function fulfill(
        bytes32 _requestId,
        string memory _metadataUri
    ) public virtual recordChainlinkFulfillment(_requestId) {

        uint256 tokenId = requestToTokenId[_requestId];
        tokenIdToRequest[tokenId] = 0;
        requestToExpiration[_requestId] = 0;

        emit StableDilutionMetadataReceived(tokenId);
        _setTokenURI(tokenId, _metadataUri);
        emit MetadataUpdate(tokenId);
    }

    function withdrawLink() public onlyOwner {
        LinkTokenInterface link = LinkTokenInterface(chainlinkTokenAddress());
        require(
            link.transfer(msg.sender, link.balanceOf(address(this))),
            "Unable to transfer"
        );
    }

    function setSaleStartTime(uint256 _saleStartTime) public onlyOwner {
        saleStartTime = _saleStartTime;
    }

    function setBaseUri(string memory _baseUri) public onlyOwner {
        baseUri = _baseUri;
    }

    function setPlaceholderUri(string memory _placeholderTokenUri) public onlyOwner {
        placeholderTokenUri = _placeholderTokenUri;
    }

    function freezeMetadata() public onlyOwner() {
        require(metadataFrozen == false, "Metadata already frozen");
        metadataFrozen = true;
        for (uint256 i = STARTING_INDEX; i < totalSupply() + STARTING_INDEX; ++i) {
            emit PermanentURI(tokenURI(i), i);
        }
    }

    function setTokenUri(uint256[] calldata tokenIds, string[] calldata _metadataUris) public onlyOwner {
        require(metadataFrozen == false, "Metadata frozen");
        require(tokenIds.length == _metadataUris.length, "Arrays need to be same size");
        for(uint256 i=0;i<tokenIds.length;i++) {
            _setTokenURI(tokenIds[i], _metadataUris[i]);
            emit MetadataUpdate(tokenIds[i]);
        }
    }

    function tokenURI(uint256 tokenId)
    public
    view
    override(ERC721, ERC721URIStorage)
    returns (string memory)
    {
        return super.tokenURI(tokenId);
    }

    function setDefaultRoyalty(address receiver, uint96 feeNumerator) public onlyOwner {
        super._setDefaultRoyalty(receiver, feeNumerator);
    }

    function _beforeTokenTransfer(address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize)
    internal
    override(ERC721, ERC721Enumerable)
    {
        super._beforeTokenTransfer(from, to, firstTokenId, batchSize);
    }

    function _burn(uint256 tokenId) internal override(ERC721, ERC721Royalty, ERC721URIStorage) {
        super._burn(tokenId);
    }

    function supportsInterface(bytes4 interfaceId)
    public
    view
    override(ERC721, ERC721Royalty, ERC721Enumerable)
    returns (bool)
    {
        return super.supportsInterface(interfaceId);
    }

    function setApprovalForAll(address operator, bool approved) public override(ERC721, IERC721) onlyAllowedOperatorApproval(operator) {
        super.setApprovalForAll(operator, approved);
    }

    function approve(address operator, uint256 tokenId) public override(ERC721, IERC721) onlyAllowedOperatorApproval(operator) {
        super.approve(operator, tokenId);
    }

    function transferFrom(address from, address to, uint256 tokenId) public override(ERC721, IERC721) onlyAllowedOperator(from) {
        super.transferFrom(from, to, tokenId);
    }

    function safeTransferFrom(address from, address to, uint256 tokenId) public override(ERC721, IERC721) onlyAllowedOperator(from) {
        super.safeTransferFrom(from, to, tokenId);
    }

    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
    public
    override(ERC721, IERC721)
    onlyAllowedOperator(from)
    {
        super.safeTransferFrom(from, to, tokenId, data);
    }
}

File 2 of 39 : Chainlink.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import {CBORChainlink} from "./vendor/CBORChainlink.sol";
import {BufferChainlink} from "./vendor/BufferChainlink.sol";

/**
 * @title Library for common Chainlink functions
 * @dev Uses imported CBOR library for encoding to buffer
 */
library Chainlink {
  uint256 internal constant defaultBufferSize = 256; // solhint-disable-line const-name-snakecase

  using CBORChainlink for BufferChainlink.buffer;

  struct Request {
    bytes32 id;
    address callbackAddress;
    bytes4 callbackFunctionId;
    uint256 nonce;
    BufferChainlink.buffer buf;
  }

  /**
   * @notice Initializes a Chainlink request
   * @dev Sets the ID, callback address, and callback function signature on the request
   * @param self The uninitialized request
   * @param jobId The Job Specification ID
   * @param callbackAddr The callback address
   * @param callbackFunc The callback function signature
   * @return The initialized request
   */
  function initialize(
    Request memory self,
    bytes32 jobId,
    address callbackAddr,
    bytes4 callbackFunc
  ) internal pure returns (Chainlink.Request memory) {
    BufferChainlink.init(self.buf, defaultBufferSize);
    self.id = jobId;
    self.callbackAddress = callbackAddr;
    self.callbackFunctionId = callbackFunc;
    return self;
  }

  /**
   * @notice Sets the data for the buffer without encoding CBOR on-chain
   * @dev CBOR can be closed with curly-brackets {} or they can be left off
   * @param self The initialized request
   * @param data The CBOR data
   */
  function setBuffer(Request memory self, bytes memory data) internal pure {
    BufferChainlink.init(self.buf, data.length);
    BufferChainlink.append(self.buf, data);
  }

  /**
   * @notice Adds a string value to the request with a given key name
   * @param self The initialized request
   * @param key The name of the key
   * @param value The string value to add
   */
  function add(
    Request memory self,
    string memory key,
    string memory value
  ) internal pure {
    self.buf.encodeString(key);
    self.buf.encodeString(value);
  }

  /**
   * @notice Adds a bytes value to the request with a given key name
   * @param self The initialized request
   * @param key The name of the key
   * @param value The bytes value to add
   */
  function addBytes(
    Request memory self,
    string memory key,
    bytes memory value
  ) internal pure {
    self.buf.encodeString(key);
    self.buf.encodeBytes(value);
  }

  /**
   * @notice Adds a int256 value to the request with a given key name
   * @param self The initialized request
   * @param key The name of the key
   * @param value The int256 value to add
   */
  function addInt(
    Request memory self,
    string memory key,
    int256 value
  ) internal pure {
    self.buf.encodeString(key);
    self.buf.encodeInt(value);
  }

  /**
   * @notice Adds a uint256 value to the request with a given key name
   * @param self The initialized request
   * @param key The name of the key
   * @param value The uint256 value to add
   */
  function addUint(
    Request memory self,
    string memory key,
    uint256 value
  ) internal pure {
    self.buf.encodeString(key);
    self.buf.encodeUInt(value);
  }

  /**
   * @notice Adds an array of strings to the request with a given key name
   * @param self The initialized request
   * @param key The name of the key
   * @param values The array of string values to add
   */
  function addStringArray(
    Request memory self,
    string memory key,
    string[] memory values
  ) internal pure {
    self.buf.encodeString(key);
    self.buf.startArray();
    for (uint256 i = 0; i < values.length; i++) {
      self.buf.encodeString(values[i]);
    }
    self.buf.endSequence();
  }
}

File 3 of 39 : ChainlinkClient.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./Chainlink.sol";
import "./interfaces/ENSInterface.sol";
import "./interfaces/LinkTokenInterface.sol";
import "./interfaces/ChainlinkRequestInterface.sol";
import "./interfaces/OperatorInterface.sol";
import "./interfaces/PointerInterface.sol";
import {ENSResolver as ENSResolver_Chainlink} from "./vendor/ENSResolver.sol";

/**
 * @title The ChainlinkClient contract
 * @notice Contract writers can inherit this contract in order to create requests for the
 * Chainlink network
 */
abstract contract ChainlinkClient {
  using Chainlink for Chainlink.Request;

  uint256 internal constant LINK_DIVISIBILITY = 10**18;
  uint256 private constant AMOUNT_OVERRIDE = 0;
  address private constant SENDER_OVERRIDE = address(0);
  uint256 private constant ORACLE_ARGS_VERSION = 1;
  uint256 private constant OPERATOR_ARGS_VERSION = 2;
  bytes32 private constant ENS_TOKEN_SUBNAME = keccak256("link");
  bytes32 private constant ENS_ORACLE_SUBNAME = keccak256("oracle");
  address private constant LINK_TOKEN_POINTER = 0xC89bD4E1632D3A43CB03AAAd5262cbe4038Bc571;

  ENSInterface private s_ens;
  bytes32 private s_ensNode;
  LinkTokenInterface private s_link;
  OperatorInterface private s_oracle;
  uint256 private s_requestCount = 1;
  mapping(bytes32 => address) private s_pendingRequests;

  event ChainlinkRequested(bytes32 indexed id);
  event ChainlinkFulfilled(bytes32 indexed id);
  event ChainlinkCancelled(bytes32 indexed id);

  /**
   * @notice Creates a request that can hold additional parameters
   * @param specId The Job Specification ID that the request will be created for
   * @param callbackAddr address to operate the callback on
   * @param callbackFunctionSignature function signature to use for the callback
   * @return A Chainlink Request struct in memory
   */
  function buildChainlinkRequest(
    bytes32 specId,
    address callbackAddr,
    bytes4 callbackFunctionSignature
  ) internal pure returns (Chainlink.Request memory) {
    Chainlink.Request memory req;
    return req.initialize(specId, callbackAddr, callbackFunctionSignature);
  }

  /**
   * @notice Creates a request that can hold additional parameters
   * @param specId The Job Specification ID that the request will be created for
   * @param callbackFunctionSignature function signature to use for the callback
   * @return A Chainlink Request struct in memory
   */
  function buildOperatorRequest(bytes32 specId, bytes4 callbackFunctionSignature)
    internal
    view
    returns (Chainlink.Request memory)
  {
    Chainlink.Request memory req;
    return req.initialize(specId, address(this), callbackFunctionSignature);
  }

  /**
   * @notice Creates a Chainlink request to the stored oracle address
   * @dev Calls `chainlinkRequestTo` with the stored oracle address
   * @param req The initialized Chainlink Request
   * @param payment The amount of LINK to send for the request
   * @return requestId The request ID
   */
  function sendChainlinkRequest(Chainlink.Request memory req, uint256 payment) internal returns (bytes32) {
    return sendChainlinkRequestTo(address(s_oracle), req, payment);
  }

  /**
   * @notice Creates a Chainlink request to the specified oracle address
   * @dev Generates and stores a request ID, increments the local nonce, and uses `transferAndCall` to
   * send LINK which creates a request on the target oracle contract.
   * Emits ChainlinkRequested event.
   * @param oracleAddress The address of the oracle for the request
   * @param req The initialized Chainlink Request
   * @param payment The amount of LINK to send for the request
   * @return requestId The request ID
   */
  function sendChainlinkRequestTo(
    address oracleAddress,
    Chainlink.Request memory req,
    uint256 payment
  ) internal returns (bytes32 requestId) {
    uint256 nonce = s_requestCount;
    s_requestCount = nonce + 1;
    bytes memory encodedRequest = abi.encodeWithSelector(
      ChainlinkRequestInterface.oracleRequest.selector,
      SENDER_OVERRIDE, // Sender value - overridden by onTokenTransfer by the requesting contract's address
      AMOUNT_OVERRIDE, // Amount value - overridden by onTokenTransfer by the actual amount of LINK sent
      req.id,
      address(this),
      req.callbackFunctionId,
      nonce,
      ORACLE_ARGS_VERSION,
      req.buf.buf
    );
    return _rawRequest(oracleAddress, nonce, payment, encodedRequest);
  }

  /**
   * @notice Creates a Chainlink request to the stored oracle address
   * @dev This function supports multi-word response
   * @dev Calls `sendOperatorRequestTo` with the stored oracle address
   * @param req The initialized Chainlink Request
   * @param payment The amount of LINK to send for the request
   * @return requestId The request ID
   */
  function sendOperatorRequest(Chainlink.Request memory req, uint256 payment) internal returns (bytes32) {
    return sendOperatorRequestTo(address(s_oracle), req, payment);
  }

  /**
   * @notice Creates a Chainlink request to the specified oracle address
   * @dev This function supports multi-word response
   * @dev Generates and stores a request ID, increments the local nonce, and uses `transferAndCall` to
   * send LINK which creates a request on the target oracle contract.
   * Emits ChainlinkRequested event.
   * @param oracleAddress The address of the oracle for the request
   * @param req The initialized Chainlink Request
   * @param payment The amount of LINK to send for the request
   * @return requestId The request ID
   */
  function sendOperatorRequestTo(
    address oracleAddress,
    Chainlink.Request memory req,
    uint256 payment
  ) internal returns (bytes32 requestId) {
    uint256 nonce = s_requestCount;
    s_requestCount = nonce + 1;
    bytes memory encodedRequest = abi.encodeWithSelector(
      OperatorInterface.operatorRequest.selector,
      SENDER_OVERRIDE, // Sender value - overridden by onTokenTransfer by the requesting contract's address
      AMOUNT_OVERRIDE, // Amount value - overridden by onTokenTransfer by the actual amount of LINK sent
      req.id,
      req.callbackFunctionId,
      nonce,
      OPERATOR_ARGS_VERSION,
      req.buf.buf
    );
    return _rawRequest(oracleAddress, nonce, payment, encodedRequest);
  }

  /**
   * @notice Make a request to an oracle
   * @param oracleAddress The address of the oracle for the request
   * @param nonce used to generate the request ID
   * @param payment The amount of LINK to send for the request
   * @param encodedRequest data encoded for request type specific format
   * @return requestId The request ID
   */
  function _rawRequest(
    address oracleAddress,
    uint256 nonce,
    uint256 payment,
    bytes memory encodedRequest
  ) private returns (bytes32 requestId) {
    requestId = keccak256(abi.encodePacked(this, nonce));
    s_pendingRequests[requestId] = oracleAddress;
    emit ChainlinkRequested(requestId);
    require(s_link.transferAndCall(oracleAddress, payment, encodedRequest), "unable to transferAndCall to oracle");
  }

  /**
   * @notice Allows a request to be cancelled if it has not been fulfilled
   * @dev Requires keeping track of the expiration value emitted from the oracle contract.
   * Deletes the request from the `pendingRequests` mapping.
   * Emits ChainlinkCancelled event.
   * @param requestId The request ID
   * @param payment The amount of LINK sent for the request
   * @param callbackFunc The callback function specified for the request
   * @param expiration The time of the expiration for the request
   */
  function cancelChainlinkRequest(
    bytes32 requestId,
    uint256 payment,
    bytes4 callbackFunc,
    uint256 expiration
  ) internal {
    OperatorInterface requested = OperatorInterface(s_pendingRequests[requestId]);
    delete s_pendingRequests[requestId];
    emit ChainlinkCancelled(requestId);
    requested.cancelOracleRequest(requestId, payment, callbackFunc, expiration);
  }

  /**
   * @notice the next request count to be used in generating a nonce
   * @dev starts at 1 in order to ensure consistent gas cost
   * @return returns the next request count to be used in a nonce
   */
  function getNextRequestCount() internal view returns (uint256) {
    return s_requestCount;
  }

  /**
   * @notice Sets the stored oracle address
   * @param oracleAddress The address of the oracle contract
   */
  function setChainlinkOracle(address oracleAddress) internal {
    s_oracle = OperatorInterface(oracleAddress);
  }

  /**
   * @notice Sets the LINK token address
   * @param linkAddress The address of the LINK token contract
   */
  function setChainlinkToken(address linkAddress) internal {
    s_link = LinkTokenInterface(linkAddress);
  }

  /**
   * @notice Sets the Chainlink token address for the public
   * network as given by the Pointer contract
   */
  function setPublicChainlinkToken() internal {
    setChainlinkToken(PointerInterface(LINK_TOKEN_POINTER).getAddress());
  }

  /**
   * @notice Retrieves the stored address of the LINK token
   * @return The address of the LINK token
   */
  function chainlinkTokenAddress() internal view returns (address) {
    return address(s_link);
  }

  /**
   * @notice Retrieves the stored address of the oracle contract
   * @return The address of the oracle contract
   */
  function chainlinkOracleAddress() internal view returns (address) {
    return address(s_oracle);
  }

  /**
   * @notice Allows for a request which was created on another contract to be fulfilled
   * on this contract
   * @param oracleAddress The address of the oracle contract that will fulfill the request
   * @param requestId The request ID used for the response
   */
  function addChainlinkExternalRequest(address oracleAddress, bytes32 requestId) internal notPendingRequest(requestId) {
    s_pendingRequests[requestId] = oracleAddress;
  }

  /**
   * @notice Sets the stored oracle and LINK token contracts with the addresses resolved by ENS
   * @dev Accounts for subnodes having different resolvers
   * @param ensAddress The address of the ENS contract
   * @param node The ENS node hash
   */
  function useChainlinkWithENS(address ensAddress, bytes32 node) internal {
    s_ens = ENSInterface(ensAddress);
    s_ensNode = node;
    bytes32 linkSubnode = keccak256(abi.encodePacked(s_ensNode, ENS_TOKEN_SUBNAME));
    ENSResolver_Chainlink resolver = ENSResolver_Chainlink(s_ens.resolver(linkSubnode));
    setChainlinkToken(resolver.addr(linkSubnode));
    updateChainlinkOracleWithENS();
  }

  /**
   * @notice Sets the stored oracle contract with the address resolved by ENS
   * @dev This may be called on its own as long as `useChainlinkWithENS` has been called previously
   */
  function updateChainlinkOracleWithENS() internal {
    bytes32 oracleSubnode = keccak256(abi.encodePacked(s_ensNode, ENS_ORACLE_SUBNAME));
    ENSResolver_Chainlink resolver = ENSResolver_Chainlink(s_ens.resolver(oracleSubnode));
    setChainlinkOracle(resolver.addr(oracleSubnode));
  }

  /**
   * @notice Ensures that the fulfillment is valid for this contract
   * @dev Use if the contract developer prefers methods instead of modifiers for validation
   * @param requestId The request ID for fulfillment
   */
  function validateChainlinkCallback(bytes32 requestId)
    internal
    recordChainlinkFulfillment(requestId)
  // solhint-disable-next-line no-empty-blocks
  {

  }

  /**
   * @dev Reverts if the sender is not the oracle of the request.
   * Emits ChainlinkFulfilled event.
   * @param requestId The request ID for fulfillment
   */
  modifier recordChainlinkFulfillment(bytes32 requestId) {
    require(msg.sender == s_pendingRequests[requestId], "Source must be the oracle of the request");
    delete s_pendingRequests[requestId];
    emit ChainlinkFulfilled(requestId);
    _;
  }

  /**
   * @dev Reverts if the request is already pending
   * @param requestId The request ID for fulfillment
   */
  modifier notPendingRequest(bytes32 requestId) {
    require(s_pendingRequests[requestId] == address(0), "Request is already pending");
    _;
  }
}

File 4 of 39 : ChainlinkRequestInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface ChainlinkRequestInterface {
  function oracleRequest(
    address sender,
    uint256 requestPrice,
    bytes32 serviceAgreementID,
    address callbackAddress,
    bytes4 callbackFunctionId,
    uint256 nonce,
    uint256 dataVersion,
    bytes calldata data
  ) external;

  function cancelOracleRequest(
    bytes32 requestId,
    uint256 payment,
    bytes4 callbackFunctionId,
    uint256 expiration
  ) external;
}

File 5 of 39 : ENSInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface ENSInterface {
  // Logged when the owner of a node assigns a new owner to a subnode.
  event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);

  // Logged when the owner of a node transfers ownership to a new account.
  event Transfer(bytes32 indexed node, address owner);

  // Logged when the resolver for a node changes.
  event NewResolver(bytes32 indexed node, address resolver);

  // Logged when the TTL of a node changes
  event NewTTL(bytes32 indexed node, uint64 ttl);

  function setSubnodeOwner(
    bytes32 node,
    bytes32 label,
    address owner
  ) external;

  function setResolver(bytes32 node, address resolver) external;

  function setOwner(bytes32 node, address owner) external;

  function setTTL(bytes32 node, uint64 ttl) external;

  function owner(bytes32 node) external view returns (address);

  function resolver(bytes32 node) external view returns (address);

  function ttl(bytes32 node) external view returns (uint64);
}

File 6 of 39 : LinkTokenInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface LinkTokenInterface {
  function allowance(address owner, address spender) external view returns (uint256 remaining);

  function approve(address spender, uint256 value) external returns (bool success);

  function balanceOf(address owner) external view returns (uint256 balance);

  function decimals() external view returns (uint8 decimalPlaces);

  function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);

  function increaseApproval(address spender, uint256 subtractedValue) external;

  function name() external view returns (string memory tokenName);

  function symbol() external view returns (string memory tokenSymbol);

  function totalSupply() external view returns (uint256 totalTokensIssued);

  function transfer(address to, uint256 value) external returns (bool success);

  function transferAndCall(
    address to,
    uint256 value,
    bytes calldata data
  ) external returns (bool success);

  function transferFrom(
    address from,
    address to,
    uint256 value
  ) external returns (bool success);
}

File 7 of 39 : OperatorInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./OracleInterface.sol";
import "./ChainlinkRequestInterface.sol";

interface OperatorInterface is OracleInterface, ChainlinkRequestInterface {
  function operatorRequest(
    address sender,
    uint256 payment,
    bytes32 specId,
    bytes4 callbackFunctionId,
    uint256 nonce,
    uint256 dataVersion,
    bytes calldata data
  ) external;

  function fulfillOracleRequest2(
    bytes32 requestId,
    uint256 payment,
    address callbackAddress,
    bytes4 callbackFunctionId,
    uint256 expiration,
    bytes calldata data
  ) external returns (bool);

  function ownerTransferAndCall(
    address to,
    uint256 value,
    bytes calldata data
  ) external returns (bool success);

  function distributeFunds(address payable[] calldata receivers, uint256[] calldata amounts) external payable;

  function getAuthorizedSenders() external returns (address[] memory);

  function setAuthorizedSenders(address[] calldata senders) external;

  function getForwarder() external returns (address);
}

File 8 of 39 : OracleInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface OracleInterface {
  function fulfillOracleRequest(
    bytes32 requestId,
    uint256 payment,
    address callbackAddress,
    bytes4 callbackFunctionId,
    uint256 expiration,
    bytes32 data
  ) external returns (bool);

  function isAuthorizedSender(address node) external view returns (bool);

  function withdraw(address recipient, uint256 amount) external;

  function withdrawable() external view returns (uint256);
}

File 9 of 39 : PointerInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface PointerInterface {
  function getAddress() external view returns (address);
}

File 10 of 39 : BufferChainlink.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

/**
 * @dev A library for working with mutable byte buffers in Solidity.
 *
 * Byte buffers are mutable and expandable, and provide a variety of primitives
 * for writing to them. At any time you can fetch a bytes object containing the
 * current contents of the buffer. The bytes object should not be stored between
 * operations, as it may change due to resizing of the buffer.
 */
library BufferChainlink {
  /**
   * @dev Represents a mutable buffer. Buffers have a current value (buf) and
   *      a capacity. The capacity may be longer than the current value, in
   *      which case it can be extended without the need to allocate more memory.
   */
  struct buffer {
    bytes buf;
    uint256 capacity;
  }

  /**
   * @dev Initializes a buffer with an initial capacity.
   * @param buf The buffer to initialize.
   * @param capacity The number of bytes of space to allocate the buffer.
   * @return The buffer, for chaining.
   */
  function init(buffer memory buf, uint256 capacity) internal pure returns (buffer memory) {
    if (capacity % 32 != 0) {
      capacity += 32 - (capacity % 32);
    }
    // Allocate space for the buffer data
    buf.capacity = capacity;
    assembly {
      let ptr := mload(0x40)
      mstore(buf, ptr)
      mstore(ptr, 0)
      mstore(0x40, add(32, add(ptr, capacity)))
    }
    return buf;
  }

  /**
   * @dev Initializes a new buffer from an existing bytes object.
   *      Changes to the buffer may mutate the original value.
   * @param b The bytes object to initialize the buffer with.
   * @return A new buffer.
   */
  function fromBytes(bytes memory b) internal pure returns (buffer memory) {
    buffer memory buf;
    buf.buf = b;
    buf.capacity = b.length;
    return buf;
  }

  function resize(buffer memory buf, uint256 capacity) private pure {
    bytes memory oldbuf = buf.buf;
    init(buf, capacity);
    append(buf, oldbuf);
  }

  function max(uint256 a, uint256 b) private pure returns (uint256) {
    if (a > b) {
      return a;
    }
    return b;
  }

  /**
   * @dev Sets buffer length to 0.
   * @param buf The buffer to truncate.
   * @return The original buffer, for chaining..
   */
  function truncate(buffer memory buf) internal pure returns (buffer memory) {
    assembly {
      let bufptr := mload(buf)
      mstore(bufptr, 0)
    }
    return buf;
  }

  /**
   * @dev Writes a byte string to a buffer. Resizes if doing so would exceed
   *      the capacity of the buffer.
   * @param buf The buffer to append to.
   * @param off The start offset to write to.
   * @param data The data to append.
   * @param len The number of bytes to copy.
   * @return The original buffer, for chaining.
   */
  function write(
    buffer memory buf,
    uint256 off,
    bytes memory data,
    uint256 len
  ) internal pure returns (buffer memory) {
    require(len <= data.length);

    if (off + len > buf.capacity) {
      resize(buf, max(buf.capacity, len + off) * 2);
    }

    uint256 dest;
    uint256 src;
    assembly {
      // Memory address of the buffer data
      let bufptr := mload(buf)
      // Length of existing buffer data
      let buflen := mload(bufptr)
      // Start address = buffer address + offset + sizeof(buffer length)
      dest := add(add(bufptr, 32), off)
      // Update buffer length if we're extending it
      if gt(add(len, off), buflen) {
        mstore(bufptr, add(len, off))
      }
      src := add(data, 32)
    }

    // Copy word-length chunks while possible
    for (; len >= 32; len -= 32) {
      assembly {
        mstore(dest, mload(src))
      }
      dest += 32;
      src += 32;
    }

    // Copy remaining bytes
    unchecked {
      uint256 mask = (256**(32 - len)) - 1;
      assembly {
        let srcpart := and(mload(src), not(mask))
        let destpart := and(mload(dest), mask)
        mstore(dest, or(destpart, srcpart))
      }
    }

    return buf;
  }

  /**
   * @dev Appends a byte string to a buffer. Resizes if doing so would exceed
   *      the capacity of the buffer.
   * @param buf The buffer to append to.
   * @param data The data to append.
   * @param len The number of bytes to copy.
   * @return The original buffer, for chaining.
   */
  function append(
    buffer memory buf,
    bytes memory data,
    uint256 len
  ) internal pure returns (buffer memory) {
    return write(buf, buf.buf.length, data, len);
  }

  /**
   * @dev Appends a byte string to a buffer. Resizes if doing so would exceed
   *      the capacity of the buffer.
   * @param buf The buffer to append to.
   * @param data The data to append.
   * @return The original buffer, for chaining.
   */
  function append(buffer memory buf, bytes memory data) internal pure returns (buffer memory) {
    return write(buf, buf.buf.length, data, data.length);
  }

  /**
   * @dev Writes a byte to the buffer. Resizes if doing so would exceed the
   *      capacity of the buffer.
   * @param buf The buffer to append to.
   * @param off The offset to write the byte at.
   * @param data The data to append.
   * @return The original buffer, for chaining.
   */
  function writeUint8(
    buffer memory buf,
    uint256 off,
    uint8 data
  ) internal pure returns (buffer memory) {
    if (off >= buf.capacity) {
      resize(buf, buf.capacity * 2);
    }

    assembly {
      // Memory address of the buffer data
      let bufptr := mload(buf)
      // Length of existing buffer data
      let buflen := mload(bufptr)
      // Address = buffer address + sizeof(buffer length) + off
      let dest := add(add(bufptr, off), 32)
      mstore8(dest, data)
      // Update buffer length if we extended it
      if eq(off, buflen) {
        mstore(bufptr, add(buflen, 1))
      }
    }
    return buf;
  }

  /**
   * @dev Appends a byte to the buffer. Resizes if doing so would exceed the
   *      capacity of the buffer.
   * @param buf The buffer to append to.
   * @param data The data to append.
   * @return The original buffer, for chaining.
   */
  function appendUint8(buffer memory buf, uint8 data) internal pure returns (buffer memory) {
    return writeUint8(buf, buf.buf.length, data);
  }

  /**
   * @dev Writes up to 32 bytes to the buffer. Resizes if doing so would
   *      exceed the capacity of the buffer.
   * @param buf The buffer to append to.
   * @param off The offset to write at.
   * @param data The data to append.
   * @param len The number of bytes to write (left-aligned).
   * @return The original buffer, for chaining.
   */
  function write(
    buffer memory buf,
    uint256 off,
    bytes32 data,
    uint256 len
  ) private pure returns (buffer memory) {
    if (len + off > buf.capacity) {
      resize(buf, (len + off) * 2);
    }

    unchecked {
      uint256 mask = (256**len) - 1;
      // Right-align data
      data = data >> (8 * (32 - len));
      assembly {
        // Memory address of the buffer data
        let bufptr := mload(buf)
        // Address = buffer address + sizeof(buffer length) + off + len
        let dest := add(add(bufptr, off), len)
        mstore(dest, or(and(mload(dest), not(mask)), data))
        // Update buffer length if we extended it
        if gt(add(off, len), mload(bufptr)) {
          mstore(bufptr, add(off, len))
        }
      }
    }
    return buf;
  }

  /**
   * @dev Writes a bytes20 to the buffer. Resizes if doing so would exceed the
   *      capacity of the buffer.
   * @param buf The buffer to append to.
   * @param off The offset to write at.
   * @param data The data to append.
   * @return The original buffer, for chaining.
   */
  function writeBytes20(
    buffer memory buf,
    uint256 off,
    bytes20 data
  ) internal pure returns (buffer memory) {
    return write(buf, off, bytes32(data), 20);
  }

  /**
   * @dev Appends a bytes20 to the buffer. Resizes if doing so would exceed
   *      the capacity of the buffer.
   * @param buf The buffer to append to.
   * @param data The data to append.
   * @return The original buffer, for chhaining.
   */
  function appendBytes20(buffer memory buf, bytes20 data) internal pure returns (buffer memory) {
    return write(buf, buf.buf.length, bytes32(data), 20);
  }

  /**
   * @dev Appends a bytes32 to the buffer. Resizes if doing so would exceed
   *      the capacity of the buffer.
   * @param buf The buffer to append to.
   * @param data The data to append.
   * @return The original buffer, for chaining.
   */
  function appendBytes32(buffer memory buf, bytes32 data) internal pure returns (buffer memory) {
    return write(buf, buf.buf.length, data, 32);
  }

  /**
   * @dev Writes an integer to the buffer. Resizes if doing so would exceed
   *      the capacity of the buffer.
   * @param buf The buffer to append to.
   * @param off The offset to write at.
   * @param data The data to append.
   * @param len The number of bytes to write (right-aligned).
   * @return The original buffer, for chaining.
   */
  function writeInt(
    buffer memory buf,
    uint256 off,
    uint256 data,
    uint256 len
  ) private pure returns (buffer memory) {
    if (len + off > buf.capacity) {
      resize(buf, (len + off) * 2);
    }

    uint256 mask = (256**len) - 1;
    assembly {
      // Memory address of the buffer data
      let bufptr := mload(buf)
      // Address = buffer address + off + sizeof(buffer length) + len
      let dest := add(add(bufptr, off), len)
      mstore(dest, or(and(mload(dest), not(mask)), data))
      // Update buffer length if we extended it
      if gt(add(off, len), mload(bufptr)) {
        mstore(bufptr, add(off, len))
      }
    }
    return buf;
  }

  /**
   * @dev Appends a byte to the end of the buffer. Resizes if doing so would
   * exceed the capacity of the buffer.
   * @param buf The buffer to append to.
   * @param data The data to append.
   * @return The original buffer.
   */
  function appendInt(
    buffer memory buf,
    uint256 data,
    uint256 len
  ) internal pure returns (buffer memory) {
    return writeInt(buf, buf.buf.length, data, len);
  }
}

File 11 of 39 : CBORChainlink.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.4.19;

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

library CBORChainlink {
  using BufferChainlink for BufferChainlink.buffer;

  uint8 private constant MAJOR_TYPE_INT = 0;
  uint8 private constant MAJOR_TYPE_NEGATIVE_INT = 1;
  uint8 private constant MAJOR_TYPE_BYTES = 2;
  uint8 private constant MAJOR_TYPE_STRING = 3;
  uint8 private constant MAJOR_TYPE_ARRAY = 4;
  uint8 private constant MAJOR_TYPE_MAP = 5;
  uint8 private constant MAJOR_TYPE_TAG = 6;
  uint8 private constant MAJOR_TYPE_CONTENT_FREE = 7;

  uint8 private constant TAG_TYPE_BIGNUM = 2;
  uint8 private constant TAG_TYPE_NEGATIVE_BIGNUM = 3;

  function encodeFixedNumeric(BufferChainlink.buffer memory buf, uint8 major, uint64 value) private pure {
    if(value <= 23) {
      buf.appendUint8(uint8((major << 5) | value));
    } else if (value <= 0xFF) {
      buf.appendUint8(uint8((major << 5) | 24));
      buf.appendInt(value, 1);
    } else if (value <= 0xFFFF) {
      buf.appendUint8(uint8((major << 5) | 25));
      buf.appendInt(value, 2);
    } else if (value <= 0xFFFFFFFF) {
      buf.appendUint8(uint8((major << 5) | 26));
      buf.appendInt(value, 4);
    } else {
      buf.appendUint8(uint8((major << 5) | 27));
      buf.appendInt(value, 8);
    }
  }

  function encodeIndefiniteLengthType(BufferChainlink.buffer memory buf, uint8 major) private pure {
    buf.appendUint8(uint8((major << 5) | 31));
  }

  function encodeUInt(BufferChainlink.buffer memory buf, uint value) internal pure {
    if(value > 0xFFFFFFFFFFFFFFFF) {
      encodeBigNum(buf, value);
    } else {
      encodeFixedNumeric(buf, MAJOR_TYPE_INT, uint64(value));
    }
  }

  function encodeInt(BufferChainlink.buffer memory buf, int value) internal pure {
    if(value < -0x10000000000000000) {
      encodeSignedBigNum(buf, value);
    } else if(value > 0xFFFFFFFFFFFFFFFF) {
      encodeBigNum(buf, uint(value));
    } else if(value >= 0) {
      encodeFixedNumeric(buf, MAJOR_TYPE_INT, uint64(uint256(value)));
    } else {
      encodeFixedNumeric(buf, MAJOR_TYPE_NEGATIVE_INT, uint64(uint256(-1 - value)));
    }
  }

  function encodeBytes(BufferChainlink.buffer memory buf, bytes memory value) internal pure {
    encodeFixedNumeric(buf, MAJOR_TYPE_BYTES, uint64(value.length));
    buf.append(value);
  }

  function encodeBigNum(BufferChainlink.buffer memory buf, uint value) internal pure {
    buf.appendUint8(uint8((MAJOR_TYPE_TAG << 5) | TAG_TYPE_BIGNUM));
    encodeBytes(buf, abi.encode(value));
  }

  function encodeSignedBigNum(BufferChainlink.buffer memory buf, int input) internal pure {
    buf.appendUint8(uint8((MAJOR_TYPE_TAG << 5) | TAG_TYPE_NEGATIVE_BIGNUM));
    encodeBytes(buf, abi.encode(uint256(-1 - input)));
  }

  function encodeString(BufferChainlink.buffer memory buf, string memory value) internal pure {
    encodeFixedNumeric(buf, MAJOR_TYPE_STRING, uint64(bytes(value).length));
    buf.append(bytes(value));
  }

  function startArray(BufferChainlink.buffer memory buf) internal pure {
    encodeIndefiniteLengthType(buf, MAJOR_TYPE_ARRAY);
  }

  function startMap(BufferChainlink.buffer memory buf) internal pure {
    encodeIndefiniteLengthType(buf, MAJOR_TYPE_MAP);
  }

  function endSequence(BufferChainlink.buffer memory buf) internal pure {
    encodeIndefiniteLengthType(buf, MAJOR_TYPE_CONTENT_FREE);
  }
}

File 12 of 39 : ENSResolver.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

abstract contract ENSResolver {
  function addr(bytes32 node) public view virtual returns (address);
}

File 13 of 39 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        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 14 of 39 : PaymentSplitter.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (finance/PaymentSplitter.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/utils/SafeERC20.sol";
import "../utils/Address.sol";
import "../utils/Context.sol";

/**
 * @title PaymentSplitter
 * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
 * that the Ether will be split in this way, since it is handled transparently by the contract.
 *
 * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
 * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
 * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the
 * time of contract deployment and can't be updated thereafter.
 *
 * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
 * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
 * function.
 *
 * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and
 * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you
 * to run tests before sending real value to this contract.
 */
contract PaymentSplitter is Context {
    event PayeeAdded(address account, uint256 shares);
    event PaymentReleased(address to, uint256 amount);
    event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount);
    event PaymentReceived(address from, uint256 amount);

    uint256 private _totalShares;
    uint256 private _totalReleased;

    mapping(address => uint256) private _shares;
    mapping(address => uint256) private _released;
    address[] private _payees;

    mapping(IERC20 => uint256) private _erc20TotalReleased;
    mapping(IERC20 => mapping(address => uint256)) private _erc20Released;

    /**
     * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
     * the matching position in the `shares` array.
     *
     * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
     * duplicates in `payees`.
     */
    constructor(address[] memory payees, uint256[] memory shares_) payable {
        require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch");
        require(payees.length > 0, "PaymentSplitter: no payees");

        for (uint256 i = 0; i < payees.length; i++) {
            _addPayee(payees[i], shares_[i]);
        }
    }

    /**
     * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
     * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
     * reliability of the events, and not the actual splitting of Ether.
     *
     * To learn more about this see the Solidity documentation for
     * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
     * functions].
     */
    receive() external payable virtual {
        emit PaymentReceived(_msgSender(), msg.value);
    }

    /**
     * @dev Getter for the total shares held by payees.
     */
    function totalShares() public view returns (uint256) {
        return _totalShares;
    }

    /**
     * @dev Getter for the total amount of Ether already released.
     */
    function totalReleased() public view returns (uint256) {
        return _totalReleased;
    }

    /**
     * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20
     * contract.
     */
    function totalReleased(IERC20 token) public view returns (uint256) {
        return _erc20TotalReleased[token];
    }

    /**
     * @dev Getter for the amount of shares held by an account.
     */
    function shares(address account) public view returns (uint256) {
        return _shares[account];
    }

    /**
     * @dev Getter for the amount of Ether already released to a payee.
     */
    function released(address account) public view returns (uint256) {
        return _released[account];
    }

    /**
     * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an
     * IERC20 contract.
     */
    function released(IERC20 token, address account) public view returns (uint256) {
        return _erc20Released[token][account];
    }

    /**
     * @dev Getter for the address of the payee number `index`.
     */
    function payee(uint256 index) public view returns (address) {
        return _payees[index];
    }

    /**
     * @dev Getter for the amount of payee's releasable Ether.
     */
    function releasable(address account) public view returns (uint256) {
        uint256 totalReceived = address(this).balance + totalReleased();
        return _pendingPayment(account, totalReceived, released(account));
    }

    /**
     * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an
     * IERC20 contract.
     */
    function releasable(IERC20 token, address account) public view returns (uint256) {
        uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token);
        return _pendingPayment(account, totalReceived, released(token, account));
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
     * total shares and their previous withdrawals.
     */
    function release(address payable account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 payment = releasable(account);

        require(payment != 0, "PaymentSplitter: account is not due payment");

        // _totalReleased is the sum of all values in _released.
        // If "_totalReleased += payment" does not overflow, then "_released[account] += payment" cannot overflow.
        _totalReleased += payment;
        unchecked {
            _released[account] += payment;
        }

        Address.sendValue(account, payment);
        emit PaymentReleased(account, payment);
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their
     * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20
     * contract.
     */
    function release(IERC20 token, address account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 payment = releasable(token, account);

        require(payment != 0, "PaymentSplitter: account is not due payment");

        // _erc20TotalReleased[token] is the sum of all values in _erc20Released[token].
        // If "_erc20TotalReleased[token] += payment" does not overflow, then "_erc20Released[token][account] += payment"
        // cannot overflow.
        _erc20TotalReleased[token] += payment;
        unchecked {
            _erc20Released[token][account] += payment;
        }

        SafeERC20.safeTransfer(token, account, payment);
        emit ERC20PaymentReleased(token, account, payment);
    }

    /**
     * @dev internal logic for computing the pending payment of an `account` given the token historical balances and
     * already released amounts.
     */
    function _pendingPayment(
        address account,
        uint256 totalReceived,
        uint256 alreadyReleased
    ) private view returns (uint256) {
        return (totalReceived * _shares[account]) / _totalShares - alreadyReleased;
    }

    /**
     * @dev Add a new payee to the contract.
     * @param account The address of the payee to add.
     * @param shares_ The number of shares owned by the payee.
     */
    function _addPayee(address account, uint256 shares_) private {
        require(account != address(0), "PaymentSplitter: account is the zero address");
        require(shares_ > 0, "PaymentSplitter: shares are 0");
        require(_shares[account] == 0, "PaymentSplitter: account already has shares");

        _payees.push(account);
        _shares[account] = shares_;
        _totalShares = _totalShares + shares_;
        emit PayeeAdded(account, shares_);
    }
}

File 15 of 39 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 16 of 39 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

File 17 of 39 : ERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/common/ERC2981.sol)

pragma solidity ^0.8.0;

import "../../interfaces/IERC2981.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information.
 *
 * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for
 * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the
 * fee is specified in basis points by default.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 *
 * _Available since v4.5._
 */
abstract contract ERC2981 is IERC2981, ERC165 {
    struct RoyaltyInfo {
        address receiver;
        uint96 royaltyFraction;
    }

    RoyaltyInfo private _defaultRoyaltyInfo;
    mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo;

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

    /**
     * @inheritdoc IERC2981
     */
    function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) {
        RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId];

        if (royalty.receiver == address(0)) {
            royalty = _defaultRoyaltyInfo;
        }

        uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();

        return (royalty.receiver, royaltyAmount);
    }

    /**
     * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
     * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
     * override.
     */
    function _feeDenominator() internal pure virtual returns (uint96) {
        return 10000;
    }

    /**
     * @dev Sets the royalty information that all ids in this contract will default to.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: invalid receiver");

        _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Removes default royalty information.
     */
    function _deleteDefaultRoyalty() internal virtual {
        delete _defaultRoyaltyInfo;
    }

    /**
     * @dev Sets the royalty information for a specific token id, overriding the global default.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function _setTokenRoyalty(
        uint256 tokenId,
        address receiver,
        uint96 feeNumerator
    ) internal virtual {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: Invalid parameters");

        _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator);
    }

    /**
     * @dev Resets royalty information for the token id back to the global default.
     */
    function _resetTokenRoyalty(uint256 tokenId) internal virtual {
        delete _tokenRoyaltyInfo[tokenId];
    }
}

File 18 of 39 : draft-IERC20Permit.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/draft-IERC20Permit.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

File 20 of 39 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 21 of 39 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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: address zero is not a valid owner");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _ownerOf(tokenId);
        require(owner != address(0), "ERC721: invalid token ID");
        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) {
        _requireMinted(tokenId);

        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 overridden 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 token owner or approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        _requireMinted(tokenId);

        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: caller is not token owner or 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: caller is not token owner or 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

    /**
     * @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 _ownerOf(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) {
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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, 1);

        // Check that tokenId was not minted by `_beforeTokenTransfer` hook
        require(!_exists(tokenId), "ERC721: token already minted");

        unchecked {
            // Will not overflow unless all 2**256 token ids are minted to the same owner.
            // Given that tokens are minted one by one, it is impossible in practice that
            // this ever happens. Might change if we allow batch minting.
            // The ERC fails to describe this case.
            _balances[to] += 1;
        }

        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId, 1);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     * This is an internal function that does not check if the sender is authorized to operate on the token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

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

        // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook
        owner = ERC721.ownerOf(tokenId);

        // Clear approvals
        delete _tokenApprovals[tokenId];

        unchecked {
            // Cannot overflow, as that would require more tokens to be burned/transferred
            // out than the owner initially received through minting and transferring in.
            _balances[owner] -= 1;
        }
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId, 1);
    }

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

        // Check that tokenId was not transferred by `_beforeTokenTransfer` hook
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");

        // Clear approvals from the previous owner
        delete _tokenApprovals[tokenId];

        unchecked {
            // `_balances[from]` cannot overflow for the same reason as described in `_burn`:
            // `from`'s balance is the number of token held, which is at least one before the current
            // transfer.
            // `_balances[to]` could overflow in the conditions described in `_mint`. That would require
            // all 2**256 token ids to be minted, which in practice is impossible.
            _balances[from] -= 1;
            _balances[to] += 1;
        }
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId, 1);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits an {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 an {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 Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

    /**
     * @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 {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
     * - When `from` is zero, the tokens will be minted for `to`.
     * - When `to` is zero, ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256, /* firstTokenId */
        uint256 batchSize
    ) internal virtual {
        if (batchSize > 1) {
            if (from != address(0)) {
                _balances[from] -= batchSize;
            }
            if (to != address(0)) {
                _balances[to] += batchSize;
            }
        }
    }

    /**
     * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.
     * - When `from` is zero, the tokens were minted for `to`.
     * - When `to` is zero, ``from``'s tokens were burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual {}
}

File 22 of 39 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

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

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

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

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

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

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

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

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

    /**
     * @dev See {ERC721-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, firstTokenId, batchSize);

        if (batchSize > 1) {
            // Will only trigger during construction. Batch transferring (minting) is not available afterwards.
            revert("ERC721Enumerable: consecutive transfers not supported");
        }

        uint256 tokenId = firstTokenId;

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

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

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

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

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

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

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

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

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

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

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

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

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

File 23 of 39 : ERC721Royalty.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Royalty.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "../../common/ERC2981.sol";
import "../../../utils/introspection/ERC165.sol";

/**
 * @dev Extension of ERC721 with the ERC2981 NFT Royalty Standard, a standardized way to retrieve royalty payment
 * information.
 *
 * Royalty information can be specified globally for all token ids via {ERC2981-_setDefaultRoyalty}, and/or individually for
 * specific token ids via {ERC2981-_setTokenRoyalty}. The latter takes precedence over the first.
 *
 * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See
 * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to
 * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported.
 *
 * _Available since v4.5._
 */
abstract contract ERC721Royalty is ERC2981, ERC721 {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, ERC2981) returns (bool) {
        return super.supportsInterface(interfaceId);
    }

    /**
     * @dev See {ERC721-_burn}. This override additionally clears the royalty information for the token.
     */
    function _burn(uint256 tokenId) internal virtual override {
        super._burn(tokenId);
        _resetTokenRoyalty(tokenId);
    }
}

File 24 of 39 : ERC721URIStorage.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/extensions/ERC721URIStorage.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";

/**
 * @dev ERC721 token with storage based token URI management.
 */
abstract contract ERC721URIStorage is ERC721 {
    using Strings for uint256;

    // Optional mapping for token URIs
    mapping(uint256 => string) private _tokenURIs;

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        _requireMinted(tokenId);

        string memory _tokenURI = _tokenURIs[tokenId];
        string memory base = _baseURI();

        // If there is no base URI, return the token URI.
        if (bytes(base).length == 0) {
            return _tokenURI;
        }
        // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
        if (bytes(_tokenURI).length > 0) {
            return string(abi.encodePacked(base, _tokenURI));
        }

        return super.tokenURI(tokenId);
    }

    /**
     * @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
        require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token");
        _tokenURIs[tokenId] = _tokenURI;
    }

    /**
     * @dev See {ERC721-_burn}. This override additionally checks to see if a
     * token-specific URI was set for the token, and if so, it deletes the token URI from
     * the storage mapping.
     */
    function _burn(uint256 tokenId) internal virtual override {
        super._burn(tokenId);

        if (bytes(_tokenURIs[tokenId]).length != 0) {
            delete _tokenURIs[tokenId];
        }
    }
}

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 26 of 39 : 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 27 of 39 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * 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;

    /**
     * @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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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 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 the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

File 28 of 39 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

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

File 29 of 39 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // 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
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 30 of 39 : Base64.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides a set of functions to operate with Base64 strings.
 *
 * _Available since v4.5._
 */
library Base64 {
    /**
     * @dev Base64 Encoding/Decoding Table
     */
    string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

    /**
     * @dev Converts a `bytes` to its Bytes64 `string` representation.
     */
    function encode(bytes memory data) internal pure returns (string memory) {
        /**
         * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence
         * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol
         */
        if (data.length == 0) return "";

        // Loads the table into memory
        string memory table = _TABLE;

        // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter
        // and split into 4 numbers of 6 bits.
        // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up
        // - `data.length + 2`  -> Round up
        // - `/ 3`              -> Number of 3-bytes chunks
        // - `4 *`              -> 4 characters for each chunk
        string memory result = new string(4 * ((data.length + 2) / 3));

        /// @solidity memory-safe-assembly
        assembly {
            // Prepare the lookup table (skip the first "length" byte)
            let tablePtr := add(table, 1)

            // Prepare result pointer, jump over length
            let resultPtr := add(result, 32)

            // Run over the input, 3 bytes at a time
            for {
                let dataPtr := data
                let endPtr := add(data, mload(data))
            } lt(dataPtr, endPtr) {

            } {
                // Advance 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // To write each character, shift the 3 bytes (18 bits) chunk
                // 4 times in blocks of 6 bits for each character (18, 12, 6, 0)
                // and apply logical AND with 0x3F which is the number of
                // the previous character in the ASCII table prior to the Base64 Table
                // The result is then added to the table to get the character to write,
                // and finally write it in the result pointer but with a left shift
                // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits

                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance

                mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F))))
                resultPtr := add(resultPtr, 1) // Advance
            }

            // When data `bytes` is not exactly 3 bytes long
            // it is padded with `=` characters at the end
            switch mod(mload(data), 3)
            case 1 {
                mstore8(sub(resultPtr, 1), 0x3d)
                mstore8(sub(resultPtr, 2), 0x3d)
            }
            case 2 {
                mstore8(sub(resultPtr, 1), 0x3d)
            }
        }

        return result;
    }
}

File 31 of 39 : 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 32 of 39 : 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 33 of 39 : 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 34 of 39 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @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 == 0 ? 0 : (a - 1) / b + 1;
    }

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

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

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

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

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

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

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 35 of 39 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol)

pragma solidity ^0.8.0;

import "./math/Math.sol";

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

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

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

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

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

File 36 of 39 : DefaultOperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {OperatorFilterer} from "./OperatorFilterer.sol";
import {CANONICAL_CORI_SUBSCRIPTION} from "./lib/Constants.sol";
/**
 * @title  DefaultOperatorFilterer
 * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription.
 * @dev    Please note that if your token contract does not provide an owner with EIP-173, it must provide
 *         administration methods on the contract itself to interact with the registry otherwise the subscription
 *         will be locked to the options set during construction.
 */

abstract contract DefaultOperatorFilterer is OperatorFilterer {
    /// @dev The constructor that is called when the contract is being deployed.
    constructor() OperatorFilterer(CANONICAL_CORI_SUBSCRIPTION, true) {}
}

File 37 of 39 : IOperatorFilterRegistry.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

interface IOperatorFilterRegistry {
    /**
     * @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns
     *         true if supplied registrant address is not registered.
     */
    function isOperatorAllowed(address registrant, address operator) external view returns (bool);

    /**
     * @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner.
     */
    function register(address registrant) external;

    /**
     * @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes.
     */
    function registerAndSubscribe(address registrant, address subscription) external;

    /**
     * @notice Registers an address with the registry and copies the filtered operators and codeHashes from another
     *         address without subscribing.
     */
    function registerAndCopyEntries(address registrant, address registrantToCopy) external;

    /**
     * @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner.
     *         Note that this does not remove any filtered addresses or codeHashes.
     *         Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes.
     */
    function unregister(address addr) external;

    /**
     * @notice Update an operator address for a registered address - when filtered is true, the operator is filtered.
     */
    function updateOperator(address registrant, address operator, bool filtered) external;

    /**
     * @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates.
     */
    function updateOperators(address registrant, address[] calldata operators, bool filtered) external;

    /**
     * @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered.
     */
    function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;

    /**
     * @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates.
     */
    function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;

    /**
     * @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous
     *         subscription if present.
     *         Note that accounts with subscriptions may go on to subscribe to other accounts - in this case,
     *         subscriptions will not be forwarded. Instead the former subscription's existing entries will still be
     *         used.
     */
    function subscribe(address registrant, address registrantToSubscribe) external;

    /**
     * @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes.
     */
    function unsubscribe(address registrant, bool copyExistingEntries) external;

    /**
     * @notice Get the subscription address of a given registrant, if any.
     */
    function subscriptionOf(address addr) external returns (address registrant);

    /**
     * @notice Get the set of addresses subscribed to a given registrant.
     *         Note that order is not guaranteed as updates are made.
     */
    function subscribers(address registrant) external returns (address[] memory);

    /**
     * @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant.
     *         Note that order is not guaranteed as updates are made.
     */
    function subscriberAt(address registrant, uint256 index) external returns (address);

    /**
     * @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr.
     */
    function copyEntriesOf(address registrant, address registrantToCopy) external;

    /**
     * @notice Returns true if operator is filtered by a given address or its subscription.
     */
    function isOperatorFiltered(address registrant, address operator) external returns (bool);

    /**
     * @notice Returns true if the hash of an address's code is filtered by a given address or its subscription.
     */
    function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);

    /**
     * @notice Returns true if a codeHash is filtered by a given address or its subscription.
     */
    function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);

    /**
     * @notice Returns a list of filtered operators for a given address or its subscription.
     */
    function filteredOperators(address addr) external returns (address[] memory);

    /**
     * @notice Returns the set of filtered codeHashes for a given address or its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredCodeHashes(address addr) external returns (bytes32[] memory);

    /**
     * @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or
     *         its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredOperatorAt(address registrant, uint256 index) external returns (address);

    /**
     * @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or
     *         its subscription.
     *         Note that order is not guaranteed as updates are made.
     */
    function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);

    /**
     * @notice Returns true if an address has registered
     */
    function isRegistered(address addr) external returns (bool);

    /**
     * @dev Convenience method to compute the code hash of an arbitrary contract
     */
    function codeHashOf(address addr) external returns (bytes32);
}

File 38 of 39 : Constants.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.17;

address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E;
address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;

File 39 of 39 : OperatorFilterer.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;

import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";
import {CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS} from "./lib/Constants.sol";
/**
 * @title  OperatorFilterer
 * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
 *         registrant's entries in the OperatorFilterRegistry.
 * @dev    This smart contract is meant to be inherited by token contracts so they can use the following:
 *         - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
 *         - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
 *         Please note that if your token contract does not provide an owner with EIP-173, it must provide
 *         administration methods on the contract itself to interact with the registry otherwise the subscription
 *         will be locked to the options set during construction.
 */

abstract contract OperatorFilterer {
    /// @dev Emitted when an operator is not allowed.
    error OperatorNotAllowed(address operator);

    IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY =
        IOperatorFilterRegistry(CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS);

    /// @dev The constructor that is called when the contract is being deployed.
    constructor(address subscriptionOrRegistrantToCopy, bool subscribe) {
        // If an inheriting token contract is deployed to a network without the registry deployed, the modifier
        // will not revert, but the contract will need to be registered with the registry once it is deployed in
        // order for the modifier to filter addresses.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            if (subscribe) {
                OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
            } else {
                if (subscriptionOrRegistrantToCopy != address(0)) {
                    OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
                } else {
                    OPERATOR_FILTER_REGISTRY.register(address(this));
                }
            }
        }
    }

    /**
     * @dev A helper function to check if an operator is allowed.
     */
    modifier onlyAllowedOperator(address from) virtual {
        // Allow spending tokens from addresses with balance
        // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
        // from an EOA.
        if (from != msg.sender) {
            _checkFilterOperator(msg.sender);
        }
        _;
    }

    /**
     * @dev A helper function to check if an operator approval is allowed.
     */
    modifier onlyAllowedOperatorApproval(address operator) virtual {
        _checkFilterOperator(operator);
        _;
    }

    /**
     * @dev A helper function to check if an operator is allowed.
     */
    function _checkFilterOperator(address operator) internal view virtual {
        // Check registry code length to facilitate testing in environments without a deployed registry.
        if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
            // under normal circumstances, this function will revert rather than return false, but inheriting contracts
            // may specify their own OperatorFilterRegistry implementations, which may behave differently
            if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
                revert OperatorNotAllowed(operator);
            }
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_placeholderTokenUri","type":"string"},{"internalType":"string","name":"_baseUri","type":"string"},{"internalType":"uint256","name":"_saleStartTime","type":"uint256"},{"internalType":"address","name":"_royalReceiver","type":"address"},{"internalType":"uint96","name":"_royalFeeNumerator","type":"uint96"},{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares_","type":"uint256[]"},{"components":[{"internalType":"address","name":"chainlinkToken","type":"address"},{"internalType":"address","name":"chainlinkOracle","type":"address"},{"internalType":"bytes32","name":"jobId","type":"bytes32"},{"internalType":"uint256","name":"fee","type":"uint256"}],"internalType":"struct MMP.ChainlinkInformation","name":"chainlinkInformation","type":"tuple"}],"stateMutability":"payable","type":"constructor"},{"inputs":[{"internalType":"address","name":"emitter","type":"address"}],"name":"EtherTransferFail","type":"error"},{"inputs":[{"internalType":"address","name":"emitter","type":"address"}],"name":"InvalidPrice","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[{"internalType":"address","name":"emitter","type":"address"}],"name":"SaleNotStarted","type":"error"},{"inputs":[{"internalType":"address","name":"emitter","type":"address"}],"name":"SoldOut","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"ChainlinkCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"ChainlinkFulfilled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"id","type":"bytes32"}],"name":"ChainlinkRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"MetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_value","type":"string"},{"indexed":true,"internalType":"uint256","name":"_id","type":"uint256"}],"name":"PermanentURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Sold","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"StableDilutionMetadataReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"StableDilutionMetadataRequested","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":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"AUCTION_PRICES","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"AUCTION_PRICE_CHANGE_TIME","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"auctionPrices","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cancelPendingChainlinkRequests","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"freezeMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_requestId","type":"bytes32"},{"internalType":"string","name":"_metadataUri","type":"string"}],"name":"fulfill","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getExpiryTime","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":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"placeholderTokenUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"preMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"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":"saleStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"_baseUri","type":"string"}],"name":"setBaseUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setDefaultRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setLinkFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_placeholderTokenUri","type":"string"}],"name":"setPlaceholderUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_saleStartTime","type":"uint256"}],"name":"setSaleStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"string[]","name":"_metadataUris","type":"string[]"}],"name":"setTokenUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","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":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawLink","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60016019556101606040526706a94d74f430000060809081526705b09cd3e5e9000060a0526704fefa17b724000060c05267044d575b885f000060e05267039bb49f599a0000610100526703311fc80a570000610120526702a303fe4b530000610140526200007390601c90600762000761565b50601d805461ffff191690555f601e556040516200549738819003908190833981016040819052620000a59162000a46565b8282733cc6cdda760b79bafa08df41ecfa224f810dceb660018d8d6002620000ce838262000c13565b506003620000dd828262000c13565b505050620000fa620000f46200042160201b60201c565b62000425565b6daaeb6d7670e522a718067333cd4e3b15620002355780156200018857604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b5f604051808303815f87803b1580156200016b575f80fd5b505af11580156200017e573d5f803e3d5ffd5b5050505062000235565b6001600160a01b03821615620001d95760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af29039060440162000153565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e486906024015f604051808303815f87803b1580156200021d575f80fd5b505af115801562000230573d5f803e3d5ffd5b505050505b50508051825114620002a95760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b5f825111620002fb5760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f207061796565730000000000006044820152606401620002a0565b5f5b825181101562000366576200035183828151811062000320576200032062000cdb565b60200260200101518383815181106200033d576200033d62000cdb565b60200260200101516200047660201b60201c565b806200035d8162000d03565b915050620002fd565b50506001601b5550601f6200037c898262000c13565b5060206200038b888262000c13565b5060218690556001600160a01b03851615620003ad57620003ad858562000661565b8051620003d690601780546001600160a01b0319166001600160a01b0392909216919091179055565b60208101516200040290601880546001600160a01b0319166001600160a01b0392909216919091179055565b6040810151602255606001516023555062000d3a975050505050505050565b3390565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b6001600160a01b038216620004e35760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b6064820152608401620002a0565b5f8111620005345760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a207368617265732061726520300000006044820152606401620002a0565b6001600160a01b0382165f9081526010602052604090205415620005af5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b6064820152608401620002a0565b60128054600181019091557fbb8a6a4669ba250d26cd7a459eca9d215f8307e33aebe50379bc5a3617ec34440180546001600160a01b0319166001600160a01b0384169081179091555f908152601060205260409020819055600e546200061890829062000d1e565b600e55604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b6127106001600160601b0382161115620006d15760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401620002a0565b6001600160a01b038216620007295760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401620002a0565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b909102175f55565b828054828255905f5260205f20908101928215620007a8579160200282015b82811115620007a857825182906001600160401b031690559160200191906001019062000780565b50620007b6929150620007ba565b5090565b5b80821115620007b6575f8155600101620007bb565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b03811182821017156200080f576200080f620007d0565b604052919050565b5f82601f83011262000827575f80fd5b81516001600160401b03811115620008435762000843620007d0565b602062000859601f8301601f19168201620007e4565b82815285828487010111156200086d575f80fd5b5f5b838110156200088c5785810183015182820184015282016200086f565b505f928101909101919091529392505050565b80516001600160a01b0381168114620008b6575f80fd5b919050565b80516001600160601b0381168114620008b6575f80fd5b5f6001600160401b03821115620008ed57620008ed620007d0565b5060051b60200190565b5f82601f83011262000907575f80fd5b81516020620009206200091a83620008d2565b620007e4565b82815260059290921b840181019181810190868411156200093f575f80fd5b8286015b84811015620009655762000957816200089f565b835291830191830162000943565b509695505050505050565b5f82601f83011262000980575f80fd5b81516020620009936200091a83620008d2565b82815260059290921b84018101918181019086841115620009b2575f80fd5b8286015b84811015620009655780518352918301918301620009b6565b5f60808284031215620009e0575f80fd5b604051608081016001600160401b038111828210171562000a055762000a05620007d0565b60405290508062000a16836200089f565b815262000a26602084016200089f565b602082015260408301516040820152606083015160608201525092915050565b5f805f805f805f805f806101a08b8d03121562000a61575f80fd5b8a516001600160401b038082111562000a78575f80fd5b62000a868e838f0162000817565b9b5060208d015191508082111562000a9c575f80fd5b62000aaa8e838f0162000817565b9a5060408d015191508082111562000ac0575f80fd5b62000ace8e838f0162000817565b995060608d015191508082111562000ae4575f80fd5b62000af28e838f0162000817565b985060808d0151975062000b0960a08e016200089f565b965062000b1960c08e01620008bb565b955060e08d015191508082111562000b2f575f80fd5b62000b3d8e838f01620008f7565b94506101008d015191508082111562000b54575f80fd5b5062000b638d828e0162000970565b92505062000b768c6101208d01620009cf565b90509295989b9194979a5092959850565b600181811c9082168062000b9c57607f821691505b60208210810362000bbb57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111562000c0e575f81815260208120601f850160051c8101602086101562000be95750805b601f850160051c820191505b8181101562000c0a5782815560010162000bf5565b5050505b505050565b81516001600160401b0381111562000c2f5762000c2f620007d0565b62000c478162000c40845462000b87565b8462000bc1565b602080601f83116001811462000c7d575f841562000c655750858301515b5f19600386901b1c1916600185901b17855562000c0a565b5f85815260208120601f198616915b8281101562000cad5788860151825594840194600190910190840162000c8c565b508582101562000ccb57878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b5f52603260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b5f6001820162000d175762000d1762000cef565b5060010190565b8082018082111562000d345762000d3462000cef565b92915050565b61474f8062000d485f395ff3fe6080604052600436106102c5575f3560e01c80636352211e11610176578063a22cb465116100d4578063ce7c2ac211610083578063ce7c2ac21461084d578063d111515d14610881578063d79779b214610895578063e33b7de3146108c9578063e985e9c5146108dd578063f2fde38b146108fc578063fd955ed91461091b575f80fd5b8063a22cb4651461077f578063a3f8eace1461079e578063aeb7c357146107bd578063b88d4fde146107d1578063c45ac050146107f0578063c87b56dd1461080f578063cd8ff6571461082e575f80fd5b80638da5cb5b116101305780638da5cb5b146106bf5780638dc654a2146106dc57806395d89b41146106f05780639852595c146107045780639abc8320146107385780639d1b464a1461074c578063a0bcfc7f14610760575f80fd5b80636352211e146106105780636afd4ba21461062f57806370a082311461064e578063715018a61461066d5780637fad2d12146106815780638b83209b146106a0575f80fd5b806332cb6b0c1161022357806348b75044116101dd57806348b750441461054a5780634cf5f7a4146105695780634db331e51461057d5780634f6ccce71461059c578063525f8a5c146105bb57806354d44968146105da578063577f6198146105ef575f80fd5b806332cb6b0c146104a457806337441996146104b85780633a98ef39146104d7578063406072a9146104eb57806341f434341461050a57806342842e0e1461052b575f80fd5b806318160ddd1161027f57806318160ddd146103d257806319165587146103f05780631cbaee2d1461040f57806323b872dd1461042457806325cb5bc0146104435780632a55205a146104585780632f745c5914610485575f80fd5b806301ffc9a71461030957806304634d8d1461033d57806306fdde031461035e578063081812fc1461037f578063095ea7b3146103ab5780631249c58b146103ca575f80fd5b36610305577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033346040516102fb929190613b4c565b60405180910390a1005b5f80fd5b348015610314575f80fd5b50610328610323366004613b7a565b61093a565b60405190151581526020015b60405180910390f35b348015610348575f80fd5b5061035c610357366004613ba9565b61094a565b005b348015610369575f80fd5b50610372610960565b6040516103349190613c38565b34801561038a575f80fd5b5061039e610399366004613c4a565b6109f0565b6040516103349190613c61565b3480156103b6575f80fd5b5061035c6103c5366004613c75565b610a15565b61035c610a2e565b3480156103dd575f80fd5b50600b545b604051908152602001610334565b3480156103fb575f80fd5b5061035c61040a366004613c9f565b610bb2565b34801561041a575f80fd5b506103e260215481565b34801561042f575f80fd5b5061035c61043e366004613cba565b610c8b565b34801561044e575f80fd5b506103e261012c81565b348015610463575f80fd5b50610477610472366004613cf8565b610cb6565b604051610334929190613b4c565b348015610490575f80fd5b506103e261049f366004613c75565b610d61565b3480156104af575f80fd5b506103e2606581565b3480156104c3575f80fd5b5061035c6104d2366004613dbc565b610df5565b3480156104e2575f80fd5b50600e546103e2565b3480156104f6575f80fd5b506103e2610505366004613dff565b610f4d565b348015610515575f80fd5b5061039e6daaeb6d7670e522a718067333cd4e81565b348015610536575f80fd5b5061035c610545366004613cba565b610f77565b348015610555575f80fd5b5061035c610564366004613dff565b610f9c565b348015610574575f80fd5b506103726110a5565b348015610588575f80fd5b506103e2610597366004613c4a565b611131565b3480156105a7575f80fd5b506103e26105b6366004613c4a565b611150565b3480156105c6575f80fd5b5061035c6105d5366004613c4a565b6111e0565b3480156105e5575f80fd5b506103e261025881565b3480156105fa575f80fd5b506106036111ed565b6040516103349190613e2b565b34801561061b575f80fd5b5061039e61062a366004613c4a565b611292565b34801561063a575f80fd5b5061035c610649366004613e6e565b6112c6565b348015610659575f80fd5b506103e2610668366004613c9f565b6112da565b348015610678575f80fd5b5061035c61135e565b34801561068c575f80fd5b5061035c61069b366004613edf565b61136f565b3480156106ab575f80fd5b5061039e6106ba366004613c4a565b6114f8565b3480156106ca575f80fd5b50600d546001600160a01b031661039e565b3480156106e7575f80fd5b5061035c611526565b3480156106fb575f80fd5b5061037261165f565b34801561070f575f80fd5b506103e261071e366004613c9f565b6001600160a01b03165f9081526011602052604090205490565b348015610743575f80fd5b5061037261166e565b348015610757575f80fd5b506103e261167b565b34801561076b575f80fd5b5061035c61077a366004613e6e565b61170c565b34801561078a575f80fd5b5061035c610799366004613f52565b611720565b3480156107a9575f80fd5b506103e26107b8366004613c9f565b611734565b3480156107c8575f80fd5b5061035c61177a565b3480156107dc575f80fd5b5061035c6107eb366004613f7e565b611824565b3480156107fb575f80fd5b506103e261080a366004613dff565b61184a565b34801561081a575f80fd5b50610372610829366004613c4a565b6118e9565b348015610839575f80fd5b5061035c610848366004613c4a565b6118f4565b348015610858575f80fd5b506103e2610867366004613c9f565b6001600160a01b03165f9081526010602052604090205490565b34801561088c575f80fd5b5061035c611901565b3480156108a0575f80fd5b506103e26108af366004613c9f565b6001600160a01b03165f9081526013602052604090205490565b3480156108d4575f80fd5b50600f546103e2565b3480156108e8575f80fd5b506103286108f7366004613dff565b6119d0565b348015610907575f80fd5b5061035c610916366004613c9f565b6119fd565b348015610926575f80fd5b5061035c610935366004613c9f565b611a73565b5f61094482611b16565b92915050565b610952611b20565b61095c8282611b7a565b5050565b60606002805461096f90613ff8565b80601f016020809104026020016040519081016040528092919081815260200182805461099b90613ff8565b80156109e65780601f106109bd576101008083540402835291602001916109e6565b820191905f5260205f20905b8154815290600101906020018083116109c957829003601f168201915b5050505050905090565b5f6109fa82611c72565b505f908152600660205260409020546001600160a01b031690565b81610a1f81611c97565b610a298383611d45565b505050565b610a36611e54565b6065610a41600b5490565b10610a6a57306040516314671f8b60e21b8152600401610a619190613c61565b60405180910390fd5b602154421015610a8f573060405163c9bbd13b60e01b8152600401610a619190613c61565b5f610a9861167b565b905080341015610abd5730604051636690a80360e11b8152600401610a619190613c61565b5f610ac8823461403e565b90508015610b57576040515f90339083908381818185875af1925050503d805f8114610b0f576040519150601f19603f3d011682016040523d82523d5f602084013e610b14565b606091505b5050905080610b555760405162461bcd60e51b815260206004820152600d60248201526c1499599d5b990819985a5b1959609a1b6044820152606401610a61565b505b601e5460405133917fbac9694ac0daa55169abd117086fe32c89401d9a3b15dd1d34e55e0aa4e47a9d91610b9391868252602082015260400190565b60405180910390a2610ba433611ead565b5050610bb06001601b55565b565b6001600160a01b0381165f90815260106020526040902054610be65760405162461bcd60e51b8152600401610a6190614051565b5f610bf082611734565b9050805f03610c115760405162461bcd60e51b8152600401610a6190614097565b80600f5f828254610c2291906140e2565b90915550506001600160a01b0382165f908152601160205260409020805482019055610c4e8282611f6f565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b0568282604051610c7f929190613b4c565b60405180910390a15050565b826001600160a01b0381163314610ca557610ca533611c97565b610cb0848484612084565b50505050565b5f8281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610d295750604080518082019091525f546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101515f9061271090610d47906001600160601b0316876140f5565b610d519190614120565b91519350909150505b9250929050565b5f610d6b836112da565b8210610dcd5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610a61565b506001600160a01b03919091165f908152600960209081526040808320938352929052205490565b5f828152601a602052604090205482906001600160a01b03163314610e6d5760405162461bcd60e51b815260206004820152602860248201527f536f75726365206d75737420626520746865206f7261636c65206f6620746865604482015267081c995c5d595cdd60c21b6064820152608401610a61565b5f818152601a602052604080822080546001600160a01b03191690555182917f7cc135e0cebb02c3480ae5d74d377283180a2601f8f644edf7987b009316c63a91a25f83815260246020908152604080832054808452602683528184208490558684526025835281842093909355518281527f9b9df81562460abd1a099731bc59d4005ca2ba7716a57d31ddc0b6e0f17a9f75910160405180910390a1610f1481846120b5565b6040518181527ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce79060200160405180910390a150505050565b6001600160a01b039182165f90815260146020908152604080832093909416825291909152205490565b826001600160a01b0381163314610f9157610f9133611c97565b610cb0848484612138565b6001600160a01b0381165f90815260106020526040902054610fd05760405162461bcd60e51b8152600401610a6190614051565b5f610fdb838361184a565b9050805f03610ffc5760405162461bcd60e51b8152600401610a6190614097565b6001600160a01b0383165f90815260136020526040812080548392906110239084906140e2565b90915550506001600160a01b038084165f90815260146020908152604080832093861683529290522080548201905561105d838383612152565b826001600160a01b03167f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a8383604051611098929190613b4c565b60405180910390a2505050565b601f80546110b290613ff8565b80601f01602080910402602001604051908101604052809291908181526020018280546110de90613ff8565b80156111295780601f1061110057610100808354040283529160200191611129565b820191905f5260205f20905b81548152906001019060200180831161110c57829003601f168201915b505050505081565b601c8181548110611140575f80fd5b5f91825260209091200154905081565b5f61115a600b5490565b82106111bd5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610a61565b600b82815481106111d0576111d0614133565b905f5260205f2001549050919050565b6111e8611b20565b602155565b601c546060905f816001600160401b0381111561120c5761120c613d18565b604051908082528060200260200182016040528015611235578160200160208202803683370190505b5090505f5b8281101561128b57601c818154811061125557611255614133565b905f5260205f20015482828151811061127057611270614133565b602090810291909101015261128481614147565b905061123a565b5092915050565b5f818152600460205260408120546001600160a01b0316806109445760405162461bcd60e51b8152600401610a619061415f565b6112ce611b20565b601f61095c82826141de565b5f6001600160a01b0382166113435760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610a61565b506001600160a01b03165f9081526005602052604090205490565b611366611b20565b610bb05f6121a8565b611377611b20565b601d5460ff16156113bc5760405162461bcd60e51b815260206004820152600f60248201526e26b2ba30b230ba3090333937bd32b760891b6044820152606401610a61565b82811461140b5760405162461bcd60e51b815260206004820152601b60248201527f417272617973206e65656420746f2062652073616d652073697a6500000000006044820152606401610a61565b5f5b838110156114f15761148e85858381811061142a5761142a614133565b9050602002013584848481811061144357611443614133565b90506020028101906114559190614299565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506120b592505050565b7ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce78585838181106114c1576114c1614133565b905060200201356040516114d791815260200190565b60405180910390a1806114e981614147565b91505061140d565b5050505050565b5f6012828154811061150c5761150c614133565b5f918252602090912001546001600160a01b031692915050565b61152e611b20565b5f6115416017546001600160a01b031690565b9050806001600160a01b031663a9059cbb33836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161157f9190613c61565b602060405180830381865afa15801561159a573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115be91906142db565b6040518363ffffffff1660e01b81526004016115db929190613b4c565b6020604051808303815f875af11580156115f7573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061161b91906142f2565b61165c5760405162461bcd60e51b81526020600482015260126024820152712ab730b13632903a37903a3930b739b332b960711b6044820152606401610a61565b50565b60606003805461096f90613ff8565b602080546110b290613ff8565b5f6021544210156116a757601c5f8154811061169957611699614133565b905f5260205f200154905090565b5f610258602154426116b9919061403e565b6116c39190614120565b601c549091505f908210156116d857816116e7565b601c546116e79060019061403e565b9050601c81815481106116fc576116fc614133565b905f5260205f2001549250505090565b611714611b20565b602061095c82826141de565b8161172a81611c97565b610a2983836121f9565b5f8061173f600f5490565b61174990476140e2565b9050611773838261176e866001600160a01b03165f9081526011602052604090205490565b612204565b9392505050565b611782611b20565b5f5b5f61178e600b5490565b61179891906140e2565b81101561165c575f8181526026602052604090205480158015906117c857505f8181526025602052604090205442115b15611811576023545f828152602560205260409020546117f2918391631ba20ccb60e11b90612241565b5f82815260266020908152604080832083905583835260259091528120555b508061181c81614147565b915050611784565b836001600160a01b038116331461183e5761183e33611c97565b6114f18585858561230d565b6001600160a01b0382165f818152601360205260408082205490516370a0823160e01b8152919283926370a0823190611887903090600401613c61565b602060405180830381865afa1580156118a2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118c691906142db565b6118d091906140e2565b90506118e1838261176e8787610f4d565b949350505050565b60606109448261233f565b6118fc611b20565b602355565b611909611b20565b601d5460ff16156119565760405162461bcd60e51b815260206004820152601760248201527626b2ba30b230ba309030b63932b0b23c90333937bd32b760491b6044820152606401610a61565b601d805460ff191660011790555f5b5f61196f600b5490565b61197991906140e2565b81101561165c57807fa109ba539900bf1b633f956d63c96fc89b814c7287f7aa50a9216d0b556572076119ab836118e9565b6040516119b89190613c38565b60405180910390a26119c981614147565b9050611965565b6001600160a01b039182165f90815260076020908152604080832093909416825291909152205460ff1690565b611a05611b20565b6001600160a01b038116611a6a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a61565b61165c816121a8565b611a7b611b20565b6065611a86600b5490565b10611aa657306040516314671f8b60e21b8152600401610a619190613c61565b601d54610100900460ff1615611afe5760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c79206f6e65207072656d696e7420697320616c6c6f77656400000000006044820152606401610a61565b601d805461ff00191661010017905561165c81611ead565b5f61094482612441565b600d546001600160a01b03163314610bb05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a61565b6127106001600160601b0382161115611be85760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610a61565b6001600160a01b038216611c3a5760405162461bcd60e51b815260206004820152601960248201527822a921991c9c189d1034b73b30b634b2103932b1b2b4bb32b960391b6044820152606401610a61565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b909102175f55565b611c7b81612465565b61165c5760405162461bcd60e51b8152600401610a619061415f565b6daaeb6d7670e522a718067333cd4e3b1561165c57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611d02573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d2691906142f2565b61165c5780604051633b79c77360e21b8152600401610a619190613c61565b5f611d4f82611292565b9050806001600160a01b0316836001600160a01b031603611dbc5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a61565b336001600160a01b0382161480611dd85750611dd881336119d0565b611e4a5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610a61565b610a298383612481565b6002601b5403611ea65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a61565b6002601b55565b611eb981601e546124ee565b611ec5601e5482612507565b50611f5a601e54601f8054611ed990613ff8565b80601f0160208091040260200160405190810160405280929190818152602001828054611f0590613ff8565b8015611f505780601f10611f2757610100808354040283529160200191611f50565b820191905f5260205f20905b815481529060010190602001808311611f3357829003601f168201915b50505050506120b5565b601e5f8154611f6890614147565b9091555050565b80471015611fbf5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610a61565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114612008576040519150601f19603f3d011682016040523d82523d5f602084013e61200d565b606091505b5050905080610a295760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610a61565b61208e3382612666565b6120aa5760405162461bcd60e51b8152600401610a619061430d565b610a298383836126c3565b6120be82612465565b6121215760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610a61565b5f828152600860205260409020610a2982826141de565b610a2983838360405180602001604052805f815250611824565b610a298363a9059cbb60e01b8484604051602401612171929190613b4c565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612832565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b61095c338383612903565b600e546001600160a01b0384165f908152601060205260408120549091839161222d90866140f5565b6122379190614120565b6118e1919061403e565b5f848152601a602052604080822080546001600160a01b0319811690915590516001600160a01b039091169186917fe1fe3afa0f7f761ff0a8b89086790efd5140d2907ebd5b7ff6bfcb5e075fd4c59190a2604051636ee4d55360e01b815260048101869052602481018590526001600160e01b031984166044820152606481018390526001600160a01b03821690636ee4d553906084015f604051808303815f87803b1580156122f0575f80fd5b505af1158015612302573d5f803e3d5ffd5b505050505050505050565b6123173383612666565b6123335760405162461bcd60e51b8152600401610a619061430d565b610cb0848484846129cc565b606061234a82611c72565b5f828152600860205260408120805461236290613ff8565b80601f016020809104026020016040519081016040528092919081815260200182805461238e90613ff8565b80156123d95780601f106123b0576101008083540402835291602001916123d9565b820191905f5260205f20905b8154815290600101906020018083116123bc57829003601f168201915b505050505090505f6123f560408051602081019091525f815290565b905080515f03612406575092915050565b81511561243857808260405160200161242092919061435a565b60405160208183030381529060405292505050919050565b6118e1846129ff565b5f6001600160e01b0319821663780e9d6360e01b1480610944575061094482612a6e565b5f908152600460205260409020546001600160a01b0316151590565b5f81815260066020526040902080546001600160a01b0319166001600160a01b03841690811790915581906124b582611292565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b61095c828260405180602001604052805f815250612aad565b5f7f789bf7f3b2714c765ae963ccabd7c22556e02c73d0d35b16831c16e0cd6cee538360405161253991815260200190565b60405180910390a15f61255660225430633744199660e01b612adf565b90506125c06040518060400160405280600381526020016219d95d60ea1b815250602061258287612b04565b612596876001600160a01b03166014612b93565b6040516020016125a893929190614388565b60408051601f19818403018152919052839190612d28565b612614604051806040016040528060048152602001630e0c2e8d60e31b8152506040518060400160405280600b81526020016a1b595d1859185d18555c9b60aa1b81525083612d289092919063ffffffff16565b61262081602354612d46565b5f818152602460205260409020859055915061263e61012c426140e2565b5f83815260256020908152604080832093909355958152602690955290932081905592915050565b5f8061267183611292565b9050806001600160a01b0316846001600160a01b03161480612698575061269881856119d0565b806118e15750836001600160a01b03166126b1846109f0565b6001600160a01b031614949350505050565b826001600160a01b03166126d682611292565b6001600160a01b0316146126fc5760405162461bcd60e51b8152600401610a619061442f565b6001600160a01b03821661275e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a61565b61276b8383836001612d5f565b826001600160a01b031661277e82611292565b6001600160a01b0316146127a45760405162461bcd60e51b8152600401610a619061442f565b5f81815260066020908152604080832080546001600160a01b03199081169091556001600160a01b038781168086526005855283862080545f1901905590871680865283862080546001019055868652600490945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b5f612886826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612d6b9092919063ffffffff16565b805190915015610a2957808060200190518101906128a491906142f2565b610a295760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a61565b816001600160a01b0316836001600160a01b0316036129605760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610a61565b6001600160a01b038381165f81815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6129d78484846126c3565b6129e384848484612d79565b610cb05760405162461bcd60e51b8152600401610a6190614474565b6060612a0a82611c72565b5f612a1f60408051602081019091525f815290565b90505f815111612a3d5760405180602001604052805f815250611773565b80612a4784612b04565b604051602001612a5892919061435a565b6040516020818303038152906040529392505050565b5f6001600160e01b031982166380ac58cd60e01b1480612a9e57506001600160e01b03198216635b5e139f60e01b145b80610944575061094482612e76565b612ab78383612eaa565b612ac35f848484612d79565b610a295760405162461bcd60e51b8152600401610a6190614474565b612ae7613aff565b612aef613aff565b612afb81868686612fc3565b95945050505050565b60605f612b1083613000565b60010190505f816001600160401b03811115612b2e57612b2e613d18565b6040519080825280601f01601f191660200182016040528015612b58576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612b6257509392505050565b60605f612ba18360026140f5565b612bac9060026140e2565b6001600160401b03811115612bc357612bc3613d18565b6040519080825280601f01601f191660200182016040528015612bed576020820181803683370190505b509050600360fc1b815f81518110612c0757612c07614133565b60200101906001600160f81b03191690815f1a905350600f60fb1b81600181518110612c3557612c35614133565b60200101906001600160f81b03191690815f1a9053505f612c578460026140f5565b612c629060016140e2565b90505b6001811115612cd9576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612c9657612c96614133565b1a60f81b828281518110612cac57612cac614133565b60200101906001600160f81b03191690815f1a90535060049490941c93612cd2816144c6565b9050612c65565b5083156117735760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a61565b6080830151612d3790836130d7565b6080830151610a2990826130d7565b6018545f90611773906001600160a01b031684846130ee565b610cb08484848461317f565b60606118e184845f856132b7565b5f6001600160a01b0384163b15612e6b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612dbc9033908990889088906004016144db565b6020604051808303815f875af1925050508015612df6575060408051601f3d908101601f19168201909252612df39181019061450d565b60015b612e51573d808015612e23576040519150601f19603f3d011682016040523d82523d5f602084013e612e28565b606091505b5080515f03612e495760405162461bcd60e51b8152600401610a6190614474565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506118e1565b506001949350505050565b5f6001600160e01b0319821663152a902d60e11b148061094457506301ffc9a760e01b6001600160e01b0319831614610944565b6001600160a01b038216612f005760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a61565b612f0981612465565b15612f265760405162461bcd60e51b8152600401610a6190614528565b612f335f83836001612d5f565b612f3c81612465565b15612f595760405162461bcd60e51b8152600401610a6190614528565b6001600160a01b0382165f81815260056020908152604080832080546001019055848352600490915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b612fcb613aff565b612fdb856080015161010061338e565b50509183526001600160a01b031660208301526001600160e01b031916604082015290565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061303e5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef8100000000831061306a576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061308857662386f26fc10000830492506010015b6305f5e10083106130a0576305f5e100830492506008015b61271083106130b457612710830492506004015b606483106130c6576064830492506002015b600a83106109445760010192915050565b6130e482600383516133e5565b610a2982826134ec565b6019545f906130fe8160016140e2565b601955835160408086015160808701515191515f936320214ca360e11b936131359386938493923092918a9160019160240161455f565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152905061317586838684613505565b9695505050505050565b61318b8484848461365e565b60018111156131fa5760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610a61565b816001600160a01b0385166132555761325081600b80545f838152600c60205260408120829055600182018355919091527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90155565b613278565b836001600160a01b0316856001600160a01b0316146132785761327885826136e4565b6001600160a01b0384166132945761328f8161377d565b6114f1565b846001600160a01b0316846001600160a01b0316146114f1576114f18482613824565b6060824710156133185760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a61565b5f80866001600160a01b0316858760405161333391906145c6565b5f6040518083038185875af1925050503d805f811461336d576040519150601f19603f3d011682016040523d82523d5f602084013e613372565b606091505b509150915061338387838387613866565b979650505050505050565b613396613b33565b6133a16020836145e1565b156133c9576133b16020836145e1565b6133bc90602061403e565b6133c690836140e2565b91505b506020828101829052604080518085525f815290920101905290565b6017816001600160401b03161161340957610cb08360e0600585901b1683176138de565b60ff816001600160401b0316116134455761342f836018611fe0600586901b16176138de565b50610cb0836001600160401b03831660016138f5565b61ffff816001600160401b0316116134825761346c836019611fe0600586901b16176138de565b50610cb0836001600160401b03831660026138f5565b63ffffffff816001600160401b0316116134c1576134ab83601a611fe0600586901b16176138de565b50610cb0836001600160401b03831660046138f5565b6134d683601b611fe0600586901b16176138de565b50610cb0836001600160401b03831660086138f5565b6134f4613b33565b61177383845f01515184855161390d565b6040516bffffffffffffffffffffffff193060601b166020820152603481018490525f9060540160408051808303601f1901815282825280516020918201205f818152601a90925291812080546001600160a01b0319166001600160a01b038a1617905590925082917fb5e6e01e79f91267dc17b4e6314d5d4d03593d2ceee0fbb452b750bd70ea5af99190a2601754604051630200057560e51b81526001600160a01b0390911690634000aea0906135c6908890879087906004016145f4565b6020604051808303815f875af11580156135e2573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061360691906142f2565b6118e15760405162461bcd60e51b815260206004820152602360248201527f756e61626c6520746f207472616e73666572416e6443616c6c20746f206f7261604482015262636c6560e81b6064820152608401610a61565b6001811115610cb0576001600160a01b038416156136a3576001600160a01b0384165f908152600560205260408120805483929061369d90849061403e565b90915550505b6001600160a01b03831615610cb0576001600160a01b0383165f90815260056020526040812080548392906136d99084906140e2565b909155505050505050565b5f60016136f0846112da565b6136fa919061403e565b5f838152600a602052604090205490915080821461374b576001600160a01b0384165f9081526009602090815260408083208584528252808320548484528184208190558352600a90915290208190555b505f918252600a602090815260408084208490556001600160a01b039094168352600981528383209183525290812055565b600b545f9061378e9060019061403e565b5f838152600c6020526040812054600b80549394509092849081106137b5576137b5614133565b905f5260205f200154905080600b83815481106137d4576137d4614133565b5f918252602080832090910192909255828152600c9091526040808220849055858252812055600b80548061380b5761380b61461a565b600190038181905f5260205f20015f9055905550505050565b5f61382e836112da565b6001600160a01b039093165f9081526009602090815260408083208684528252808320859055938252600a9052919091209190915550565b606083156138d45782515f036138cd576001600160a01b0385163b6138cd5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a61565b50816118e1565b6118e183836139e7565b6138e6613b33565b61177383845f01515184613a11565b6138fd613b33565b6118e184855f0151518585613a5f565b613915613b33565b8251821115613922575f80fd5b602085015161393183866140e2565b111561396457613964856139548760200151878661394f91906140e2565b613ad2565b61395f9060026140f5565b613ae8565b5f808651805187602083010193508088870111156139825787860182525b505050602084015b602084106139c257805182526139a16020836140e2565b91506139ae6020826140e2565b90506139bb60208561403e565b935061398a565b5181515f1960208690036101000a019081169019919091161790525083949350505050565b8151156139f75781518083602001fd5b8060405162461bcd60e51b8152600401610a619190613c38565b613a19613b33565b83602001518310613a3957613a39848560200151600261395f91906140f5565b8351805160208583010184815350808503613a55576001810182525b5093949350505050565b613a67613b33565b6020850151613a7685846140e2565b1115613a8a57613a8a8561395486856140e2565b5f6001613a998461010061470e565b613aa3919061403e565b9050855183868201018583198251161781525080518487011115613ac75783860181525b509495945050505050565b5f81831115613ae2575081610944565b50919050565b8151613af4838361338e565b50610cb083826134ec565b6040805160a0810182525f80825260208201819052918101829052606081019190915260808101613b2e613b33565b905290565b6040518060400160405280606081526020015f81525090565b6001600160a01b03929092168252602082015260400190565b6001600160e01b03198116811461165c575f80fd5b5f60208284031215613b8a575f80fd5b813561177381613b65565b6001600160a01b038116811461165c575f80fd5b5f8060408385031215613bba575f80fd5b8235613bc581613b95565b915060208301356001600160601b0381168114613be0575f80fd5b809150509250929050565b5f5b83811015613c05578181015183820152602001613bed565b50505f910152565b5f8151808452613c24816020860160208601613beb565b601f01601f19169290920160200192915050565b602081525f6117736020830184613c0d565b5f60208284031215613c5a575f80fd5b5035919050565b6001600160a01b0391909116815260200190565b5f8060408385031215613c86575f80fd5b8235613c9181613b95565b946020939093013593505050565b5f60208284031215613caf575f80fd5b813561177381613b95565b5f805f60608486031215613ccc575f80fd5b8335613cd781613b95565b92506020840135613ce781613b95565b929592945050506040919091013590565b5f8060408385031215613d09575f80fd5b50508035926020909101359150565b634e487b7160e01b5f52604160045260245ffd5b5f6001600160401b0380841115613d4557613d45613d18565b604051601f8501601f19908116603f01168101908282118183101715613d6d57613d6d613d18565b81604052809350858152868686011115613d85575f80fd5b858560208301375f602087830101525050509392505050565b5f82601f830112613dad575f80fd5b61177383833560208501613d2c565b5f8060408385031215613dcd575f80fd5b8235915060208301356001600160401b03811115613de9575f80fd5b613df585828601613d9e565b9150509250929050565b5f8060408385031215613e10575f80fd5b8235613e1b81613b95565b91506020830135613be081613b95565b602080825282518282018190525f9190848201906040850190845b81811015613e6257835183529284019291840191600101613e46565b50909695505050505050565b5f60208284031215613e7e575f80fd5b81356001600160401b03811115613e93575f80fd5b6118e184828501613d9e565b5f8083601f840112613eaf575f80fd5b5081356001600160401b03811115613ec5575f80fd5b6020830191508360208260051b8501011115610d5a575f80fd5b5f805f8060408587031215613ef2575f80fd5b84356001600160401b0380821115613f08575f80fd5b613f1488838901613e9f565b90965094506020870135915080821115613f2c575f80fd5b50613f3987828801613e9f565b95989497509550505050565b801515811461165c575f80fd5b5f8060408385031215613f63575f80fd5b8235613f6e81613b95565b91506020830135613be081613f45565b5f805f8060808587031215613f91575f80fd5b8435613f9c81613b95565b93506020850135613fac81613b95565b92506040850135915060608501356001600160401b03811115613fcd575f80fd5b8501601f81018713613fdd575f80fd5b613fec87823560208401613d2c565b91505092959194509250565b600181811c9082168061400c57607f821691505b602082108103613ae257634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b818103818111156109445761094461402a565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b808201808211156109445761094461402a565b80820281158282048414176109445761094461402a565b634e487b7160e01b5f52601260045260245ffd5b5f8261412e5761412e61410c565b500490565b634e487b7160e01b5f52603260045260245ffd5b5f600182016141585761415861402a565b5060010190565b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b601f821115610a29575f81815260208120601f850160051c810160208610156141b75750805b601f850160051c820191505b818110156141d6578281556001016141c3565b505050505050565b81516001600160401b038111156141f7576141f7613d18565b61420b816142058454613ff8565b84614191565b602080601f83116001811461423e575f84156142275750858301515b5f19600386901b1c1916600185901b1785556141d6565b5f85815260208120601f198616915b8281101561426c5788860151825594840194600190910190840161424d565b508582101561428957878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f808335601e198436030181126142ae575f80fd5b8301803591506001600160401b038211156142c7575f80fd5b602001915036819003821315610d5a575f80fd5b5f602082840312156142eb575f80fd5b5051919050565b5f60208284031215614302575f80fd5b815161177381613f45565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b5f835161436b818460208801613beb565b83519083019061437f818360208801613beb565b01949350505050565b5f80855461439581613ff8565b600182811680156143ad57600181146143c2576143ee565b60ff19841687528215158302870194506143ee565b895f526020805f205f5b858110156143e55781548a8201529084019082016143cc565b50505082870194505b5087519250614401838560208b01613beb565b602f60f81b939092019283528551916144208382860160208a01613beb565b91909201019695505050505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b5f816144d4576144d461402a565b505f190190565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f9061317590830184613c0d565b5f6020828403121561451d575f80fd5b815161177381613b65565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b6001600160a01b0389811682526020820189905260408201889052861660608201526001600160e01b03198516608082015260a0810184905260c0810183905261010060e082018190525f906145b783820185613c0d565b9b9a5050505050505050505050565b5f82516145d7818460208701613beb565b9190910192915050565b5f826145ef576145ef61410c565b500690565b60018060a01b0384168152826020820152606060408201525f612afb6060830184613c0d565b634e487b7160e01b5f52603160045260245ffd5b600181815b8085111561466857815f190482111561464e5761464e61402a565b8085161561465b57918102915b93841c9390800290614633565b509250929050565b5f8261467e57506001610944565b8161468a57505f610944565b81600181146146a057600281146146aa576146c6565b6001915050610944565b60ff8411156146bb576146bb61402a565b50506001821b610944565b5060208310610133831016604e8410600b84101617156146e9575081810a610944565b6146f3838361462e565b805f19048211156147065761470661402a565b029392505050565b5f611773838361467056fea264697066735822122049c53e795406cded0ce58877f8ebdac3fbc5d149d22f448ddc8420a47da6fd3264736f6c6343000814003300000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000064778b20000000000000000000000000f50ac39c3c3bd062de4e47fcf8f3f9d37b94874a00000000000000000000000000000000000000000000000000000000000002ee00000000000000000000000000000000000000000000000000000000000002e00000000000000000000000000000000000000000000000000000000000000340000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000001db329cde457d68b872766f4e12f9532bca9149b38376131613564396239333634386635613966633930666538303336383561350000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000000000000000000000000000000000000000000d4d6574616d6f7270686f7365730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034d4d500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f68747470733a2f2f617277656176652e6e65742f6e4a664530686d424766357045424e6d6a6f544f7a2d47592d7a755050563265354753594d73795a46374100000000000000000000000000000000000000000000000000000000000000003768747470733a2f2f7777772e737461626c652d64696c7574696f6e2e6172742f6e66742f6974656d2f67656e65726174696f6e2f31312f0000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000f50ac39c3c3bd062de4e47fcf8f3f9d37b94874a0000000000000000000000008b7adc43153bcfae98ab20ce9fff23331f54238700000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000003c

Deployed Bytecode

0x6080604052600436106102c5575f3560e01c80636352211e11610176578063a22cb465116100d4578063ce7c2ac211610083578063ce7c2ac21461084d578063d111515d14610881578063d79779b214610895578063e33b7de3146108c9578063e985e9c5146108dd578063f2fde38b146108fc578063fd955ed91461091b575f80fd5b8063a22cb4651461077f578063a3f8eace1461079e578063aeb7c357146107bd578063b88d4fde146107d1578063c45ac050146107f0578063c87b56dd1461080f578063cd8ff6571461082e575f80fd5b80638da5cb5b116101305780638da5cb5b146106bf5780638dc654a2146106dc57806395d89b41146106f05780639852595c146107045780639abc8320146107385780639d1b464a1461074c578063a0bcfc7f14610760575f80fd5b80636352211e146106105780636afd4ba21461062f57806370a082311461064e578063715018a61461066d5780637fad2d12146106815780638b83209b146106a0575f80fd5b806332cb6b0c1161022357806348b75044116101dd57806348b750441461054a5780634cf5f7a4146105695780634db331e51461057d5780634f6ccce71461059c578063525f8a5c146105bb57806354d44968146105da578063577f6198146105ef575f80fd5b806332cb6b0c146104a457806337441996146104b85780633a98ef39146104d7578063406072a9146104eb57806341f434341461050a57806342842e0e1461052b575f80fd5b806318160ddd1161027f57806318160ddd146103d257806319165587146103f05780631cbaee2d1461040f57806323b872dd1461042457806325cb5bc0146104435780632a55205a146104585780632f745c5914610485575f80fd5b806301ffc9a71461030957806304634d8d1461033d57806306fdde031461035e578063081812fc1461037f578063095ea7b3146103ab5780631249c58b146103ca575f80fd5b36610305577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033346040516102fb929190613b4c565b60405180910390a1005b5f80fd5b348015610314575f80fd5b50610328610323366004613b7a565b61093a565b60405190151581526020015b60405180910390f35b348015610348575f80fd5b5061035c610357366004613ba9565b61094a565b005b348015610369575f80fd5b50610372610960565b6040516103349190613c38565b34801561038a575f80fd5b5061039e610399366004613c4a565b6109f0565b6040516103349190613c61565b3480156103b6575f80fd5b5061035c6103c5366004613c75565b610a15565b61035c610a2e565b3480156103dd575f80fd5b50600b545b604051908152602001610334565b3480156103fb575f80fd5b5061035c61040a366004613c9f565b610bb2565b34801561041a575f80fd5b506103e260215481565b34801561042f575f80fd5b5061035c61043e366004613cba565b610c8b565b34801561044e575f80fd5b506103e261012c81565b348015610463575f80fd5b50610477610472366004613cf8565b610cb6565b604051610334929190613b4c565b348015610490575f80fd5b506103e261049f366004613c75565b610d61565b3480156104af575f80fd5b506103e2606581565b3480156104c3575f80fd5b5061035c6104d2366004613dbc565b610df5565b3480156104e2575f80fd5b50600e546103e2565b3480156104f6575f80fd5b506103e2610505366004613dff565b610f4d565b348015610515575f80fd5b5061039e6daaeb6d7670e522a718067333cd4e81565b348015610536575f80fd5b5061035c610545366004613cba565b610f77565b348015610555575f80fd5b5061035c610564366004613dff565b610f9c565b348015610574575f80fd5b506103726110a5565b348015610588575f80fd5b506103e2610597366004613c4a565b611131565b3480156105a7575f80fd5b506103e26105b6366004613c4a565b611150565b3480156105c6575f80fd5b5061035c6105d5366004613c4a565b6111e0565b3480156105e5575f80fd5b506103e261025881565b3480156105fa575f80fd5b506106036111ed565b6040516103349190613e2b565b34801561061b575f80fd5b5061039e61062a366004613c4a565b611292565b34801561063a575f80fd5b5061035c610649366004613e6e565b6112c6565b348015610659575f80fd5b506103e2610668366004613c9f565b6112da565b348015610678575f80fd5b5061035c61135e565b34801561068c575f80fd5b5061035c61069b366004613edf565b61136f565b3480156106ab575f80fd5b5061039e6106ba366004613c4a565b6114f8565b3480156106ca575f80fd5b50600d546001600160a01b031661039e565b3480156106e7575f80fd5b5061035c611526565b3480156106fb575f80fd5b5061037261165f565b34801561070f575f80fd5b506103e261071e366004613c9f565b6001600160a01b03165f9081526011602052604090205490565b348015610743575f80fd5b5061037261166e565b348015610757575f80fd5b506103e261167b565b34801561076b575f80fd5b5061035c61077a366004613e6e565b61170c565b34801561078a575f80fd5b5061035c610799366004613f52565b611720565b3480156107a9575f80fd5b506103e26107b8366004613c9f565b611734565b3480156107c8575f80fd5b5061035c61177a565b3480156107dc575f80fd5b5061035c6107eb366004613f7e565b611824565b3480156107fb575f80fd5b506103e261080a366004613dff565b61184a565b34801561081a575f80fd5b50610372610829366004613c4a565b6118e9565b348015610839575f80fd5b5061035c610848366004613c4a565b6118f4565b348015610858575f80fd5b506103e2610867366004613c9f565b6001600160a01b03165f9081526010602052604090205490565b34801561088c575f80fd5b5061035c611901565b3480156108a0575f80fd5b506103e26108af366004613c9f565b6001600160a01b03165f9081526013602052604090205490565b3480156108d4575f80fd5b50600f546103e2565b3480156108e8575f80fd5b506103286108f7366004613dff565b6119d0565b348015610907575f80fd5b5061035c610916366004613c9f565b6119fd565b348015610926575f80fd5b5061035c610935366004613c9f565b611a73565b5f61094482611b16565b92915050565b610952611b20565b61095c8282611b7a565b5050565b60606002805461096f90613ff8565b80601f016020809104026020016040519081016040528092919081815260200182805461099b90613ff8565b80156109e65780601f106109bd576101008083540402835291602001916109e6565b820191905f5260205f20905b8154815290600101906020018083116109c957829003601f168201915b5050505050905090565b5f6109fa82611c72565b505f908152600660205260409020546001600160a01b031690565b81610a1f81611c97565b610a298383611d45565b505050565b610a36611e54565b6065610a41600b5490565b10610a6a57306040516314671f8b60e21b8152600401610a619190613c61565b60405180910390fd5b602154421015610a8f573060405163c9bbd13b60e01b8152600401610a619190613c61565b5f610a9861167b565b905080341015610abd5730604051636690a80360e11b8152600401610a619190613c61565b5f610ac8823461403e565b90508015610b57576040515f90339083908381818185875af1925050503d805f8114610b0f576040519150601f19603f3d011682016040523d82523d5f602084013e610b14565b606091505b5050905080610b555760405162461bcd60e51b815260206004820152600d60248201526c1499599d5b990819985a5b1959609a1b6044820152606401610a61565b505b601e5460405133917fbac9694ac0daa55169abd117086fe32c89401d9a3b15dd1d34e55e0aa4e47a9d91610b9391868252602082015260400190565b60405180910390a2610ba433611ead565b5050610bb06001601b55565b565b6001600160a01b0381165f90815260106020526040902054610be65760405162461bcd60e51b8152600401610a6190614051565b5f610bf082611734565b9050805f03610c115760405162461bcd60e51b8152600401610a6190614097565b80600f5f828254610c2291906140e2565b90915550506001600160a01b0382165f908152601160205260409020805482019055610c4e8282611f6f565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b0568282604051610c7f929190613b4c565b60405180910390a15050565b826001600160a01b0381163314610ca557610ca533611c97565b610cb0848484612084565b50505050565b5f8281526001602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b0316928201929092528291610d295750604080518082019091525f546001600160a01b0381168252600160a01b90046001600160601b031660208201525b60208101515f9061271090610d47906001600160601b0316876140f5565b610d519190614120565b91519350909150505b9250929050565b5f610d6b836112da565b8210610dcd5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610a61565b506001600160a01b03919091165f908152600960209081526040808320938352929052205490565b5f828152601a602052604090205482906001600160a01b03163314610e6d5760405162461bcd60e51b815260206004820152602860248201527f536f75726365206d75737420626520746865206f7261636c65206f6620746865604482015267081c995c5d595cdd60c21b6064820152608401610a61565b5f818152601a602052604080822080546001600160a01b03191690555182917f7cc135e0cebb02c3480ae5d74d377283180a2601f8f644edf7987b009316c63a91a25f83815260246020908152604080832054808452602683528184208490558684526025835281842093909355518281527f9b9df81562460abd1a099731bc59d4005ca2ba7716a57d31ddc0b6e0f17a9f75910160405180910390a1610f1481846120b5565b6040518181527ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce79060200160405180910390a150505050565b6001600160a01b039182165f90815260146020908152604080832093909416825291909152205490565b826001600160a01b0381163314610f9157610f9133611c97565b610cb0848484612138565b6001600160a01b0381165f90815260106020526040902054610fd05760405162461bcd60e51b8152600401610a6190614051565b5f610fdb838361184a565b9050805f03610ffc5760405162461bcd60e51b8152600401610a6190614097565b6001600160a01b0383165f90815260136020526040812080548392906110239084906140e2565b90915550506001600160a01b038084165f90815260146020908152604080832093861683529290522080548201905561105d838383612152565b826001600160a01b03167f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a8383604051611098929190613b4c565b60405180910390a2505050565b601f80546110b290613ff8565b80601f01602080910402602001604051908101604052809291908181526020018280546110de90613ff8565b80156111295780601f1061110057610100808354040283529160200191611129565b820191905f5260205f20905b81548152906001019060200180831161110c57829003601f168201915b505050505081565b601c8181548110611140575f80fd5b5f91825260209091200154905081565b5f61115a600b5490565b82106111bd5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610a61565b600b82815481106111d0576111d0614133565b905f5260205f2001549050919050565b6111e8611b20565b602155565b601c546060905f816001600160401b0381111561120c5761120c613d18565b604051908082528060200260200182016040528015611235578160200160208202803683370190505b5090505f5b8281101561128b57601c818154811061125557611255614133565b905f5260205f20015482828151811061127057611270614133565b602090810291909101015261128481614147565b905061123a565b5092915050565b5f818152600460205260408120546001600160a01b0316806109445760405162461bcd60e51b8152600401610a619061415f565b6112ce611b20565b601f61095c82826141de565b5f6001600160a01b0382166113435760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610a61565b506001600160a01b03165f9081526005602052604090205490565b611366611b20565b610bb05f6121a8565b611377611b20565b601d5460ff16156113bc5760405162461bcd60e51b815260206004820152600f60248201526e26b2ba30b230ba3090333937bd32b760891b6044820152606401610a61565b82811461140b5760405162461bcd60e51b815260206004820152601b60248201527f417272617973206e65656420746f2062652073616d652073697a6500000000006044820152606401610a61565b5f5b838110156114f15761148e85858381811061142a5761142a614133565b9050602002013584848481811061144357611443614133565b90506020028101906114559190614299565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284375f920191909152506120b592505050565b7ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce78585838181106114c1576114c1614133565b905060200201356040516114d791815260200190565b60405180910390a1806114e981614147565b91505061140d565b5050505050565b5f6012828154811061150c5761150c614133565b5f918252602090912001546001600160a01b031692915050565b61152e611b20565b5f6115416017546001600160a01b031690565b9050806001600160a01b031663a9059cbb33836001600160a01b03166370a08231306040518263ffffffff1660e01b815260040161157f9190613c61565b602060405180830381865afa15801561159a573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906115be91906142db565b6040518363ffffffff1660e01b81526004016115db929190613b4c565b6020604051808303815f875af11580156115f7573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061161b91906142f2565b61165c5760405162461bcd60e51b81526020600482015260126024820152712ab730b13632903a37903a3930b739b332b960711b6044820152606401610a61565b50565b60606003805461096f90613ff8565b602080546110b290613ff8565b5f6021544210156116a757601c5f8154811061169957611699614133565b905f5260205f200154905090565b5f610258602154426116b9919061403e565b6116c39190614120565b601c549091505f908210156116d857816116e7565b601c546116e79060019061403e565b9050601c81815481106116fc576116fc614133565b905f5260205f2001549250505090565b611714611b20565b602061095c82826141de565b8161172a81611c97565b610a2983836121f9565b5f8061173f600f5490565b61174990476140e2565b9050611773838261176e866001600160a01b03165f9081526011602052604090205490565b612204565b9392505050565b611782611b20565b5f5b5f61178e600b5490565b61179891906140e2565b81101561165c575f8181526026602052604090205480158015906117c857505f8181526025602052604090205442115b15611811576023545f828152602560205260409020546117f2918391631ba20ccb60e11b90612241565b5f82815260266020908152604080832083905583835260259091528120555b508061181c81614147565b915050611784565b836001600160a01b038116331461183e5761183e33611c97565b6114f18585858561230d565b6001600160a01b0382165f818152601360205260408082205490516370a0823160e01b8152919283926370a0823190611887903090600401613c61565b602060405180830381865afa1580156118a2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118c691906142db565b6118d091906140e2565b90506118e1838261176e8787610f4d565b949350505050565b60606109448261233f565b6118fc611b20565b602355565b611909611b20565b601d5460ff16156119565760405162461bcd60e51b815260206004820152601760248201527626b2ba30b230ba309030b63932b0b23c90333937bd32b760491b6044820152606401610a61565b601d805460ff191660011790555f5b5f61196f600b5490565b61197991906140e2565b81101561165c57807fa109ba539900bf1b633f956d63c96fc89b814c7287f7aa50a9216d0b556572076119ab836118e9565b6040516119b89190613c38565b60405180910390a26119c981614147565b9050611965565b6001600160a01b039182165f90815260076020908152604080832093909416825291909152205460ff1690565b611a05611b20565b6001600160a01b038116611a6a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a61565b61165c816121a8565b611a7b611b20565b6065611a86600b5490565b10611aa657306040516314671f8b60e21b8152600401610a619190613c61565b601d54610100900460ff1615611afe5760405162461bcd60e51b815260206004820152601b60248201527f4f6e6c79206f6e65207072656d696e7420697320616c6c6f77656400000000006044820152606401610a61565b601d805461ff00191661010017905561165c81611ead565b5f61094482612441565b600d546001600160a01b03163314610bb05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610a61565b6127106001600160601b0382161115611be85760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610a61565b6001600160a01b038216611c3a5760405162461bcd60e51b815260206004820152601960248201527822a921991c9c189d1034b73b30b634b2103932b1b2b4bb32b960391b6044820152606401610a61565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b909102175f55565b611c7b81612465565b61165c5760405162461bcd60e51b8152600401610a619061415f565b6daaeb6d7670e522a718067333cd4e3b1561165c57604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611d02573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190611d2691906142f2565b61165c5780604051633b79c77360e21b8152600401610a619190613c61565b5f611d4f82611292565b9050806001600160a01b0316836001600160a01b031603611dbc5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a61565b336001600160a01b0382161480611dd85750611dd881336119d0565b611e4a5760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610a61565b610a298383612481565b6002601b5403611ea65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610a61565b6002601b55565b611eb981601e546124ee565b611ec5601e5482612507565b50611f5a601e54601f8054611ed990613ff8565b80601f0160208091040260200160405190810160405280929190818152602001828054611f0590613ff8565b8015611f505780601f10611f2757610100808354040283529160200191611f50565b820191905f5260205f20905b815481529060010190602001808311611f3357829003601f168201915b50505050506120b5565b601e5f8154611f6890614147565b9091555050565b80471015611fbf5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610a61565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114612008576040519150601f19603f3d011682016040523d82523d5f602084013e61200d565b606091505b5050905080610a295760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610a61565b61208e3382612666565b6120aa5760405162461bcd60e51b8152600401610a619061430d565b610a298383836126c3565b6120be82612465565b6121215760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610a61565b5f828152600860205260409020610a2982826141de565b610a2983838360405180602001604052805f815250611824565b610a298363a9059cbb60e01b8484604051602401612171929190613b4c565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152612832565b600d80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b61095c338383612903565b600e546001600160a01b0384165f908152601060205260408120549091839161222d90866140f5565b6122379190614120565b6118e1919061403e565b5f848152601a602052604080822080546001600160a01b0319811690915590516001600160a01b039091169186917fe1fe3afa0f7f761ff0a8b89086790efd5140d2907ebd5b7ff6bfcb5e075fd4c59190a2604051636ee4d55360e01b815260048101869052602481018590526001600160e01b031984166044820152606481018390526001600160a01b03821690636ee4d553906084015f604051808303815f87803b1580156122f0575f80fd5b505af1158015612302573d5f803e3d5ffd5b505050505050505050565b6123173383612666565b6123335760405162461bcd60e51b8152600401610a619061430d565b610cb0848484846129cc565b606061234a82611c72565b5f828152600860205260408120805461236290613ff8565b80601f016020809104026020016040519081016040528092919081815260200182805461238e90613ff8565b80156123d95780601f106123b0576101008083540402835291602001916123d9565b820191905f5260205f20905b8154815290600101906020018083116123bc57829003601f168201915b505050505090505f6123f560408051602081019091525f815290565b905080515f03612406575092915050565b81511561243857808260405160200161242092919061435a565b60405160208183030381529060405292505050919050565b6118e1846129ff565b5f6001600160e01b0319821663780e9d6360e01b1480610944575061094482612a6e565b5f908152600460205260409020546001600160a01b0316151590565b5f81815260066020526040902080546001600160a01b0319166001600160a01b03841690811790915581906124b582611292565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b61095c828260405180602001604052805f815250612aad565b5f7f789bf7f3b2714c765ae963ccabd7c22556e02c73d0d35b16831c16e0cd6cee538360405161253991815260200190565b60405180910390a15f61255660225430633744199660e01b612adf565b90506125c06040518060400160405280600381526020016219d95d60ea1b815250602061258287612b04565b612596876001600160a01b03166014612b93565b6040516020016125a893929190614388565b60408051601f19818403018152919052839190612d28565b612614604051806040016040528060048152602001630e0c2e8d60e31b8152506040518060400160405280600b81526020016a1b595d1859185d18555c9b60aa1b81525083612d289092919063ffffffff16565b61262081602354612d46565b5f818152602460205260409020859055915061263e61012c426140e2565b5f83815260256020908152604080832093909355958152602690955290932081905592915050565b5f8061267183611292565b9050806001600160a01b0316846001600160a01b03161480612698575061269881856119d0565b806118e15750836001600160a01b03166126b1846109f0565b6001600160a01b031614949350505050565b826001600160a01b03166126d682611292565b6001600160a01b0316146126fc5760405162461bcd60e51b8152600401610a619061442f565b6001600160a01b03821661275e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a61565b61276b8383836001612d5f565b826001600160a01b031661277e82611292565b6001600160a01b0316146127a45760405162461bcd60e51b8152600401610a619061442f565b5f81815260066020908152604080832080546001600160a01b03199081169091556001600160a01b038781168086526005855283862080545f1901905590871680865283862080546001019055868652600490945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b5f612886826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316612d6b9092919063ffffffff16565b805190915015610a2957808060200190518101906128a491906142f2565b610a295760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a61565b816001600160a01b0316836001600160a01b0316036129605760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610a61565b6001600160a01b038381165f81815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6129d78484846126c3565b6129e384848484612d79565b610cb05760405162461bcd60e51b8152600401610a6190614474565b6060612a0a82611c72565b5f612a1f60408051602081019091525f815290565b90505f815111612a3d5760405180602001604052805f815250611773565b80612a4784612b04565b604051602001612a5892919061435a565b6040516020818303038152906040529392505050565b5f6001600160e01b031982166380ac58cd60e01b1480612a9e57506001600160e01b03198216635b5e139f60e01b145b80610944575061094482612e76565b612ab78383612eaa565b612ac35f848484612d79565b610a295760405162461bcd60e51b8152600401610a6190614474565b612ae7613aff565b612aef613aff565b612afb81868686612fc3565b95945050505050565b60605f612b1083613000565b60010190505f816001600160401b03811115612b2e57612b2e613d18565b6040519080825280601f01601f191660200182016040528015612b58576020820181803683370190505b5090508181016020015b5f19016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084612b6257509392505050565b60605f612ba18360026140f5565b612bac9060026140e2565b6001600160401b03811115612bc357612bc3613d18565b6040519080825280601f01601f191660200182016040528015612bed576020820181803683370190505b509050600360fc1b815f81518110612c0757612c07614133565b60200101906001600160f81b03191690815f1a905350600f60fb1b81600181518110612c3557612c35614133565b60200101906001600160f81b03191690815f1a9053505f612c578460026140f5565b612c629060016140e2565b90505b6001811115612cd9576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612c9657612c96614133565b1a60f81b828281518110612cac57612cac614133565b60200101906001600160f81b03191690815f1a90535060049490941c93612cd2816144c6565b9050612c65565b5083156117735760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a61565b6080830151612d3790836130d7565b6080830151610a2990826130d7565b6018545f90611773906001600160a01b031684846130ee565b610cb08484848461317f565b60606118e184845f856132b7565b5f6001600160a01b0384163b15612e6b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612dbc9033908990889088906004016144db565b6020604051808303815f875af1925050508015612df6575060408051601f3d908101601f19168201909252612df39181019061450d565b60015b612e51573d808015612e23576040519150601f19603f3d011682016040523d82523d5f602084013e612e28565b606091505b5080515f03612e495760405162461bcd60e51b8152600401610a6190614474565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506118e1565b506001949350505050565b5f6001600160e01b0319821663152a902d60e11b148061094457506301ffc9a760e01b6001600160e01b0319831614610944565b6001600160a01b038216612f005760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a61565b612f0981612465565b15612f265760405162461bcd60e51b8152600401610a6190614528565b612f335f83836001612d5f565b612f3c81612465565b15612f595760405162461bcd60e51b8152600401610a6190614528565b6001600160a01b0382165f81815260056020908152604080832080546001019055848352600490915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b612fcb613aff565b612fdb856080015161010061338e565b50509183526001600160a01b031660208301526001600160e01b031916604082015290565b5f8072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b831061303e5772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef8100000000831061306a576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061308857662386f26fc10000830492506010015b6305f5e10083106130a0576305f5e100830492506008015b61271083106130b457612710830492506004015b606483106130c6576064830492506002015b600a83106109445760010192915050565b6130e482600383516133e5565b610a2982826134ec565b6019545f906130fe8160016140e2565b601955835160408086015160808701515191515f936320214ca360e11b936131359386938493923092918a9160019160240161455f565b60408051601f198184030181529190526020810180516001600160e01b03166001600160e01b031990931692909217909152905061317586838684613505565b9695505050505050565b61318b8484848461365e565b60018111156131fa5760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610a61565b816001600160a01b0385166132555761325081600b80545f838152600c60205260408120829055600182018355919091527f0175b7a638427703f0dbe7bb9bbf987a2551717b34e79f33b5b1008d1fa01db90155565b613278565b836001600160a01b0316856001600160a01b0316146132785761327885826136e4565b6001600160a01b0384166132945761328f8161377d565b6114f1565b846001600160a01b0316846001600160a01b0316146114f1576114f18482613824565b6060824710156133185760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a61565b5f80866001600160a01b0316858760405161333391906145c6565b5f6040518083038185875af1925050503d805f811461336d576040519150601f19603f3d011682016040523d82523d5f602084013e613372565b606091505b509150915061338387838387613866565b979650505050505050565b613396613b33565b6133a16020836145e1565b156133c9576133b16020836145e1565b6133bc90602061403e565b6133c690836140e2565b91505b506020828101829052604080518085525f815290920101905290565b6017816001600160401b03161161340957610cb08360e0600585901b1683176138de565b60ff816001600160401b0316116134455761342f836018611fe0600586901b16176138de565b50610cb0836001600160401b03831660016138f5565b61ffff816001600160401b0316116134825761346c836019611fe0600586901b16176138de565b50610cb0836001600160401b03831660026138f5565b63ffffffff816001600160401b0316116134c1576134ab83601a611fe0600586901b16176138de565b50610cb0836001600160401b03831660046138f5565b6134d683601b611fe0600586901b16176138de565b50610cb0836001600160401b03831660086138f5565b6134f4613b33565b61177383845f01515184855161390d565b6040516bffffffffffffffffffffffff193060601b166020820152603481018490525f9060540160408051808303601f1901815282825280516020918201205f818152601a90925291812080546001600160a01b0319166001600160a01b038a1617905590925082917fb5e6e01e79f91267dc17b4e6314d5d4d03593d2ceee0fbb452b750bd70ea5af99190a2601754604051630200057560e51b81526001600160a01b0390911690634000aea0906135c6908890879087906004016145f4565b6020604051808303815f875af11580156135e2573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061360691906142f2565b6118e15760405162461bcd60e51b815260206004820152602360248201527f756e61626c6520746f207472616e73666572416e6443616c6c20746f206f7261604482015262636c6560e81b6064820152608401610a61565b6001811115610cb0576001600160a01b038416156136a3576001600160a01b0384165f908152600560205260408120805483929061369d90849061403e565b90915550505b6001600160a01b03831615610cb0576001600160a01b0383165f90815260056020526040812080548392906136d99084906140e2565b909155505050505050565b5f60016136f0846112da565b6136fa919061403e565b5f838152600a602052604090205490915080821461374b576001600160a01b0384165f9081526009602090815260408083208584528252808320548484528184208190558352600a90915290208190555b505f918252600a602090815260408084208490556001600160a01b039094168352600981528383209183525290812055565b600b545f9061378e9060019061403e565b5f838152600c6020526040812054600b80549394509092849081106137b5576137b5614133565b905f5260205f200154905080600b83815481106137d4576137d4614133565b5f918252602080832090910192909255828152600c9091526040808220849055858252812055600b80548061380b5761380b61461a565b600190038181905f5260205f20015f9055905550505050565b5f61382e836112da565b6001600160a01b039093165f9081526009602090815260408083208684528252808320859055938252600a9052919091209190915550565b606083156138d45782515f036138cd576001600160a01b0385163b6138cd5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a61565b50816118e1565b6118e183836139e7565b6138e6613b33565b61177383845f01515184613a11565b6138fd613b33565b6118e184855f0151518585613a5f565b613915613b33565b8251821115613922575f80fd5b602085015161393183866140e2565b111561396457613964856139548760200151878661394f91906140e2565b613ad2565b61395f9060026140f5565b613ae8565b5f808651805187602083010193508088870111156139825787860182525b505050602084015b602084106139c257805182526139a16020836140e2565b91506139ae6020826140e2565b90506139bb60208561403e565b935061398a565b5181515f1960208690036101000a019081169019919091161790525083949350505050565b8151156139f75781518083602001fd5b8060405162461bcd60e51b8152600401610a619190613c38565b613a19613b33565b83602001518310613a3957613a39848560200151600261395f91906140f5565b8351805160208583010184815350808503613a55576001810182525b5093949350505050565b613a67613b33565b6020850151613a7685846140e2565b1115613a8a57613a8a8561395486856140e2565b5f6001613a998461010061470e565b613aa3919061403e565b9050855183868201018583198251161781525080518487011115613ac75783860181525b509495945050505050565b5f81831115613ae2575081610944565b50919050565b8151613af4838361338e565b50610cb083826134ec565b6040805160a0810182525f80825260208201819052918101829052606081019190915260808101613b2e613b33565b905290565b6040518060400160405280606081526020015f81525090565b6001600160a01b03929092168252602082015260400190565b6001600160e01b03198116811461165c575f80fd5b5f60208284031215613b8a575f80fd5b813561177381613b65565b6001600160a01b038116811461165c575f80fd5b5f8060408385031215613bba575f80fd5b8235613bc581613b95565b915060208301356001600160601b0381168114613be0575f80fd5b809150509250929050565b5f5b83811015613c05578181015183820152602001613bed565b50505f910152565b5f8151808452613c24816020860160208601613beb565b601f01601f19169290920160200192915050565b602081525f6117736020830184613c0d565b5f60208284031215613c5a575f80fd5b5035919050565b6001600160a01b0391909116815260200190565b5f8060408385031215613c86575f80fd5b8235613c9181613b95565b946020939093013593505050565b5f60208284031215613caf575f80fd5b813561177381613b95565b5f805f60608486031215613ccc575f80fd5b8335613cd781613b95565b92506020840135613ce781613b95565b929592945050506040919091013590565b5f8060408385031215613d09575f80fd5b50508035926020909101359150565b634e487b7160e01b5f52604160045260245ffd5b5f6001600160401b0380841115613d4557613d45613d18565b604051601f8501601f19908116603f01168101908282118183101715613d6d57613d6d613d18565b81604052809350858152868686011115613d85575f80fd5b858560208301375f602087830101525050509392505050565b5f82601f830112613dad575f80fd5b61177383833560208501613d2c565b5f8060408385031215613dcd575f80fd5b8235915060208301356001600160401b03811115613de9575f80fd5b613df585828601613d9e565b9150509250929050565b5f8060408385031215613e10575f80fd5b8235613e1b81613b95565b91506020830135613be081613b95565b602080825282518282018190525f9190848201906040850190845b81811015613e6257835183529284019291840191600101613e46565b50909695505050505050565b5f60208284031215613e7e575f80fd5b81356001600160401b03811115613e93575f80fd5b6118e184828501613d9e565b5f8083601f840112613eaf575f80fd5b5081356001600160401b03811115613ec5575f80fd5b6020830191508360208260051b8501011115610d5a575f80fd5b5f805f8060408587031215613ef2575f80fd5b84356001600160401b0380821115613f08575f80fd5b613f1488838901613e9f565b90965094506020870135915080821115613f2c575f80fd5b50613f3987828801613e9f565b95989497509550505050565b801515811461165c575f80fd5b5f8060408385031215613f63575f80fd5b8235613f6e81613b95565b91506020830135613be081613f45565b5f805f8060808587031215613f91575f80fd5b8435613f9c81613b95565b93506020850135613fac81613b95565b92506040850135915060608501356001600160401b03811115613fcd575f80fd5b8501601f81018713613fdd575f80fd5b613fec87823560208401613d2c565b91505092959194509250565b600181811c9082168061400c57607f821691505b602082108103613ae257634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52601160045260245ffd5b818103818111156109445761094461402a565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b808201808211156109445761094461402a565b80820281158282048414176109445761094461402a565b634e487b7160e01b5f52601260045260245ffd5b5f8261412e5761412e61410c565b500490565b634e487b7160e01b5f52603260045260245ffd5b5f600182016141585761415861402a565b5060010190565b602080825260189082015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604082015260600190565b601f821115610a29575f81815260208120601f850160051c810160208610156141b75750805b601f850160051c820191505b818110156141d6578281556001016141c3565b505050505050565b81516001600160401b038111156141f7576141f7613d18565b61420b816142058454613ff8565b84614191565b602080601f83116001811461423e575f84156142275750858301515b5f19600386901b1c1916600185901b1785556141d6565b5f85815260208120601f198616915b8281101561426c5788860151825594840194600190910190840161424d565b508582101561428957878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b5f808335601e198436030181126142ae575f80fd5b8301803591506001600160401b038211156142c7575f80fd5b602001915036819003821315610d5a575f80fd5b5f602082840312156142eb575f80fd5b5051919050565b5f60208284031215614302575f80fd5b815161177381613f45565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b5f835161436b818460208801613beb565b83519083019061437f818360208801613beb565b01949350505050565b5f80855461439581613ff8565b600182811680156143ad57600181146143c2576143ee565b60ff19841687528215158302870194506143ee565b895f526020805f205f5b858110156143e55781548a8201529084019082016143cc565b50505082870194505b5087519250614401838560208b01613beb565b602f60f81b939092019283528551916144208382860160208a01613beb565b91909201019695505050505050565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b5f816144d4576144d461402a565b505f190190565b6001600160a01b03858116825284166020820152604081018390526080606082018190525f9061317590830184613c0d565b5f6020828403121561451d575f80fd5b815161177381613b65565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b6001600160a01b0389811682526020820189905260408201889052861660608201526001600160e01b03198516608082015260a0810184905260c0810183905261010060e082018190525f906145b783820185613c0d565b9b9a5050505050505050505050565b5f82516145d7818460208701613beb565b9190910192915050565b5f826145ef576145ef61410c565b500690565b60018060a01b0384168152826020820152606060408201525f612afb6060830184613c0d565b634e487b7160e01b5f52603160045260245ffd5b600181815b8085111561466857815f190482111561464e5761464e61402a565b8085161561465b57918102915b93841c9390800290614633565b509250929050565b5f8261467e57506001610944565b8161468a57505f610944565b81600181146146a057600281146146aa576146c6565b6001915050610944565b60ff8411156146bb576146bb61402a565b50506001821b610944565b5060208310610133831016604e8410600b84101617156146e9575081810a610944565b6146f3838361462e565b805f19048211156147065761470661402a565b029392505050565b5f611773838361467056fea264697066735822122049c53e795406cded0ce58877f8ebdac3fbc5d149d22f448ddc8420a47da6fd3264736f6c63430008140033

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

00000000000000000000000000000000000000000000000000000000000001a000000000000000000000000000000000000000000000000000000000000001e0000000000000000000000000000000000000000000000000000000000000022000000000000000000000000000000000000000000000000000000000000002800000000000000000000000000000000000000000000000000000000064778b20000000000000000000000000f50ac39c3c3bd062de4e47fcf8f3f9d37b94874a00000000000000000000000000000000000000000000000000000000000002ee00000000000000000000000000000000000000000000000000000000000002e00000000000000000000000000000000000000000000000000000000000000340000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000001db329cde457d68b872766f4e12f9532bca9149b38376131613564396239333634386635613966633930666538303336383561350000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000000000000000000000000000000000000000000d4d6574616d6f7270686f7365730000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000034d4d500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003f68747470733a2f2f617277656176652e6e65742f6e4a664530686d424766357045424e6d6a6f544f7a2d47592d7a755050563265354753594d73795a46374100000000000000000000000000000000000000000000000000000000000000003768747470733a2f2f7777772e737461626c652d64696c7574696f6e2e6172742f6e66742f6974656d2f67656e65726174696f6e2f31312f0000000000000000000000000000000000000000000000000000000000000000000000000000000002000000000000000000000000f50ac39c3c3bd062de4e47fcf8f3f9d37b94874a0000000000000000000000008b7adc43153bcfae98ab20ce9fff23331f54238700000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000028000000000000000000000000000000000000000000000000000000000000003c

-----Decoded View---------------
Arg [0] : _name (string): Metamorphoses
Arg [1] : _symbol (string): MMP
Arg [2] : _placeholderTokenUri (string): https://arweave.net/nJfE0hmBGf5pEBNmjoTOz-GY-zuPPV2e5GSYMsyZF7A
Arg [3] : _baseUri (string): https://www.stable-dilution.art/nft/item/generation/11/
Arg [4] : _saleStartTime (uint256): 1685556000
Arg [5] : _royalReceiver (address): 0xF50Ac39c3C3bd062dE4E47fCF8F3F9d37b94874a
Arg [6] : _royalFeeNumerator (uint96): 750
Arg [7] : payees (address[]): 0xF50Ac39c3C3bd062dE4E47fCF8F3F9d37b94874a,0x8B7adc43153bCfAe98AB20ce9ffF23331F542387
Arg [8] : shares_ (uint256[]): 40,60
Arg [9] : chainlinkInformation (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]

-----Encoded View---------------
29 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000001e0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000220
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000280
Arg [4] : 0000000000000000000000000000000000000000000000000000000064778b20
Arg [5] : 000000000000000000000000f50ac39c3c3bd062de4e47fcf8f3f9d37b94874a
Arg [6] : 00000000000000000000000000000000000000000000000000000000000002ee
Arg [7] : 00000000000000000000000000000000000000000000000000000000000002e0
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000340
Arg [9] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [10] : 0000000000000000000000001db329cde457d68b872766f4e12f9532bca9149b
Arg [11] : 3837613161356439623933363438663561396663393066653830333638356135
Arg [12] : 0000000000000000000000000000000000000000000000001bc16d674ec80000
Arg [13] : 000000000000000000000000000000000000000000000000000000000000000d
Arg [14] : 4d6574616d6f7270686f73657300000000000000000000000000000000000000
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [16] : 4d4d500000000000000000000000000000000000000000000000000000000000
Arg [17] : 000000000000000000000000000000000000000000000000000000000000003f
Arg [18] : 68747470733a2f2f617277656176652e6e65742f6e4a664530686d4247663570
Arg [19] : 45424e6d6a6f544f7a2d47592d7a755050563265354753594d73795a46374100
Arg [20] : 0000000000000000000000000000000000000000000000000000000000000037
Arg [21] : 68747470733a2f2f7777772e737461626c652d64696c7574696f6e2e6172742f
Arg [22] : 6e66742f6974656d2f67656e65726174696f6e2f31312f000000000000000000
Arg [23] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [24] : 000000000000000000000000f50ac39c3c3bd062de4e47fcf8f3f9d37b94874a
Arg [25] : 0000000000000000000000008b7adc43153bcfae98ab20ce9fff23331f542387
Arg [26] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [27] : 0000000000000000000000000000000000000000000000000000000000000028
Arg [28] : 000000000000000000000000000000000000000000000000000000000000003c


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.