Contract 0x8308a1A404dB3cB3075618B1651671bC4E15F9d5 1

Contract Overview

Balance:
0 Ether
Txn Hash
Method
Block
From
To
Value
0xdec8ea9cc94fe452a1411418ced2e852ea13248c77c890174cc649c65daa936aSet Approval For...92691692021-09-10 16:40:34299 days 2 hrs ago0xe321bd63cde8ea046b382f82964575f2a5586474 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.00373774 81
0x6d7a23b3437e2b63eb6d3ce75161f538827815cb045a3a53ef51e235004dccbdSet Approval For...92691142021-09-10 16:26:48299 days 2 hrs ago0xe321bd63cde8ea046b382f82964575f2a5586474 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.00373774 81
0x52d3ad494a2548cdad84ba6955cff4cc673ad115f1937c8138080031045cbc42Set Approval For...92689842021-09-10 15:54:17299 days 3 hrs ago0xe321bd63cde8ea046b382f82964575f2a5586474 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.00373774 81
0xbabc82776ad1da2e1c9a9b9057d18e078cb70ebc011448a91c9dba7c5fdc245bSet Approval For...92686752021-09-10 14:36:55299 days 4 hrs ago0xe321bd63cde8ea046b382f82964575f2a5586474 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.00373774 81
0x062f42ebfd591a7fbec14c0a7c75f32ebab9123ecfe204dd57f47b2a002472d5Set Approval For...92686472021-09-10 14:29:55299 days 4 hrs ago0xe321bd63cde8ea046b382f82964575f2a5586474 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.00373774 81
0xfcff4416e37c185c82573b1612e20041973b2d80dc7acc9844963fd32884f3dbMint92583852021-09-08 19:39:46300 days 23 hrs ago0xe321bd63cde8ea046b382f82964575f2a5586474 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.00004887 1
0xd3db93a1569431f639801c0f8f6533d6ac391aca34c09024946a16143376ae11Mint92583852021-09-08 19:39:46300 days 23 hrs ago0xe321bd63cde8ea046b382f82964575f2a5586474 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.00004887 1
0xa3d9adce8e6430b58f73ba1401b27ae726de3b6034b6e9798c906bd792c1b284Mint92583832021-09-08 19:39:16300 days 23 hrs ago0xe321bd63cde8ea046b382f82964575f2a5586474 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.00008307 1
0xfbc882682bd59d6ad26c3dbc996e8ec1b95dcfad5a12887607753dfd46b7642cMint92583822021-09-08 19:39:01300 days 23 hrs ago0xe321bd63cde8ea046b382f82964575f2a5586474 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.00008307 1
0x7f51de9959c7dd56a1c7ac955872f707786c54a73e538951eafe3616f1ec4a2eClaim92583792021-09-08 19:38:15300 days 23 hrs ago0xe321bd63cde8ea046b382f82964575f2a5586474 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.0087304 171
0x489444ef5fb2ea9fa96a1fcc7f2cb48f0a4af387c7cabd1824d1819a24d2aa20Mint92527952021-09-07 20:19:39301 days 23 hrs ago0xe321bd63cde8ea046b382f82964575f2a5586474 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.00006597 1.00000001
0x132e6ec3c4ec694539201ad8d7e38cc639fa052a6ab4b250784b041b27730180Redeem92468512021-09-06 19:32:00302 days 23 hrs ago0xe321bd63cde8ea046b382f82964575f2a5586474 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.00004234 1
0xeb99adcac0a99f0b1a914e491f5e54206cb5c1749cf5d629bf045f2ddce1562fBurn92468462021-09-06 19:30:45302 days 23 hrs ago0xe321bd63cde8ea046b382f82964575f2a5586474 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.00003742 1
0x265d18af52826d1a3b5f9e66638a6bf20843c74f3f6fc06edd9d6199e80489eaCraft92468402021-09-06 19:29:15302 days 23 hrs ago0xe321bd63cde8ea046b382f82964575f2a5586474 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.00006254 1
0x097578ec9cce3ab3f1fc19af3ee32782b13de522cba47af8db147348572f93efMint92468212021-09-06 19:24:30302 days 23 hrs ago0xe321bd63cde8ea046b382f82964575f2a5586474 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.00004887 1.00000001
0x069045df4f4aa651b27cecd1b180b4b3a816cc157fd9ed73d95cb1bd089a21b9Claim92468172021-09-06 19:23:30302 days 23 hrs ago0xe321bd63cde8ea046b382f82964575f2a5586474 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.0142469 209
0x41cf55a96c518a17d5b9e3fad685f41af2ec10390bba8de343a07575a7d94ae9Mint92468102021-09-06 19:21:45303 days ago0xe321bd63cde8ea046b382f82964575f2a5586474 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.00007827 1.00000001
0xad8bc228118c5e9b1359ae38e0ddfce292e83c7910d308b4c960cc462109907fMint92467592021-09-06 19:09:00303 days 12 mins ago0xe321bd63cde8ea046b382f82964575f2a5586474 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.00008307 1
0x0e1e58587ac68cc90d732320815db7ba203cac62bb145d0f78853beab4f522d2Mint92467472021-09-06 19:05:59303 days 16 mins ago0xe321bd63cde8ea046b382f82964575f2a5586474 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.0049069 209
0x7515f9db9c3e5511d7aaf6e52d2f7decf86e82489ed1a7048f4066532f3854ebMint92467392021-09-06 19:03:59303 days 18 mins ago0xe321bd63cde8ea046b382f82964575f2a5586474 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.0049069 209
0x9d42c3c79bedea98fb6f7c71fa3ea2cb5eb8d18aec698da1cfda5bae1a291612Claim92467242021-09-06 19:00:13303 days 21 mins ago0xe321bd63cde8ea046b382f82964575f2a5586474 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.0178208 209
0x70149b091f1f9ad56e36f5169fab7a4ba9e862de88721f25ec850194ad25de04Add92339312021-09-04 13:36:38305 days 5 hrs ago0x19327c8fc14585b075b98583613f5e46488e4c7f IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.00012557 1
0x5b8b6b60cd77f54e08298315ea2d0dfcac1e45d31390b2c351125b2a6ea53b7fAdd92339112021-09-04 13:31:38305 days 5 hrs ago0x19327c8fc14585b075b98583613f5e46488e4c7f IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.00012557 1
0x11ab63935f99f9699be3674ee2e9ad5f2f3a4d639dbf40ce8f797072620c7af7Claim92302442021-09-03 22:13:47305 days 21 hrs ago0x11cba1eff7a308ac2cf6a6ac2892ca33fabc3398 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.00811583 159
0x69ca54da3bf6b8ad81963c9c7cea9bcfc300aa9a39a05b2abb1e677c3ff65f07Claim92302402021-09-03 22:12:47305 days 21 hrs ago0x11cba1eff7a308ac2cf6a6ac2892ca33fabc3398 IN  0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether0.00811774 159
[ Download CSV Export 
Latest 4 internal transactions
Parent Txn Hash Block From To Value
0x71763385202e6113a2781af2c21bcca3ad88bd9727d3559066a94971abde0f9392696162021-09-10 18:32:24299 days 49 mins ago 0xe957a2046d8404fed6d9509bc380506cb0798bd5 0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether
0xe6cef2494cf37eaef3f3e218ec122a3f0e9d7171993b163d65feb60d076c667392695572021-09-10 18:17:39299 days 1 hr ago 0xe957a2046d8404fed6d9509bc380506cb0798bd5 0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether
0xf61d56ac019105cbe190c2e1dd8294b85bcfc10f0edc439c7ba030ba05c7828f92691732021-09-10 16:41:34299 days 2 hrs ago 0xe957a2046d8404fed6d9509bc380506cb0798bd5 0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether
0xd04ea40e2d36c3db225a4b76a9430431356271d3f2d456f08ca82a59fd8f9f8492584092021-09-08 19:45:47300 days 23 hrs ago 0x12c085210a498369720f68c3020a60edf1542e4a 0x8308a1a404db3cb3075618b1651671bc4e15f9d50 Ether
[ Download CSV Export 
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
Zapper_NFT_V2

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion, GNU GPLv2 license
File 1 of 12 : ERC1155.sol
// SPDX-License-Identifier: MIT

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
    {
        require(
            _msgSender() != operator,
            "ERC1155: setting approval status for self"
        );

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_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(to != address(0), "ERC1155: transfer to the zero address");
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: caller is not owner nor approved"
        );

        address operator = _msgSender();

        _beforeTokenTransfer(
            operator,
            from,
            to,
            _asSingletonArray(id),
            _asSingletonArray(amount),
            data
        );

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

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

        _doSafeTransferAcceptanceCheck(operator, 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(
            ids.length == amounts.length,
            "ERC1155: ids and amounts length mismatch"
        );
        require(to != address(0), "ERC1155: transfer to the zero address");
        require(
            from == _msgSender() || isApprovedForAll(from, _msgSender()),
            "ERC1155: transfer caller is not owner nor approved"
        );

        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"
            );
            _balances[id][from] = fromBalance - amount;
            _balances[id][to] += amount;
        }

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

        _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 `account`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function _mint(
        address account,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual {
        require(account != address(0), "ERC1155: mint to the zero address");

        address operator = _msgSender();

        _beforeTokenTransfer(
            operator,
            address(0),
            account,
            _asSingletonArray(id),
            _asSingletonArray(amount),
            data
        );

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

        _doSafeTransferAcceptanceCheck(
            operator,
            address(0),
            account,
            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);

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

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

        address operator = _msgSender();

        _beforeTokenTransfer(
            operator,
            account,
            address(0),
            _asSingletonArray(id),
            _asSingletonArray(amount),
            ""
        );

        uint256 accountBalance = _balances[id][account];
        require(
            accountBalance >= amount,
            "ERC1155: burn amount exceeds balance"
        );
        _balances[id][account] = accountBalance - amount;

        emit TransferSingle(operator, account, address(0), id, amount);
    }

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

        address operator = _msgSender();

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

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

            uint256 accountBalance = _balances[id][account];
            require(
                accountBalance >= amount,
                "ERC1155: burn amount exceeds balance"
            );
            _balances[id][account] = accountBalance - amount;
        }

        emit TransferBatch(operator, account, address(0), ids, amounts);
    }

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

    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(to).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(to).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 2 of 12 : IERC1155.sol
// SPDX-License-Identifier: MIT

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 3 of 12 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT

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.
        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. 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 4 of 12 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT

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 5 of 12 : SignatureVerifier_V2.sol
// ███████╗░█████╗░██████╗░██████╗░███████╗██████╗░░░░███████╗██╗
// ╚════██║██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔══██╗░░░██╔════╝██║
// ░░███╔═╝███████║██████╔╝██████╔╝█████╗░░██████╔╝░░░█████╗░░██║
// ██╔══╝░░██╔══██║██╔═══╝░██╔═══╝░██╔══╝░░██╔══██╗░░░██╔══╝░░██║
// ███████╗██║░░██║██║░░░░░██║░░░░░███████╗██║░░██║██╗██║░░░░░██║
// ╚══════╝╚═╝░░╚═╝╚═╝░░░░░╚═╝░░░░░╚══════╝╚═╝░░╚═╝╚═╝╚═╝░░░░░╚═╝
// Copyright (C) 2021 zapper
// Copyright (c) 2018 Tasuku Nakamura

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//

///@author Zapper
///@notice This contract checks if a message has been signed by a verified signer via personal_sign.
// SPDX-License-Identifier: GPLv2

pragma solidity ^0.8.0;

contract SignatureVerifier_V2 {
    address public signer;

    // Mapping from account to nonce
    mapping(address => uint256) public nonces;

    constructor(address _signer) {
        signer = _signer;
    }

    function verify(
        address account,
        uint256 volts,
        uint256 nonce,
        bytes memory signature
    ) internal view returns (bool) {
        bytes32 messageHash = getMessageHash(account, volts, nonce);
        bytes32 ethSignedMessageHash = getEthSignedMessageHash(messageHash);

        return recoverSigner(ethSignedMessageHash, signature) == signer;
    }

    function getMessageHash(
        address account,
        uint256 volts,
        uint256 nonce
    ) public pure returns (bytes32) {
        return keccak256(abi.encodePacked(account, volts, nonce));
    }

    function getEthSignedMessageHash(bytes32 messageHash)
        internal
        pure
        returns (bytes32)
    {
        return
            keccak256(
                abi.encodePacked(
                    "\x19Ethereum Signed Message:\n32",
                    messageHash
                )
            );
    }

    function recoverSigner(
        bytes32 _ethSignedMessageHash,
        bytes memory _signature
    ) internal pure returns (address) {
        (bytes32 r, bytes32 s, uint8 v) = splitSignature(_signature);

        return ecrecover(_ethSignedMessageHash, v, r, s);
    }

    function splitSignature(bytes memory signature)
        internal
        pure
        returns (
            bytes32 r,
            bytes32 s,
            uint8 v
        )
    {
        require(signature.length == 65, "invalid signature length");

        assembly {
            r := mload(add(signature, 32))
            s := mload(add(signature, 64))
            v := byte(0, mload(add(signature, 96)))
        }
    }
}

File 6 of 12 : Zapper_NFT_V2.sol
// ███████╗░█████╗░██████╗░██████╗░███████╗██████╗░░░░███████╗██╗
// ╚════██║██╔══██╗██╔══██╗██╔══██╗██╔════╝██╔══██╗░░░██╔════╝██║
// ░░███╔═╝███████║██████╔╝██████╔╝█████╗░░██████╔╝░░░█████╗░░██║
// ██╔══╝░░██╔══██║██╔═══╝░██╔═══╝░██╔══╝░░██╔══██╗░░░██╔══╝░░██║
// ███████╗██║░░██║██║░░░░░██║░░░░░███████╗██║░░██║██╗██║░░░░░██║
// ╚══════╝╚═╝░░╚═╝╚═╝░░░░░╚═╝░░░░░╚══════╝╚═╝░░╚═╝╚═╝╚═╝░░░░░╚═╝
// Copyright (C) 2021 zapper

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as published by
// the Free Software Foundation, either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//

///@author Zapper
///@notice This contract manages Zapper V2 NFTs and Volts.
/// Volts can be claimed through quests in order to mint various NFTs.
/// Crafting combines NFTs of the same type into higher tier NFTs. NFTs
/// can also be redemeed for Volts.
// SPDX-License-Identifier: GPL-2.0

pragma solidity ^0.8.0;
import "./ERC1155/ERC1155.sol";
import "./access/Ownable.sol";
import "./utils/Counters.sol";
import "./SignatureVerifier/SignatureVerifier_V2.sol";
import "./ERC1155/IERC1155.sol";

contract Zapper_NFT_V2 is ERC1155, Ownable, SignatureVerifier_V2 {
    using Counters for Counters.Counter;
    Counters.Counter private ID;

    // Used in pausable modifier
    bool public paused = false;

    // NFT name
    string public name;

    // NFT symbol
    string public symbol;

    // Mapping from token ID to token URI
    mapping(uint256 => string) private idToUri;

    // Mapping from token ID to token supply
    mapping(uint256 => uint256) private tokenSupply;

    // Season deadline
    uint256 public deadline;
    // Modifier to apply to cost of NFT when redeeming in bps

    uint256 public redeemModifier = 7500;

    // Quantity of NFTs consumed per crafting event
    uint256 public craftingRequirement = 3;

    //Total Volt supply
    uint256 public voltSupply;

    //Mapping from address to Volt balance
    mapping(address => uint256) public voltBalance;

    //Mapping from token ID to token ID of higher rarity of same type
    mapping(uint256 => uint256) public nextRarity;

    //Mapping from token ID to token cost in volts
    mapping(uint256 => uint256) public cost;

    //Emitted when `account` claims Volts
    event Claim(address account, uint256 voltsRecieved, uint256 nonce);

    //Emitted when `account` mints one or more NFTs by spending Volts
    event Mint(address account, uint256 voltsSpent);

    //Emitted when `account` redeems Volts by burning one or more NFTs
    event Redeem(address account, uint256 voltsRecieved);

    //Emitted when `account` crafts one or more of the same NFT
    event Craft(address account, uint256 craftID);

    //Emitted when `account` crafts multiple different NFTs
    event CraftBatch(address account, uint256[] craftIDs);

    constructor(
        string memory _name,
        string memory _symbol,
        string memory _uri,
        address signer,
        address manager,
        uint256 _deadline
    ) ERC1155(_uri) SignatureVerifier_V2(signer) {
        name = _name;
        symbol = _symbol;
        deadline = _deadline;
        transferOwnership(manager);
    }

    modifier pausable {
        require(!paused, "Paused");
        _;
    }

    modifier beforeDeadline {
        require(block.timestamp <= deadline, "Deadline elapsed");
        _;
    }

    /**
     * @dev Adds a new NFT type
     * @dev set nextRarity after addition for crafting
     * @param cid Content identifier
     * @param _cost Cost in Volts for the NFT. If 0 it cannt be redeemed
     * @return id The newly created token ID
     */
    function add(string calldata cid, uint256 _cost)
        external
        onlyOwner
        returns (uint256 id)
    {
        require(bytes(cid).length > 0, "Missing Content Identifier");

        id = _nextId();

        string memory _uri = _createUri(cid);
        idToUri[id] = _uri;
        cost[id] = _cost;

        emit URI(_uri, id);
    }

    /**
     * @notice Claims Volts earned through quests
     * @param voltsEarned The quantity of Volts being awarded
     */
    function claim(uint256 voltsEarned, bytes calldata signature)
        external
        pausable
        beforeDeadline
    {
        require(
            verify(msg.sender, voltsEarned, nonces[msg.sender]++, signature),
            "Invalid Signature"
        );
        voltBalance[msg.sender] += voltsEarned;
        voltSupply += voltsEarned;

        emit Claim(msg.sender, voltsEarned, nonces[msg.sender]);
    }

    /**
     * @notice Maps the rarity classes for use in crafting
     * @dev toID should be 0 for max rarity classes
     * @param fromID An array of lower rarity IDs
     * @param toID An array of higher rarity IDs which can be
     * crafted from the fromID
     */
    function setNextRarity(uint256[] calldata fromID, uint256[] calldata toID)
        external
        onlyOwner
    {
        require(fromID.length == toID.length, "Mismatched array lengths");

        for (uint256 i = 0; i < fromID.length; i++) {
            nextRarity[fromID[i]] = toID[i];
        }
    }

    /**
     * @notice Mints a desired quantity of a single NFT ID
     * in exchange for Volts
     * @param id The ID of the  NFT to mint
     * @param quantity The quantity of the NFT to mint
     */
    function mint(uint256 id, uint256 quantity) external pausable {
        require(_exists(id), "Invalid ID");

        uint256 voltsSpent = cost[id] * quantity;
        require(voltBalance[msg.sender] >= voltsSpent);
        voltBalance[msg.sender] -= voltsSpent;

        _mint(msg.sender, id, quantity, new bytes(0));

        tokenSupply[id]++;

        emit Mint(msg.sender, voltsSpent);
    }

    /**
     * @notice Batch Mints desired quantities of different NFT IDs
     * in exchange for Volts
     * @param ids An array consisting of the IDs of the NFTs to mint
     * @param quantities  An array consisting of the quantities of the NFTs to mint
     */
    function mintBatch(uint256[] calldata ids, uint256[] calldata quantities)
        external
        pausable
    {
        require(ids.length == quantities.length, "Mismatched array lengths");

        uint256 voltsSpent;
        for (uint256 i = 0; i < ID.current(); i++) {
            require(_exists(ids[i]), "Invalid ID");
            voltsSpent += cost[ids[i]];
            tokenSupply[ids[i]] += quantities[i];
        }

        require(
            voltBalance[msg.sender] >= voltsSpent,
            "Insufficient Volt balance"
        );

        voltBalance[msg.sender] -= voltsSpent;

        _mintBatch(msg.sender, ids, quantities, new bytes(0));

        emit Mint(msg.sender, voltsSpent);
    }

    /**
     * @notice Burns an NFT
     * @dev Does not award Volts!
     * @param id The ID of the  NFT to burn
     * @param quantity The quantity of the NFT to burn
     */
    function burn(uint256 id, uint256 quantity) external pausable {
        _burn(msg.sender, id, quantity);

        tokenSupply[id] -= quantity;
    }

    /**
     * @notice Burns an NFT
     * @dev Does not award Volts!
     * @param ids An array consisting of the IDs of the  NFTs to burn
     * @param quantities An array consisting of the quantities
     * of each NFT to burn
     */
    function burnBatch(uint256[] calldata ids, uint256[] calldata quantities)
        external
        pausable
    {
        require(ids.length == quantities.length, "Mismatched array lengths");

        _burnBatch(msg.sender, ids, quantities);

        for (uint256 i; i < ids.length; i++) {
            tokenSupply[ids[i]] -= quantities[i];
        }
    }

    /**
     * @notice Redeems an NFT for Volts. Redeeming NFTs is
     * subject to a modifier which returns some percentage of
     * the full cost of the NFT
     * @param id ID of the  NFT to redeem
     * @param quantity The quantity of the NFT being redeemed
     */
    function redeem(uint256 id, uint256 quantity) external pausable {
        require(cost[id] > 0, "Cannot redeem this type");

        _burn(msg.sender, id, quantity);

        tokenSupply[id]--;
        voltBalance[msg.sender] += (cost[id] * redeemModifier) / 10000;
    }

    /**
     * @notice Redeems multiple NFTs for Volts. Redeeming NFTs is
     * subject to a modifier which returns some percentage of
     * the full cost of the NFT
     * @param ids An array consisting of the IDs of the NFTs to redeem
     * @param quantities An array consisting of the quantities of
     * each NFT to redeem
     */
    function redeemBatch(uint256[] calldata ids, uint256[] calldata quantities)
        external
        pausable
    {
        require(ids.length == quantities.length, "Mismatched array lengths");

        _burnBatch(msg.sender, ids, quantities);

        uint256 voltsRecieved;
        for (uint256 i = 0; i < ids.length; i++) {
            voltsRecieved += (cost[ids[i]] * redeemModifier) / 10000;
            tokenSupply[ids[i]]--;
        }
        emit Redeem(msg.sender, voltsRecieved);
    }

    /**
     * @notice Crafts higher tier NFTs with lower tier NFTs
     * @param id ID of the  NFT used for crafting
     * @param quantity The quantity of id to consume in crafting
     */
    function craft(uint256 id, uint256 quantity) external pausable {
        uint256 craftID = nextRarity[id];
        require(craftID == 0, "Already maximum rarity");
        require(quantity % 3 == 0, "Incorrect quantity for crafting");

        _burn(msg.sender, id, quantity);

        uint256 craftQuantity = quantity / 3;
        _mint(msg.sender, craftID, craftQuantity, new bytes(0));

        tokenSupply[id] -= quantity;
        tokenSupply[craftID] += craftQuantity;

        emit Craft(msg.sender, craftID);
    }

    /**
     * @notice Crafts multiple different higher tier NFTs with
     * lower tier NFTs
     * @param ids An array consisting of the IDs of the NFT used for crafting
     * @param quantities An array consisting of the quantities of the NFT
     * to consume in crafting
     */
    function craftBatch(uint256[] calldata ids, uint256[] calldata quantities)
        external
        pausable
    {
        require(ids.length == quantities.length, "Mismatched array lengths");

        uint256[] memory craftQuantities = new uint256[](quantities.length);
        uint256[] memory craftIds = new uint256[](ids.length);

        for (uint256 i = 0; i < quantities.length; i++) {
            uint256 craftID = nextRarity[ids[i]];
            require(craftID > 0, "Already maximum rarity");
            require(quantities[i] % 3 == 0, "Incorrect quantity for crafting");
            craftQuantities[i] = quantities[i] / 3;
            craftIds[i] = craftID;
            tokenSupply[ids[i]] -= quantities[i];
            tokenSupply[craftIds[i]] += craftQuantities[i];
        }

        _burnBatch(msg.sender, ids, quantities);
        _mintBatch(msg.sender, craftIds, craftQuantities, new bytes(0));

        emit CraftBatch(msg.sender, craftIds);
    }

    /**
     * @param cid IPFS content identifier
     */
    function _createUri(string memory cid)
        internal
        view
        returns (string memory)
    {
        string memory baseUri = super.uri(0);
        return string(abi.encodePacked(baseUri, cid));
    }

    /**
     * @dev returns the next NFT ID to be minted
     */
    function _nextId() internal returns (uint256 id) {
        ID.increment();
        return ID.current();
    }

    function _exists(uint256 id) internal view returns (bool) {
        return (bytes(idToUri[id]).length > 0);
    }

    /**
     * @dev Returns the uri of a token given its ID
     * @param id ID of the token to query
     * @return uri of the token or an empty string if it does not exist
     */
    function uri(uint256 id) public view override returns (string memory) {
        return idToUri[id];
    }

    /**
     * @dev Returns the total quantity for a token ID
     * @param id ID of the token to query
     * @return amount of token in existence
     */
    function totalSupply(uint256 id) public view returns (uint256) {
        return tokenSupply[id];
    }

    /**
     * @dev Pause or unpause the minting and creation of NFTs
     */
    function pause() public onlyOwner {
        paused = !paused;
    }

    /**
     * @dev Updates the redeem modifier which exchanges an NFT for Volts
     */
    function updateRedeemModifier(uint256 _redeemModifier) public onlyOwner {
        redeemModifier = _redeemModifier;
    }

    /**
     * @dev Updates the crafting requirement modifier which determines
     * the quantity of NFTs that are burned in order to craft
     * higher rarity NFTs
     */
    function updateCraftingRequirement(uint256 _craftingRequirement)
        public
        onlyOwner
    {
        craftingRequirement = _craftingRequirement;
    }

    /**
     * @dev Updates the deadline after which Volts can no longer be claimed
     */
    function updateDeadline(uint256 _deadline) public onlyOwner {
        deadline = _deadline;
    }
}

File 7 of 12 : Ownable.sol
// SPDX-License-Identifier: MIT

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() {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), 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 {
        emit OwnershipTransferred(_owner, address(0));
        _owner = 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"
        );
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}

File 8 of 12 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

        uint256 size;
        // solhint-disable-next-line no-inline-assembly
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

        // solhint-disable-next-line avoid-low-level-calls, avoid-call-value
        (bool success, ) = recipient.call{ value: amount }("");
        require(
            success,
            "Address: unable to send value, recipient may have reverted"
        );
    }

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

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

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

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

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

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

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

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

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

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

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

    function _verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) private pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

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

File 9 of 12 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

    function _msgData() internal view virtual returns (bytes calldata) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

File 10 of 12 : Counters.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

File 11 of 12 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

Settings
{
  "evmVersion": "istanbul",
  "libraries": {},
  "metadata": {
    "bytecodeHash": "ipfs",
    "useLiteralContent": true
  },
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "remappings": [],
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "abi"
      ]
    }
  }
}

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_uri","type":"string"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"manager","type":"address"},{"internalType":"uint256","name":"_deadline","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"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":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"voltsRecieved","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"craftID","type":"uint256"}],"name":"Craft","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"craftIDs","type":"uint256[]"}],"name":"CraftBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"voltsSpent","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"voltsRecieved","type":"uint256"}],"name":"Redeem","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":[{"internalType":"string","name":"cid","type":"string"},{"internalType":"uint256","name":"_cost","type":"uint256"}],"name":"add","outputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"stateMutability":"nonpayable","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":"id","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"quantities","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"voltsEarned","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"cost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"craft","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"quantities","type":"uint256[]"}],"name":"craftBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"craftingRequirement","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deadline","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"volts","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"}],"name":"getMessageHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","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":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"quantities","type":"uint256[]"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"nextRarity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"redeem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"quantities","type":"uint256[]"}],"name":"redeemBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"redeemModifier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"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":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"fromID","type":"uint256[]"},{"internalType":"uint256[]","name":"toID","type":"uint256[]"}],"name":"setNextRarity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_craftingRequirement","type":"uint256"}],"name":"updateCraftingRequirement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_deadline","type":"uint256"}],"name":"updateDeadline","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_redeemModifier","type":"uint256"}],"name":"updateRedeemModifier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"voltBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"voltSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60806040526007805460ff19169055611d4c600d556003600e553480156200002657600080fd5b5060405162003ddf38038062003ddf833981016040819052620000499162000392565b82846200005681620000f1565b50600380546001600160a01b03191633908117909155604051819060009060008051602062003dbf833981519152908290a350600480546001600160a01b0319166001600160a01b03929092169190911790558551620000be9060089060208901906200021c565b508451620000d49060099060208801906200021c565b50600c819055620000e5826200010a565b505050505050620004a0565b8051620001069060029060208401906200021c565b5050565b6003546001600160a01b031633146200016a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064015b60405180910390fd5b6001600160a01b038116620001d15760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840162000161565b6003546040516001600160a01b0380841692169060008051602062003dbf83398151915290600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b8280546200022a906200044d565b90600052602060002090601f0160209004810192826200024e576000855562000299565b82601f106200026957805160ff191683800117855562000299565b8280016001018555821562000299579182015b82811115620002995782518255916020019190600101906200027c565b50620002a7929150620002ab565b5090565b5b80821115620002a75760008155600101620002ac565b80516001600160a01b0381168114620002da57600080fd5b919050565b600082601f830112620002f0578081fd5b81516001600160401b03808211156200030d576200030d6200048a565b604051601f8301601f19908116603f011681019082821181831017156200033857620003386200048a565b8160405283815260209250868385880101111562000354578485fd5b8491505b8382101562000377578582018301518183018401529082019062000358565b838211156200038857848385830101525b9695505050505050565b60008060008060008060c08789031215620003ab578182fd5b86516001600160401b0380821115620003c2578384fd5b620003d08a838b01620002df565b97506020890151915080821115620003e6578384fd5b620003f48a838b01620002df565b965060408901519150808211156200040a578384fd5b506200041989828a01620002df565b9450506200042a60608801620002c2565b92506200043a60808801620002c2565b915060a087015190509295509295509295565b600181811c908216806200046257607f821691505b602082108114156200048457634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b61390f80620004b06000396000f3fe608060405234801561001057600080fd5b50600436106102475760003560e01c80637cbc23731161013b578063a22cb465116100b8578063d351cfdc1161007c578063d351cfdc14610514578063e985e9c514610527578063f052259014610563578063f242432a14610583578063f2fde38b1461059657600080fd5b8063a22cb465146104a8578063afad42f6146104bb578063b390c0ab146104ce578063bd85b039146104e1578063d2b0737b1461050157600080fd5b80638da5cb5b116100ff5780638da5cb5b146104495780639097548d1461045a5780639142b30e1461047a57806395d89b411461048d5780639e57af971461049557600080fd5b80637cbc2373146103f25780637ecebe001461040557806383ca4b6f146104255780638456cb59146104385780638c4c407c1461044057600080fd5b80632eb2c2d6116101c9578063503d5f6c1161018d578063503d5f6c146103b85780635c975abb146103c15780635f56e5c7146103ce578063649117d3146103d7578063715018a6146103ea57600080fd5b80632eb2c2d61461034c57806336555b851461035f57806338926b6d1461037257806342af1884146103855780634e1273f41461039857600080fd5b8063238ac93311610210578063238ac933146102d257806324d22e87146102fd578063263203c514610310578063289137a11461033057806329dcb0cf1461034357600080fd5b8062fdd58e1461024c57806301ffc9a71461027257806306fdde03146102955780630e89341c146102aa5780631b2ef1ca146102bd575b600080fd5b61025f61025a366004612fc0565b6105a9565b6040519081526020015b60405180910390f35b61028561028036600461314d565b610640565b6040519015158152602001610269565b61029d610692565b60405161026991906133f5565b61029d6102b83660046131ce565b610720565b6102d06102cb36600461322f565b6107c2565b005b6004546102e5906001600160a01b031681565b6040516001600160a01b039091168152602001610269565b6102d061030b3660046131ce565b61091c565b61025f61031e366004612e2c565b60106020526000908152604090205481565b6102d061033e36600461322f565b61094b565b61025f600c5481565b6102d061035a366004612e7f565b610ac8565b61025f61036d366004613185565b610d4e565b6102d06103803660046131e6565b610e8b565b6102d06103933660046131ce565b61101f565b6103ab6103a636600461301b565b61104e565b60405161026991906133b4565b61025f600e5481565b6007546102859060ff1681565b61025f600d5481565b6102d06103e53660046130e5565b6111af565b6102d061136f565b6102d061040036600461322f565b6113e3565b61025f610413366004612e2c565b60056020526000908152604090205481565b6102d06104333660046130e5565b6114dc565b6102d0611625565b61025f600f5481565b6003546001600160a01b03166102e5565b61025f6104683660046131ce565b60126020526000908152604090205481565b6102d06104883660046130e5565b611663565b61029d61172e565b6102d06104a33660046131ce565b61173b565b6102d06104b6366004612f86565b61176a565b6102d06104c93660046130e5565b611841565b6102d06104dc36600461322f565b611cb3565b61025f6104ef3660046131ce565b6000908152600b602052604090205490565b61025f61050f366004612fe9565b611cff565b6102d06105223660046130e5565b611d4e565b610285610535366004612e4d565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b61025f6105713660046131ce565b60116020526000908152604090205481565b6102d0610591366004612f24565b611ffe565b6102d06105a4366004612e2c565b6121a7565b60006001600160a01b03831661061a5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b148061067157506001600160e01b031982166303a24d0760e21b145b8061068c57506301ffc9a760e01b6001600160e01b03198316145b92915050565b6008805461069f90613747565b80601f01602080910402602001604051908101604052809291908181526020018280546106cb90613747565b80156107185780601f106106ed57610100808354040283529160200191610718565b820191906000526020600020905b8154815290600101906020018083116106fb57829003601f168201915b505050505081565b6000818152600a6020526040902080546060919061073d90613747565b80601f016020809104026020016040519081016040528092919081815260200182805461076990613747565b80156107b65780601f1061078b576101008083540402835291602001916107b6565b820191906000526020600020905b81548152906001019060200180831161079957829003601f168201915b50505050509050919050565b60075460ff16156107e55760405162461bcd60e51b815260040161061190613450565b6107ee82612292565b6108275760405162461bcd60e51b815260206004820152600a602482015269125b9d985b1a5908125160b21b6044820152606401610611565b6000828152601260205260408120546108419083906136ca565b3360009081526010602052604090205490915081111561086057600080fd5b336000908152601060205260408120805483929061087f9084906136e9565b909155506108be905033848460005b6040519080825280601f01601f1916602001820160405280156108b8576020820181803683370190505b506122b8565b6000838152600b602052604081208054916108d8836137ae565b909155505060408051338152602081018390527f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688591015b60405180910390a1505050565b6003546001600160a01b031633146109465760405162461bcd60e51b815260040161061190613586565b600e55565b60075460ff161561096e5760405162461bcd60e51b815260040161061190613450565b60008281526011602052604090205480156109c45760405162461bcd60e51b8152602060048201526016602482015275416c7265616479206d6178696d756d2072617269747960501b6044820152606401610611565b6109cf6003836137c9565b15610a1c5760405162461bcd60e51b815260206004820152601f60248201527f496e636f7272656374207175616e7469747920666f72206372616674696e67006044820152606401610611565b610a2733848461237f565b6000610a346003846136b6565b9050610a43338383600061088e565b6000848152600b602052604081208054859290610a619084906136e9565b90915550506000828152600b602052604081208054839290610a8490849061369e565b909155505060408051338152602081018490527f82bf558222c4c37aae80230f0a656373f327bcc6f1ac1ef73c385d4dec21b223910160405180910390a150505050565b8151835114610ae95760405162461bcd60e51b8152600401610611906135f2565b6001600160a01b038416610b0f5760405162461bcd60e51b8152600401610611906134b4565b6001600160a01b038516331480610b2b5750610b2b8533610535565b610b925760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b6064820152608401610611565b3360005b8451811015610ce0576000858281518110610bc157634e487b7160e01b600052603260045260246000fd5b602002602001015190506000858381518110610bed57634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015610c3d5760405162461bcd60e51b81526004016106119061353c565b610c4782826136e9565b60008085815260200190815260200160002060008c6001600160a01b03166001600160a01b03168152602001908152602001600020819055508160008085815260200190815260200160002060008b6001600160a01b03166001600160a01b031681526020019081526020016000206000828254610cc5919061369e565b9250508190555050505080610cd9906137ae565b9050610b96565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610d309291906133c7565b60405180910390a4610d46818787878787612489565b505050505050565b6003546000906001600160a01b03163314610d7b5760405162461bcd60e51b815260040161061190613586565b82610dc85760405162461bcd60e51b815260206004820152601a60248201527f4d697373696e6720436f6e74656e74204964656e7469666965720000000000006044820152606401610611565b610dd06125f4565b90506000610e1385858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061260b92505050565b6000838152600a602090815260409091208251929350610e37929091840190612c0d565b50600082815260126020526040908190208490555182907f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b90610e7b9084906133f5565b60405180910390a2509392505050565b60075460ff1615610eae5760405162461bcd60e51b815260040161061190613450565b600c54421115610ef35760405162461bcd60e51b815260206004820152601060248201526f111958591b1a5b9948195b185c1cd95960821b6044820152606401610611565b3360008181526005602052604081208054610f559392879290610f15836137ae565b9190505585858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061264592505050565b610f955760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964205369676e617475726560781b6044820152606401610611565b3360009081526010602052604081208054859290610fb490849061369e565b9250508190555082600f6000828254610fcd919061369e565b909155505033600081815260056020908152604091829020548251938452908301869052908201527f34fcbac0073d7c3d388e51312faf357774904998eeb8fca628b9e6f65ee1cbf79060600161090f565b6003546001600160a01b031633146110495760405162461bcd60e51b815260040161061190613586565b600c55565b606081518351146110b35760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b6064820152608401610611565b600083516001600160401b038111156110dc57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611105578160200160208202803683370190505b50905060005b84518110156111a75761116c85828151811061113757634e487b7160e01b600052603260045260246000fd5b602002602001015185838151811061115f57634e487b7160e01b600052603260045260246000fd5b60200260200101516105a9565b82828151811061118c57634e487b7160e01b600052603260045260246000fd5b60209081029190910101526111a0816137ae565b905061110b565b509392505050565b60075460ff16156111d25760405162461bcd60e51b815260040161061190613450565b8281146111f15760405162461bcd60e51b8152600401610611906135bb565b61125f33858580806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040805160208089028281018201909352888252909350889250879182918501908490808284376000920191909152506126dc92505050565b6000805b8481101561132d57612710600d546012600089898681811061129557634e487b7160e01b600052603260045260246000fd5b905060200201358152602001908152602001600020546112b591906136ca565b6112bf91906136b6565b6112c9908361369e565b9150600b60008787848181106112ef57634e487b7160e01b600052603260045260246000fd5b905060200201358152602001908152602001600020600081548092919061131590613730565b91905055508080611325906137ae565b915050611263565b5060408051338152602081018390527f222838db2794d11532d940e8dec38ae307ed0b63cd97c233322e221f998767a691015b60405180910390a15050505050565b6003546001600160a01b031633146113995760405162461bcd60e51b815260040161061190613586565b6003546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600380546001600160a01b0319169055565b60075460ff16156114065760405162461bcd60e51b815260040161061190613450565b6000828152601260205260409020546114615760405162461bcd60e51b815260206004820152601760248201527f43616e6e6f742072656465656d207468697320747970650000000000000000006044820152606401610611565b61146c33838361237f565b6000828152600b6020526040812080549161148683613730565b9091555050600d54600083815260126020526040902054612710916114aa916136ca565b6114b491906136b6565b33600090815260106020526040812080549091906114d390849061369e565b90915550505050565b60075460ff16156114ff5760405162461bcd60e51b815260040161061190613450565b82811461151e5760405162461bcd60e51b8152600401610611906135bb565b61158c33858580806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250506040805160208089028281018201909352888252909350889250879182918501908490808284376000920191909152506126dc92505050565b60005b8381101561161e578282828181106115b757634e487b7160e01b600052603260045260246000fd5b90506020020135600b60008787858181106115e257634e487b7160e01b600052603260045260246000fd5b905060200201358152602001908152602001600020600082825461160691906136e9565b90915550819050611616816137ae565b91505061158f565b5050505050565b6003546001600160a01b0316331461164f5760405162461bcd60e51b815260040161061190613586565b6007805460ff19811660ff90911615179055565b6003546001600160a01b0316331461168d5760405162461bcd60e51b815260040161061190613586565b8281146116ac5760405162461bcd60e51b8152600401610611906135bb565b60005b8381101561161e578282828181106116d757634e487b7160e01b600052603260045260246000fd5b905060200201356011600087878581811061170257634e487b7160e01b600052603260045260246000fd5b905060200201358152602001908152602001600020819055508080611726906137ae565b9150506116af565b6009805461069f90613747565b6003546001600160a01b031633146117655760405162461bcd60e51b815260040161061190613586565b600d55565b336001600160a01b03831614156117d55760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b6064820152608401610611565b3360008181526001602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60075460ff16156118645760405162461bcd60e51b815260040161061190613450565b8281146118835760405162461bcd60e51b8152600401610611906135bb565b6000816001600160401b038111156118ab57634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156118d4578160200160208202803683370190505b5090506000846001600160401b038111156118ff57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611928578160200160208202803683370190505b50905060005b83811015611bca5760006011600089898581811061195c57634e487b7160e01b600052603260045260246000fd5b905060200201358152602001908152602001600020549050600081116119bd5760405162461bcd60e51b8152602060048201526016602482015275416c7265616479206d6178696d756d2072617269747960501b6044820152606401610611565b60038686848181106119df57634e487b7160e01b600052603260045260246000fd5b905060200201356119f091906137c9565b15611a3d5760405162461bcd60e51b815260206004820152601f60248201527f496e636f7272656374207175616e7469747920666f72206372616674696e67006044820152606401610611565b6003868684818110611a5f57634e487b7160e01b600052603260045260246000fd5b90506020020135611a7091906136b6565b848381518110611a9057634e487b7160e01b600052603260045260246000fd5b60200260200101818152505080838381518110611abd57634e487b7160e01b600052603260045260246000fd5b602002602001018181525050858583818110611ae957634e487b7160e01b600052603260045260246000fd5b90506020020135600b60008a8a86818110611b1457634e487b7160e01b600052603260045260246000fd5b9050602002013581526020019081526020016000206000828254611b3891906136e9565b92505081905550838281518110611b5f57634e487b7160e01b600052603260045260246000fd5b6020026020010151600b6000858581518110611b8b57634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000828254611bb0919061369e565b90915550829150611bc29050816137ae565b91505061192e565b50611c393387878080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808b0282810182019093528a82529093508a9250899182918501908490808284376000920191909152506126dc92505050565b611c7233828460005b6040519080825280601f01601f191660200182016040528015611c6c576020820181803683370190505b50612881565b7f05028d6a08b9899850722b5e39c783597a065af9a175d3f1b3c8d1c48365c6303382604051611ca3929190613388565b60405180910390a1505050505050565b60075460ff1615611cd65760405162461bcd60e51b815260040161061190613450565b611ce133838361237f565b6000828152600b6020526040812080548392906114d39084906136e9565b6040516bffffffffffffffffffffffff19606085901b16602082015260348101839052605481018290526000906074016040516020818303038152906040528051906020012090509392505050565b60075460ff1615611d715760405162461bcd60e51b815260040161061190613450565b828114611d905760405162461bcd60e51b8152600401610611906135bb565b6000805b600654811015611ed457611dcd868683818110611dc157634e487b7160e01b600052603260045260246000fd5b90506020020135612292565b611e065760405162461bcd60e51b815260206004820152600a602482015269125b9d985b1a5908125160b21b6044820152606401610611565b60126000878784818110611e2a57634e487b7160e01b600052603260045260246000fd5b9050602002013581526020019081526020016000205482611e4b919061369e565b9150838382818110611e6d57634e487b7160e01b600052603260045260246000fd5b90506020020135600b6000888885818110611e9857634e487b7160e01b600052603260045260246000fd5b9050602002013581526020019081526020016000206000828254611ebc919061369e565b90915550819050611ecc816137ae565b915050611d94565b5033600090815260106020526040902054811115611f345760405162461bcd60e51b815260206004820152601960248201527f496e73756666696369656e7420566f6c742062616c616e6365000000000000006044820152606401610611565b3360009081526010602052604081208054839290611f539084906136e9565b92505081905550611fc83386868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a0282810182019093528982529093508992508891829185019084908082843760009201829052509250611c42915050565b60408051338152602081018390527f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d41213968859101611360565b6001600160a01b0384166120245760405162461bcd60e51b8152600401610611906134b4565b6001600160a01b03851633148061204057506120408533610535565b61209e5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b6064820152608401610611565b336120b78187876120ae886129e8565b61161e886129e8565b6000848152602081815260408083206001600160a01b038a168452909152902054838110156120f85760405162461bcd60e51b81526004016106119061353c565b61210284826136e9565b6000868152602081815260408083206001600160a01b038c8116855292528083209390935588168152908120805486929061213e90849061369e565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461219e828888888888612a41565b50505050505050565b6003546001600160a01b031633146121d15760405162461bcd60e51b815260040161061190613586565b6001600160a01b0381166122365760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610611565b6003546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000818152600a6020526040812080548291906122ae90613747565b9050119050919050565b6001600160a01b0384166122de5760405162461bcd60e51b81526004016106119061363a565b336122ef816000876120ae886129e8565b6000848152602081815260408083206001600160a01b03891684529091528120805485929061231f90849061369e565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461161e81600087878787612a41565b6001600160a01b0383166123a55760405162461bcd60e51b8152600401610611906134f9565b336123d5818560006123b6876129e8565b6123bf876129e8565b5050604080516020810190915260009052505050565b6000838152602081815260408083206001600160a01b0388168452909152902054828110156124165760405162461bcd60e51b815260040161061190613470565b61242083826136e9565b6000858152602081815260408083206001600160a01b038a811680865291845282852095909555815189815292830188905292938616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a45050505050565b6001600160a01b0384163b15610d465760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906124cd90899089908890889088906004016132e5565b602060405180830381600087803b1580156124e757600080fd5b505af1925050508015612517575060408051601f3d908101601f1916820190925261251491810190613169565b60015b6125c45761252361381f565b806308c379a0141561255d5750612538613837565b80612543575061255f565b8060405162461bcd60e51b815260040161061191906133f5565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b6064820152608401610611565b6001600160e01b0319811663bc197c8160e01b1461219e5760405162461bcd60e51b815260040161061190613408565b6000612604600680546001019055565b5060065490565b606060006126196000612b0b565b9050808360405160200161262e9291906132b6565b604051602081830303815290604052915050919050565b600080612653868686611cff565b905060006126ae826040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b6004549091506001600160a01b03166126c78286612b1a565b6001600160a01b031614979650505050505050565b6001600160a01b0383166127025760405162461bcd60e51b8152600401610611906134f9565b80518251146127235760405162461bcd60e51b8152600401610611906135f2565b604080516020810190915260009081905233905b835181101561282257600084828151811061276257634e487b7160e01b600052603260045260246000fd5b60200260200101519050600084838151811061278e57634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815280835260408082206001600160a01b038c1683529093529190912054909150818110156127de5760405162461bcd60e51b815260040161061190613470565b6127e882826136e9565b6000938452602084815260408086206001600160a01b038c168752909152909320929092555081905061281a816137ae565b915050612737565b5060006001600160a01b0316846001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb86866040516128739291906133c7565b60405180910390a450505050565b6001600160a01b0384166128a75760405162461bcd60e51b81526004016106119061363a565b81518351146128c85760405162461bcd60e51b8152600401610611906135f2565b3360005b8451811015612980578381815181106128f557634e487b7160e01b600052603260045260246000fd5b602002602001015160008087848151811061292057634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254612968919061369e565b90915550819050612978816137ae565b9150506128cc565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516129d19291906133c7565b60405180910390a461161e81600087878787612489565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110612a3057634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b6001600160a01b0384163b15610d465760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190612a859089908990889088908890600401613343565b602060405180830381600087803b158015612a9f57600080fd5b505af1925050508015612acf575060408051601f3d908101601f19168201909252612acc91810190613169565b60015b612adb5761252361381f565b6001600160e01b0319811663f23a6e6160e01b1461219e5760405162461bcd60e51b815260040161061190613408565b60606002805461073d90613747565b600080600080612b2985612b99565b6040805160008152602081018083528b905260ff8316918101919091526060810184905260808101839052929550909350915060019060a0016020604051602081039080840390855afa158015612b84573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b60008060008351604114612bef5760405162461bcd60e51b815260206004820152601860248201527f696e76616c6964207369676e6174757265206c656e67746800000000000000006044820152606401610611565b50505060208101516040820151606090920151909260009190911a90565b828054612c1990613747565b90600052602060002090601f016020900481019282612c3b5760008555612c81565b82601f10612c5457805160ff1916838001178555612c81565b82800160010185558215612c81579182015b82811115612c81578251825591602001919060010190612c66565b50612c8d929150612c91565b5090565b5b80821115612c8d5760008155600101612c92565b80356001600160a01b0381168114612cbd57600080fd5b919050565b60008083601f840112612cd3578182fd5b5081356001600160401b03811115612ce9578182fd5b6020830191508360208260051b8501011115612d0457600080fd5b9250929050565b600082601f830112612d1b578081fd5b81356020612d288261367b565b604051612d358282613782565b8381528281019150858301600585901b87018401881015612d54578586fd5b855b85811015612d7257813584529284019290840190600101612d56565b5090979650505050505050565b60008083601f840112612d90578182fd5b5081356001600160401b03811115612da6578182fd5b602083019150836020828501011115612d0457600080fd5b600082601f830112612dce578081fd5b81356001600160401b03811115612de757612de7613809565b604051612dfe601f8301601f191660200182613782565b818152846020838601011115612e12578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215612e3d578081fd5b612e4682612ca6565b9392505050565b60008060408385031215612e5f578081fd5b612e6883612ca6565b9150612e7660208401612ca6565b90509250929050565b600080600080600060a08688031215612e96578081fd5b612e9f86612ca6565b9450612ead60208701612ca6565b935060408601356001600160401b0380821115612ec8578283fd5b612ed489838a01612d0b565b94506060880135915080821115612ee9578283fd5b612ef589838a01612d0b565b93506080880135915080821115612f0a578283fd5b50612f1788828901612dbe565b9150509295509295909350565b600080600080600060a08688031215612f3b578081fd5b612f4486612ca6565b9450612f5260208701612ca6565b9350604086013592506060860135915060808601356001600160401b03811115612f7a578182fd5b612f1788828901612dbe565b60008060408385031215612f98578182fd5b612fa183612ca6565b915060208301358015158114612fb5578182fd5b809150509250929050565b60008060408385031215612fd2578182fd5b612fdb83612ca6565b946020939093013593505050565b600080600060608486031215612ffd578283fd5b61300684612ca6565b95602085013595506040909401359392505050565b6000806040838503121561302d578182fd5b82356001600160401b0380821115613043578384fd5b818501915085601f830112613056578384fd5b813560206130638261367b565b6040516130708282613782565b8381528281019150858301600585901b870184018b101561308f578889fd5b8896505b848710156130b8576130a481612ca6565b835260019690960195918301918301613093565b50965050860135925050808211156130ce578283fd5b506130db85828601612d0b565b9150509250929050565b600080600080604085870312156130fa578182fd5b84356001600160401b0380821115613110578384fd5b61311c88838901612cc2565b90965094506020870135915080821115613134578384fd5b5061314187828801612cc2565b95989497509550505050565b60006020828403121561315e578081fd5b8135612e46816138c0565b60006020828403121561317a578081fd5b8151612e46816138c0565b600080600060408486031215613199578081fd5b83356001600160401b038111156131ae578182fd5b6131ba86828701612d7f565b909790965060209590950135949350505050565b6000602082840312156131df578081fd5b5035919050565b6000806000604084860312156131fa578081fd5b8335925060208401356001600160401b03811115613216578182fd5b61322286828701612d7f565b9497909650939450505050565b60008060408385031215613241578182fd5b50508035926020909101359150565b6000815180845260208085019450808401835b8381101561327f57815187529582019590820190600101613263565b509495945050505050565b600081518084526132a2816020860160208601613700565b601f01601f19169290920160200192915050565b600083516132c8818460208801613700565b8351908301906132dc818360208801613700565b01949350505050565b6001600160a01b0386811682528516602082015260a06040820181905260009061331190830186613250565b82810360608401526133238186613250565b90508281036080840152613337818561328a565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061337d9083018461328a565b979650505050505050565b6001600160a01b03831681526040602082018190526000906133ac90830184613250565b949350505050565b602081526000612e466020830184613250565b6040815260006133da6040830185613250565b82810360208401526133ec8185613250565b95945050505050565b602081526000612e46602083018461328a565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526006908201526514185d5cd95960d21b604082015260600190565b60208082526024908201527f455243313135353a206275726e20616d6f756e7420657863656564732062616c604082015263616e636560e01b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526023908201527f455243313135353a206275726e2066726f6d20746865207a65726f206164647260408201526265737360e81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526018908201527f4d69736d617463686564206172726179206c656e677468730000000000000000604082015260600190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60006001600160401b0382111561369457613694613809565b5060051b60200190565b600082198211156136b1576136b16137dd565b500190565b6000826136c5576136c56137f3565b500490565b60008160001904831182151516156136e4576136e46137dd565b500290565b6000828210156136fb576136fb6137dd565b500390565b60005b8381101561371b578181015183820152602001613703565b8381111561372a576000848401525b50505050565b60008161373f5761373f6137dd565b506000190190565b600181811c9082168061375b57607f821691505b6020821081141561377c57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f191681016001600160401b03811182821017156137a7576137a7613809565b6040525050565b60006000198214156137c2576137c26137dd565b5060010190565b6000826137d8576137d86137f3565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d111561383457600481823e5160e01c5b90565b600060443d10156138455790565b6040516003193d81016004833e81513d6001600160401b03816024840111818411171561387457505050505090565b828501915081518181111561388c5750505050505090565b843d87010160208285010111156138a65750505050505090565b6138b560208286010187613782565b509095945050505050565b6001600160e01b0319811681146138d657600080fd5b5056fea2646970667358221220241442169da9befe0268059e8bf9e507f1a06ecf9497049d2f01fb10d228c20a64736f6c634300080400338be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e000000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000002dddd8efc6b053f3b5dc327fb812d180f18878f600000000000000000000000019327c8fc14585b075b98583613f5e46488e4c7f0000000000000000000000000000000000000000000000000000000061d1f630000000000000000000000000000000000000000000000000000000000000000a5a6170706572204e46540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000075a50525f4e465400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c697066733a2f2f697066732f0000000000000000000000000000000000000000

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

00000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001400000000000000000000000002dddd8efc6b053f3b5dc327fb812d180f18878f600000000000000000000000019327c8fc14585b075b98583613f5e46488e4c7f0000000000000000000000000000000000000000000000000000000061d1f630000000000000000000000000000000000000000000000000000000000000000a5a6170706572204e46540000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000075a50525f4e465400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c697066733a2f2f697066732f0000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): Zapper NFT
Arg [1] : _symbol (string): ZPR_NFT
Arg [2] : _uri (string): ipfs://ipfs/
Arg [3] : signer (address): 0x2dddd8efc6b053f3b5dc327fb812d180f18878f6
Arg [4] : manager (address): 0x19327c8fc14585b075b98583613f5e46488e4c7f
Arg [5] : _deadline (uint256): 1641150000

-----Encoded View---------------
12 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000140
Arg [3] : 0000000000000000000000002dddd8efc6b053f3b5dc327fb812d180f18878f6
Arg [4] : 00000000000000000000000019327c8fc14585b075b98583613f5e46488e4c7f
Arg [5] : 0000000000000000000000000000000000000000000000000000000061d1f630
Arg [6] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [7] : 5a6170706572204e465400000000000000000000000000000000000000000000
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [9] : 5a50525f4e465400000000000000000000000000000000000000000000000000
Arg [10] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [11] : 697066733a2f2f697066732f0000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
Block Uncle Number Difficulty Gas Used Reward
Loading

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