Token

 

Overview ERC-1155

Total Supply:
0 N/A

Holders:
1 addresses

Transfers:
-

Loading
[ Download CSV Export  ] 
Loading
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
Game

Compiler Version
v0.8.1+commit.df193b15

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 14 : game.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "./Token.sol";
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";


contract Game  is ERC1155 {
    ALCHI public token;
    uint256 public constant Water = 0;
    uint256 public constant Air = 1;
    uint256 public constant Fire = 2;
    uint256 public constant Earth = 3;
    uint256 public constant Steam = 4;
    uint256 public constant Energy = 5;
    uint256 public constant Lava = 6;
    uint256 public constant Rain = 7;
    uint256 public constant Mud = 8;
    uint256 public constant Plant = 9;
    uint256 public constant Rock = 10;
    uint256 public constant Sand = 11;
    uint256 public constant Metal = 12;
    uint256 public constant Glass = 13;
    uint256 public constant Swamp = 14;
    uint256 public constant Eyeglasse = 15;
    uint256 public constant Electricity = 16;
    uint256 public constant Life = 17;
    uint256 public constant Human = 18;
    uint256 public constant Nerd = 19;
    uint256 public constant Computer = 20;
    uint256 public constant Internet = 21;
    uint256 public constant Blockchain = 22;
    uint256 public constant Bitcoin = 23;
    uint256 public fee;
    address owner;
    address private fundAddress;
    modifier _onlyOwner() {
        require(msg.sender == owner);
        _;
    }
    constructor(ALCHI _token) ERC1155("https://gateway.pinata.cloud/ipfs/Qma3uTKnWLWVL7ZB2Fgd4Jy1ZpwERPL5uUjpBqRZM2Wg2z/{id}.json") {
        token = _token;
        owner = msg.sender;
        fee = 10 * 10 ** 18;
    }
    function setfundAddress(address _account) public _onlyOwner {
        fundAddress = _account;
    }
    function mintStandard()  public{
        _mint(msg.sender,Water,1,"0x000");
        _mint(msg.sender,Air,1,"0x000");
        _mint(msg.sender,Fire,1,"0x000");
        _mint(msg.sender,Earth,1,"0x000");
        token.transferFrom(msg.sender, fundAddress, 4*fee);
    }
    function mintPlant() public{
        require(balanceOf(msg.sender,Rain) > 0,"you need have a Rain");
        require(balanceOf(msg.sender,Earth) > 0,"you need have a Earth");
        _mint(msg.sender,Plant,1,"0x000");
        token.transferFrom(msg.sender, fundAddress, fee);
    }
    function mintSand() public{
        require(balanceOf(msg.sender,Air) > 0,"you need have a Air");
        require(balanceOf(msg.sender,Rock) > 0,"you need have a Rock");
        _mint(msg.sender,Sand,1,"0x000");
        token.transferFrom(msg.sender, fundAddress, fee);
    }
    function mintRock() public{
        require(balanceOf(msg.sender,Air) > 0,"you need have a Air");
        require(balanceOf(msg.sender,Lava) > 0,"you need have a Lava");
        _mint(msg.sender,Rock,1,"0x000");
        token.transferFrom(msg.sender, fundAddress, fee);
    }
    function mintMud() public{
        require(balanceOf(msg.sender,Water) > 0,"you need have a Water");
        require(balanceOf(msg.sender,Earth) > 0,"you need have a Earth");
        _mint(msg.sender,Mud,1,"0x000");
        token.transferFrom(msg.sender, fundAddress, fee);
    }
    function mintRain() public{
        require(balanceOf(msg.sender,Water) > 0,"you need have a Water");
        require(balanceOf(msg.sender,Air) > 0,"you need have a Air");
        _mint(msg.sender,Rain,1,"0x000");
        token.transferFrom(msg.sender, fundAddress, fee);
    }
    function mintSteam() public{
        require(balanceOf(msg.sender,Water) > 0,"you need have a Water");
        require(balanceOf(msg.sender,Fire) > 0,"you need have a Fire");
        _mint(msg.sender,Steam,1,"0x000");
        token.transferFrom(msg.sender, fundAddress, fee);
    }
    function mintEnergy() public{
        require(balanceOf(msg.sender,Fire) > 0,"you need have a Fire");
        require(balanceOf(msg.sender,Air) > 0,"you need have a Air");
        _mint(msg.sender,Energy,1,"0x000");
        token.transferFrom(msg.sender, fundAddress, fee);
    }
    function mintLava() public{
        require(balanceOf(msg.sender,Fire) > 0,"you need have a Fire");
        require(balanceOf(msg.sender,Earth) > 0,"you need have a Earth");
        _mint(msg.sender,Lava,1,"0x000");
        token.transferFrom(msg.sender, fundAddress, fee);
    }
    function mintMetal() public{
        require(balanceOf(msg.sender,Fire) > 0,"you need have a Fire");
        require(balanceOf(msg.sender,Rock) > 0,"you need have a Rock");
        _mint(msg.sender,Metal,1,"0x000");
        token.transferFrom(msg.sender, fundAddress, fee);
    }
    function mintGlass() public{
        require(balanceOf(msg.sender,Fire) > 0,"you need have a Fire");
        require(balanceOf(msg.sender,Sand) > 0,"you need have a Sand");
        _mint(msg.sender,Glass,1,"0x000");
        token.transferFrom(msg.sender, fundAddress, fee);
    }
    function mintSwamp() public{
        require(balanceOf(msg.sender,Plant) > 0,"you need have a Plant");
        require(balanceOf(msg.sender,Mud) > 0,"you need have a Mud");
        _mint(msg.sender,Swamp,1,"0x000");
        token.transferFrom(msg.sender, fundAddress, fee);
    }
    function mintEyeglasse() public{
        require(balanceOf(msg.sender,Glass) > 0,"you need have a Glass");
        require(balanceOf(msg.sender,Glass) > 0,"you need have a Glass");
        _mint(msg.sender,Eyeglasse,1,"0x000");
        token.transferFrom(msg.sender, fundAddress, fee);
    }
    function mintElectricity() public{
        require(balanceOf(msg.sender,Energy) > 0,"you need have a Energy");
        require(balanceOf(msg.sender,Metal) > 0,"you need have a Metal");
        _mint(msg.sender,Electricity,1,"0x000");
        token.transferFrom(msg.sender, fundAddress, fee);
    }
    function mintLife() public{
        require(balanceOf(msg.sender,Energy) > 0,"you need have a Energy");
        require(balanceOf(msg.sender,Mud) > 0,"you need have a Metal");
        _mint(msg.sender,Life,1,"0x000");
        token.transferFrom(msg.sender, fundAddress, fee);
    }
    function mintHuman() public{
        require(balanceOf(msg.sender,Life) > 0,"you need have a Life");
        require(balanceOf(msg.sender,Earth) > 0,"you need have a Earth");
        _mint(msg.sender,Human,1,"0x000");
        token.transferFrom(msg.sender, fundAddress, fee);
    }
    function mintNerd() public{
        require(balanceOf(msg.sender,Eyeglasse) > 0,"you need have a Eyeglasse");
        require(balanceOf(msg.sender,Human) > 0,"you need have a Human");
        _mint(msg.sender,Nerd,1,"0x000");
        token.transferFrom(msg.sender, fundAddress, fee);
    }
    function mintComputer() public{
        require(balanceOf(msg.sender,Electricity) > 0,"you need have a Electricity");
        require(balanceOf(msg.sender,Nerd) > 0,"you need have a Nerd");
        _mint(msg.sender,Computer,1,"0x000");
        token.transferFrom(msg.sender, fundAddress, fee);
    }
    function mintInternet() public{
        require(balanceOf(msg.sender,Computer) > 0,"you need have a Computer");
        require(balanceOf(msg.sender,Computer) > 0,"you need have a Computer");
        _mint(msg.sender,Internet,1,"0x000");
        token.transferFrom(msg.sender, fundAddress, fee);
    }
    function mintBlockchain() public{
        require(balanceOf(msg.sender,Computer) > 0,"you need have a Computer");
        require(balanceOf(msg.sender,Internet) > 0,"you need have a Internet");
        _mint(msg.sender,Blockchain,1,"0x000");
        token.transferFrom(msg.sender, fundAddress, fee);
    }
    function mintBitcoin() public{
        require(balanceOf(msg.sender,Blockchain) > 0,"you need have a Blockchain");
        require(balanceOf(msg.sender,Nerd) > 0,"you need have a Nerd");
        _mint(msg.sender,Bitcoin,1,"0x000");
        token.transferFrom(msg.sender, fundAddress, fee);
        fee = fee*2;
    }
}

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

import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";

contract ALCHI is ERC20 {
    using SafeMath for uint256;
    address owner;
    modifier _onlyOwner() {
        require(msg.sender == owner);
        _;
    }
    constructor() payable ERC20("AlchemyToken", "ALCHI") {
        owner = msg.sender;
        uint256 supply = 4400000000;
        _mint(msg.sender, supply.mul(10 ** 18));
    }
}

File 3 of 14 : ERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

        return batchBalances;
    }

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

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

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

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

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

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

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
     *
     * 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 _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        require(to != address(0), "ERC1155: mint to the zero address");
        require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");

        address operator = _msgSender();

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

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

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

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

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

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

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

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

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

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

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

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

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

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

        return array;
    }
}

File 4 of 14 : ERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, allowance(owner, spender) + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = allowance(owner, spender);
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `from` to `to`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

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

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Updates `owner` s allowance for `spender` based on spent `amount`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

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

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

File 5 of 14 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 8 of 14 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 10 of 14 : IERC1155.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must 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 11 of 14 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)

pragma solidity ^0.8.0;

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC1155.sol";

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract ALCHI","name":"_token","type":"address"}],"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":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"Air","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Bitcoin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Blockchain","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Computer","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Earth","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Electricity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Energy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Eyeglasse","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Fire","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Glass","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Human","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Internet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Lava","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Life","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Metal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Mud","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Nerd","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Plant","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Rain","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Rock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Sand","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Steam","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Swamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"Water","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintBitcoin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintBlockchain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintComputer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintElectricity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintEnergy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintEyeglasse","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintGlass","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintHuman","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintInternet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintLava","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintLife","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintMetal","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintMud","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintNerd","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintPlant","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintRain","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintRock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintSand","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintStandard","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintSteam","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintSwamp","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":"address","name":"_account","type":"address"}],"name":"setfundAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract ALCHI","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b5060405162002e4538038062002e45833981016040819052620000349162000154565b6040518060800160405280605a815260200162002deb605a9139620000598162000095565b50600380546001600160a01b039092166001600160a01b03199283161790556005805490911633179055678ac7230489e80000600455620001c1565b8051620000aa906002906020840190620000ae565b5050565b828054620000bc9062000184565b90600052602060002090601f016020900481019282620000e057600085556200012b565b82601f10620000fb57805160ff19168380011785556200012b565b828001600101855582156200012b579182015b828111156200012b5782518255916020019190600101906200010e565b50620001399291506200013d565b5090565b5b808211156200013957600081556001016200013e565b60006020828403121562000166578081fd5b81516001600160a01b03811681146200017d578182fd5b9392505050565b6002810460018216806200019957607f821691505b60208210811415620001bb57634e487b7160e01b600052602260045260246000fd5b50919050565b612c1a80620001d16000396000f3fe608060405234801561001057600080fd5b50600436106103775760003560e01c80636f0fa17f116101d3578063ba8f4acf11610104578063e2acaeef116100a2578063eb4bb8df1161007c578063eb4bb8df146105b3578063f242432a146105bb578063f37633f9146105ce578063fc0c546a146105d657610377565b8063e2acaeef14610590578063e985e9c514610598578063eb2a1f4f146105ab57610377565b8063cbf904b4116100de578063cbf904b414610570578063d50b57c314610578578063d73412db14610580578063ddca3f431461058857610377565b8063ba8f4acf14610558578063bfdc948b14610560578063cb9d7c161461056857610377565b8063a22cb46511610171578063ac6dc89d1161014b578063ac6dc89d14610538578063ae726b3d14610540578063b29d81f014610548578063b870dcf61461055057610377565b8063a22cb46514610515578063a23b791a14610528578063a64f64f21461053057610377565b80637e061660116101ad5780637e061660146104ea578063908ee140146104f2578063a151939f146104fa578063a1ac2fef1461050d57610377565b80636f0fa17f146104d257806374afa174146104da57806376bde502146104e257610377565b8063422b5e3e116102ad578063588e3c7a1161024b5780635f72cc8f116102255780635f72cc8f146104b257806360689557146104ba5780636aecfb3f146104c25780636e69adcf146104ca57610377565b8063588e3c7a1461049a5780635952828c146104a25780635f2f63aa146104aa57610377565b80634c2e5d82116102875780634c2e5d82146104625780634e1273f41461046a57806353b1b49b1461048a57806355aeceea1461049257610377565b8063422b5e3e1461044a57806344b2f8c414610452578063474ce3681461045a57610377565b806320ec885b1161031a5780632aaa6b19116102f45780632aaa6b191461041f5780632eb2c2d6146104275780632f35a71e1461043a5780633d82e8971461044257610377565b806320ec885b14610407578063214a827c1461040f578063299ccd011461041757610377565b8063140d015311610356578063140d0153146103e557806314c539ef146103ef57806316625b8a146103f757806319c34d1e146103ff57610377565b8062fdd58e1461037c57806301ffc9a7146103a55780630e89341c146103c5575b600080fd5b61038f61038a366004612001565b6105eb565b60405161039c91906129f6565b60405180910390f35b6103b86103b336600461210f565b610642565b60405161039c91906122ec565b6103d86103d3366004612147565b61068a565b60405161039c919061230b565b6103ed61071e565b005b61038f61083d565b61038f610842565b61038f610847565b6103ed61084c565b6103ed61095a565b61038f6109d9565b6103ed6109de565b6103ed610435366004611ec2565b610a5d565b61038f610abb565b6103ed610ac0565b6103ed610b3f565b6103ed610bbe565b61038f610c3d565b6103ed610c42565b61047d61047836600461202a565b610cc1565b60405161039c91906122ab565b61038f610de1565b61038f610de6565b61038f610deb565b61038f610df0565b6103ed610df5565b61038f610e74565b61038f610e79565b61038f610e7e565b61038f610e83565b6103ed610e88565b61038f610f07565b61038f610f0c565b61038f610f11565b6103ed610f16565b6103ed610508366004611e6f565b610f95565b6103ed610fce565b6103ed610523366004611fcb565b61104d565b61038f611063565b6103ed611068565b61038f6110e7565b6103ed6110ec565b6103ed61116b565b6103ed6111ea565b6103ed611269565b6103ed61135c565b6103ed6113db565b61038f61145a565b61038f61145f565b61038f611464565b61038f611469565b6103ed61146f565b6103b86105a6366004611e90565b6114ee565b61038f61151c565b6103ed611521565b6103ed6105c9366004611f68565b6115a0565b61038f6115f7565b6105de6115fc565b60405161039c91906122f7565b60006001600160a01b03831661061c5760405162461bcd60e51b8152600401610613906125c4565b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b03198216636cdb3d1360e11b148061067357506001600160e01b031982166303a24d0760e21b145b8061068257506106828261160b565b90505b919050565b60606002805461069990612a68565b80601f01602080910402602001604051908101604052809291908181526020018280546106c590612a68565b80156107125780601f106106e757610100808354040283529160200191610712565b820191906000526020600020905b8154815290600101906020018083116106f557829003601f168201915b50505050509050919050565b600061072b3360166105eb565b116107485760405162461bcd60e51b81526004016106139061258d565b60006107553360136105eb565b116107725760405162461bcd60e51b81526004016106139061255f565b61079d336017600160405180604001604052806005815260200164030783030360dc1b815250611624565b600354600654600480546040516323b872dd60e01b81526001600160a01b03948516946323b872dd946107d7943394929091169201612242565b602060405180830381600087803b1580156107f157600080fd5b505af1158015610805573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082991906120f3565b50600454610838906002612a49565b600455565b600281565b600181565b601381565b60006108593360116105eb565b116108765760405162461bcd60e51b815260040161061390612409565b60006108833360036105eb565b116108a05760405162461bcd60e51b81526004016106139061266a565b6108cb336012600160405180604001604052806005815260200164030783030360dc1b815250611624565b600354600654600480546040516323b872dd60e01b81526001600160a01b03948516946323b872dd94610905943394929091169201612242565b602060405180830381600087803b15801561091f57600080fd5b505af1158015610933573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061095791906120f3565b50565b60006109673360006105eb565b116109845760405162461bcd60e51b815260040161061390612437565b60006109913360016105eb565b116109ae5760405162461bcd60e51b815260040161061390612699565b6108cb336007600160405180604001604052806005815260200164030783030360dc1b815250611624565b600d81565b60006109eb3360016105eb565b11610a085760405162461bcd60e51b815260040161061390612699565b6000610a1533600a6105eb565b11610a325760405162461bcd60e51b81526004016106139061260e565b6108cb33600b600160405180604001604052806005815260200164030783030360dc1b815250611624565b610a65611735565b6001600160a01b0316856001600160a01b03161480610a8b5750610a8b856105a6611735565b610aa75760405162461bcd60e51b815260040161061390612372565b610ab4858585858561173a565b5050505050565b601681565b6000610acd3360106105eb565b11610aea5760405162461bcd60e51b81526004016106139061270b565b6000610af73360136105eb565b11610b145760405162461bcd60e51b81526004016106139061255f565b6108cb336014600160405180604001604052806005815260200164030783030360dc1b815250611624565b6000610b4c3360026105eb565b11610b695760405162461bcd60e51b81526004016106139061263c565b6000610b7633600b6105eb565b11610b935760405162461bcd60e51b815260040161061390612847565b6108cb33600d600160405180604001604052806005815260200164030783030360dc1b815250611624565b6000610bcb3360056105eb565b11610be85760405162461bcd60e51b8152600401610613906124cb565b6000610bf53360086105eb565b11610c125760405162461bcd60e51b8152600401610613906127bb565b6108cb336011600160405180604001604052806005815260200164030783030360dc1b815250611624565b601481565b6000610c4f3360056105eb565b11610c6c5760405162461bcd60e51b8152600401610613906124cb565b6000610c7933600c6105eb565b11610c965760405162461bcd60e51b8152600401610613906127bb565b6108cb336010600160405180604001604052806005815260200164030783030360dc1b815250611624565b60608151835114610ce45760405162461bcd60e51b8152600401610613906128be565b6000835167ffffffffffffffff811115610d0e57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610d37578160200160208202803683370190505b50905060005b8451811015610dd957610d9e858281518110610d6957634e487b7160e01b600052603260045260246000fd5b6020026020010151858381518110610d9157634e487b7160e01b600052603260045260246000fd5b60200260200101516105eb565b828281518110610dbe57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152610dd281612ad0565b9050610d3d565b509392505050565b601281565b600e81565b600481565b601081565b6000610e023360026105eb565b11610e1f5760405162461bcd60e51b81526004016106139061263c565b6000610e2c3360016105eb565b11610e495760405162461bcd60e51b815260040161061390612699565b6108cb336005600160405180604001604052806005815260200164030783030360dc1b815250611624565b600581565b600a81565b600881565b600081565b6000610e953360006105eb565b11610eb25760405162461bcd60e51b815260040161061390612437565b6000610ebf3360036105eb565b11610edc5760405162461bcd60e51b81526004016106139061266a565b6108cb336008600160405180604001604052806005815260200164030783030360dc1b815250611624565b600681565b600781565b600981565b6000610f233360146105eb565b11610f405760405162461bcd60e51b815260040161061390612466565b6000610f4d3360146105eb565b11610f6a5760405162461bcd60e51b815260040161061390612466565b6108cb336015600160405180604001604052806005815260200164030783030360dc1b815250611624565b6005546001600160a01b03163314610fac57600080fd5b600680546001600160a01b0319166001600160a01b0392909216919091179055565b6000610fdb3360016105eb565b11610ff85760405162461bcd60e51b815260040161061390612699565b60006110053360066105eb565b116110225760405162461bcd60e51b815260040161061390612819565b6108cb33600a600160405180604001604052806005815260200164030783030360dc1b815250611624565b61105f611058611735565b8383611919565b5050565b601781565b60006110753360026105eb565b116110925760405162461bcd60e51b81526004016106139061263c565b600061109f33600a6105eb565b116110bc5760405162461bcd60e51b81526004016106139061260e565b6108cb33600c600160405180604001604052806005815260200164030783030360dc1b815250611624565b600f81565b60006110f93360006105eb565b116111165760405162461bcd60e51b815260040161061390612437565b60006111233360026105eb565b116111405760405162461bcd60e51b81526004016106139061263c565b6108cb336004600160405180604001604052806005815260200164030783030360dc1b815250611624565b60006111783360096105eb565b116111955760405162461bcd60e51b81526004016106139061278c565b60006111a23360086105eb565b116111bf5760405162461bcd60e51b8152600401610613906124fb565b6108cb33600e600160405180604001604052806005815260200164030783030360dc1b815250611624565b60006111f73360146105eb565b116112145760405162461bcd60e51b815260040161061390612466565b60006112213360156105eb565b1161123e5760405162461bcd60e51b815260040161061390612990565b6108cb336016600160405180604001604052806005815260200164030783030360dc1b815250611624565b611294336000600160405180604001604052806005815260200164030783030360dc1b815250611624565b6112be3360018060405180604001604052806005815260200164030783030360dc1b815250611624565b6112e9336002600160405180604001604052806005815260200164030783030360dc1b815250611624565b611314336003600160405180604001604052806005815260200164030783030360dc1b815250611624565b600354600654600480546001600160a01b03938416936323b872dd93339391169161133e91612a49565b6040518463ffffffff1660e01b815260040161090593929190612242565b600061136933600d6105eb565b116113865760405162461bcd60e51b8152600401610613906127ea565b600061139333600d6105eb565b116113b05760405162461bcd60e51b8152600401610613906127ea565b6108cb33600f600160405180604001604052806005815260200164030783030360dc1b815250611624565b60006113e83360076105eb565b116114055760405162461bcd60e51b81526004016106139061249d565b60006114123360036105eb565b1161142f5760405162461bcd60e51b81526004016106139061266a565b6108cb336009600160405180604001604052806005815260200164030783030360dc1b815250611624565b600b81565b601181565b600381565b60045481565b600061147c33600f6105eb565b116114995760405162461bcd60e51b815260040161061390612528565b60006114a63360126105eb565b116114c35760405162461bcd60e51b8152600401610613906129c7565b6108cb336013600160405180604001604052806005815260200164030783030360dc1b815250611624565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b600c81565b600061152e3360026105eb565b1161154b5760405162461bcd60e51b81526004016106139061263c565b60006115583360036105eb565b116115755760405162461bcd60e51b81526004016106139061266a565b6108cb336006600160405180604001604052806005815260200164030783030360dc1b815250611624565b6115a8611735565b6001600160a01b0316856001600160a01b031614806115ce57506115ce856105a6611735565b6115ea5760405162461bcd60e51b815260040161061390612372565b610ab485858585856119bc565b601581565b6003546001600160a01b031681565b6001600160e01b031981166301ffc9a760e01b14919050565b6001600160a01b03841661164a5760405162461bcd60e51b81526004016106139061294f565b6000611654611735565b9050600061166185611b19565b9050600061166e85611b19565b905061167f83600089858589611911565b6000868152602081815260408083206001600160a01b038b168452909152812080548792906116af908490612a31565b92505081905550866001600160a01b031660006001600160a01b0316846001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6289896040516117069291906129ff565b60405180910390a461171d83600089858589611911565b61172c83600089898989611b72565b50505050505050565b335b90565b815183511461175b5760405162461bcd60e51b815260040161061390612907565b6001600160a01b0384166117815760405162461bcd60e51b8152600401610613906126c6565b600061178b611735565b905061179b818787878787611911565b60005b845181101561189d5760008582815181106117c957634e487b7160e01b600052603260045260246000fd5b6020026020010151905060008583815181106117f557634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815280835260408082206001600160a01b038e1683529093529190912054909150818110156118455760405162461bcd60e51b815260040161061390612742565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290611882908490612a31565b925050819055505050508061189690612ad0565b905061179e565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516118ed9291906122be565b60405180910390a4611903818787878787611911565b611911818787878787611c97565b505050505050565b816001600160a01b0316836001600160a01b0316141561194b5760405162461bcd60e51b815260040161061390612875565b6001600160a01b0383811660008181526001602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31906119af9085906122ec565b60405180910390a3505050565b6001600160a01b0384166119e25760405162461bcd60e51b8152600401610613906126c6565b60006119ec611735565b905060006119f985611b19565b90506000611a0685611b19565b9050611a16838989858589611911565b6000868152602081815260408083206001600160a01b038c16845290915290205485811015611a575760405162461bcd60e51b815260040161061390612742565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290611a94908490612a31565b92505081905550876001600160a01b0316896001600160a01b0316856001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a604051611aea9291906129ff565b60405180910390a4611b00848a8a86868a611911565b611b0e848a8a8a8a8a611b72565b505050505050505050565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110611b6157634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b611b84846001600160a01b0316611d68565b156119115760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611bbd9089908990889088908890600401612266565b602060405180830381600087803b158015611bd757600080fd5b505af1925050508015611c07575060408051601f3d908101601f19168201909252611c049181019061212b565b60015b611c6757611c13612b17565b806308c379a01415611c4d5750611c28612b2e565b80611c335750611c4f565b8060405162461bcd60e51b8152600401610613919061230b565b505b60405162461bcd60e51b81526004016106139061231e565b6001600160e01b0319811663f23a6e6160e01b1461172c5760405162461bcd60e51b8152600401610613906123c1565b611ca9846001600160a01b0316611d68565b156119115760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611ce290899089908890889088906004016121e4565b602060405180830381600087803b158015611cfc57600080fd5b505af1925050508015611d2c575060408051601f3d908101601f19168201909252611d299181019061212b565b60015b611d3857611c13612b17565b6001600160e01b0319811663bc197c8160e01b1461172c5760405162461bcd60e51b8152600401610613906123c1565b6001600160a01b03163b151590565b80356001600160a01b038116811461068557600080fd5b600082601f830112611d9e578081fd5b81356020611dab82612a0d565b604051611db88282612aa3565b838152828101915085830183850287018401881015611dd5578586fd5b855b85811015611df357813584529284019290840190600101611dd7565b5090979650505050505050565b600082601f830112611e10578081fd5b813567ffffffffffffffff811115611e2a57611e2a612b01565b604051611e41601f8301601f191660200182612aa3565b818152846020838601011115611e55578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215611e80578081fd5b611e8982611d77565b9392505050565b60008060408385031215611ea2578081fd5b611eab83611d77565b9150611eb960208401611d77565b90509250929050565b600080600080600060a08688031215611ed9578081fd5b611ee286611d77565b9450611ef060208701611d77565b9350604086013567ffffffffffffffff80821115611f0c578283fd5b611f1889838a01611d8e565b94506060880135915080821115611f2d578283fd5b611f3989838a01611d8e565b93506080880135915080821115611f4e578283fd5b50611f5b88828901611e00565b9150509295509295909350565b600080600080600060a08688031215611f7f578081fd5b611f8886611d77565b9450611f9660208701611d77565b93506040860135925060608601359150608086013567ffffffffffffffff811115611fbf578182fd5b611f5b88828901611e00565b60008060408385031215611fdd578182fd5b611fe683611d77565b91506020830135611ff681612bc0565b809150509250929050565b60008060408385031215612013578182fd5b61201c83611d77565b946020939093013593505050565b6000806040838503121561203c578182fd5b823567ffffffffffffffff80821115612053578384fd5b818501915085601f830112612066578384fd5b8135602061207382612a0d565b6040516120808282612aa3565b8381528281019150858301838502870184018b101561209d578889fd5b8896505b848710156120c6576120b281611d77565b8352600196909601959183019183016120a1565b50965050860135925050808211156120dc578283fd5b506120e985828601611d8e565b9150509250929050565b600060208284031215612104578081fd5b8151611e8981612bc0565b600060208284031215612120578081fd5b8135611e8981612bce565b60006020828403121561213c578081fd5b8151611e8981612bce565b600060208284031215612158578081fd5b5035919050565b6000815180845260208085019450808401835b8381101561218e57815187529582019590820190600101612172565b509495945050505050565b60008151808452815b818110156121be576020818501810151868301820152016121a2565b818111156121cf5782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0386811682528516602082015260a0604082018190526000906122109083018661215f565b8281036060840152612222818661215f565b905082810360808401526122368185612199565b98975050505050505050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906122a090830184612199565b979650505050505050565b600060208252611e89602083018461215f565b6000604082526122d1604083018561215f565b82810360208401526122e3818561215f565b95945050505050565b901515815260200190565b6001600160a01b0391909116815260200190565b600060208252611e896020830184612199565b60208082526034908201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356040820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606082015260800190565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201526e195c881b9bdc88185c1c1c9bdd9959608a1b606082015260800190565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b602080825260149082015273796f75206e65656420686176652061204c69666560601b604082015260600190565b6020808252601590820152743cb7ba903732b2b2103430bb329030902bb0ba32b960591b604082015260600190565b60208082526018908201527f796f75206e6565642068617665206120436f6d70757465720000000000000000604082015260600190565b6020808252601490820152733cb7ba903732b2b2103430bb329030902930b4b760611b604082015260600190565b602080825260169082015275796f75206e6565642068617665206120456e6572677960501b604082015260600190565b6020808252601390820152721e5bdd481b995959081a185d99481848135d59606a1b604082015260600190565b60208082526019908201527f796f75206e6565642068617665206120457965676c6173736500000000000000604082015260600190565b6020808252601490820152731e5bdd481b995959081a185d9948184813995c9960621b604082015260600190565b6020808252601a908201527f796f75206e6565642068617665206120426c6f636b636861696e000000000000604082015260600190565b6020808252602a908201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660408201526930b634b21037bbb732b960b11b606082015260800190565b602080825260149082015273796f75206e6565642068617665206120526f636b60601b604082015260600190565b602080825260149082015273796f75206e65656420686176652061204669726560601b604082015260600190565b6020808252601590820152740f2deea40dccacac840d0c2ecca40c2408ac2e4e8d605b1b604082015260600190565b6020808252601390820152723cb7ba903732b2b2103430bb3290309020b4b960691b604082015260600190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252601b908201527f796f75206e6565642068617665206120456c6563747269636974790000000000604082015260600190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6020808252601590820152741e5bdd481b995959081a185d99481848141b185b9d605a1b604082015260600190565b6020808252601590820152741e5bdd481b995959081a185d9948184813595d185b605a1b604082015260600190565b602080825260159082015274796f75206e6565642068617665206120476c61737360581b604082015260600190565b602080825260149082015273796f75206e65656420686176652061204c61766160601b604082015260600190565b6020808252601490820152731e5bdd481b995959081a185d9948184814d85b9960621b604082015260600190565b60208082526029908201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604082015268103337b91039b2b63360b91b606082015260800190565b60208082526029908201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604082015268040dad2e6dac2e8c6d60bb1b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60208082526018908201527f796f75206e6565642068617665206120496e7465726e65740000000000000000604082015260600190565b6020808252601590820152743cb7ba903732b2b2103430bb32903090243ab6b0b760591b604082015260600190565b90815260200190565b918252602082015260400190565b600067ffffffffffffffff821115612a2757612a27612b01565b5060209081020190565b60008219821115612a4457612a44612aeb565b500190565b6000816000190483118215151615612a6357612a63612aeb565b500290565b600281046001821680612a7c57607f821691505b60208210811415612a9d57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f1916810167ffffffffffffffff81118282101715612ac957612ac9612b01565b6040525050565b6000600019821415612ae457612ae4612aeb565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d111561173757600481823e5160e01c90565b600060443d1015612b3e57611737565b6040516003193d81016004833e81513d67ffffffffffffffff8160248401118184111715612b70575050505050611737565b8285019150815181811115612b8a57505050505050611737565b843d8701016020828501011115612ba657505050505050611737565b612bb560208286010187612aa3565b509094505050505090565b801515811461095757600080fd5b6001600160e01b03198116811461095757600080fdfea264697066735822122023f9d8c7f8603bf1f596fed8970b61581163eead12c1a240754e7023a6ecfe1064736f6c6343000801003368747470733a2f2f676174657761792e70696e6174612e636c6f75642f697066732f516d613375544b6e574c57564c375a4232466764344a79315a70774552504c3575556a704271525a4d325767327a2f7b69647d2e6a736f6e00000000000000000000000036996c8642810add6c5bb814ed7a7ca8abc26fe0

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

00000000000000000000000036996c8642810add6c5bb814ed7a7ca8abc26fe0

-----Decoded View---------------
Arg [0] : _token (address): 0x36996c8642810add6c5bb814ed7a7ca8abc26fe0

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000036996c8642810add6c5bb814ed7a7ca8abc26fe0


Loading