Mumbai Testnet

Contract

0x7bb5907021A7a7a0F6E2D3F0C14953817F74A2FD

Overview

MATIC Balance

Polygon PoS Chain LogoPolygon PoS Chain LogoPolygon PoS Chain Logo0 MATIC

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Value
Award Item345708912023-04-19 15:26:05343 days ago1681917965IN
0x7bb59070...17F74A2FD
0 MATIC0.000349932.50000001
Award Item338000722023-03-31 16:24:11362 days ago1680279851IN
0x7bb59070...17F74A2FD
0 MATIC0.000349932.50000001
Award Item337998252023-03-31 16:15:27362 days ago1680279327IN
0x7bb59070...17F74A2FD
0 MATIC0.000349932.50000001
Award Item337993602023-03-31 15:58:59362 days ago1680278339IN
0x7bb59070...17F74A2FD
0 MATIC0.000349932.50000001
Award Item337458912023-03-30 8:25:17364 days ago1680164717IN
0x7bb59070...17F74A2FD
0 MATIC0.000349932.50000001
Award Item337454132023-03-30 8:08:21364 days ago1680163701IN
0x7bb59070...17F74A2FD
0 MATIC0.000349932.50000001
Award Item337389122023-03-30 4:18:07364 days ago1680149887IN
0x7bb59070...17F74A2FD
0 MATIC0.000349932.50000001
Award Item336248272023-03-27 8:57:23367 days ago1679907443IN
0x7bb59070...17F74A2FD
0 MATIC0.000349932.50000001
Award Item335192522023-03-24 18:38:17369 days ago1679683097IN
0x7bb59070...17F74A2FD
0 MATIC0.000349932.50000001
Award Item335161582023-03-24 16:48:41369 days ago1679676521IN
0x7bb59070...17F74A2FD
0 MATIC0.000349932.50000001
Set Approval For...335161172023-03-24 16:47:15369 days ago1679676435IN
0x7bb59070...17F74A2FD
0 MATIC0.000115832.50000001
Award Item335055782023-03-24 10:33:59370 days ago1679654039IN
0x7bb59070...17F74A2FD
0 MATIC0.00034992.50000001
Set Approval For...335055552023-03-24 10:33:11370 days ago1679653991IN
0x7bb59070...17F74A2FD
0 MATIC0.000115832.50000001
Award Item334805942023-03-23 19:49:09370 days ago1679600949IN
0x7bb59070...17F74A2FD
0 MATIC0.000349932.50000001
Award Item334694372023-03-23 13:13:59370 days ago1679577239IN
0x7bb59070...17F74A2FD
0 MATIC0.000349932.50000001
Award Item334676162023-03-23 12:09:31370 days ago1679573371IN
0x7bb59070...17F74A2FD
0 MATIC0.000349932.50000001
Set Approval For...334675992023-03-23 12:08:53370 days ago1679573333IN
0x7bb59070...17F74A2FD
0 MATIC0.000115832.50000001
Award Item314313992023-01-26 13:36:23426 days ago1674740183IN
0x7bb59070...17F74A2FD
0 MATIC0.000349932.50000001
Award Item305090722023-01-03 20:47:02449 days ago1672778822IN
0x7bb59070...17F74A2FD
0 MATIC0.000349932.50000001
Transfer Ownersh...305088982023-01-03 20:40:52449 days ago1672778452IN
0x7bb59070...17F74A2FD
0 MATIC0.000071892.50000001
Set Approval For...302876992022-12-29 10:06:35455 days ago1672308395IN
0x7bb59070...17F74A2FD
0 MATIC0.000115832.50000001
Set Approval For...296447162022-12-13 14:33:16470 days ago1670941996IN
0x7bb59070...17F74A2FD
0 MATIC0.000115832.50000001
Set Approval For...296441862022-12-13 14:14:30470 days ago1670940870IN
0x7bb59070...17F74A2FD
0 MATIC0.000115832.50000001
Award Item296438312022-12-13 14:01:56470 days ago1670940116IN
0x7bb59070...17F74A2FD
0 MATIC0.000349932.50000001
Award Item296418472022-12-13 12:51:40470 days ago1670935900IN
0x7bb59070...17F74A2FD
0 MATIC0.000349932.50000001
View all transactions

Parent Txn Hash Block From To Value
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ERC1155Openzeppelin

Compiler Version
v0.8.1+commit.df193b15

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 14 : ERC1155Openzeppelin.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity ^0.8.0 || ^0.8.1;
import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "../loyalties/Loyalty.sol";

contract ERC1155Openzeppelin is ERC1155, Ownable, Loyalty {
    string public name = "BULLZ Collection";
    string public symbol = "BULLZ";    
    string public baseUri = "https://prod-eth-api.bullz.com/api/nfts/item/";
    
    ILoyalty private loyalty;

    constructor(string memory _name, string memory _symbol)
        ERC1155("https://eth-api.bullz.com/api/nfts/item/")
    {
        if (bytes(_name).length != 0) {
            name = _name;
        }
        if (bytes(_symbol).length != 0) {
            symbol = _symbol;
        }
    }

    function awardItem(
        uint256 newItemId,
        uint256 amount,
        bytes memory data,
        uint256 loyaltyPercent,
        uint256 resaleStatus
    ) public returns (uint256) {
        _mint(_msgSender(), newItemId, amount, data);
        addLoyalty(newItemId, _msgSender(), loyaltyPercent, resaleStatus);
        return newItemId;
    }

    function setURI(string memory newUri)
        public
        onlyOwner
        returns (string memory)
    {
        _setURI(newUri);
        baseUri = newUri;

        return newUri;
    }

    function uri(uint256 _tokenid)
        public
        view
        override
        returns (string memory)
    {
        return
            string(
                abi.encodePacked(baseUri, Strings.toString(_tokenid), ".json")
            );
    }
}

File 2 of 14 : Loyalty.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0 || ^0.8.1;

import "./interfaces/ILoyalty.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";

abstract contract Loyalty is ILoyalty {
    mapping(uint256 => mapping(address => uint256)) public loyalties;
    mapping(uint256 => address) public creators;
    mapping(uint256 => bool) public hasLoyalty;
    mapping(uint256 => uint256) public resaleStatuses;

    uint256 public INIT_RESALE = 0;
    uint256 public RESALE_ALLOWED = 1;
    uint256 public RESALE_REJECTED = 2;

    using SafeMath for uint256;
    bytes4 private constant FUNC_SELECTOR = bytes4(keccak256("isLoyalty()"));

    constructor() {}

    function isLoyalty() external pure override returns (bool) {
        return true;
    }

    function addLoyalty(
        uint256 assetId,
        address rightHolder,
        uint256 percent,
        uint256 resaleStatus
    ) internal {
        require(percent <= 10, "Loyalty percent must be between 0 and 10");

        require(!_isInLoyalty(assetId), "NFT already in loyalty");
        creators[assetId] = rightHolder;
        resaleStatuses[assetId] = resaleStatus;
        _addLoyalty(assetId, rightHolder, percent);
    }

    function getLoyalty(uint256 assetId, address rightHolder)
        public
        view
        override
        returns (uint256)
    {
        return loyalties[assetId][rightHolder];
    }

    function getLoyaltyCreator(uint256 assetId)
        external
        view
        override
        returns (address)
    {
        return _getLoyaltyCreator(assetId);
    }

    function _getLoyaltyCreator(uint256 assetId)
        internal
        view
        returns (address)
    {
        return creators[assetId];
    }

    function isInLoyalty(uint256 assetId)
        external
        view
        override
        returns (bool)
    {
        return _isInLoyalty(assetId);
    }

    function _isInLoyalty(uint256 assetId) internal view returns (bool) {
        return hasLoyalty[assetId];
    }

    function getCurent() external view returns (address) {
        return msg.sender;
    }

    function isResaleAllowed(uint256 assetId, address currentUser)
        external
        view
        override
        returns (bool)
    {
        return _isResaleAllowed(assetId, currentUser);
    }

    function _isResaleAllowed(uint256 assetId, address currentUser)
        internal
        view
        returns (bool)
    {
        return
            address(creators[assetId]) == currentUser
                ? true
                : resaleStatuses[assetId] != RESALE_REJECTED;
    }

    function _addLoyalty(
        uint256 assetId,
        address rightHolder,
        uint256 percent
    ) internal {
        loyalties[assetId][rightHolder] = percent;
        hasLoyalty[assetId] = true;
        emit AddLoyalty(address(this), assetId, rightHolder, percent);
    }

    function computeCreatorLoyaltyByAmount(
        uint256 assetId,
        address seller,
        uint256 sellerAmount
    ) external view override returns (address creator, uint256 creatorBenif) {
        if (_isInLoyalty(assetId)) {
            creator = _getLoyaltyCreator(assetId);
            if (creator != seller) {
                uint256 percent = getLoyalty(assetId, creator);
                if (percent > 0) {
                    creatorBenif = (sellerAmount).mul(percent).div(100);
                } else {
                    creatorBenif = 0;
                }
            } else {
                creatorBenif = 0;
            }
        } else {
            creator = address(0);
            creatorBenif = 0;
        }
    }
}

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 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

File 6 of 14 : ILoyalty.sol
// SPDX-License-Identifier: UNLICENSED

pragma solidity ^0.8.0 || ^0.8.1;

/// @title Loyalty for Non-fungible token
/// @notice Manage
interface ILoyalty {
    /**
     * @notice loyalty program
     * @dev Get loyalty percentage
     * @param assetId the NFT asset identifier
     */
    function getLoyalty(uint256 assetId, address rightHolder)
        external
        view
        returns (uint256);

    /**
     * @notice loyalty program
     * @dev Check loyalty existence
     * @param assetId the NFT asset identifier
     */
    function isInLoyalty(uint256 assetId) external view returns (bool);

    function isResaleAllowed(uint256 assetId, address currentUser)
        external
        view
        returns (bool);

    function isLoyalty() external pure returns (bool);

    function getLoyaltyCreator(uint256 assetId) external view returns (address);

    function computeCreatorLoyaltyByAmount(
        uint256 assetId,
        address seller,
        uint256 sellerAmount
    ) external view returns (address creator, uint256 creatorBenif);

    event AddLoyalty(
        address collection,
        uint256 assetId,
        address rightHolder,
        uint256 percent
    );
}

File 7 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 8 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 9 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 10 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 11 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 12 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 13 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 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": 1000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract ABI

[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"collection","type":"address"},{"indexed":false,"internalType":"uint256","name":"assetId","type":"uint256"},{"indexed":false,"internalType":"address","name":"rightHolder","type":"address"},{"indexed":false,"internalType":"uint256","name":"percent","type":"uint256"}],"name":"AddLoyalty","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"INIT_RESALE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RESALE_ALLOWED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RESALE_REJECTED","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"newItemId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"},{"internalType":"uint256","name":"loyaltyPercent","type":"uint256"},{"internalType":"uint256","name":"resaleStatus","type":"uint256"}],"name":"awardItem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseUri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assetId","type":"uint256"},{"internalType":"address","name":"seller","type":"address"},{"internalType":"uint256","name":"sellerAmount","type":"uint256"}],"name":"computeCreatorLoyaltyByAmount","outputs":[{"internalType":"address","name":"creator","type":"address"},{"internalType":"uint256","name":"creatorBenif","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"creators","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurent","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assetId","type":"uint256"},{"internalType":"address","name":"rightHolder","type":"address"}],"name":"getLoyalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assetId","type":"uint256"}],"name":"getLoyaltyCreator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"hasLoyalty","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"assetId","type":"uint256"}],"name":"isInLoyalty","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isLoyalty","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"assetId","type":"uint256"},{"internalType":"address","name":"currentUser","type":"address"}],"name":"isResaleAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"loyalties","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"resaleStatuses","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"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":"string","name":"newUri","type":"string"}],"name":"setURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenid","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]

600060085560016009556002600a5560c0604052601060808190526f212aa6262d1021b7b63632b1ba34b7b760811b60a09081526200004291600b9190620001c2565b5060408051808201909152600580825264212aa6262d60d91b60209092019182526200007191600c91620001c2565b506040518060600160405280602d81526020016200288e602d91398051620000a291600d91602090910190620001c2565b50348015620000b057600080fd5b50604051620028bb380380620028bb833981016040819052620000d3916200031b565b6040518060600160405280602881526020016200286660289139620000f88162000153565b506200010d620001076200016c565b62000170565b8151156200012c5781516200012a90600b906020850190620001c2565b505b8051156200014b5780516200014990600c906020840190620001c2565b505b5050620003d5565b805162000168906002906020840190620001c2565b5050565b3390565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620001d09062000382565b90600052602060002090601f016020900481019282620001f457600085556200023f565b82601f106200020f57805160ff19168380011785556200023f565b828001600101855582156200023f579182015b828111156200023f57825182559160200191906001019062000222565b506200024d92915062000251565b5090565b5b808211156200024d576000815560010162000252565b600082601f83011262000279578081fd5b81516001600160401b0380821115620002965762000296620003bf565b604051601f8301601f19908116603f01168101908282118183101715620002c157620002c1620003bf565b81604052838152602092508683858801011115620002dd578485fd5b8491505b83821015620003005785820183015181830184015290820190620002e1565b838211156200031157848385830101525b9695505050505050565b600080604083850312156200032e578182fd5b82516001600160401b038082111562000345578384fd5b620003538683870162000268565b9350602085015191508082111562000369578283fd5b50620003788582860162000268565b9150509250929050565b6002810460018216806200039757607f821691505b60208210811415620003b957634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052604160045260246000fd5b61248180620003e56000396000f3fe608060405234801561001057600080fd5b50600436106101d95760003560e01c8063715018a611610104578063ac65bcc0116100a2578063cd53d08e11610071578063cd53d08e146103b8578063e985e9c5146103cb578063f242432a146103de578063f2fde38b146103f1576101d9565b8063ac65bcc014610374578063b1846fe814610387578063b3db32351461038f578063b918169e14610397576101d9565b806395d89b41116100de57806395d89b411461033e578063980cb39e146103465780639abc832014610359578063a22cb46514610361576101d9565b8063715018a61461031b57806381047cb1146103235780638da5cb5b14610336576101d9565b806319b6a4311161017c578063302c0c231161014b578063302c0c23146102c0578063374aca22146102d557806349212fcb146102e85780634e1273f4146102fb576101d9565b806319b6a4311461027d57806321bb49d214610290578063241329e2146102a35780632eb2c2d6146102ab576101d9565b806306fdde03116101b857806306fdde03146102475780630e89341c1461024f5780630fb97ae314610262578063145009e014610275576101d9565b8062fdd58e146101de57806301ffc9a71461020757806302fe530514610227575b600080fd5b6101f16101ec366004611831565b610404565b6040516101fe91906121de565b60405180910390f35b61021a610215366004611923565b61045b565b6040516101fe9190611cf8565b61023a61023536600461195b565b6104d5565b6040516101fe9190611d03565b61023a610502565b61023a61025d3660046119a1565b610590565b6101f16102703660046119a1565b6105c4565b6101f16105d6565b61021a61028b3660046119a1565b6105dc565b61021a61029e3660046119a1565b6105e7565b6101f16105fc565b6102be6102b93660046116ee565b610602565b005b6102c8610660565b6040516101fe9190611bc8565b61021a6102e33660046119b9565b610665565b6101f16102f63660046119b9565b610678565b61030e61030936600461185a565b610695565b6040516101fe9190611cc0565b6102be6107b5565b6101f16103313660046119b9565b6107c9565b6102c86107f1565b61023a610800565b6102c86103543660046119a1565b61080d565b61023a610818565b6102be61036f3660046117f7565b610825565b6101f1610382366004611a0f565b61083b565b6101f161086d565b61021a610873565b6103aa6103a53660046119db565b610878565b6040516101fe929190611c7d565b6102c86103c63660046119a1565b610900565b61021a6103d93660046116bc565b61091b565b6102be6103ec366004611794565b610949565b6102be6103ff3660046116a2565b6109a0565b60006001600160a01b0383166104355760405162461bcd60e51b815260040161042c90611e8a565b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b031982167fd9b67a260000000000000000000000000000000000000000000000000000000014806104be57506001600160e01b031982167f0e89341c00000000000000000000000000000000000000000000000000000000145b806104cd57506104cd826109da565b90505b919050565b60606104df610a0c565b6104e882610a4b565b81516104fb90600d906020850190611503565b5090919050565b600b805461050f906122b3565b80601f016020809104026020016040519081016040528092919081815260200182805461053b906122b3565b80156105885780601f1061055d57610100808354040283529160200191610588565b820191906000526020600020905b81548152906001019060200180831161056b57829003601f168201915b505050505081565b6060600d61059d83610a5e565b6040516020016105ae929190611b1a565b6040516020818303038152906040529050919050565b60076020526000908152604090205481565b60095481565b60006104cd82610bb5565b60066020526000908152604090205460ff1681565b600a5481565b61060a610660565b6001600160a01b0316856001600160a01b031614806106305750610630856103d9610660565b61064c5760405162461bcd60e51b815260040161042c90611d73565b6106598585858585610bca565b5050505050565b335b90565b60006106718383610da9565b9392505050565b600460209081526000928352604080842090915290825290205481565b606081518351146106b85760405162461bcd60e51b815260040161042c906120c7565b6000835167ffffffffffffffff8111156106e257634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561070b578160200160208202803683370190505b50905060005b84518110156107ad5761077285828151811061073d57634e487b7160e01b600052603260045260246000fd5b602002602001015185838151811061076557634e487b7160e01b600052603260045260246000fd5b6020026020010151610404565b82828151811061079257634e487b7160e01b600052603260045260246000fd5b60209081029190910101526107a68161231b565b9050610711565b509392505050565b6107bd610a0c565b6107c76000610dec565b565b60009182526004602090815260408084206001600160a01b0393909316845291905290205490565b6003546001600160a01b031690565b600c805461050f906122b3565b60006104cd82610e4b565b600d805461050f906122b3565b610837610830610660565b8383610e66565b5050565b6000610850610848610660565b878787610f09565b6108638661085c610660565b858561101a565b5093949350505050565b60085481565b600190565b60008061088485610bb5565b156108f15761089285610e4b565b9150836001600160a01b0316826001600160a01b0316146108e85760006108b986846107c9565b905080156108dd576108d660646108d086846110b3565b906110bf565b91506108e2565b600091505b506108ec565b5060005b6108f8565b5060009050805b935093915050565b6005602052600090815260409020546001600160a01b031681565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b610951610660565b6001600160a01b0316856001600160a01b031614806109775750610977856103d9610660565b6109935760405162461bcd60e51b815260040161042c90611d73565b61065985858585856110cb565b6109a8610a0c565b6001600160a01b0381166109ce5760405162461bcd60e51b815260040161042c90611e2d565b6109d781610dec565b50565b6001600160e01b031981167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b610a14610660565b6001600160a01b0316610a256107f1565b6001600160a01b0316146107c75760405162461bcd60e51b815260040161042c90611fa1565b8051610837906002906020840190611503565b606081610a9f575060408051808201909152600181527f300000000000000000000000000000000000000000000000000000000000000060208201526104d0565b8160005b8115610ac95780610ab38161231b565b9150610ac29050600a8361223d565b9150610aa3565b60008167ffffffffffffffff811115610af257634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610b1c576020820181803683370190505b5090505b8415610bad57610b31600183612270565b9150610b3e600a86612336565b610b49906030612225565b60f81b818381518110610b6c57634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350610ba6600a8661223d565b9450610b20565b949350505050565b60009081526006602052604090205460ff1690565b8151835114610beb5760405162461bcd60e51b815260040161042c90612124565b6001600160a01b038416610c115760405162461bcd60e51b815260040161042c90611ee7565b6000610c1b610660565b9050610c2b818787878787610da1565b60005b8451811015610d2d576000858281518110610c5957634e487b7160e01b600052603260045260246000fd5b602002602001015190506000858381518110610c8557634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015610cd55760405162461bcd60e51b815260040161042c90611f44565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610d12908490612225565b9250508190555050505080610d269061231b565b9050610c2e565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610d7d929190611cd3565b60405180910390a4610d93818787878787610da1565b610da1818787878787611228565b505050505050565b6000828152600560205260408120546001600160a01b03838116911614610de357600a546000848152600760205260409020541415610671565b50600192915050565b600380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000908152600560205260409020546001600160a01b031690565b816001600160a01b0316836001600160a01b03161415610e985760405162461bcd60e51b815260040161042c9061206a565b6001600160a01b0383811660008181526001602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190610efc908590611cf8565b60405180910390a3505050565b6001600160a01b038416610f2f5760405162461bcd60e51b815260040161042c90612181565b6000610f39610660565b90506000610f468561134d565b90506000610f538561134d565b9050610f6483600089858589610da1565b6000868152602081815260408083206001600160a01b038b16845290915281208054879290610f94908490612225565b92505081905550866001600160a01b031660006001600160a01b0316846001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051610feb9291906121e7565b60405180910390a461100283600089858589610da1565b611011836000898989896113a6565b50505050505050565b600a82111561103b5760405162461bcd60e51b815260040161042c90611fd6565b61104484610bb5565b156110615760405162461bcd60e51b815260040161042c90612033565b6000848152600560209081526040808320805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038816179055600790915290208190556110ad848484611477565b50505050565b60006106718284612251565b6000610671828461223d565b6001600160a01b0384166110f15760405162461bcd60e51b815260040161042c90611ee7565b60006110fb610660565b905060006111088561134d565b905060006111158561134d565b9050611125838989858589610da1565b6000868152602081815260408083206001600160a01b038c168452909152902054858110156111665760405162461bcd60e51b815260040161042c90611f44565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906111a3908490612225565b92505081905550876001600160a01b0316896001600160a01b0316856001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a6040516111f99291906121e7565b60405180910390a461120f848a8a86868a610da1565b61121d848a8a8a8a8a6113a6565b505050505050505050565b61123a846001600160a01b03166114f4565b15610da15760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906112739089908990889088908890600401611bdc565b602060405180830381600087803b15801561128d57600080fd5b505af19250505080156112bd575060408051601f3d908101601f191682019092526112ba9181019061193f565b60015b61131d576112c961238c565b806308c379a0141561130357506112de6123a3565b806112e95750611305565b8060405162461bcd60e51b815260040161042c9190611d03565b505b60405162461bcd60e51b815260040161042c90611d16565b6001600160e01b0319811663bc197c8160e01b146110115760405162461bcd60e51b815260040161042c90611dd0565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061139557634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b6113b8846001600160a01b03166114f4565b15610da15760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906113f19089908990889088908890600401611c3a565b602060405180830381600087803b15801561140b57600080fd5b505af192505050801561143b575060408051601f3d908101601f191682019092526114389181019061193f565b60015b611447576112c961238c565b6001600160e01b0319811663f23a6e6160e01b146110115760405162461bcd60e51b815260040161042c90611dd0565b60008381526004602090815260408083206001600160a01b03861684528252808320849055858352600690915290819020805460ff19166001179055517f3a9c7efcff27a8e4e0fa3ad71bb9266a85fb6477fea0c3918eb4d4c3ce61d689906114e7903090869086908690611c96565b60405180910390a1505050565b6001600160a01b03163b151590565b82805461150f906122b3565b90600052602060002090601f0160209004810192826115315760008555611577565b82601f1061154a57805160ff1916838001178555611577565b82800160010185558215611577579182015b8281111561157757825182559160200191906001019061155c565b50611583929150611587565b5090565b5b808211156115835760008155600101611588565b600067ffffffffffffffff8311156115b6576115b6612376565b6040516115cd601f8501601f1916602001826122ee565b8091508381528484840111156115e257600080fd5b83836020830137600060208583010152509392505050565b80356001600160a01b03811681146104d057600080fd5b600082601f830112611621578081fd5b8135602061162e826121f5565b60405161163b82826122ee565b838152828101915085830183850287018401881015611658578586fd5b855b858110156116765781358452928401929084019060010161165a565b5090979650505050505050565b600082601f830112611693578081fd5b6106718383356020850161159c565b6000602082840312156116b3578081fd5b610671826115fa565b600080604083850312156116ce578081fd5b6116d7836115fa565b91506116e5602084016115fa565b90509250929050565b600080600080600060a08688031215611705578081fd5b61170e866115fa565b945061171c602087016115fa565b9350604086013567ffffffffffffffff80821115611738578283fd5b61174489838a01611611565b94506060880135915080821115611759578283fd5b61176589838a01611611565b9350608088013591508082111561177a578283fd5b5061178788828901611683565b9150509295509295909350565b600080600080600060a086880312156117ab578081fd5b6117b4866115fa565b94506117c2602087016115fa565b93506040860135925060608601359150608086013567ffffffffffffffff8111156117eb578182fd5b61178788828901611683565b60008060408385031215611809578182fd5b611812836115fa565b915060208301358015158114611826578182fd5b809150509250929050565b60008060408385031215611843578182fd5b61184c836115fa565b946020939093013593505050565b6000806040838503121561186c578182fd5b823567ffffffffffffffff80821115611883578384fd5b818501915085601f830112611896578384fd5b813560206118a3826121f5565b6040516118b082826122ee565b8381528281019150858301838502870184018b10156118cd578889fd5b8896505b848710156118f6576118e2816115fa565b8352600196909601959183019183016118d1565b509650508601359250508082111561190c578283fd5b5061191985828601611611565b9150509250929050565b600060208284031215611934578081fd5b813561067181612435565b600060208284031215611950578081fd5b815161067181612435565b60006020828403121561196c578081fd5b813567ffffffffffffffff811115611982578182fd5b8201601f81018413611992578182fd5b610bad8482356020840161159c565b6000602082840312156119b2578081fd5b5035919050565b600080604083850312156119cb578182fd5b823591506116e5602084016115fa565b6000806000606084860312156119ef578081fd5b833592506119ff602085016115fa565b9150604084013590509250925092565b600080600080600060a08688031215611a26578283fd5b8535945060208601359350604086013567ffffffffffffffff811115611a4a578384fd5b611a5688828901611683565b9598949750949560608101359550608001359392505050565b6000815180845260208085019450808401835b83811015611a9e57815187529582019590820190600101611a82565b509495945050505050565b60008151808452611ac1816020860160208601612287565b601f01601f19169290920160200192915050565b60008151611ae7818560208601612287565b9290920192915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000815260050190565b8254600090819060028104600180831680611b3657607f831692505b6020808410821415611b5657634e487b7160e01b87526022600452602487fd5b818015611b6a5760018114611b7b57611ba7565b60ff19861689528489019650611ba7565b611b848b612219565b885b86811015611b9f5781548b820152908501908301611b86565b505084890196505b505050505050611bbf611bba8286611ad5565b611af1565b95945050505050565b6001600160a01b0391909116815260200190565b60006001600160a01b03808816835280871660208401525060a06040830152611c0860a0830186611a6f565b8281036060840152611c1a8186611a6f565b90508281036080840152611c2e8185611aa9565b98975050505050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152611c7260a0830184611aa9565b979650505050505050565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039485168152602081019390935292166040820152606081019190915260800190565b6000602082526106716020830184611a6f565b600060408252611ce66040830185611a6f565b8281036020840152611bbf8185611a6f565b901515815260200190565b6000602082526106716020830184611aa9565b60208082526034908201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560408201527f526563656976657220696d706c656d656e746572000000000000000000000000606082015260800190565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201527f6572206e6f7220617070726f7665640000000000000000000000000000000000606082015260800190565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a6563746560408201527f6420746f6b656e73000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660408201527f616c6964206f776e657200000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460408201527f6472657373000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201527f72207472616e7366657200000000000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526028908201527f4c6f79616c74792070657263656e74206d757374206265206265747765656e2060408201527f3020616e64203130000000000000000000000000000000000000000000000000606082015260800190565b60208082526016908201527f4e465420616c726561647920696e206c6f79616c747900000000000000000000604082015260600190565b60208082526029908201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360408201527f20666f722073656c660000000000000000000000000000000000000000000000606082015260800190565b60208082526029908201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860408201527f206d69736d617463680000000000000000000000000000000000000000000000606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060408201527f6d69736d61746368000000000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360408201527f7300000000000000000000000000000000000000000000000000000000000000606082015260800190565b90815260200190565b918252602082015260400190565b600067ffffffffffffffff82111561220f5761220f612376565b5060209081020190565b60009081526020902090565b600082198211156122385761223861234a565b500190565b60008261224c5761224c612360565b500490565b600081600019048311821515161561226b5761226b61234a565b500290565b6000828210156122825761228261234a565b500390565b60005b838110156122a257818101518382015260200161228a565b838111156110ad5750506000910152565b6002810460018216806122c757607f821691505b602082108114156122e857634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f1916810167ffffffffffffffff8111828210171561231457612314612376565b6040525050565b600060001982141561232f5761232f61234a565b5060010190565b60008261234557612345612360565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d111561066257600481823e5160e01c90565b600060443d10156123b357610662565b6040516003193d81016004833e81513d67ffffffffffffffff81602484011181841117156123e5575050505050610662565b82850191508151818111156123ff57505050505050610662565b843d870101602082850101111561241b57505050505050610662565b61242a602082860101876122ee565b509094505050505090565b6001600160e01b0319811681146109d757600080fdfea26469706673582212201b9b877464239fbafe3180ae1aad839937fd75a23925b40d23aded9b257f24f564736f6c6343000801003368747470733a2f2f6574682d6170692e62756c6c7a2e636f6d2f6170692f6e6674732f6974656d2f68747470733a2f2f70726f642d6574682d6170692e62756c6c7a2e636f6d2f6170692f6e6674732f6974656d2f00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000001042756c6c7a20436f6c6c656374696f6e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000542554c4c5a000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101d95760003560e01c8063715018a611610104578063ac65bcc0116100a2578063cd53d08e11610071578063cd53d08e146103b8578063e985e9c5146103cb578063f242432a146103de578063f2fde38b146103f1576101d9565b8063ac65bcc014610374578063b1846fe814610387578063b3db32351461038f578063b918169e14610397576101d9565b806395d89b41116100de57806395d89b411461033e578063980cb39e146103465780639abc832014610359578063a22cb46514610361576101d9565b8063715018a61461031b57806381047cb1146103235780638da5cb5b14610336576101d9565b806319b6a4311161017c578063302c0c231161014b578063302c0c23146102c0578063374aca22146102d557806349212fcb146102e85780634e1273f4146102fb576101d9565b806319b6a4311461027d57806321bb49d214610290578063241329e2146102a35780632eb2c2d6146102ab576101d9565b806306fdde03116101b857806306fdde03146102475780630e89341c1461024f5780630fb97ae314610262578063145009e014610275576101d9565b8062fdd58e146101de57806301ffc9a71461020757806302fe530514610227575b600080fd5b6101f16101ec366004611831565b610404565b6040516101fe91906121de565b60405180910390f35b61021a610215366004611923565b61045b565b6040516101fe9190611cf8565b61023a61023536600461195b565b6104d5565b6040516101fe9190611d03565b61023a610502565b61023a61025d3660046119a1565b610590565b6101f16102703660046119a1565b6105c4565b6101f16105d6565b61021a61028b3660046119a1565b6105dc565b61021a61029e3660046119a1565b6105e7565b6101f16105fc565b6102be6102b93660046116ee565b610602565b005b6102c8610660565b6040516101fe9190611bc8565b61021a6102e33660046119b9565b610665565b6101f16102f63660046119b9565b610678565b61030e61030936600461185a565b610695565b6040516101fe9190611cc0565b6102be6107b5565b6101f16103313660046119b9565b6107c9565b6102c86107f1565b61023a610800565b6102c86103543660046119a1565b61080d565b61023a610818565b6102be61036f3660046117f7565b610825565b6101f1610382366004611a0f565b61083b565b6101f161086d565b61021a610873565b6103aa6103a53660046119db565b610878565b6040516101fe929190611c7d565b6102c86103c63660046119a1565b610900565b61021a6103d93660046116bc565b61091b565b6102be6103ec366004611794565b610949565b6102be6103ff3660046116a2565b6109a0565b60006001600160a01b0383166104355760405162461bcd60e51b815260040161042c90611e8a565b60405180910390fd5b506000908152602081815260408083206001600160a01b03949094168352929052205490565b60006001600160e01b031982167fd9b67a260000000000000000000000000000000000000000000000000000000014806104be57506001600160e01b031982167f0e89341c00000000000000000000000000000000000000000000000000000000145b806104cd57506104cd826109da565b90505b919050565b60606104df610a0c565b6104e882610a4b565b81516104fb90600d906020850190611503565b5090919050565b600b805461050f906122b3565b80601f016020809104026020016040519081016040528092919081815260200182805461053b906122b3565b80156105885780601f1061055d57610100808354040283529160200191610588565b820191906000526020600020905b81548152906001019060200180831161056b57829003601f168201915b505050505081565b6060600d61059d83610a5e565b6040516020016105ae929190611b1a565b6040516020818303038152906040529050919050565b60076020526000908152604090205481565b60095481565b60006104cd82610bb5565b60066020526000908152604090205460ff1681565b600a5481565b61060a610660565b6001600160a01b0316856001600160a01b031614806106305750610630856103d9610660565b61064c5760405162461bcd60e51b815260040161042c90611d73565b6106598585858585610bca565b5050505050565b335b90565b60006106718383610da9565b9392505050565b600460209081526000928352604080842090915290825290205481565b606081518351146106b85760405162461bcd60e51b815260040161042c906120c7565b6000835167ffffffffffffffff8111156106e257634e487b7160e01b600052604160045260246000fd5b60405190808252806020026020018201604052801561070b578160200160208202803683370190505b50905060005b84518110156107ad5761077285828151811061073d57634e487b7160e01b600052603260045260246000fd5b602002602001015185838151811061076557634e487b7160e01b600052603260045260246000fd5b6020026020010151610404565b82828151811061079257634e487b7160e01b600052603260045260246000fd5b60209081029190910101526107a68161231b565b9050610711565b509392505050565b6107bd610a0c565b6107c76000610dec565b565b60009182526004602090815260408084206001600160a01b0393909316845291905290205490565b6003546001600160a01b031690565b600c805461050f906122b3565b60006104cd82610e4b565b600d805461050f906122b3565b610837610830610660565b8383610e66565b5050565b6000610850610848610660565b878787610f09565b6108638661085c610660565b858561101a565b5093949350505050565b60085481565b600190565b60008061088485610bb5565b156108f15761089285610e4b565b9150836001600160a01b0316826001600160a01b0316146108e85760006108b986846107c9565b905080156108dd576108d660646108d086846110b3565b906110bf565b91506108e2565b600091505b506108ec565b5060005b6108f8565b5060009050805b935093915050565b6005602052600090815260409020546001600160a01b031681565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b610951610660565b6001600160a01b0316856001600160a01b031614806109775750610977856103d9610660565b6109935760405162461bcd60e51b815260040161042c90611d73565b61065985858585856110cb565b6109a8610a0c565b6001600160a01b0381166109ce5760405162461bcd60e51b815260040161042c90611e2d565b6109d781610dec565b50565b6001600160e01b031981167f01ffc9a70000000000000000000000000000000000000000000000000000000014919050565b610a14610660565b6001600160a01b0316610a256107f1565b6001600160a01b0316146107c75760405162461bcd60e51b815260040161042c90611fa1565b8051610837906002906020840190611503565b606081610a9f575060408051808201909152600181527f300000000000000000000000000000000000000000000000000000000000000060208201526104d0565b8160005b8115610ac95780610ab38161231b565b9150610ac29050600a8361223d565b9150610aa3565b60008167ffffffffffffffff811115610af257634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015610b1c576020820181803683370190505b5090505b8415610bad57610b31600183612270565b9150610b3e600a86612336565b610b49906030612225565b60f81b818381518110610b6c57634e487b7160e01b600052603260045260246000fd5b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350610ba6600a8661223d565b9450610b20565b949350505050565b60009081526006602052604090205460ff1690565b8151835114610beb5760405162461bcd60e51b815260040161042c90612124565b6001600160a01b038416610c115760405162461bcd60e51b815260040161042c90611ee7565b6000610c1b610660565b9050610c2b818787878787610da1565b60005b8451811015610d2d576000858281518110610c5957634e487b7160e01b600052603260045260246000fd5b602002602001015190506000858381518110610c8557634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815280835260408082206001600160a01b038e168352909352919091205490915081811015610cd55760405162461bcd60e51b815260040161042c90611f44565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290610d12908490612225565b9250508190555050505080610d269061231b565b9050610c2e565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051610d7d929190611cd3565b60405180910390a4610d93818787878787610da1565b610da1818787878787611228565b505050505050565b6000828152600560205260408120546001600160a01b03838116911614610de357600a546000848152600760205260409020541415610671565b50600192915050565b600380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000908152600560205260409020546001600160a01b031690565b816001600160a01b0316836001600160a01b03161415610e985760405162461bcd60e51b815260040161042c9061206a565b6001600160a01b0383811660008181526001602090815260408083209487168084529490915290819020805460ff1916851515179055517f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190610efc908590611cf8565b60405180910390a3505050565b6001600160a01b038416610f2f5760405162461bcd60e51b815260040161042c90612181565b6000610f39610660565b90506000610f468561134d565b90506000610f538561134d565b9050610f6483600089858589610da1565b6000868152602081815260408083206001600160a01b038b16845290915281208054879290610f94908490612225565b92505081905550866001600160a01b031660006001600160a01b0316846001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628989604051610feb9291906121e7565b60405180910390a461100283600089858589610da1565b611011836000898989896113a6565b50505050505050565b600a82111561103b5760405162461bcd60e51b815260040161042c90611fd6565b61104484610bb5565b156110615760405162461bcd60e51b815260040161042c90612033565b6000848152600560209081526040808320805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038816179055600790915290208190556110ad848484611477565b50505050565b60006106718284612251565b6000610671828461223d565b6001600160a01b0384166110f15760405162461bcd60e51b815260040161042c90611ee7565b60006110fb610660565b905060006111088561134d565b905060006111158561134d565b9050611125838989858589610da1565b6000868152602081815260408083206001600160a01b038c168452909152902054858110156111665760405162461bcd60e51b815260040161042c90611f44565b6000878152602081815260408083206001600160a01b038d8116855292528083208985039055908a168252812080548892906111a3908490612225565b92505081905550876001600160a01b0316896001600160a01b0316856001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628a8a6040516111f99291906121e7565b60405180910390a461120f848a8a86868a610da1565b61121d848a8a8a8a8a6113a6565b505050505050505050565b61123a846001600160a01b03166114f4565b15610da15760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906112739089908990889088908890600401611bdc565b602060405180830381600087803b15801561128d57600080fd5b505af19250505080156112bd575060408051601f3d908101601f191682019092526112ba9181019061193f565b60015b61131d576112c961238c565b806308c379a0141561130357506112de6123a3565b806112e95750611305565b8060405162461bcd60e51b815260040161042c9190611d03565b505b60405162461bcd60e51b815260040161042c90611d16565b6001600160e01b0319811663bc197c8160e01b146110115760405162461bcd60e51b815260040161042c90611dd0565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061139557634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b6113b8846001600160a01b03166114f4565b15610da15760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906113f19089908990889088908890600401611c3a565b602060405180830381600087803b15801561140b57600080fd5b505af192505050801561143b575060408051601f3d908101601f191682019092526114389181019061193f565b60015b611447576112c961238c565b6001600160e01b0319811663f23a6e6160e01b146110115760405162461bcd60e51b815260040161042c90611dd0565b60008381526004602090815260408083206001600160a01b03861684528252808320849055858352600690915290819020805460ff19166001179055517f3a9c7efcff27a8e4e0fa3ad71bb9266a85fb6477fea0c3918eb4d4c3ce61d689906114e7903090869086908690611c96565b60405180910390a1505050565b6001600160a01b03163b151590565b82805461150f906122b3565b90600052602060002090601f0160209004810192826115315760008555611577565b82601f1061154a57805160ff1916838001178555611577565b82800160010185558215611577579182015b8281111561157757825182559160200191906001019061155c565b50611583929150611587565b5090565b5b808211156115835760008155600101611588565b600067ffffffffffffffff8311156115b6576115b6612376565b6040516115cd601f8501601f1916602001826122ee565b8091508381528484840111156115e257600080fd5b83836020830137600060208583010152509392505050565b80356001600160a01b03811681146104d057600080fd5b600082601f830112611621578081fd5b8135602061162e826121f5565b60405161163b82826122ee565b838152828101915085830183850287018401881015611658578586fd5b855b858110156116765781358452928401929084019060010161165a565b5090979650505050505050565b600082601f830112611693578081fd5b6106718383356020850161159c565b6000602082840312156116b3578081fd5b610671826115fa565b600080604083850312156116ce578081fd5b6116d7836115fa565b91506116e5602084016115fa565b90509250929050565b600080600080600060a08688031215611705578081fd5b61170e866115fa565b945061171c602087016115fa565b9350604086013567ffffffffffffffff80821115611738578283fd5b61174489838a01611611565b94506060880135915080821115611759578283fd5b61176589838a01611611565b9350608088013591508082111561177a578283fd5b5061178788828901611683565b9150509295509295909350565b600080600080600060a086880312156117ab578081fd5b6117b4866115fa565b94506117c2602087016115fa565b93506040860135925060608601359150608086013567ffffffffffffffff8111156117eb578182fd5b61178788828901611683565b60008060408385031215611809578182fd5b611812836115fa565b915060208301358015158114611826578182fd5b809150509250929050565b60008060408385031215611843578182fd5b61184c836115fa565b946020939093013593505050565b6000806040838503121561186c578182fd5b823567ffffffffffffffff80821115611883578384fd5b818501915085601f830112611896578384fd5b813560206118a3826121f5565b6040516118b082826122ee565b8381528281019150858301838502870184018b10156118cd578889fd5b8896505b848710156118f6576118e2816115fa565b8352600196909601959183019183016118d1565b509650508601359250508082111561190c578283fd5b5061191985828601611611565b9150509250929050565b600060208284031215611934578081fd5b813561067181612435565b600060208284031215611950578081fd5b815161067181612435565b60006020828403121561196c578081fd5b813567ffffffffffffffff811115611982578182fd5b8201601f81018413611992578182fd5b610bad8482356020840161159c565b6000602082840312156119b2578081fd5b5035919050565b600080604083850312156119cb578182fd5b823591506116e5602084016115fa565b6000806000606084860312156119ef578081fd5b833592506119ff602085016115fa565b9150604084013590509250925092565b600080600080600060a08688031215611a26578283fd5b8535945060208601359350604086013567ffffffffffffffff811115611a4a578384fd5b611a5688828901611683565b9598949750949560608101359550608001359392505050565b6000815180845260208085019450808401835b83811015611a9e57815187529582019590820190600101611a82565b509495945050505050565b60008151808452611ac1816020860160208601612287565b601f01601f19169290920160200192915050565b60008151611ae7818560208601612287565b9290920192915050565b7f2e6a736f6e000000000000000000000000000000000000000000000000000000815260050190565b8254600090819060028104600180831680611b3657607f831692505b6020808410821415611b5657634e487b7160e01b87526022600452602487fd5b818015611b6a5760018114611b7b57611ba7565b60ff19861689528489019650611ba7565b611b848b612219565b885b86811015611b9f5781548b820152908501908301611b86565b505084890196505b505050505050611bbf611bba8286611ad5565b611af1565b95945050505050565b6001600160a01b0391909116815260200190565b60006001600160a01b03808816835280871660208401525060a06040830152611c0860a0830186611a6f565b8281036060840152611c1a8186611a6f565b90508281036080840152611c2e8185611aa9565b98975050505050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a06080830152611c7260a0830184611aa9565b979650505050505050565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039485168152602081019390935292166040820152606081019190915260800190565b6000602082526106716020830184611a6f565b600060408252611ce66040830185611a6f565b8281036020840152611bbf8185611a6f565b901515815260200190565b6000602082526106716020830184611aa9565b60208082526034908201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560408201527f526563656976657220696d706c656d656e746572000000000000000000000000606082015260800190565b6020808252602f908201527f455243313135353a2063616c6c6572206973206e6f7420746f6b656e206f776e60408201527f6572206e6f7220617070726f7665640000000000000000000000000000000000606082015260800190565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a6563746560408201527f6420746f6b656e73000000000000000000000000000000000000000000000000606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201527f6464726573730000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f455243313135353a2061646472657373207a65726f206973206e6f742061207660408201527f616c6964206f776e657200000000000000000000000000000000000000000000606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f20616460408201527f6472657373000000000000000000000000000000000000000000000000000000606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201527f72207472616e7366657200000000000000000000000000000000000000000000606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526028908201527f4c6f79616c74792070657263656e74206d757374206265206265747765656e2060408201527f3020616e64203130000000000000000000000000000000000000000000000000606082015260800190565b60208082526016908201527f4e465420616c726561647920696e206c6f79616c747900000000000000000000604082015260600190565b60208082526029908201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360408201527f20666f722073656c660000000000000000000000000000000000000000000000606082015260800190565b60208082526029908201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860408201527f206d69736d617463680000000000000000000000000000000000000000000000606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060408201527f6d69736d61746368000000000000000000000000000000000000000000000000606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f2061646472657360408201527f7300000000000000000000000000000000000000000000000000000000000000606082015260800190565b90815260200190565b918252602082015260400190565b600067ffffffffffffffff82111561220f5761220f612376565b5060209081020190565b60009081526020902090565b600082198211156122385761223861234a565b500190565b60008261224c5761224c612360565b500490565b600081600019048311821515161561226b5761226b61234a565b500290565b6000828210156122825761228261234a565b500390565b60005b838110156122a257818101518382015260200161228a565b838111156110ad5750506000910152565b6002810460018216806122c757607f821691505b602082108114156122e857634e487b7160e01b600052602260045260246000fd5b50919050565b601f8201601f1916810167ffffffffffffffff8111828210171561231457612314612376565b6040525050565b600060001982141561232f5761232f61234a565b5060010190565b60008261234557612345612360565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d111561066257600481823e5160e01c90565b600060443d10156123b357610662565b6040516003193d81016004833e81513d67ffffffffffffffff81602484011181841117156123e5575050505050610662565b82850191508151818111156123ff57505050505050610662565b843d870101602082850101111561241b57505050505050610662565b61242a602082860101876122ee565b509094505050505090565b6001600160e01b0319811681146109d757600080fdfea26469706673582212201b9b877464239fbafe3180ae1aad839937fd75a23925b40d23aded9b257f24f564736f6c63430008010033

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

00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000001042756c6c7a20436f6c6c656374696f6e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000542554c4c5a000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _name (string): Bullz Collection
Arg [1] : _symbol (string): BULLZ

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000010
Arg [3] : 42756c6c7a20436f6c6c656374696f6e00000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [5] : 42554c4c5a000000000000000000000000000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

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