ETH Price: $3,317.31 (-3.40%)
Gas: 22 Gwei

Token

JEAN CLAUDE DAMN VAN (JCDV)
 

Overview

Max Total Supply

179 JCDV

Holders

56

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
ryanindo.eth
0xA2A0A02B75BAD38a4ed423Ff56EB5787E52dFe62
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:
JEANCLAUDEDAMNVAN

Compiler Version
v0.8.20+commit.a1b79de6

Optimization Enabled:
Yes with 200 runs

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

pragma solidity ^0.8.20;

/// @title: JEAN CLAUDE DAMN VAN
/// @author: white lights & sidewaysDAO

import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV3Interface.sol";
import "@manifoldxyz/libraries-solidity/contracts/access/AdminControl.sol";
import "./ITokenURISupplier.sol";

//////////////////////////////////////////////////////////////////////////////////////
//                                                                                  //
//                                                ,,                                //
//                                              ╓φ░░░░φ                             //
//                                          ╓φ▒░░░░░░░╠▒                            //
//                                  ,,╓╔φ▒▒░░░░░░░░░▒╠╣▒                            //
//                          ,╓φφ▒▒░░░░░░░░░░░░░░▒▒╠╬╬╩                              //
//                      ╓φ╠░░░░░░░░░░░░░▒▒▒▒▒▒╠╠╬╬╣╩                                //
//                    φ╠╩░░░░░░░░░░▒▒▒▒▒╠╠╠╬╬╣╝╩╙`                                  //
//                  ;╠╩░░░░░░░░░░░░╚╚╚╚╚╚╚╚╚╚╚░░░▒░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒φ╓    //
//                  ╔╠▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╠▒  //
//    ,╬╠▒▒▒φφσ╓,╓╬╠▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒╠╬   //
//    ╔╠▒╚╚╠╠╠╠╠╠╠╩▒░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒╠╠╠╠╬╩   //
//  φ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒╠╩╩╩╩╩╩╩╩╩╩╩╩╩╩╩╩╩╚╙╙╙╙╙╙╙└       //
//  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╠╠ε                               //
//  «░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒╠                              //
//  φ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒╠╩                              //
//  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒╠`                               //
//  ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░╠ε                               //
//  ╚░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░▒╠░                               //
//  ]▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒░░░░░░░░░░░░░░░░░░░░░░░░▒╠╩                                //
//  ╠▒▒╠╠╠╠╠╠╠╠╠╠╠▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒╠╬╙                                  //
//  `╠╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╠╠╠╠╠╠╠▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒╠╬▒                                   //
//    ╚╬╬╬╬╬╬╬╬╬╬╬╬╣╣╬╬╬╬╬╬╬╬╬╠╠╠╠╠╠╠╠╠╠╠╠╠╠╬╬╬╬                                    //
//      `╚╣╣╣╝╩╩╙╙└`  ╙╚╝╣╣╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╬╣╩                                    //
//                          ╙╙╙╙╩╩╩╩╩╩╩╩╙╙╙                                         //
//                                                                                  //
//                                                                                  //
//////////////////////////////////////////////////////////////////////////////////////
// An ERC1155 Gumball Machine

contract JEANCLAUDEDAMNVAN is AdminControl, ERC1155, ReentrancyGuard {
  uint256 public salePrice = 40000000000000000;
  bool public activated;
  bool private transferSemaphore;
  uint256 public gumballsLeft = 0;
  ITokenURISupplier public tokenURIContract;

  address[] public artists;
  uint256[] private availableTokenIds;
  uint256 private availableTokenIdsLength;
  mapping(uint256 => uint256) private tokenIdToEditionCount;

  AggregatorV3Interface ethUsdPriceFeed = AggregatorV3Interface(0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419);

  error NotActivated();
  error Paused();
  error SoldOut();
  error WrongSalesPrice();
  error MachineIsLocked();

  constructor() ERC1155("") {}

  function withdraw() external adminRequired {
    payable(msg.sender).transfer(address(this).balance);
  }

  function supportsInterface(bytes4 interfaceId)
    public
    view
    virtual
    override(AdminControl, ERC1155)
    returns (bool)
  {
    return
      AdminControl.supportsInterface(interfaceId) ||
      ERC1155.supportsInterface(interfaceId) ||
      super.supportsInterface(interfaceId);
  }

  function name() public view virtual returns (string memory) {
    return "JEAN CLAUDE DAMN VAN";
  }

  function symbol() public view virtual returns (string memory) {
    return "JCDV";
  }

  /**
   * @dev See {IERC1155-isApprovedForAll}.
   *
   * This implementation allows only the owner to transfer tokens.
   * If that check fails, we let them through when transferSemaphore is set.
   * The transferSemaphore is only ever set for one line during buyGumball().
   */
  function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {
    return super.isApprovedForAll(account, operator) || transferSemaphore;
  }

  function setActivate(bool val) external adminRequired {
    activated = val;
  }

  function setPrice(uint256 val) external adminRequired {
    salePrice = val;
  }

  /**
   * Sets up the initial set of artist wallet that can autograph the contract
   *
   * @param _artistWallets the addresses of the artists that will be able to autograph the contract
   */
  function setArtists(address[] memory _artistWallets) external adminRequired {
    if (activated || gumballsLeft > 0)
      revert MachineIsLocked();

    artists = _artistWallets;
  }

  /**
   * Allows the uri() this contract returns to be controlled by another contract.
   *
   * @param addy the address of the contract that implements the tokenURI function
   */
  function setTokenURIContract(address addy) external adminRequired {
    tokenURIContract = ITokenURISupplier(addy);
  }

  /**
   * @dev See {IERC1155MetadataURI-uri}.
   *
   * This implementation makes a proxy call to another contract for the uri.
   */
  function uri(uint256 tokenId) public view virtual override returns (string memory) {
    return tokenURIContract.tokenURI(tokenId);
  }

  /**
   * @notice
   *
   * By signing this contract, the artist authorizes the creation and sale of a
   * limited-edition artwork for this exhibition.
   *
   * The contract maintains a list of eligible artists who can participate
   * in the exhibition by signing the contract. If you're not on the list,
   * you cannot sign the contract, and you cannot be in the exhibition.
   *
   * If you're on the list, your artwork will only be a part of the exhibition
   * after you sign. You can sign the contract at any time before the exhibition
   * starts, but once the exhibition starts, you are locked out.
   *
   * When minted, the art is first sent to the artist's wallet, followed
   * by the buyer's wallet. This ensures on-chain evidence of the artist's
   * "signature" on the artwork, giving the buyer confidence in the token's
   * authenticity as part of that artist's provenance.
   *
   * "I am the artist of token X and approve 11 editions to be created and sold"
   */
  function sign() public {
    if (activated)
      revert MachineIsLocked();

    bool found = false;
    uint256 foundId = 0;
    for(;foundId < artists.length;) {
      if (artists[foundId] == _msgSender()) {
        found = true;
        foundId = foundId;
        break;
      }

      unchecked {
        foundId++;
      }
    }

    if (!found)
      revert MachineIsLocked();

    if (tokenIdToEditionCount[foundId] > 0)
      revert MachineIsLocked();

    // tracks the total supply of all tokens
    unchecked {
      gumballsLeft += 11;
    }
    // tracks the token ids that are approved for minting
    availableTokenIds.push(foundId);
    // tracks the "end" of the array that we can select from (see swap algo)
    availableTokenIdsLength = availableTokenIds.length;
    // tracks the supply left of that token id
    tokenIdToEditionCount[foundId] = 11;
  }

  /**
   * @dev Used for publicly minting artworks.
   * @param numberOfTokens the number of tokens to buy
   */
  function buyGumball(uint256 numberOfTokens) public payable {
    if (!activated)
      revert NotActivated();

    uint256 _gumballsLeft = gumballsLeft;
    uint256 _availableTokenIdsLength = availableTokenIdsLength;

    if ((_gumballsLeft == 0) || _gumballsLeft < numberOfTokens)
      revert SoldOut();

    bool isDiscounted = numberOfTokens % 3 == 0;
    uint256 expectedPayment = numberOfTokens * salePrice * (isDiscounted ? 5 : 6) / 6;

    if (msg.value != expectedPayment)
      revert WrongSalesPrice();

    (,int256 price,,,) = ethUsdPriceFeed.latestRoundData();

    for(uint i; i < numberOfTokens;) {
      uint256 rngIndex = getRandomNumberDuringWriteTx(_availableTokenIdsLength, price);
      uint256 tokenId;

      uint tries = 0;

      do {
        if (tries > _availableTokenIdsLength) {
          break;
        }

        rngIndex = getRandomNumberDuringWriteTx(_availableTokenIdsLength, price);
        tokenId = availableTokenIds[rngIndex];
        tries++;
      } while (tokenIdToEditionCount[tokenId] == 0);

      address artistWallet = artists[tokenId];

      unchecked {
        tokenIdToEditionCount[tokenId]--;
        _gumballsLeft--;
      }

      if (tokenIdToEditionCount[tokenId] == 0) {
        availableTokenIds[rngIndex] = availableTokenIds[_availableTokenIdsLength - 1];
        unchecked {
          _availableTokenIdsLength--;
        }
      }

      _mint(artistWallet, tokenId, 1, "");
      transferSemaphore = true;
      safeTransferFrom(artistWallet, msg.sender, tokenId, 1, "");
      transferSemaphore = false;

      unchecked {
        i++;
      }
    }

    gumballsLeft = _gumballsLeft;
    availableTokenIdsLength = _availableTokenIdsLength;
  }


  uint256 private nonce = 9356734589;
  /**
   * @dev gives a random digit from 0 (exclusive) to _range (inclusive)
   * @param _range the range of the random number
   * @param price  the price of eth in usd as a PRNG seed
   */
  function getRandomNumberDuringWriteTx(uint256 _range, int256 price) private returns (uint256) {
    uint256 random = uint256(keccak256(abi.encodePacked(
      msg.sender,
      // pack all 256 bit variables together
      block.timestamp,
      tx.gasprice,
      price,
      nonce
    )));

    unchecked {
      nonce += 1;
    }

    return random % _range;
  }
}

File 2 of 16 : ITokenURISupplier.sol
// SPDX-License-Identifier: Unlicense

pragma solidity ^0.8.19;

import "@openzeppelin/contracts/utils/introspection/IERC165.sol";

interface ITokenURISupplier is IERC165 {
  function tokenURI(uint256 id) external view returns (string memory);
}

File 3 of 16 : AdminControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./IAdminControl.sol";

abstract contract AdminControl is Ownable, IAdminControl, ERC165 {
    using EnumerableSet for EnumerableSet.AddressSet;

    // Track registered admins
    EnumerableSet.AddressSet private _admins;

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

    /**
     * @dev Only allows approved admins to call the specified function
     */
    modifier adminRequired() {
        require(owner() == msg.sender || _admins.contains(msg.sender), "AdminControl: Must be owner or admin");
        _;
    }   

    /**
     * @dev See {IAdminControl-getAdmins}.
     */
    function getAdmins() external view override returns (address[] memory admins) {
        admins = new address[](_admins.length());
        for (uint i = 0; i < _admins.length(); i++) {
            admins[i] = _admins.at(i);
        }
        return admins;
    }

    /**
     * @dev See {IAdminControl-approveAdmin}.
     */
    function approveAdmin(address admin) external override onlyOwner {
        if (!_admins.contains(admin)) {
            emit AdminApproved(admin, msg.sender);
            _admins.add(admin);
        }
    }

    /**
     * @dev See {IAdminControl-revokeAdmin}.
     */
    function revokeAdmin(address admin) external override onlyOwner {
        if (_admins.contains(admin)) {
            emit AdminRevoked(admin, msg.sender);
            _admins.remove(admin);
        }
    }

    /**
     * @dev See {IAdminControl-isAdmin}.
     */
    function isAdmin(address admin) public override view returns (bool) {
        return (owner() == admin || _admins.contains(admin));
    }

}

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

interface AggregatorV3Interface {
  function decimals() external view returns (uint8);

  function description() external view returns (string memory);

  function version() external view returns (uint256);

  function getRoundData(uint80 _roundId)
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

  function latestRoundData()
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );
}

File 5 of 16 : 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 6 of 16 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 7 of 16 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of the basic standard multi-token.
 * See https://eips.ethereum.org/EIPS/eip-1155
 * Originally based on code by Enjin: https://github.com/enjin/erc-1155
 *
 * _Available since v3.1._
 */
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
    using Address for address;

    // Mapping from token ID to account balances
    mapping(uint256 => mapping(address => uint256)) private _balances;

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

    // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
    string private _uri;

    /**
     * @dev See {_setURI}.
     */
    constructor(string memory uri_) {
        _setURI(uri_);
    }

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

    /**
     * @dev See {IERC1155MetadataURI-uri}.
     *
     * This implementation returns the same URI for *all* token types. It relies
     * on the token type ID substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * Clients calling this function must replace the `\{id\}` substring with the
     * actual token type ID.
     */
    function uri(uint256) public view virtual override returns (string memory) {
        return _uri;
    }

    /**
     * @dev See {IERC1155-balanceOf}.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
        require(account != address(0), "ERC1155: balance query for the zero address");
        return _balances[id][account];
    }

    /**
     * @dev See {IERC1155-balanceOfBatch}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
        public
        view
        virtual
        override
        returns (uint256[] memory)
    {
        require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");

        uint256[] memory batchBalances = new uint256[](accounts.length);

        for (uint256 i = 0; i < accounts.length; ++i) {
            batchBalances[i] = balanceOf(accounts[i], ids[i]);
        }

        return batchBalances;
    }

    /**
     * @dev See {IERC1155-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        _setApprovalForAll(_msgSender(), operator, approved);
    }

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

    /**
     * @dev See {IERC1155-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );
        _safeTransferFrom(from, to, id, amount, data);
    }

    /**
     * @dev See {IERC1155-safeBatchTransferFrom}.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public virtual override {
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: transfer caller is not owner nor approved"
        );
        _safeBatchTransferFrom(from, to, ids, amounts, data);
    }

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }
        _balances[id][to] += amount;

        emit TransferSingle(operator, from, to, id, amount);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _safeBatchTransferFrom(
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
        require(to != address(0), "ERC1155: transfer to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; ++i) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
            _balances[id][to] += amount;
        }

        emit TransferBatch(operator, from, to, ids, amounts);

        _afterTokenTransfer(operator, from, to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
    }

    /**
     * @dev Sets a new URI for all token types, by relying on the token type ID
     * substitution mechanism
     * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
     *
     * By this mechanism, any occurrence of the `\{id\}` substring in either the
     * URI or any of the amounts in the JSON file at said URI will be replaced by
     * clients with the token type ID.
     *
     * For example, the `https://token-cdn-domain/\{id\}.json` URI would be
     * interpreted by clients as
     * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
     * for token type ID 0x4cce0.
     *
     * See {uri}.
     *
     * Because these URIs cannot be meaningfully represented by the {URI} event,
     * this function emits no events.
     */
    function _setURI(string memory newuri) internal virtual {
        _uri = newuri;
    }

    /**
     * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        _balances[id][to] += amount;
        emit TransferSingle(operator, address(0), to, id, amount);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, address(0), to, ids, amounts, data);

        for (uint256 i = 0; i < ids.length; i++) {
            _balances[ids[i]][to] += amounts[i];
        }

        emit TransferBatch(operator, address(0), to, ids, amounts);

        _afterTokenTransfer(operator, address(0), to, ids, amounts, data);

        _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
    }

    /**
     * @dev Destroys `amount` tokens of token type `id` from `from`
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `from` must have at least `amount` tokens of token type `id`.
     */
    function _burn(
        address from,
        uint256 id,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");

        address operator = _msgSender();
        uint256[] memory ids = _asSingletonArray(id);
        uint256[] memory amounts = _asSingletonArray(amount);

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        uint256 fromBalance = _balances[id][from];
        require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
        unchecked {
            _balances[id][from] = fromBalance - amount;
        }

        emit TransferSingle(operator, from, address(0), id, amount);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     */
    function _burnBatch(
        address from,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual {
        require(from != address(0), "ERC1155: burn from the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, address(0), ids, amounts, "");

        for (uint256 i = 0; i < ids.length; i++) {
            uint256 id = ids[i];
            uint256 amount = amounts[i];

            uint256 fromBalance = _balances[id][from];
            require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
            unchecked {
                _balances[id][from] = fromBalance - amount;
            }
        }

        emit TransferBatch(operator, from, address(0), ids, amounts);

        _afterTokenTransfer(operator, from, address(0), ids, amounts, "");
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC1155: setting approval status for self");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    /**
     * @dev Hook that is called after any token transfer. This includes minting
     * and burning, as well as batched variants.
     *
     * The same hook is called on both single and batched variants. For single
     * transfers, the length of the `id` and `amount` arrays will be 1.
     *
     * Calling conditions (for each `id` and `amount` pair):
     *
     * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * of token type `id` will be  transferred to `to`.
     * - When `from` is zero, `amount` tokens of token type `id` will be minted
     * for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
     * will be burned.
     * - `from` and `to` are never both zero.
     * - `ids` and `amounts` have the same, non-zero length.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {}

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.onERC1155Received.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _doSafeBatchTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
                bytes4 response
            ) {
                if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
                    revert("ERC1155: ERC1155Receiver rejected tokens");
                }
            } catch Error(string memory reason) {
                revert(reason);
            } catch {
                revert("ERC1155: transfer to non ERC1155Receiver implementer");
            }
        }
    }

    function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
        uint256[] memory array = new uint256[](1);
        array[0] = element;

        return array;
    }
}

File 8 of 16 : 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 9 of 16 : 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 10 of 16 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 11 of 16 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)

pragma solidity ^0.8.0;

import "../IERC1155.sol";

/**
 * @dev Interface of the optional ERC1155MetadataExtension interface, as defined
 * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155MetadataURI is IERC1155 {
    /**
     * @dev Returns the URI for token type `id`.
     *
     * If the `\{id\}` substring is present in the URI, it must be replaced by
     * clients with the actual token type ID.
     */
    function uri(uint256 id) external view returns (string memory);
}

File 12 of 16 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev _Available since v3.1._
 */
interface IERC1155Receiver is IERC165 {
    /**
     * @dev Handles the receipt of a single ERC1155 token type. This function is
     * called at the end of a `safeTransferFrom` after the balance has been updated.
     *
     * NOTE: To accept the transfer, this must return
     * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
     * (i.e. 0xf23a6e61, or its own function selector).
     *
     * @param operator The address which initiated the transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param id The ID of the token being transferred
     * @param value The amount of tokens being transferred
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
     */
    function onERC1155Received(
        address operator,
        address from,
        uint256 id,
        uint256 value,
        bytes calldata data
    ) external returns (bytes4);

    /**
     * @dev Handles the receipt of a multiple ERC1155 token types. This function
     * is called at the end of a `safeBatchTransferFrom` after the balances have
     * been updated.
     *
     * NOTE: To accept the transfer(s), this must return
     * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
     * (i.e. 0xbc197c81, or its own function selector).
     *
     * @param operator The address which initiated the batch transfer (i.e. msg.sender)
     * @param from The address which previously owned the token
     * @param ids An array containing ids of each token being transferred (order and length must match values array)
     * @param values An array containing amounts of each token being transferred (order and length must match ids array)
     * @param data Additional data with no specified format
     * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
     */
    function onERC1155BatchReceived(
        address operator,
        address from,
        uint256[] calldata ids,
        uint256[] calldata values,
        bytes calldata data
    ) external returns (bytes4);
}

File 13 of 16 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

File 14 of 16 : IAdminControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/// @author: manifold.xyz

import "@openzeppelin/contracts/utils/introspection/IERC165.sol";

/**
 * @dev Interface for admin control
 */
interface IAdminControl is IERC165 {

    event AdminApproved(address indexed account, address indexed sender);
    event AdminRevoked(address indexed account, address indexed sender);

    /**
     * @dev gets address of all admins
     */
    function getAdmins() external view returns (address[] memory);

    /**
     * @dev add an admin.  Can only be called by contract owner.
     */
    function approveAdmin(address admin) external;

    /**
     * @dev remove an admin.  Can only be called by contract owner.
     */
    function revokeAdmin(address admin) external;

    /**
     * @dev checks whether or not given address is an admin
     * Returns True if they are
     */
    function isAdmin(address admin) external view returns (bool);

}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 16 of 16 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

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

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastValue;
                // Update the index for the moved value
                set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex
            }

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

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"MachineIsLocked","type":"error"},{"inputs":[],"name":"NotActivated","type":"error"},{"inputs":[],"name":"Paused","type":"error"},{"inputs":[],"name":"SoldOut","type":"error"},{"inputs":[],"name":"WrongSalesPrice","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminApproved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"AdminRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"activated","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"approveAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"artists","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfTokens","type":"uint256"}],"name":"buyGumball","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"getAdmins","outputs":[{"internalType":"address[]","name":"admins","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gumballsLeft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"admin","type":"address"}],"name":"revokeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"salePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"val","type":"bool"}],"name":"setActivate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_artistWallets","type":"address[]"}],"name":"setArtists","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"val","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addy","type":"address"}],"name":"setTokenURIContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"sign","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenURIContract","outputs":[{"internalType":"contract ITokenURISupplier","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6080604052668e1bc9bf0400006007555f600955600f80546001600160a01b031916735f4ec3df9cbd43714fe2740f5e3616155c5b841917905564022db4707d6010553480156200004e575f80fd5b5060408051602081019091525f815262000068336200007f565b6200007381620000ce565b50600160065562000248565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6005620000dc828262000180565b5050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806200010957607f821691505b6020821081036200012857634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200017b575f81815260208120601f850160051c81016020861015620001565750805b601f850160051c820191505b81811015620001775782815560010162000162565b5050505b505050565b81516001600160401b038111156200019c576200019c620000e0565b620001b481620001ad8454620000f4565b846200012e565b602080601f831160018114620001ea575f8415620001d25750858301515b5f19600386901b1c1916600185901b17855562000177565b5f85815260208120601f198616915b828110156200021a57888601518255948401946001909101908401620001f9565b50858210156200023857878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b6126a580620002565f395ff3fe6080604052600436106101b9575f3560e01c80636d73e669116100f2578063a22cb46511610092578063e985e9c511610062578063e985e9c514610503578063f242432a14610522578063f2fde38b14610541578063f51f96dd14610560575f80fd5b8063a22cb46514610491578063a52302c4146104b0578063c346d9db146104c5578063cd7e10c1146104e4575f80fd5b806382fc3147116100cd57806382fc31471461040b5780638da5cb5b1461042a57806391b7f5ed1461044657806395d89b4114610465575f80fd5b80636d73e669146103b9578063715018a6146103d857806376d6de66146103ec575f80fd5b80632ca151221161015d57806331ae450b1161013857806331ae450b146103215780633ccfd60b146103425780634e1273f414610356578063698f87be14610382575f80fd5b80632ca15122146102cf5780632d345670146102e35780632eb2c2d614610302575f80fd5b80630e89341c116101985780630e89341c14610263578063186601ca146102825780632446ef471461029b57806324d7806c146102b0575f80fd5b8062fdd58e146101bd57806301ffc9a7146101ef57806306fdde031461021e575b5f80fd5b3480156101c8575f80fd5b506101dc6101d7366004611c98565b610575565b6040519081526020015b60405180910390f35b3480156101fa575f80fd5b5061020e610209366004611cd5565b61060f565b60405190151581526020016101e6565b348015610229575f80fd5b506040805180820190915260148152732522a0a71021a620aaa222902220a6a7102b20a760611b60208201525b6040516101e69190611d3d565b34801561026e575f80fd5b5061025661027d366004611d4f565b610637565b34801561028d575f80fd5b5060085461020e9060ff1681565b6102ae6102a9366004611d4f565b6106a5565b005b3480156102bb575f80fd5b5061020e6102ca366004611d66565b61094c565b3480156102da575f80fd5b506102ae610983565b3480156102ee575f80fd5b506102ae6102fd366004611d66565b610a96565b34801561030d575f80fd5b506102ae61031c366004611ed0565b610b14565b34801561032c575f80fd5b50610335610bab565b6040516101e69190611f73565b34801561034d575f80fd5b506102ae610c59565b348015610361575f80fd5b50610375610370366004612029565b610ccb565b6040516101e691906120c2565b34801561038d575f80fd5b50600a546103a1906001600160a01b031681565b6040516001600160a01b0390911681526020016101e6565b3480156103c4575f80fd5b506102ae6103d3366004611d66565b610df3565b3480156103e3575f80fd5b506102ae610e6b565b3480156103f7575f80fd5b506102ae6104063660046120e3565b610e9f565b348015610416575f80fd5b506102ae610425366004611d66565b610efb565b348015610435575f80fd5b505f546001600160a01b03166103a1565b348015610451575f80fd5b506102ae610460366004611d4f565b610f66565b348015610470575f80fd5b506040805180820190915260048152632521a22b60e11b6020820152610256565b34801561049c575f80fd5b506102ae6104ab3660046120fc565b610fb4565b3480156104bb575f80fd5b506101dc60095481565b3480156104d0575f80fd5b506102ae6104df36600461212d565b610fbf565b3480156104ef575f80fd5b506103a16104fe366004611d4f565b61104b565b34801561050e575f80fd5b5061020e61051d36600461215f565b611073565b34801561052d575f80fd5b506102ae61053c366004612187565b6110b6565b34801561054c575f80fd5b506102ae61055b366004611d66565b61113d565b34801561056b575f80fd5b506101dc60075481565b5f6001600160a01b0383166105e55760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b505f8181526003602090815260408083206001600160a01b03861684529091529020545b92915050565b5f610619826111d4565b80610628575061062882611208565b80610609575061060982611208565b600a5460405163c87b56dd60e01b8152600481018390526060916001600160a01b03169063c87b56dd906024015f60405180830381865afa15801561067e573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261060991908101906121e7565b60085460ff166106c85760405163037c597f60e01b815260040160405180910390fd5b600954600d548115806106da57508282105b156106f8576040516352df9fe560e01b815260040160405180910390fd5b5f610704600385612278565b1590505f600682610716576006610719565b60055b60ff166007548761072a919061229f565b610734919061229f565b61073e91906122b6565b90508034146107605760405163913f5bf360e01b815260040160405180910390fd5b600f5460408051633fabe5a360e21b815290515f926001600160a01b03169163feaf968c9160048083019260a09291908290030181865afa1580156107a7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107cb91906122e2565b5050509150505f5b8681101561093c575f6107e68684611247565b90505f805b878111610840576107fc8886611247565b9250600c83815481106108115761081161232e565b905f5260205f2001549150808061082790612342565b5f848152600e60205260409020549092501590506107eb575b5f600b83815481106108545761085461232e565b5f918252602080832090910154858352600e9091526040822080545f198082019092559c019b6001600160a01b03909116925090036001016108db57600c61089d60018b61235a565b815481106108ad576108ad61232e565b905f5260205f200154600c85815481106108c9576108c961232e565b5f918252602090912001555f19909801975b6108f68184600160405180602001604052805f8152506112bc565b6008805461ff00191661010017905560408051602081019091525f8152610925908290339086906001906110b6565b50506008805461ff001916905550506001016107d3565b505050600992909255600d555050565b5f816001600160a01b03166109685f546001600160a01b031690565b6001600160a01b0316148061060957506106096001836113cd565b60085460ff16156109a7576040516323a9ac2f60e21b815260040160405180910390fd5b5f805b600b548110156109fb57336001600160a01b0316600b82815481106109d1576109d161232e565b5f918252602090912001546001600160a01b0316036109f357600191506109fb565b6001016109aa565b81610a19576040516323a9ac2f60e21b815260040160405180910390fd5b5f818152600e602052604090205415610a45576040516323a9ac2f60e21b815260040160405180910390fd5b60098054600b908101909155600c80546001810182557fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c70183905554600d555f918252600e60205260409091205550565b5f546001600160a01b03163314610abf5760405162461bcd60e51b81526004016105dc9061236d565b610aca6001826113cd565b15610b115760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d5905f90a3610b0f6001826113ee565b505b50565b6001600160a01b038516331480610b305750610b308533611073565b610b975760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016105dc565b610ba48585858585611402565b5050505050565b6060610bb760016115dd565b67ffffffffffffffff811115610bcf57610bcf611d7f565b604051908082528060200260200182016040528015610bf8578160200160208202803683370190505b5090505f5b610c0760016115dd565b811015610c5557610c196001826115e6565b828281518110610c2b57610c2b61232e565b6001600160a01b039092166020928302919091019091015280610c4d81612342565b915050610bfd565b5090565b33610c6b5f546001600160a01b031690565b6001600160a01b03161480610c865750610c866001336113cd565b610ca25760405162461bcd60e51b81526004016105dc906123a2565b60405133904780156108fc02915f818181858888f19350505050158015610b11573d5f803e3d5ffd5b60608151835114610d305760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016105dc565b5f835167ffffffffffffffff811115610d4b57610d4b611d7f565b604051908082528060200260200182016040528015610d74578160200160208202803683370190505b5090505f5b8451811015610deb57610dbe858281518110610d9757610d9761232e565b6020026020010151858381518110610db157610db161232e565b6020026020010151610575565b828281518110610dd057610dd061232e565b6020908102919091010152610de481612342565b9050610d79565b509392505050565b5f546001600160a01b03163314610e1c5760405162461bcd60e51b81526004016105dc9061236d565b610e276001826113cd565b610b115760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb1905f90a3610b0f6001826115f1565b5f546001600160a01b03163314610e945760405162461bcd60e51b81526004016105dc9061236d565b610e9d5f611605565b565b33610eb15f546001600160a01b031690565b6001600160a01b03161480610ecc5750610ecc6001336113cd565b610ee85760405162461bcd60e51b81526004016105dc906123a2565b6008805460ff1916911515919091179055565b33610f0d5f546001600160a01b031690565b6001600160a01b03161480610f285750610f286001336113cd565b610f445760405162461bcd60e51b81526004016105dc906123a2565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b33610f785f546001600160a01b031690565b6001600160a01b03161480610f935750610f936001336113cd565b610faf5760405162461bcd60e51b81526004016105dc906123a2565b600755565b610b0f338383611654565b33610fd15f546001600160a01b031690565b6001600160a01b03161480610fec5750610fec6001336113cd565b6110085760405162461bcd60e51b81526004016105dc906123a2565b60085460ff168061101a57505f600954115b15611038576040516323a9ac2f60e21b815260040160405180910390fd5b8051610b0f90600b906020840190611c0f565b600b818154811061105a575f80fd5b5f918252602090912001546001600160a01b0316905081565b6001600160a01b038083165f90815260046020908152604080832093851683529290529081205460ff16806110af5750600854610100900460ff165b9392505050565b6001600160a01b0385163314806110d257506110d28533611073565b6111305760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016105dc565b610ba48585858585611733565b5f546001600160a01b031633146111665760405162461bcd60e51b81526004016105dc9061236d565b6001600160a01b0381166111cb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105dc565b610b1181611605565b5f6001600160e01b03198216632a9f3abf60e11b148061060957506301ffc9a760e01b6001600160e01b0319831614610609565b5f6001600160e01b03198216636cdb3d1360e11b148061123857506001600160e01b031982166303a24d0760e21b145b806106095750610609826111d4565b6010546040516bffffffffffffffffffffffff193360601b1660208201524260348201523a60548201526074810183905260948101919091525f90819060b40160408051601f19818403018152919052805160209091012060108054600101905590506112b48482612278565b949350505050565b6001600160a01b03841661131c5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016105dc565b335f6113278561185d565b90505f6113338561185d565b90505f8681526003602090815260408083206001600160a01b038b168452909152812080548792906113669084906123e6565b909155505060408051878152602081018790526001600160a01b03808a16925f92918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46113c4835f898989896118a6565b50505050505050565b6001600160a01b0381165f90815260018301602052604081205415156110af565b5f6110af836001600160a01b038416611a00565b81518351146114645760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016105dc565b6001600160a01b03841661148a5760405162461bcd60e51b81526004016105dc906123f9565b335f5b845181101561156f575f8582815181106114a9576114a961232e565b602002602001015190505f8583815181106114c6576114c661232e565b6020908102919091018101515f8481526003835260408082206001600160a01b038e1683529093529190912054909150818110156115165760405162461bcd60e51b81526004016105dc9061243e565b5f8381526003602090815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906115549084906123e6565b925050819055505050508061156890612342565b905061148d565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516115bf929190612488565b60405180910390a46115d5818787878787611ae3565b505050505050565b5f610609825490565b5f6110af8383611b9d565b5f6110af836001600160a01b038416611bc3565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b816001600160a01b0316836001600160a01b0316036116c75760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016105dc565b6001600160a01b038381165f81815260046020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166117595760405162461bcd60e51b81526004016105dc906123f9565b335f6117648561185d565b90505f6117708561185d565b90505f8681526003602090815260408083206001600160a01b038c168452909152902054858110156117b45760405162461bcd60e51b81526004016105dc9061243e565b5f8781526003602090815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906117f29084906123e6565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611852848a8a8a8a8a6118a6565b505050505050505050565b6040805160018082528183019092526060915f91906020808301908036833701905050905082815f815181106118955761189561232e565b602090810291909101015292915050565b6001600160a01b0384163b156115d55760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906118ea90899089908890889088906004016124b5565b6020604051808303815f875af1925050508015611924575060408051601f3d908101601f19168201909252611921918101906124f9565b60015b6119d057611930612514565b806308c379a003611969575061194461252d565b8061194f575061196b565b8060405162461bcd60e51b81526004016105dc9190611d3d565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016105dc565b6001600160e01b0319811663f23a6e6160e01b146113c45760405162461bcd60e51b81526004016105dc906125b6565b5f8181526001830160205260408120548015611ada575f611a2260018361235a565b85549091505f90611a359060019061235a565b9050818114611a94575f865f018281548110611a5357611a5361232e565b905f5260205f200154905080875f018481548110611a7357611a7361232e565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080611aa557611aa56125fe565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610609565b5f915050610609565b6001600160a01b0384163b156115d55760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611b279089908990889088908890600401612612565b6020604051808303815f875af1925050508015611b61575060408051601f3d908101601f19168201909252611b5e918101906124f9565b60015b611b6d57611930612514565b6001600160e01b0319811663bc197c8160e01b146113c45760405162461bcd60e51b81526004016105dc906125b6565b5f825f018281548110611bb257611bb261232e565b905f5260205f200154905092915050565b5f818152600183016020526040812054611c0857508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610609565b505f610609565b828054828255905f5260205f20908101928215611c62579160200282015b82811115611c6257825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611c2d565b50610c559291505b80821115610c55575f8155600101611c6a565b80356001600160a01b0381168114611c93575f80fd5b919050565b5f8060408385031215611ca9575f80fd5b611cb283611c7d565b946020939093013593505050565b6001600160e01b031981168114610b11575f80fd5b5f60208284031215611ce5575f80fd5b81356110af81611cc0565b5f5b83811015611d0a578181015183820152602001611cf2565b50505f910152565b5f8151808452611d29816020860160208601611cf0565b601f01601f19169290920160200192915050565b602081525f6110af6020830184611d12565b5f60208284031215611d5f575f80fd5b5035919050565b5f60208284031215611d76575f80fd5b6110af82611c7d565b634e487b7160e01b5f52604160045260245ffd5b601f8201601f1916810167ffffffffffffffff81118282101715611db957611db9611d7f565b6040525050565b5f67ffffffffffffffff821115611dd957611dd9611d7f565b5060051b60200190565b5f82601f830112611df2575f80fd5b81356020611dff82611dc0565b604051611e0c8282611d93565b83815260059390931b8501820192828101915086841115611e2b575f80fd5b8286015b84811015611e465780358352918301918301611e2f565b509695505050505050565b5f67ffffffffffffffff821115611e6a57611e6a611d7f565b50601f01601f191660200190565b5f82601f830112611e87575f80fd5b8135611e9281611e51565b604051611e9f8282611d93565b828152856020848701011115611eb3575f80fd5b826020860160208301375f92810160200192909252509392505050565b5f805f805f60a08688031215611ee4575f80fd5b611eed86611c7d565b9450611efb60208701611c7d565b9350604086013567ffffffffffffffff80821115611f17575f80fd5b611f2389838a01611de3565b94506060880135915080821115611f38575f80fd5b611f4489838a01611de3565b93506080880135915080821115611f59575f80fd5b50611f6688828901611e78565b9150509295509295909350565b602080825282518282018190525f9190848201906040850190845b81811015611fb35783516001600160a01b031683529284019291840191600101611f8e565b50909695505050505050565b5f82601f830112611fce575f80fd5b81356020611fdb82611dc0565b604051611fe88282611d93565b83815260059390931b8501820192828101915086841115612007575f80fd5b8286015b84811015611e465761201c81611c7d565b835291830191830161200b565b5f806040838503121561203a575f80fd5b823567ffffffffffffffff80821115612051575f80fd5b61205d86838701611fbf565b93506020850135915080821115612072575f80fd5b5061207f85828601611de3565b9150509250929050565b5f8151808452602080850194508084015f5b838110156120b75781518752958201959082019060010161209b565b509495945050505050565b602081525f6110af6020830184612089565b80358015158114611c93575f80fd5b5f602082840312156120f3575f80fd5b6110af826120d4565b5f806040838503121561210d575f80fd5b61211683611c7d565b9150612124602084016120d4565b90509250929050565b5f6020828403121561213d575f80fd5b813567ffffffffffffffff811115612153575f80fd5b6112b484828501611fbf565b5f8060408385031215612170575f80fd5b61217983611c7d565b915061212460208401611c7d565b5f805f805f60a0868803121561219b575f80fd5b6121a486611c7d565b94506121b260208701611c7d565b93506040860135925060608601359150608086013567ffffffffffffffff8111156121db575f80fd5b611f6688828901611e78565b5f602082840312156121f7575f80fd5b815167ffffffffffffffff81111561220d575f80fd5b8201601f8101841361221d575f80fd5b805161222881611e51565b6040516122358282611d93565b828152866020848601011115612249575f80fd5b61225a836020830160208701611cf0565b9695505050505050565b634e487b7160e01b5f52601260045260245ffd5b5f8261228657612286612264565b500690565b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176106095761060961228b565b5f826122c4576122c4612264565b500490565b805169ffffffffffffffffffff81168114611c93575f80fd5b5f805f805f60a086880312156122f6575f80fd5b6122ff866122c9565b9450602086015193506040860151925060608601519150612322608087016122c9565b90509295509295909350565b634e487b7160e01b5f52603260045260245ffd5b5f600182016123535761235361228b565b5060010190565b818103818111156106095761060961228b565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b808201808211156106095761060961228b565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b604081525f61249a6040830185612089565b82810360208401526124ac8185612089565b95945050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190525f906124ee90830184611d12565b979650505050505050565b5f60208284031215612509575f80fd5b81516110af81611cc0565b5f60033d111561252a5760045f803e505f5160e01c5b90565b5f60443d101561253a5790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561256a57505050505090565b82850191508151818111156125825750505050505090565b843d870101602082850101111561259c5750505050505090565b6125ab60208286010187611d93565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b634e487b7160e01b5f52603160045260245ffd5b6001600160a01b0386811682528516602082015260a0604082018190525f9061263d90830186612089565b828103606084015261264f8186612089565b905082810360808401526126638185611d12565b9897505050505050505056fea2646970667358221220990a0659b17510273e647fdc3a0adf2aabfca040d188e7ca1396717a37a34f4364736f6c63430008140033

Deployed Bytecode

0x6080604052600436106101b9575f3560e01c80636d73e669116100f2578063a22cb46511610092578063e985e9c511610062578063e985e9c514610503578063f242432a14610522578063f2fde38b14610541578063f51f96dd14610560575f80fd5b8063a22cb46514610491578063a52302c4146104b0578063c346d9db146104c5578063cd7e10c1146104e4575f80fd5b806382fc3147116100cd57806382fc31471461040b5780638da5cb5b1461042a57806391b7f5ed1461044657806395d89b4114610465575f80fd5b80636d73e669146103b9578063715018a6146103d857806376d6de66146103ec575f80fd5b80632ca151221161015d57806331ae450b1161013857806331ae450b146103215780633ccfd60b146103425780634e1273f414610356578063698f87be14610382575f80fd5b80632ca15122146102cf5780632d345670146102e35780632eb2c2d614610302575f80fd5b80630e89341c116101985780630e89341c14610263578063186601ca146102825780632446ef471461029b57806324d7806c146102b0575f80fd5b8062fdd58e146101bd57806301ffc9a7146101ef57806306fdde031461021e575b5f80fd5b3480156101c8575f80fd5b506101dc6101d7366004611c98565b610575565b6040519081526020015b60405180910390f35b3480156101fa575f80fd5b5061020e610209366004611cd5565b61060f565b60405190151581526020016101e6565b348015610229575f80fd5b506040805180820190915260148152732522a0a71021a620aaa222902220a6a7102b20a760611b60208201525b6040516101e69190611d3d565b34801561026e575f80fd5b5061025661027d366004611d4f565b610637565b34801561028d575f80fd5b5060085461020e9060ff1681565b6102ae6102a9366004611d4f565b6106a5565b005b3480156102bb575f80fd5b5061020e6102ca366004611d66565b61094c565b3480156102da575f80fd5b506102ae610983565b3480156102ee575f80fd5b506102ae6102fd366004611d66565b610a96565b34801561030d575f80fd5b506102ae61031c366004611ed0565b610b14565b34801561032c575f80fd5b50610335610bab565b6040516101e69190611f73565b34801561034d575f80fd5b506102ae610c59565b348015610361575f80fd5b50610375610370366004612029565b610ccb565b6040516101e691906120c2565b34801561038d575f80fd5b50600a546103a1906001600160a01b031681565b6040516001600160a01b0390911681526020016101e6565b3480156103c4575f80fd5b506102ae6103d3366004611d66565b610df3565b3480156103e3575f80fd5b506102ae610e6b565b3480156103f7575f80fd5b506102ae6104063660046120e3565b610e9f565b348015610416575f80fd5b506102ae610425366004611d66565b610efb565b348015610435575f80fd5b505f546001600160a01b03166103a1565b348015610451575f80fd5b506102ae610460366004611d4f565b610f66565b348015610470575f80fd5b506040805180820190915260048152632521a22b60e11b6020820152610256565b34801561049c575f80fd5b506102ae6104ab3660046120fc565b610fb4565b3480156104bb575f80fd5b506101dc60095481565b3480156104d0575f80fd5b506102ae6104df36600461212d565b610fbf565b3480156104ef575f80fd5b506103a16104fe366004611d4f565b61104b565b34801561050e575f80fd5b5061020e61051d36600461215f565b611073565b34801561052d575f80fd5b506102ae61053c366004612187565b6110b6565b34801561054c575f80fd5b506102ae61055b366004611d66565b61113d565b34801561056b575f80fd5b506101dc60075481565b5f6001600160a01b0383166105e55760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b505f8181526003602090815260408083206001600160a01b03861684529091529020545b92915050565b5f610619826111d4565b80610628575061062882611208565b80610609575061060982611208565b600a5460405163c87b56dd60e01b8152600481018390526060916001600160a01b03169063c87b56dd906024015f60405180830381865afa15801561067e573d5f803e3d5ffd5b505050506040513d5f823e601f3d908101601f1916820160405261060991908101906121e7565b60085460ff166106c85760405163037c597f60e01b815260040160405180910390fd5b600954600d548115806106da57508282105b156106f8576040516352df9fe560e01b815260040160405180910390fd5b5f610704600385612278565b1590505f600682610716576006610719565b60055b60ff166007548761072a919061229f565b610734919061229f565b61073e91906122b6565b90508034146107605760405163913f5bf360e01b815260040160405180910390fd5b600f5460408051633fabe5a360e21b815290515f926001600160a01b03169163feaf968c9160048083019260a09291908290030181865afa1580156107a7573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107cb91906122e2565b5050509150505f5b8681101561093c575f6107e68684611247565b90505f805b878111610840576107fc8886611247565b9250600c83815481106108115761081161232e565b905f5260205f2001549150808061082790612342565b5f848152600e60205260409020549092501590506107eb575b5f600b83815481106108545761085461232e565b5f918252602080832090910154858352600e9091526040822080545f198082019092559c019b6001600160a01b03909116925090036001016108db57600c61089d60018b61235a565b815481106108ad576108ad61232e565b905f5260205f200154600c85815481106108c9576108c961232e565b5f918252602090912001555f19909801975b6108f68184600160405180602001604052805f8152506112bc565b6008805461ff00191661010017905560408051602081019091525f8152610925908290339086906001906110b6565b50506008805461ff001916905550506001016107d3565b505050600992909255600d555050565b5f816001600160a01b03166109685f546001600160a01b031690565b6001600160a01b0316148061060957506106096001836113cd565b60085460ff16156109a7576040516323a9ac2f60e21b815260040160405180910390fd5b5f805b600b548110156109fb57336001600160a01b0316600b82815481106109d1576109d161232e565b5f918252602090912001546001600160a01b0316036109f357600191506109fb565b6001016109aa565b81610a19576040516323a9ac2f60e21b815260040160405180910390fd5b5f818152600e602052604090205415610a45576040516323a9ac2f60e21b815260040160405180910390fd5b60098054600b908101909155600c80546001810182557fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c70183905554600d555f918252600e60205260409091205550565b5f546001600160a01b03163314610abf5760405162461bcd60e51b81526004016105dc9061236d565b610aca6001826113cd565b15610b115760405133906001600160a01b038316907f7c0c3c84c67c85fcac635147348bfe374c24a1a93d0366d1cfe9d8853cbf89d5905f90a3610b0f6001826113ee565b505b50565b6001600160a01b038516331480610b305750610b308533611073565b610b975760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016105dc565b610ba48585858585611402565b5050505050565b6060610bb760016115dd565b67ffffffffffffffff811115610bcf57610bcf611d7f565b604051908082528060200260200182016040528015610bf8578160200160208202803683370190505b5090505f5b610c0760016115dd565b811015610c5557610c196001826115e6565b828281518110610c2b57610c2b61232e565b6001600160a01b039092166020928302919091019091015280610c4d81612342565b915050610bfd565b5090565b33610c6b5f546001600160a01b031690565b6001600160a01b03161480610c865750610c866001336113cd565b610ca25760405162461bcd60e51b81526004016105dc906123a2565b60405133904780156108fc02915f818181858888f19350505050158015610b11573d5f803e3d5ffd5b60608151835114610d305760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016105dc565b5f835167ffffffffffffffff811115610d4b57610d4b611d7f565b604051908082528060200260200182016040528015610d74578160200160208202803683370190505b5090505f5b8451811015610deb57610dbe858281518110610d9757610d9761232e565b6020026020010151858381518110610db157610db161232e565b6020026020010151610575565b828281518110610dd057610dd061232e565b6020908102919091010152610de481612342565b9050610d79565b509392505050565b5f546001600160a01b03163314610e1c5760405162461bcd60e51b81526004016105dc9061236d565b610e276001826113cd565b610b115760405133906001600160a01b038316907f7e1a1a08d52e4ba0e21554733d66165fd5151f99460116223d9e3a608eec5cb1905f90a3610b0f6001826115f1565b5f546001600160a01b03163314610e945760405162461bcd60e51b81526004016105dc9061236d565b610e9d5f611605565b565b33610eb15f546001600160a01b031690565b6001600160a01b03161480610ecc5750610ecc6001336113cd565b610ee85760405162461bcd60e51b81526004016105dc906123a2565b6008805460ff1916911515919091179055565b33610f0d5f546001600160a01b031690565b6001600160a01b03161480610f285750610f286001336113cd565b610f445760405162461bcd60e51b81526004016105dc906123a2565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b33610f785f546001600160a01b031690565b6001600160a01b03161480610f935750610f936001336113cd565b610faf5760405162461bcd60e51b81526004016105dc906123a2565b600755565b610b0f338383611654565b33610fd15f546001600160a01b031690565b6001600160a01b03161480610fec5750610fec6001336113cd565b6110085760405162461bcd60e51b81526004016105dc906123a2565b60085460ff168061101a57505f600954115b15611038576040516323a9ac2f60e21b815260040160405180910390fd5b8051610b0f90600b906020840190611c0f565b600b818154811061105a575f80fd5b5f918252602090912001546001600160a01b0316905081565b6001600160a01b038083165f90815260046020908152604080832093851683529290529081205460ff16806110af5750600854610100900460ff165b9392505050565b6001600160a01b0385163314806110d257506110d28533611073565b6111305760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016105dc565b610ba48585858585611733565b5f546001600160a01b031633146111665760405162461bcd60e51b81526004016105dc9061236d565b6001600160a01b0381166111cb5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105dc565b610b1181611605565b5f6001600160e01b03198216632a9f3abf60e11b148061060957506301ffc9a760e01b6001600160e01b0319831614610609565b5f6001600160e01b03198216636cdb3d1360e11b148061123857506001600160e01b031982166303a24d0760e21b145b806106095750610609826111d4565b6010546040516bffffffffffffffffffffffff193360601b1660208201524260348201523a60548201526074810183905260948101919091525f90819060b40160408051601f19818403018152919052805160209091012060108054600101905590506112b48482612278565b949350505050565b6001600160a01b03841661131c5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b60648201526084016105dc565b335f6113278561185d565b90505f6113338561185d565b90505f8681526003602090815260408083206001600160a01b038b168452909152812080548792906113669084906123e6565b909155505060408051878152602081018790526001600160a01b03808a16925f92918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46113c4835f898989896118a6565b50505050505050565b6001600160a01b0381165f90815260018301602052604081205415156110af565b5f6110af836001600160a01b038416611a00565b81518351146114645760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206044820152670dad2e6dac2e8c6d60c31b60648201526084016105dc565b6001600160a01b03841661148a5760405162461bcd60e51b81526004016105dc906123f9565b335f5b845181101561156f575f8582815181106114a9576114a961232e565b602002602001015190505f8583815181106114c6576114c661232e565b6020908102919091018101515f8481526003835260408082206001600160a01b038e1683529093529190912054909150818110156115165760405162461bcd60e51b81526004016105dc9061243e565b5f8381526003602090815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906115549084906123e6565b925050819055505050508061156890612342565b905061148d565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516115bf929190612488565b60405180910390a46115d5818787878787611ae3565b505050505050565b5f610609825490565b5f6110af8383611b9d565b5f6110af836001600160a01b038416611bc3565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b816001600160a01b0316836001600160a01b0316036116c75760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016105dc565b6001600160a01b038381165f81815260046020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6001600160a01b0384166117595760405162461bcd60e51b81526004016105dc906123f9565b335f6117648561185d565b90505f6117708561185d565b90505f8681526003602090815260408083206001600160a01b038c168452909152902054858110156117b45760405162461bcd60e51b81526004016105dc9061243e565b5f8781526003602090815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906117f29084906123e6565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4611852848a8a8a8a8a6118a6565b505050505050505050565b6040805160018082528183019092526060915f91906020808301908036833701905050905082815f815181106118955761189561232e565b602090810291909101015292915050565b6001600160a01b0384163b156115d55760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906118ea90899089908890889088906004016124b5565b6020604051808303815f875af1925050508015611924575060408051601f3d908101601f19168201909252611921918101906124f9565b60015b6119d057611930612514565b806308c379a003611969575061194461252d565b8061194f575061196b565b8060405162461bcd60e51b81526004016105dc9190611d3d565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016105dc565b6001600160e01b0319811663f23a6e6160e01b146113c45760405162461bcd60e51b81526004016105dc906125b6565b5f8181526001830160205260408120548015611ada575f611a2260018361235a565b85549091505f90611a359060019061235a565b9050818114611a94575f865f018281548110611a5357611a5361232e565b905f5260205f200154905080875f018481548110611a7357611a7361232e565b5f918252602080832090910192909255918252600188019052604090208390555b8554869080611aa557611aa56125fe565b600190038181905f5260205f20015f90559055856001015f8681526020019081526020015f205f905560019350505050610609565b5f915050610609565b6001600160a01b0384163b156115d55760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611b279089908990889088908890600401612612565b6020604051808303815f875af1925050508015611b61575060408051601f3d908101601f19168201909252611b5e918101906124f9565b60015b611b6d57611930612514565b6001600160e01b0319811663bc197c8160e01b146113c45760405162461bcd60e51b81526004016105dc906125b6565b5f825f018281548110611bb257611bb261232e565b905f5260205f200154905092915050565b5f818152600183016020526040812054611c0857508154600181810184555f848152602080822090930184905584548482528286019093526040902091909155610609565b505f610609565b828054828255905f5260205f20908101928215611c62579160200282015b82811115611c6257825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611c2d565b50610c559291505b80821115610c55575f8155600101611c6a565b80356001600160a01b0381168114611c93575f80fd5b919050565b5f8060408385031215611ca9575f80fd5b611cb283611c7d565b946020939093013593505050565b6001600160e01b031981168114610b11575f80fd5b5f60208284031215611ce5575f80fd5b81356110af81611cc0565b5f5b83811015611d0a578181015183820152602001611cf2565b50505f910152565b5f8151808452611d29816020860160208601611cf0565b601f01601f19169290920160200192915050565b602081525f6110af6020830184611d12565b5f60208284031215611d5f575f80fd5b5035919050565b5f60208284031215611d76575f80fd5b6110af82611c7d565b634e487b7160e01b5f52604160045260245ffd5b601f8201601f1916810167ffffffffffffffff81118282101715611db957611db9611d7f565b6040525050565b5f67ffffffffffffffff821115611dd957611dd9611d7f565b5060051b60200190565b5f82601f830112611df2575f80fd5b81356020611dff82611dc0565b604051611e0c8282611d93565b83815260059390931b8501820192828101915086841115611e2b575f80fd5b8286015b84811015611e465780358352918301918301611e2f565b509695505050505050565b5f67ffffffffffffffff821115611e6a57611e6a611d7f565b50601f01601f191660200190565b5f82601f830112611e87575f80fd5b8135611e9281611e51565b604051611e9f8282611d93565b828152856020848701011115611eb3575f80fd5b826020860160208301375f92810160200192909252509392505050565b5f805f805f60a08688031215611ee4575f80fd5b611eed86611c7d565b9450611efb60208701611c7d565b9350604086013567ffffffffffffffff80821115611f17575f80fd5b611f2389838a01611de3565b94506060880135915080821115611f38575f80fd5b611f4489838a01611de3565b93506080880135915080821115611f59575f80fd5b50611f6688828901611e78565b9150509295509295909350565b602080825282518282018190525f9190848201906040850190845b81811015611fb35783516001600160a01b031683529284019291840191600101611f8e565b50909695505050505050565b5f82601f830112611fce575f80fd5b81356020611fdb82611dc0565b604051611fe88282611d93565b83815260059390931b8501820192828101915086841115612007575f80fd5b8286015b84811015611e465761201c81611c7d565b835291830191830161200b565b5f806040838503121561203a575f80fd5b823567ffffffffffffffff80821115612051575f80fd5b61205d86838701611fbf565b93506020850135915080821115612072575f80fd5b5061207f85828601611de3565b9150509250929050565b5f8151808452602080850194508084015f5b838110156120b75781518752958201959082019060010161209b565b509495945050505050565b602081525f6110af6020830184612089565b80358015158114611c93575f80fd5b5f602082840312156120f3575f80fd5b6110af826120d4565b5f806040838503121561210d575f80fd5b61211683611c7d565b9150612124602084016120d4565b90509250929050565b5f6020828403121561213d575f80fd5b813567ffffffffffffffff811115612153575f80fd5b6112b484828501611fbf565b5f8060408385031215612170575f80fd5b61217983611c7d565b915061212460208401611c7d565b5f805f805f60a0868803121561219b575f80fd5b6121a486611c7d565b94506121b260208701611c7d565b93506040860135925060608601359150608086013567ffffffffffffffff8111156121db575f80fd5b611f6688828901611e78565b5f602082840312156121f7575f80fd5b815167ffffffffffffffff81111561220d575f80fd5b8201601f8101841361221d575f80fd5b805161222881611e51565b6040516122358282611d93565b828152866020848601011115612249575f80fd5b61225a836020830160208701611cf0565b9695505050505050565b634e487b7160e01b5f52601260045260245ffd5b5f8261228657612286612264565b500690565b634e487b7160e01b5f52601160045260245ffd5b80820281158282048414176106095761060961228b565b5f826122c4576122c4612264565b500490565b805169ffffffffffffffffffff81168114611c93575f80fd5b5f805f805f60a086880312156122f6575f80fd5b6122ff866122c9565b9450602086015193506040860151925060608601519150612322608087016122c9565b90509295509295909350565b634e487b7160e01b5f52603260045260245ffd5b5f600182016123535761235361228b565b5060010190565b818103818111156106095761060961228b565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526024908201527f41646d696e436f6e74726f6c3a204d757374206265206f776e6572206f7220616040820152633236b4b760e11b606082015260800190565b808201808211156106095761060961228b565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b604081525f61249a6040830185612089565b82810360208401526124ac8185612089565b95945050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190525f906124ee90830184611d12565b979650505050505050565b5f60208284031215612509575f80fd5b81516110af81611cc0565b5f60033d111561252a5760045f803e505f5160e01c5b90565b5f60443d101561253a5790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561256a57505050505090565b82850191508151818111156125825750505050505090565b843d870101602082850101111561259c5750505050505090565b6125ab60208286010187611d93565b509095945050505050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b634e487b7160e01b5f52603160045260245ffd5b6001600160a01b0386811682528516602082015260a0604082018190525f9061263d90830186612089565b828103606084015261264f8186612089565b905082810360808401526126638185611d12565b9897505050505050505056fea2646970667358221220990a0659b17510273e647fdc3a0adf2aabfca040d188e7ca1396717a37a34f4364736f6c63430008140033

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.