ETH Price: $3,317.61 (-4.40%)

Token

dava-official ()
 

Overview

Max Total Supply

0

Holders

10,205

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Filtered by Token Holder
aaaeeeggg.eth
0x469adaf766fb35f1a3c2569fe8c57a50f4b39131
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
DavaOfficial

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 24 : DavaOfficial.sol
//SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.0;

import {IGatewayHandler} from "../interfaces/IGatewayHandler.sol";
import {PartCollection} from "../libraries/PartCollection.sol";

contract DavaOfficial is PartCollection {
    constructor(IGatewayHandler gatewayHandler_, address dava_)
        PartCollection(gatewayHandler_, dava_)
    {}

    function name() public pure returns (string memory) {
        return "dava-official";
    }
}

File 2 of 24 : IGatewayHandler.sol
//SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.0;

interface IGatewayHandler {
    function setGateway(bytes32 key_, string calldata gateway_) external;

    function gateways(bytes32 key_) external view returns (string memory);
}

File 3 of 24 : PartCollection.sol
//SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.0;
pragma abicoder v2;

import {ERC1155Supply} from "./ERC1155Supply.sol";
import {ERC1155, IERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {AccessControl, IAccessControl} from "@openzeppelin/contracts/access/AccessControl.sol";
import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";
import {IERC165} from "@openzeppelin/contracts/interfaces/IERC165.sol";
import {IPartCollection} from "../interfaces/IPartCollection.sol";
import {IAvatar} from "../interfaces/IAvatar.sol";
import {IGatewayHandler} from "../interfaces/IGatewayHandler.sol";
import {GatewayHandler} from "./GatewayHandler.sol";
import {OnchainMetadata} from "./OnchainMetadata.sol";
import {URICompiler} from "./URICompiler.sol";

struct PartInfo {
    mapping(uint256 => string) titles;
    mapping(uint256 => string) descriptions;
    mapping(uint256 => string) ipfsHashes;
    mapping(uint256 => uint256) maxSupply;
    mapping(uint256 => IPartCollection.Attribute[]) attributes;
    mapping(uint256 => bytes32) categoryIds;
}

struct CollectionInfo {
    // categoryId => zIndex
    mapping(bytes32 => uint256) zIndex;
    // categoryId => title
    mapping(bytes32 => string) titles;
    // categoryId => current contract tokenId
    mapping(bytes32 => uint256) backgroundImagePart;
    // categoryId => current contract tokenId
    mapping(bytes32 => uint256) foregroundImagePart;
    // zIndex => bool
    mapping(uint256 => bool) zIndexExists;
}

abstract contract PartCollection is
    IPartCollection,
    AccessControl,
    Ownable,
    ERC1155Supply
{
    using Strings for uint256;
    using Address for address;
    using EnumerableSet for EnumerableSet.Bytes32Set;

    bytes32 public constant IPFS_GATEWAY_KEY = keccak256("IPFS_GATEWAY");
    bytes32 public constant DAVA_GATEWAY_KEY = keccak256("DAVA_GATEWAY");
    bytes32 public constant DEFAULT_CATEGORY = keccak256("DEFAULT_CATEGORY");

    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    bytes32 public constant CREATOR_ROLE = keccak256("CREATOR_ROLE");

    address public override dava;

    PartInfo private _partInfo;
    CollectionInfo private _collectionInfo;
    IGatewayHandler public gatewayHandler;

    uint256 public override numberOfParts;

    EnumerableSet.Bytes32Set private _supportedCategoryIds;

    event PartCreated(uint256 partId);

    constructor(IGatewayHandler gatewayHandler_, address dava_)
        ERC1155("")
        Ownable()
    {
        gatewayHandler = gatewayHandler_;
        dava = dava_;

        _setupRole(DEFAULT_ADMIN_ROLE, msg.sender);
        _setupRole(MINTER_ROLE, msg.sender);
        _setRoleAdmin(MINTER_ROLE, DEFAULT_ADMIN_ROLE);
        _setupRole(CREATOR_ROLE, msg.sender);
        _setRoleAdmin(CREATOR_ROLE, DEFAULT_ADMIN_ROLE);

        _supportedCategoryIds.add(DEFAULT_CATEGORY);
    }

    function unsafeCreatePart(
        bytes32 categoryId_,
        string memory title_,
        string memory description_,
        string memory ipfsHash_,
        Attribute[] memory attributes,
        uint256 maxSupply_,
        uint256 filledSupply_
    ) external onlyRole(CREATOR_ROLE) {
        _unsafeSetTotalSupply(numberOfParts, filledSupply_);
        createPart(
            categoryId_,
            title_,
            description_,
            ipfsHash_,
            attributes,
            maxSupply_
        );
    }

    function createPart(
        bytes32 categoryId_,
        string memory title_,
        string memory description_,
        string memory ipfsHash_,
        Attribute[] memory attributes,
        uint256 maxSupply_
    ) public virtual override onlyRole(CREATOR_ROLE) {
        uint256 tokenId = numberOfParts;
        _partInfo.titles[tokenId] = title_;
        _partInfo.descriptions[tokenId] = description_;
        _partInfo.ipfsHashes[tokenId] = ipfsHash_;
        _partInfo.maxSupply[tokenId] = maxSupply_;

        // default part
        require(
            _supportedCategoryIds.contains(categoryId_),
            "Part: non existent category"
        );
        if (categoryId_ == DEFAULT_CATEGORY) {
            require(
                maxSupply_ == 0,
                "Part: maxSupply of default category should be zero"
            );
        } else {
            require(
                maxSupply_ != 0,
                "Part: maxSupply should be greater than zero"
            );
            emit PartCreated(tokenId);
        }
        _partInfo.categoryIds[tokenId] = categoryId_;

        for (uint256 i = 0; i < attributes.length; i += 1) {
            _partInfo.attributes[tokenId].push(attributes[i]);
        }

        numberOfParts += 1;
    }

    function createCategory(
        string memory title_,
        uint256 backgroundImageTokenId_,
        uint256 foregroundImageTokenId_,
        uint256 zIndex_
    ) public virtual override onlyRole(CREATOR_ROLE) {
        bytes32 _categoryId = keccak256(abi.encodePacked(title_));
        require(
            !_supportedCategoryIds.contains(_categoryId),
            "Part: already exists category"
        );
        require(
            !_collectionInfo.zIndexExists[zIndex_],
            "Part: already used zIndex"
        );

        require(
            _partInfo.categoryIds[backgroundImageTokenId_] ==
                DEFAULT_CATEGORY &&
                _partInfo.categoryIds[foregroundImageTokenId_] ==
                DEFAULT_CATEGORY,
            "Part: frame image is not created"
        );

        _collectionInfo.zIndex[_categoryId] = zIndex_;
        _collectionInfo.titles[_categoryId] = title_;
        _collectionInfo.backgroundImagePart[
            _categoryId
        ] = backgroundImageTokenId_;
        _collectionInfo.foregroundImagePart[
            _categoryId
        ] = foregroundImageTokenId_;
        _collectionInfo.zIndexExists[zIndex_] = true;

        _supportedCategoryIds.add(_categoryId);
    }

    function mint(
        address account,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) public onlyRole(MINTER_ROLE) {
        require(
            totalSupply(id) + amount <= maxSupply(id),
            "Part: Out of stock."
        );

        return super._mint(account, id, amount, data);
    }

    function mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) public onlyRole(MINTER_ROLE) {
        for (uint256 i = 0; i < ids.length; i += 1) {
            require(
                totalSupply(ids[i]) + amounts[i] <= maxSupply(ids[i]),
                "Part: Out of stock."
            );
        }
        return super._mintBatch(to, ids, amounts, data);
    }

    function unsafeMintBatch(
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts
    ) external onlyRole(MINTER_ROLE) {
        super._unsafeMintBatch(to, ids, amounts, "");
    }

    // viewers

    function uri(uint256 tokenId) public view override returns (string memory) {
        string[] memory imgURIs = new string[](3);
        uint256 backgroundTokenId = _collectionInfo.backgroundImagePart[
            _partInfo.categoryIds[tokenId]
        ];
        uint256 foregroundTokenId = _collectionInfo.foregroundImagePart[
            _partInfo.categoryIds[tokenId]
        ];

        string memory ipfsBaseUri = gatewayHandler.gateways(IPFS_GATEWAY_KEY);
        imgURIs[0] = string(
            abi.encodePacked(
                ipfsBaseUri,
                "/",
                _partInfo.ipfsHashes[backgroundTokenId]
            )
        );
        imgURIs[1] = string(
            abi.encodePacked(ipfsBaseUri, "/", _partInfo.ipfsHashes[tokenId])
        );
        imgURIs[2] = string(
            abi.encodePacked(
                ipfsBaseUri,
                "/",
                _partInfo.ipfsHashes[foregroundTokenId]
            )
        );

        string memory thisAddress = uint256(uint160(address(this))).toHexString(
            20
        );
        string[] memory imgParams = new string[](1);
        imgParams[0] = "images";
        string[] memory infoParams = new string[](3);
        infoParams[0] = "info";
        infoParams[1] = thisAddress;
        infoParams[2] = tokenId.toString();

        URICompiler.Query[] memory queries = new URICompiler.Query[](3);
        queries[0] = URICompiler.Query(
            thisAddress,
            backgroundTokenId.toString()
        );
        queries[1] = URICompiler.Query(thisAddress, tokenId.toString());
        queries[2] = URICompiler.Query(
            thisAddress,
            foregroundTokenId.toString()
        );

        // partInfo => maxSupply, collection title
        Attribute[] memory attributes = new Attribute[](
            _partInfo.attributes[tokenId].length + 1
        );
        for (uint256 i = 0; i < _partInfo.attributes[tokenId].length; i += 1) {
            attributes[i] = _partInfo.attributes[tokenId][i];
        }
        attributes[_partInfo.attributes[tokenId].length] = Attribute(
            "TYPE",
            categoryTitle(tokenId)
        );

        return
            OnchainMetadata.toMetadata(
                _partInfo.titles[tokenId],
                _partInfo.descriptions[tokenId],
                imgURIs,
                URICompiler.getFullUri(
                    gatewayHandler.gateways(DAVA_GATEWAY_KEY),
                    imgParams,
                    queries
                ),
                URICompiler.getFullUri(
                    gatewayHandler.gateways(DAVA_GATEWAY_KEY),
                    infoParams,
                    new URICompiler.Query[](0)
                ),
                attributes
            );
    }

    function description(uint256 tokenId)
        public
        view
        override
        returns (string memory)
    {
        return _partInfo.descriptions[tokenId];
    }

    function imageUri(uint256 tokenId)
        public
        view
        override
        returns (string memory)
    {
        string memory ipfsGateway = gatewayHandler.gateways(IPFS_GATEWAY_KEY);
        return
            string(
                abi.encodePacked(
                    ipfsGateway,
                    "/",
                    _partInfo.ipfsHashes[tokenId]
                )
            );
    }

    function image(uint256 tokenId)
        external
        view
        override
        returns (string memory)
    {
        string memory ipfsGateway = gatewayHandler.gateways(IPFS_GATEWAY_KEY);
        string[] memory imgURIs = new string[](1);
        imgURIs[0] = string(
            abi.encodePacked(ipfsGateway, "/", _partInfo.ipfsHashes[tokenId])
        );
        return OnchainMetadata.compileImages(imgURIs);
    }

    function getAllSupportedCategoryIds()
        public
        view
        returns (bytes32[] memory)
    {
        return _supportedCategoryIds.values();
    }

    function maxSupply(uint256 tokenId)
        public
        view
        virtual
        override
        returns (uint256)
    {
        return _partInfo.maxSupply[tokenId];
    }

    function supportsInterface(bytes4 interfaceId)
        public
        view
        virtual
        override(IERC165, AccessControl, ERC1155)
        returns (bool)
    {
        return
            interfaceId == type(IPartCollection).interfaceId ||
            interfaceId == type(IAccessControl).interfaceId ||
            super.supportsInterface(interfaceId);
    }

    function categoryTitle(uint256 tokenId)
        public
        view
        override
        returns (string memory)
    {
        bytes32 _categoryId = _partInfo.categoryIds[tokenId];
        return _collectionInfo.titles[_categoryId];
    }

    /**
     * @dev return registered part title
     */
    function partTitle(uint256 tokenId)
        public
        view
        override
        returns (string memory)
    {
        return _partInfo.titles[tokenId];
    }

    function categoryInfo(bytes32 categoryId_)
        public
        view
        override
        returns (
            string memory title_,
            uint256 backgroundImgTokenId_,
            uint256 foregroundImgTokenId_,
            uint256 zIndex_
        )
    {
        title_ = _collectionInfo.titles[categoryId_];
        backgroundImgTokenId_ = _collectionInfo.backgroundImagePart[
            categoryId_
        ];
        foregroundImgTokenId_ = _collectionInfo.foregroundImagePart[
            categoryId_
        ];
        zIndex_ = _collectionInfo.zIndex[categoryId_];
    }

    function categoryId(uint256 tokenId)
        public
        view
        override
        returns (bytes32)
    {
        return _partInfo.categoryIds[tokenId];
    }

    /**
     * @dev zIndex value decides the order of image layering
     */
    function zIndex(uint256 tokenId)
        public
        view
        virtual
        override
        returns (uint256)
    {
        bytes32 _categoryId = _partInfo.categoryIds[tokenId];
        uint256 zIndex_ = _collectionInfo.zIndex[_categoryId];
        return zIndex_;
    }

    function isApprovedForAll(address account, address operator)
        public
        view
        virtual
        override(ERC1155, IERC1155)
        returns (bool)
    {
        return super.isApprovedForAll(account, operator) || operator == dava;
    }
}

File 4 of 24 : ERC1155Supply.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import {ERC1155} from "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";

/**
 * @dev Extension of ERC1155 that adds tracking of total supply per id.
 *
 * Useful for scenarios where Fungible and Non-fungible tokens have to be
 * clearly identified. Note: While a totalSupply of 1 might mean the
 * corresponding is an NFT, there is no guarantees that no other token with the
 * same id are not going to be minted.
 */
abstract contract ERC1155Supply is ERC1155 {
    mapping(uint256 => uint256) private _totalSupply;

    /**
     * @dev Total amount of tokens in with a given id.
     */
    function totalSupply(uint256 id) public view virtual returns (uint256) {
        return _totalSupply[id];
    }

    /**
     * @dev Indicates weither any token exist with a given id, or not.
     */
    function exists(uint256 id) public view virtual returns (bool) {
        return ERC1155Supply.totalSupply(id) > 0;
    }

    function _unsafeSetTotalSupply(uint256 id, uint256 amount)
        internal
        virtual
    {
        _totalSupply[id] = amount;
    }

    /**
     * @dev See {ERC1155-_mint}.
     */
    function _mint(
        address account,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) internal virtual override {
        super._mint(account, id, amount, data);
        _totalSupply[id] += amount;
    }

    /**
     * @dev See {ERC1155-_mintBatch}.
     */
    function _mintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual override {
        super._mintBatch(to, ids, amounts, data);
        for (uint256 i = 0; i < ids.length; ++i) {
            _totalSupply[ids[i]] += amounts[i];
        }
    }

    function _unsafeMintBatch(
        address to,
        uint256[] memory ids,
        uint256[] memory amounts,
        bytes memory data
    ) internal virtual {
        super._mintBatch(to, ids, amounts, data);
    }

    /**
     * @dev See {ERC1155-_burn}.
     */
    function _burn(
        address account,
        uint256 id,
        uint256 amount
    ) internal virtual override {
        super._burn(account, id, amount);
        _totalSupply[id] -= amount;
    }

    /**
     * @dev See {ERC1155-_burnBatch}.
     */
    function _burnBatch(
        address account,
        uint256[] memory ids,
        uint256[] memory amounts
    ) internal virtual override {
        super._burnBatch(account, ids, amounts);
        for (uint256 i = 0; i < ids.length; ++i) {
            _totalSupply[ids[i]] -= amounts[i];
        }
    }
}

File 5 of 24 : ERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

        return batchBalances;
    }

    /**
     * @dev See {IERC1155-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        require(_msgSender() != operator, "ERC1155: setting approval status for self");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_msgSender(), operator, approved);
    }

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

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

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

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

        address operator = _msgSender();

        _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), 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);

        _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);

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

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

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

        address operator = _msgSender();

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

        address operator = _msgSender();

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

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

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

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

        address operator = _msgSender();

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

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

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

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

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

    function _doSafeTransferAcceptanceCheck(
        address operator,
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes memory data
    ) private {
        if (to.isContract()) {
            try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
                if (response != IERC1155Receiver.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 6 of 24 : Address.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 7 of 24 : Strings.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 8 of 24 : Ownable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _setOwner(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");
        _setOwner(newOwner);
    }

    function _setOwner(address newOwner) private {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

File 9 of 24 : AccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IAccessControl.sol";
import "../utils/Context.sol";
import "../utils/Strings.sol";
import "../utils/introspection/ERC165.sol";

/**
 * @dev Contract module that allows children to implement role-based access
 * control mechanisms. This is a lightweight version that doesn't allow enumerating role
 * members except through off-chain means by accessing the contract event logs. Some
 * applications may benefit from on-chain enumerability, for those cases see
 * {AccessControlEnumerable}.
 *
 * Roles are referred to by their `bytes32` identifier. These should be exposed
 * in the external API and be unique. The best way to achieve this is by
 * using `public constant` hash digests:
 *
 * ```
 * bytes32 public constant MY_ROLE = keccak256("MY_ROLE");
 * ```
 *
 * Roles can be used to represent a set of permissions. To restrict access to a
 * function call, use {hasRole}:
 *
 * ```
 * function foo() public {
 *     require(hasRole(MY_ROLE, msg.sender));
 *     ...
 * }
 * ```
 *
 * Roles can be granted and revoked dynamically via the {grantRole} and
 * {revokeRole} functions. Each role has an associated admin role, and only
 * accounts that have a role's admin role can call {grantRole} and {revokeRole}.
 *
 * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means
 * that only accounts with this role will be able to grant or revoke other
 * roles. More complex role relationships can be created by using
 * {_setRoleAdmin}.
 *
 * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to
 * grant and revoke this role. Extra precautions should be taken to secure
 * accounts that have been granted it.
 */
abstract contract AccessControl is Context, IAccessControl, ERC165 {
    struct RoleData {
        mapping(address => bool) members;
        bytes32 adminRole;
    }

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

    /**
     * @dev Modifier that checks that an account has a specific role. Reverts
     * with a standardized message including the required role.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     *
     * _Available since v4.1._
     */
    modifier onlyRole(bytes32 role) {
        _checkRole(role, _msgSender());
        _;
    }

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

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) public view override returns (bool) {
        return _roles[role].members[account];
    }

    /**
     * @dev Revert with a standard message if `account` is missing `role`.
     *
     * The format of the revert reason is given by the following regular expression:
     *
     *  /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/
     */
    function _checkRole(bytes32 role, address account) internal view {
        if (!hasRole(role, account)) {
            revert(
                string(
                    abi.encodePacked(
                        "AccessControl: account ",
                        Strings.toHexString(uint160(account), 20),
                        " is missing role ",
                        Strings.toHexString(uint256(role), 32)
                    )
                )
            );
        }
    }

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) public view override returns (bytes32) {
        return _roles[role].adminRole;
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _grantRole(role, account);
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) {
        _revokeRole(role, account);
    }

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) public virtual override {
        require(account == _msgSender(), "AccessControl: can only renounce roles for self");

        _revokeRole(role, account);
    }

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event. Note that unlike {grantRole}, this function doesn't perform any
     * checks on the calling account.
     *
     * [WARNING]
     * ====
     * This function should only be called from the constructor when setting
     * up the initial roles for the system.
     *
     * Using this function in any other way is effectively circumventing the admin
     * system imposed by {AccessControl}.
     * ====
     */
    function _setupRole(bytes32 role, address account) internal virtual {
        _grantRole(role, account);
    }

    /**
     * @dev Sets `adminRole` as ``role``'s admin role.
     *
     * Emits a {RoleAdminChanged} event.
     */
    function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual {
        bytes32 previousAdminRole = getRoleAdmin(role);
        _roles[role].adminRole = adminRole;
        emit RoleAdminChanged(role, previousAdminRole, adminRole);
    }

    function _grantRole(bytes32 role, address account) private {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    function _revokeRole(bytes32 role, address account) private {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 10 of 24 : EnumerableSet.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

            return true;
        } else {
            return false;
        }
    }

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

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

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

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

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

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

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

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

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

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

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

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

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

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

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

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

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

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

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

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

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

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

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

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

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

        assembly {
            result := store
        }

        return result;
    }
}

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

pragma solidity ^0.8.0;

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

File 12 of 24 : IPartCollection.sol
//SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.0;
pragma abicoder v2;

import {IERC1155} from "@openzeppelin/contracts/interfaces/IERC1155.sol";

interface IPartCollection is IERC1155 {
    struct Attribute {
        string trait_type;
        string value;
    }

    function createPart(
        bytes32 categoryId_,
        string memory title_,
        string memory description_,
        string memory ipfsHash_,
        Attribute[] memory attributes_,
        uint256 maxSupply_
    ) external;

    function createCategory(
        string memory title_,
        uint256 backgroundImageTokenId_,
        uint256 foregroundImageTokenId_,
        uint256 zIndex_
    ) external;

    function dava() external view returns (address);

    function numberOfParts() external view returns (uint256);

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

    function imageUri(uint256 tokenId_) external view returns (string memory);

    function zIndex(uint256 tokenId_) external view returns (uint256);

    function categoryInfo(bytes32 categoryId_)
        external
        view
        returns (
            string memory name_,
            uint256 backgroundImgTokenId_,
            uint256 foregroundImgTokenId_,
            uint256 zIndex_
        );

    function categoryId(uint256 tokenId_) external view returns (bytes32);

    function categoryTitle(uint256 tokenId_)
        external
        view
        returns (string memory);

    function partTitle(uint256 tokenId_) external view returns (string memory);

    function image(uint256 tokenId_) external view returns (string memory);

    function maxSupply(uint256 tokenId_) external view returns (uint256);
}

File 13 of 24 : IAvatar.sol
//SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.0;
pragma abicoder v2;

struct Part {
    address collection;
    uint96 id;
}

interface IAvatar {
    function dress(Part[] calldata partsOn, bytes32[] calldata partsOff)
        external;

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

    function dava() external view returns (address);

    function davaId() external view returns (uint256);

    function part(bytes32 categoryId) external view returns (Part memory);

    function allParts() external view returns (Part[] memory parts);

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

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

    function externalImgUri() external view returns (string memory);
}

File 14 of 24 : GatewayHandler.sol
//SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.0;

import {IGatewayHandler} from "../interfaces/IGatewayHandler.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";

contract GatewayHandler is IGatewayHandler, Ownable {
    mapping(bytes32 => string) public override gateways;

    function setGateway(bytes32 key_, string calldata gateway_)
        external
        override
        onlyOwner
    {
        gateways[key_] = gateway_;
    }
}

File 15 of 24 : OnchainMetadata.sol
//SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.0;
pragma abicoder v2;

import {IPartCollection} from "../interfaces/IPartCollection.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";

library OnchainMetadata {
    using Strings for uint256;

    string private constant SVG_START_LINE =
        "<svg xmlns='http://www.w3.org/2000/svg' width='1000' height='1000' viewBox='0 0 1000 1000'>";
    string private constant SVG_END_LINE = "</svg>";
    string private constant SVG_IMG_START_LINE = "<image href='";
    string private constant SVG_IMG_END_LINE = "' width='100%'/>";

    function toMetadata(
        string memory name,
        string memory description,
        string[] memory imgURIs,
        string memory externalImgUri,
        string memory externalUri,
        IPartCollection.Attribute[] memory attributes
    ) internal pure returns (string memory) {
        bytes memory metadata = abi.encodePacked(
            'data:application/json;utf8,{"name":"',
            name,
            '","external_url":"',
            externalUri,
            '","description":"',
            description,
            '","attributes":['
        );

        for (uint256 i = 0; i < attributes.length; i += 1) {
            IPartCollection.Attribute memory attribute = attributes[i];
            metadata = abi.encodePacked(
                metadata,
                '{"trait_type":"',
                attribute.trait_type,
                '","value":"',
                attribute.value,
                '"}'
            );
            if (i < attributes.length - 1) {
                metadata = abi.encodePacked(metadata, ",");
            }
        }

        metadata = abi.encodePacked(
            metadata,
            '],"raw_image":"data:image/svg+xml;utf8,',
            compileImages(imgURIs),
            '","image":"',
            externalImgUri,
            '"}'
        );

        return string(metadata);
    }

    function compileImages(string[] memory imgURIs)
        internal
        pure
        returns (string memory)
    {
        string memory accumulator;

        for (uint256 i = 0; i < imgURIs.length; i += 1) {
            accumulator = string(
                abi.encodePacked(accumulator, toSVGImage(imgURIs[i]))
            );
        }

        return
            string(abi.encodePacked(SVG_START_LINE, accumulator, SVG_END_LINE));
    }

    function toSVGImage(string memory imgUri)
        internal
        pure
        returns (string memory)
    {
        return
            string(
                abi.encodePacked(SVG_IMG_START_LINE, imgUri, SVG_IMG_END_LINE)
            );
    }
}

File 16 of 24 : URICompiler.sol
//SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.8.0;
pragma abicoder v2;

library URICompiler {
    struct Query {
        string key;
        string value;
    }

    function getFullUri(
        string memory host,
        string[] memory params,
        Query[] memory queries
    ) internal pure returns (string memory) {
        string memory queryString;
        for (uint256 i = 0; i < params.length; i += 1) {
            host = string(abi.encodePacked(host, "/", params[i]));
        }

        for (uint256 i = 0; i < queries.length; i += 1) {
            if (i == 0) {
                queryString = "?";
            }
            if (i != 0) {
                queryString = string(abi.encodePacked(queryString, "&"));
            }
            queryString = string(
                abi.encodePacked(
                    queryString,
                    queries[i].key,
                    "=",
                    queries[i].value
                )
            );
        }

        return string(abi.encodePacked(host, queryString));
    }
}

File 17 of 24 : IERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

File 18 of 24 : IERC1155Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

File 19 of 24 : IERC1155MetadataURI.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC1155.sol";

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

File 20 of 24 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 21 of 24 : ERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 23 of 24 : IAccessControl.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev External interface of AccessControl declared to support ERC165 detection.
 */
interface IAccessControl {
    /**
     * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole`
     *
     * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite
     * {RoleAdminChanged} not being emitted signaling this.
     *
     * _Available since v3.1._
     */
    event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole);

    /**
     * @dev Emitted when `account` is granted `role`.
     *
     * `sender` is the account that originated the contract call, an admin role
     * bearer except when using {AccessControl-_setupRole}.
     */
    event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Emitted when `account` is revoked `role`.
     *
     * `sender` is the account that originated the contract call:
     *   - if using `revokeRole`, it is the admin role bearer
     *   - if using `renounceRole`, it is the role bearer (i.e. `account`)
     */
    event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender);

    /**
     * @dev Returns `true` if `account` has been granted `role`.
     */
    function hasRole(bytes32 role, address account) external view returns (bool);

    /**
     * @dev Returns the admin role that controls `role`. See {grantRole} and
     * {revokeRole}.
     *
     * To change a role's admin, use {AccessControl-_setRoleAdmin}.
     */
    function getRoleAdmin(bytes32 role) external view returns (bytes32);

    /**
     * @dev Grants `role` to `account`.
     *
     * If `account` had not been already granted `role`, emits a {RoleGranted}
     * event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function grantRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from `account`.
     *
     * If `account` had been granted `role`, emits a {RoleRevoked} event.
     *
     * Requirements:
     *
     * - the caller must have ``role``'s admin role.
     */
    function revokeRole(bytes32 role, address account) external;

    /**
     * @dev Revokes `role` from the calling account.
     *
     * Roles are often managed via {grantRole} and {revokeRole}: this function's
     * purpose is to provide a mechanism for accounts to lose their privileges
     * if they are compromised (such as when a trusted device is misplaced).
     *
     * If the calling account had been granted `role`, emits a {RoleRevoked}
     * event.
     *
     * Requirements:
     *
     * - the caller must be `account`.
     */
    function renounceRole(bytes32 role, address account) external;
}

File 24 of 24 : IERC1155.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../token/ERC1155/IERC1155.sol";

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IGatewayHandler","name":"gatewayHandler_","type":"address"},{"internalType":"address","name":"dava_","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"partId","type":"uint256"}],"name":"PartCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","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":"CREATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DAVA_GATEWAY_KEY","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_CATEGORY","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"IPFS_GATEWAY_KEY","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"categoryId","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"categoryId_","type":"bytes32"}],"name":"categoryInfo","outputs":[{"internalType":"string","name":"title_","type":"string"},{"internalType":"uint256","name":"backgroundImgTokenId_","type":"uint256"},{"internalType":"uint256","name":"foregroundImgTokenId_","type":"uint256"},{"internalType":"uint256","name":"zIndex_","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"categoryTitle","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"title_","type":"string"},{"internalType":"uint256","name":"backgroundImageTokenId_","type":"uint256"},{"internalType":"uint256","name":"foregroundImageTokenId_","type":"uint256"},{"internalType":"uint256","name":"zIndex_","type":"uint256"}],"name":"createCategory","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"categoryId_","type":"bytes32"},{"internalType":"string","name":"title_","type":"string"},{"internalType":"string","name":"description_","type":"string"},{"internalType":"string","name":"ipfsHash_","type":"string"},{"components":[{"internalType":"string","name":"trait_type","type":"string"},{"internalType":"string","name":"value","type":"string"}],"internalType":"struct IPartCollection.Attribute[]","name":"attributes","type":"tuple[]"},{"internalType":"uint256","name":"maxSupply_","type":"uint256"}],"name":"createPart","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dava","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gatewayHandler","outputs":[{"internalType":"contract IGatewayHandler","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllSupportedCategoryIds","outputs":[{"internalType":"bytes32[]","name":"","type":"bytes32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"image","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"imageUri","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"tokenId","type":"uint256"}],"name":"maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"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":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"numberOfParts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"partTitle","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"categoryId_","type":"bytes32"},{"internalType":"string","name":"title_","type":"string"},{"internalType":"string","name":"description_","type":"string"},{"internalType":"string","name":"ipfsHash_","type":"string"},{"components":[{"internalType":"string","name":"trait_type","type":"string"},{"internalType":"string","name":"value","type":"string"}],"internalType":"struct IPartCollection.Attribute[]","name":"attributes","type":"tuple[]"},{"internalType":"uint256","name":"maxSupply_","type":"uint256"},{"internalType":"uint256","name":"filledSupply_","type":"uint256"}],"name":"unsafeCreatePart","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"unsafeMintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"zIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60806040523480156200001157600080fd5b5060405162004efb38038062004efb8339810160408190526200003491620003d2565b818160405180602001604052806000815250620000606200005a6200015d60201b60201c565b62000161565b6200006b81620001b3565b50601280546001600160a01b038085166001600160a01b0319928316179092556006805492841692909116919091179055620000a9600033620001cc565b620000c460008051602062004edb83398151915233620001cc565b620000e060008051602062004edb8339815191526000620001d8565b620000fb60008051602062004ebb83398151915233620001cc565b6200011760008051602062004ebb8339815191526000620001d8565b620001527f9265a59ce9426670e5a4dc96720a1debb1a5c18c021885a2362d173df95ebebb60146200022360201b620023451790919060201c565b505050505062000466565b3390565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8051620001c89060049060208401906200032c565b5050565b620001c882826200023a565b600082815260208190526040808220600101805490849055905190918391839186917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a4505050565b6000620002318383620002da565b90505b92915050565b6000828152602081815260408083206001600160a01b038516845290915290205460ff16620001c8576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055620002963390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000818152600183016020526040812054620003235750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915562000234565b50600062000234565b8280546200033a9062000410565b90600052602060002090601f0160209004810192826200035e5760008555620003a9565b82601f106200037957805160ff1916838001178555620003a9565b82800160010185558215620003a9579182015b82811115620003a95782518255916020019190600101906200038c565b50620003b7929150620003bb565b5090565b5b80821115620003b75760008155600101620003bc565b60008060408385031215620003e5578182fd5b8251620003f2816200044d565b602084015190925062000405816200044d565b809150509250929050565b600181811c908216806200042557607f821691505b602082108114156200044757634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b03811681146200046357600080fd5b50565b614a4580620004766000396000f3fe608060405234801561001057600080fd5b50600436106102735760003560e01c8063869f759411610151578063bd85b039116100c3578063d547741f11610087578063d547741f1461061f578063e985e9c514610632578063eef4da5f14610645578063f242432a14610658578063f2fde38b1461066b578063f91fe6bf1461067e57600080fd5b8063bd85b03914610595578063bf842211146105b5578063c79178c6146105e2578063c8be2b03146105f5578063d53913931461060a57600080fd5b806395a9ccae1161011557806395a9ccae1461051f578063a217fddf14610532578063a22cb4651461053a578063a39f8d2d1461054d578063b2ceb3f214610560578063b7e545771461058057600080fd5b8063869f7594146104a35780638aeda25a146104c35780638bb52244146104d85780638da5cb5b146104fb57806391d148541461050c57600080fd5b806336568abe116101ea57806363d05cf3116101ae57806363d05cf31461044457806367e851c91461044d5780636d14162b14610462578063715018a614610475578063731133e91461047d5780637bd279971461049057600080fd5b806336568abe146103c957806345a29d40146103dc5780634e1273f4146103ef5780634f558e791461040f57806351a40bfa1461043157600080fd5b80631f7fdffa1161023c5780631f7fdffa1461032d5780631fa4f86e14610342578063248a9ca31461036d5780632c5f13e0146103905780632eb2c2d6146103a35780632f2ff15d146103b657600080fd5b8062fdd58e1461027857806301ffc9a71461029e57806306fdde03146102c15780630a323bea146102f35780630e89341c1461031a575b600080fd5b61028b610286366004613aca565b610691565b6040519081526020015b60405180910390f35b6102b16102ac366004613dc6565b61072d565b6040519015158152602001610295565b60408051808201909152600d81526c19185d984b5bd9999a58da585b609a1b60208201525b60405161029591906144ef565b61028b7f4bcafa307edced29184180ecf3a3ef99cd92e9f26df7c14cbec7a5c02db836f581565b6102e6610328366004613c0f565b61076d565b61034061033b3660046139fc565b6111ac565b005b600654610355906001600160a01b031681565b6040516001600160a01b039091168152602001610295565b61028b61037b366004613c0f565b60009081526020819052604090206001015490565b6102e661039e366004613c0f565b6112e7565b6103406103b1366004613878565b611389565b6103406103c4366004613c27565b611419565b6103406103d7366004613c27565b611444565b6102e66103ea366004613c0f565b6114c2565b6104026103fd366004613b45565b6114df565b60405161029591906144ae565b6102b161041d366004613c0f565b600090815260056020526040902054151590565b6102e661043f366004613c0f565b611640565b61028b60135481565b61028b60008051602061497583398151915281565b6102e6610470366004613c0f565b6116f3565b6103406117c1565b61034061048b366004613af3565b611827565b61034061049e36600461397f565b6118b6565b61028b6104b1366004613c0f565b6000908152600a602052604090205490565b61028b60008051602061493583398151915281565b6104eb6104e6366004613c0f565b611953565b6040516102959493929190614502565b6001546001600160a01b0316610355565b6102b161051a366004613c27565b611a22565b61034061052d366004613d02565b611a4b565b61028b600081565b610340610548366004613a90565b611a95565b61034061055b366004613c49565b611b6c565b61028b61056e366004613c0f565b6000908152600c602052604090205490565b610588611e40565b604051610295919061446a565b61028b6105a3366004613c0f565b60009081526005602052604090205490565b61028b6105c3366004613c0f565b6000908152600c60209081526040808320548352600d90915290205490565b6102e66105f0366004613c0f565b611e51565b61028b60008051602061499583398151915281565b61028b60008051602061495583398151915281565b61034061062d366004613c27565b611f83565b6102b1610640366004613846565b611fa9565b610340610653366004613e7b565b611ff3565b61034061066636600461391d565b6121f3565b61034061067936600461382c565b61227a565b601254610355906001600160a01b031681565b60006001600160a01b0383166107025760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060008181526002602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b0319821663a3a3de6b60e01b148061075e57506001600160e01b03198216637965db0b60e01b145b80610727575061072782612351565b6040805160038082526080820190925260609160009190816020015b6060815260200190600190039081610789579050506000848152600c60209081526040808320548352600f825280832054601090925280832054601254915163fbe336ff60e01b8152600080516020614995833981519152600482015294955091939192916001600160a01b039091169063fbe336ff9060240160006040518083038186803b15801561081b57600080fd5b505afa15801561082f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108579190810190613dfe565b600084815260096020908152604091829020915192935061087b92849291016141c1565b604051602081830303815290604052846000815181106108ab57634e487b7160e01b600052603260045260246000fd5b602002602001018190525080600760020160008881526020019081526020016000206040516020016108de9291906141c1565b6040516020818303038152906040528460018151811061090e57634e487b7160e01b600052603260045260246000fd5b602002602001018190525080600760020160008481526020019081526020016000206040516020016109419291906141c1565b6040516020818303038152906040528460028151811061097157634e487b7160e01b600052603260045260246000fd5b60209081029190910101526000610989306014612391565b60408051600180825281830190925291925060009190816020015b60608152602001906001900390816109a457905050905060405180604001604052806006815260200165696d6167657360d01b815250816000815181106109fb57634e487b7160e01b600052603260045260246000fd5b602090810291909101015260408051600380825260808201909252600091816020015b6060815260200190600190039081610a1e57905050905060405180604001604052806004815260200163696e666f60e01b81525081600081518110610a7357634e487b7160e01b600052603260045260246000fd5b60200260200101819052508281600181518110610aa057634e487b7160e01b600052603260045260246000fd5b6020026020010181905250610ab489612572565b81600281518110610ad557634e487b7160e01b600052603260045260246000fd5b602090810291909101015260408051600380825260808201909252600091816020015b6040805180820190915260608082526020820152815260200190600190039081610af85790505090506040518060400160405280858152602001610b3b89612572565b81525081600081518110610b5f57634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280858152602001610b848c612572565b81525081600181518110610ba857634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280858152602001610bcd88612572565b81525081600281518110610bf157634e487b7160e01b600052603260045260246000fd5b60209081029190910181019190915260008b8152600b9091526040812054610c1a9060016146db565b6001600160401b03811115610c3f57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610c8457816020015b6040805180820190915260608082526020820152815260200190600190039081610c5d5790505b50905060005b60008c8152600b6020526040902054811015610e485760008c8152600b60205260409020805482908110610cce57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060020201604051806040016040529081600082018054610cf790614780565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2390614780565b8015610d705780601f10610d4557610100808354040283529160200191610d70565b820191906000526020600020905b815481529060010190602001808311610d5357829003601f168201915b50505050508152602001600182018054610d8990614780565b80601f0160208091040260200160405190810160405280929190818152602001828054610db590614780565b8015610e025780601f10610dd757610100808354040283529160200191610e02565b820191906000526020600020905b815481529060010190602001808311610de557829003601f168201915b505050505081525050828281518110610e2b57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152610e416001826146db565b9050610c8a565b50604080516080810182526004918101918252635459504560e01b606082015290815260208101610e788d611640565b905260008c8152600b602052604090205482518391908110610eaa57634e487b7160e01b600052603260045260246000fd5b602002602001018190525061119d600760000160008d81526020019081526020016000208054610ed990614780565b80601f0160208091040260200160405190810160405280929190818152602001828054610f0590614780565b8015610f525780601f10610f2757610100808354040283529160200191610f52565b820191906000526020600020905b815481529060010190602001808311610f3557829003601f168201915b50505060008f81526008602052604090208054909250610f729150614780565b80601f0160208091040260200160405190810160405280929190818152602001828054610f9e90614780565b8015610feb5780601f10610fc057610100808354040283529160200191610feb565b820191906000526020600020905b815481529060010190602001808311610fce57829003601f168201915b50505050508b6110b2601260009054906101000a90046001600160a01b03166001600160a01b031663fbe336ff7f4bcafa307edced29184180ecf3a3ef99cd92e9f26df7c14cbec7a5c02db836f56040518263ffffffff1660e01b815260040161105791815260200190565b60006040518083038186803b15801561106f57600080fd5b505afa158015611083573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110ab9190810190613dfe565b898861268b565b60125460405163fbe336ff60e01b81527f4bcafa307edced29184180ecf3a3ef99cd92e9f26df7c14cbec7a5c02db836f56004820152611197916001600160a01b03169063fbe336ff9060240160006040518083038186803b15801561111757600080fd5b505afa15801561112b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526111539190810190613dfe565b604080516000808252602082019092528b91611191565b604080518082019091526060808252602082015281526020019060019003908161116a5790505b5061268b565b8661280c565b9b9a5050505050505050505050565b6000805160206149558339815191526111c58133612921565b60005b84518110156112d35761120e8582815181106111f457634e487b7160e01b600052603260045260246000fd5b60200260200101516000908152600a602052604090205490565b84828151811061122e57634e487b7160e01b600052603260045260246000fd5b602002602001015161127387848151811061125957634e487b7160e01b600052603260045260246000fd5b602002602001015160009081526005602052604090205490565b61127d91906146db565b11156112c15760405162461bcd60e51b81526020600482015260136024820152722830b93a1d1027baba1037b31039ba37b1b59760691b60448201526064016106f9565b6112cc6001826146db565b90506111c8565b506112e085858585612985565b5050505050565b600081815260086020526040902080546060919061130490614780565b80601f016020809104026020016040519081016040528092919081815260200182805461133090614780565b801561137d5780601f106113525761010080835404028352916020019161137d565b820191906000526020600020905b81548152906001019060200180831161136057829003601f168201915b50505050509050919050565b6001600160a01b0385163314806113a557506113a58533611fa9565b61140c5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016106f9565b6112e08585858585612a24565b6000828152602081905260409020600101546114358133612921565b61143f8383612bd7565b505050565b6001600160a01b03811633146114b45760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106f9565b6114be8282612c5b565b5050565b600081815260076020526040902080546060919061130490614780565b606081518351146115445760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016106f9565b600083516001600160401b0381111561156d57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611596578160200160208202803683370190505b50905060005b8451811015611638576115fd8582815181106115c857634e487b7160e01b600052603260045260246000fd5b60200260200101518583815181106115f057634e487b7160e01b600052603260045260246000fd5b6020026020010151610691565b82828151811061161d57634e487b7160e01b600052603260045260246000fd5b60209081029190910101526116318161480c565b905061159c565b509392505050565b6000818152600c6020908152604080832054808452600e9092529091208054606092919061166d90614780565b80601f016020809104026020016040519081016040528092919081815260200182805461169990614780565b80156116e65780601f106116bb576101008083540402835291602001916116e6565b820191906000526020600020905b8154815290600101906020018083116116c957829003601f168201915b5050505050915050919050565b60125460405163fbe336ff60e01b815260008051602061499583398151915260048201526060916000916001600160a01b039091169063fbe336ff9060240160006040518083038186803b15801561174a57600080fd5b505afa15801561175e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117869190810190613dfe565b60008481526009602090815260409182902091519293506117aa92849291016141c1565b604051602081830303815290604052915050919050565b6001546001600160a01b0316331461181b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106f9565b6118256000612cc0565b565b6000805160206149558339815191526118408133612921565b6000848152600a60209081526040808320546005909252909120546118669085906146db565b11156118aa5760405162461bcd60e51b81526020600482015260136024820152722830b93a1d1027baba1037b31039ba37b1b59760691b60448201526064016106f9565b6112e085858585612d12565b6000805160206149558339815191526118cf8133612921565b61194b8686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092018290525060408051602081019091529081529250612d47915050565b505050505050565b6000818152600e60205260408120805460609291829182919061197590614780565b80601f01602080910402602001604051908101604052809291908181526020018280546119a190614780565b80156119ee5780601f106119c3576101008083540402835291602001916119ee565b820191906000526020600020905b8154815290600101906020018083116119d157829003601f168201915b50505060009788525050600f60209081526040808820546010835281892054600d9093529720549197909550909350915050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600080516020614935833981519152611a648133612921565b611a7d6013548360009182526005602052604090912055565b611a8b888888888888611b6c565b5050505050505050565b336001600160a01b0383161415611b005760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016106f9565b3360008181526003602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600080516020614935833981519152611b858133612921565b60135460008181526007602090815260409091208851611ba7928a0190613572565b5060008181526008602090815260409091208751611bc792890190613572565b5060008181526009602090815260409091208651611be792880190613572565b506000818152600a60205260409020839055611c04601489612d59565b611c505760405162461bcd60e51b815260206004820152601b60248201527f506172743a206e6f6e206578697374656e742063617465676f7279000000000060448201526064016106f9565b600080516020614975833981519152881415611cd4578215611ccf5760405162461bcd60e51b815260206004820152603260248201527f506172743a206d6178537570706c79206f662064656661756c742063617465676044820152716f72792073686f756c64206265207a65726f60701b60648201526084016106f9565b611d69565b82611d355760405162461bcd60e51b815260206004820152602b60248201527f506172743a206d6178537570706c792073686f756c642062652067726561746560448201526a72207468616e207a65726f60a81b60648201526084016106f9565b6040518181527fbeb6ef1e252bba53ccc7403a1dbbfed2526fd6136f583a36b73c4adb67331b8a9060200160405180910390a15b6000818152600c602052604081208990555b8451811015611e1d576000828152600b602052604090208551869083908110611db457634e487b7160e01b600052603260045260246000fd5b602090810291909101810151825460018101845560009384529282902081518051929460020290910192611ded92849290910190613572565b506020828101518051611e069260018501920190613572565b505050600181611e1691906146db565b9050611d7b565b50600160136000828254611e3191906146db565b90915550505050505050505050565b6060611e4c6014612d71565b905090565b60125460405163fbe336ff60e01b815260008051602061499583398151915260048201526060916000916001600160a01b039091169063fbe336ff9060240160006040518083038186803b158015611ea857600080fd5b505afa158015611ebc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611ee49190810190613dfe565b60408051600180825281830190925291925060009190816020015b6060815260200190600190039081611eff5750506000858152600960209081526040918290209151929350611f3792859291016141c1565b60405160208183030381529060405281600081518110611f6757634e487b7160e01b600052603260045260246000fd5b6020026020010181905250611f7b81612d7c565b949350505050565b600082815260208190526040902060010154611f9f8133612921565b61143f8383612c5b565b6001600160a01b03808316600090815260036020908152604080832093851683529290529081205460ff1680611fec57506006546001600160a01b038381169116145b9392505050565b60008051602061493583398151915261200c8133612921565b60008560405160200161201f9190614082565b60408051601f1981840301815291905280516020909101209050612044601482612d59565b156120915760405162461bcd60e51b815260206004820152601d60248201527f506172743a20616c7265616479206578697374732063617465676f727900000060448201526064016106f9565b60008381526011602052604090205460ff16156120f05760405162461bcd60e51b815260206004820152601960248201527f506172743a20616c72656164792075736564207a496e6465780000000000000060448201526064016106f9565b6000858152600c602052604090205460008051602061497583398151915214801561213657506000848152600c6020526040902054600080516020614975833981519152145b6121825760405162461bcd60e51b815260206004820181905260248201527f506172743a206672616d6520696d616765206973206e6f74206372656174656460448201526064016106f9565b6000818152600d60209081526040808320869055600e825290912087516121ab92890190613572565b506000818152600f602090815260408083208890556010825280832087905585835260119091529020805460ff191660011790556121ea601482612345565b50505050505050565b6001600160a01b03851633148061220f575061220f8533611fa9565b61226d5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016106f9565b6112e08585858585612e3d565b6001546001600160a01b031633146122d45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106f9565b6001600160a01b0381166123395760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106f9565b61234281612cc0565b50565b6000611fec8383612f5e565b60006001600160e01b03198216636cdb3d1360e11b148061238257506001600160e01b031982166303a24d0760e21b145b80610727575061072782612fad565b606060006123a0836002614707565b6123ab9060026146db565b6001600160401b038111156123d057634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156123fa576020820181803683370190505b509050600360fc1b8160008151811061242357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061246057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000612484846002614707565b61248f9060016146db565b90505b6001811115612523576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106124d157634e487b7160e01b600052603260045260246000fd5b1a60f81b8282815181106124f557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361251c81614769565b9050612492565b508315611fec5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106f9565b6060816125965750506040805180820190915260018152600360fc1b602082015290565b8160005b81156125c057806125aa8161480c565b91506125b99050600a836146f3565b915061259a565b6000816001600160401b038111156125e857634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612612576020820181803683370190505b5090505b8415611f7b57612627600183614726565b9150612634600a86614827565b61263f9060306146db565b60f81b81838151811061266257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612684600a866146f3565b9450612616565b60608060005b84518110156126f857858582815181106126bb57634e487b7160e01b600052603260045260246000fd5b60200260200101516040516020016126d4929190614185565b60408051601f1981840301815291905295506126f16001826146db565b9050612691565b5060005b83518110156127df578061272757604051806040016040528060018152602001603f60f81b81525091505b8015612750578160405160200161273e9190614160565b60405160208183030381529060405291505b8184828151811061277157634e487b7160e01b600052603260045260246000fd5b60200260200101516000015185838151811061279d57634e487b7160e01b600052603260045260246000fd5b6020026020010151602001516040516020016127bb93929190614110565b60408051601f1981840301815291905291506127d86001826146db565b90506126fc565b5084816040516020016127f392919061409e565b6040516020818303038152906040529150509392505050565b606060008784886040516020016128259392919061427f565b604051602081830303815290604052905060005b83518110156128e757600084828151811061286457634e487b7160e01b600052603260045260246000fd5b60200260200101519050828160000151826020015160405160200161288b93929190613f57565b6040516020818303038152906040529250600185516128aa9190614726565b8210156128d457826040516020016128c29190613f32565b60405160208183030381529060405292505b506128e06001826146db565b9050612839565b50806128f287612d7c565b8660405160200161290593929190613fdd565b60408051808303601f1901815291905298975050505050505050565b61292b8282611a22565b6114be57612943816001600160a01b03166014612391565b61294e836020612391565b60405160200161295f929190614352565b60408051601f198184030181529082905262461bcd60e51b82526106f9916004016144ef565b61299184848484612fe2565b60005b83518110156112e0578281815181106129bd57634e487b7160e01b600052603260045260246000fd5b6020026020010151600560008684815181106129e957634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000828254612a0e91906146db565b90915550612a1d90508161480c565b9050612994565b8151835114612a455760405162461bcd60e51b81526004016106f990614608565b6001600160a01b038416612a6b5760405162461bcd60e51b81526004016106f990614579565b3360005b8451811015612b71576000858281518110612a9a57634e487b7160e01b600052603260045260246000fd5b602002602001015190506000858381518110612ac657634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015612b175760405162461bcd60e51b81526004016106f9906145be565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612b569084906146db565b9250508190555050505080612b6a9061480c565b9050612a6f565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612bc19291906144c1565b60405180910390a461194b818787878787613146565b612be18282611a22565b6114be576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055612c173390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b612c658282611a22565b156114be576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612d1e848484846132b1565b60008381526005602052604081208054849290612d3c9084906146db565b909155505050505050565b612d5384848484612fe2565b50505050565b60008181526001830160205260408120541515611fec565b60606107278261337a565b60608060005b8351811015612df15781612dbc858381518110612daf57634e487b7160e01b600052603260045260246000fd5b60200260200101516133d5565b604051602001612dcd92919061409e565b60408051601f198184030181529190529150612dea6001826146db565b9050612d82565b506040518060800160405280605b81526020016149b5605b913981604051806040016040528060068152602001651e17b9bb339f60d11b8152506040516020016117aa939291906140cd565b6001600160a01b038416612e635760405162461bcd60e51b81526004016106f990614579565b33612e7c818787612e738861344f565b6112e08861344f565b60008481526002602090815260408083206001600160a01b038a16845290915290205483811015612ebf5760405162461bcd60e51b81526004016106f9906145be565b60008581526002602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290612efe9084906146db565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46121ea8288888888886134a8565b6000818152600183016020526040812054612fa557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610727565b506000610727565b60006001600160e01b03198216637965db0b60e01b148061072757506301ffc9a760e01b6001600160e01b0319831614610727565b6001600160a01b0384166130085760405162461bcd60e51b81526004016106f990614650565b81518351146130295760405162461bcd60e51b81526004016106f990614608565b3360005b84518110156130e25783818151811061305657634e487b7160e01b600052603260045260246000fd5b60200260200101516002600087848151811061308257634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546130ca91906146db565b909155508190506130da8161480c565b91505061302d565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516131339291906144c1565b60405180910390a46112e0816000878787875b6001600160a01b0384163b1561194b5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061318a90899089908890889088906004016143c7565b602060405180830381600087803b1580156131a457600080fd5b505af19250505080156131d4575060408051601f3d908101601f191682019092526131d191810190613de2565b60015b613281576131e061487d565b806308c379a0141561321a57506131f5614895565b80613200575061321c565b8060405162461bcd60e51b81526004016106f991906144ef565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016106f9565b6001600160e01b0319811663bc197c8160e01b146121ea5760405162461bcd60e51b81526004016106f990614531565b6001600160a01b0384166132d75760405162461bcd60e51b81526004016106f990614650565b336132e881600087612e738861344f565b60008481526002602090815260408083206001600160a01b03891684529091528120805485929061331a9084906146db565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46112e0816000878787876134a8565b60608160000180548060200260200160405190810160405280929190818152602001828054801561137d57602002820191906000526020600020905b8154815260200190600101908083116133b65750505050509050919050565b60606040518060400160405280600d81526020016c3c696d61676520687265663d2760981b815250826040518060400160405280601081526020016f13903bb4b23a341e939898181293979f60811b815250604051602001613439939291906140cd565b6040516020818303038152906040529050919050565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061349757634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b6001600160a01b0384163b1561194b5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906134ec9089908990889088908890600401614425565b602060405180830381600087803b15801561350657600080fd5b505af1925050508015613536575060408051601f3d908101601f1916820190925261353391810190613de2565b60015b613542576131e061487d565b6001600160e01b0319811663f23a6e6160e01b146121ea5760405162461bcd60e51b81526004016106f990614531565b82805461357e90614780565b90600052602060002090601f0160209004810192826135a057600085556135e6565b82601f106135b957805160ff19168380011785556135e6565b828001600101855582156135e6579182015b828111156135e65782518255916020019190600101906135cb565b506135f29291506135f6565b5090565b5b808211156135f257600081556001016135f7565b80356001600160a01b038116811461362257600080fd5b919050565b600082601f830112613637578081fd5b8135602061364482614691565b6040805161365283826147e0565b8481528381019250868401600586901b88018501891015613671578687fd5b865b8681101561370a5781356001600160401b038082111561369157898afd5b908a0190818c03601f19018613156136a757898afd5b85516136b2816147bb565b88830135828111156136c2578b8cfd5b6136d08e8b838701016137d5565b82525086830135828111156136e3578b8cfd5b6136f18e8b838701016137d5565b828b015250875250509385019390850190600101613673565b509098975050505050505050565b60008083601f840112613729578182fd5b5081356001600160401b0381111561373f578182fd5b6020830191508360208260051b850101111561375a57600080fd5b9250929050565b600082601f830112613771578081fd5b8135602061377e82614691565b60405161378b82826147e0565b8381528281019150858301600585901b870184018810156137aa578586fd5b855b858110156137c8578135845292840192908401906001016137ac565b5090979650505050505050565b600082601f8301126137e5578081fd5b81356137f0816146b4565b6040516137fd82826147e0565b828152856020848701011115613811578384fd5b82602086016020830137918201602001929092529392505050565b60006020828403121561383d578081fd5b611fec8261360b565b60008060408385031215613858578081fd5b6138618361360b565b915061386f6020840161360b565b90509250929050565b600080600080600060a0868803121561388f578081fd5b6138988661360b565b94506138a66020870161360b565b935060408601356001600160401b03808211156138c1578283fd5b6138cd89838a01613761565b945060608801359150808211156138e2578283fd5b6138ee89838a01613761565b93506080880135915080821115613903578283fd5b50613910888289016137d5565b9150509295509295909350565b600080600080600060a08688031215613934578283fd5b61393d8661360b565b945061394b6020870161360b565b9350604086013592506060860135915060808601356001600160401b03811115613973578182fd5b613910888289016137d5565b600080600080600060608688031215613996578283fd5b61399f8661360b565b945060208601356001600160401b03808211156139ba578485fd5b6139c689838a01613718565b909650945060408801359150808211156139de578283fd5b506139eb88828901613718565b969995985093965092949392505050565b60008060008060808587031215613a11578182fd5b613a1a8561360b565b935060208501356001600160401b0380821115613a35578384fd5b613a4188838901613761565b94506040870135915080821115613a56578384fd5b613a6288838901613761565b93506060870135915080821115613a77578283fd5b50613a84878288016137d5565b91505092959194509250565b60008060408385031215613aa2578182fd5b613aab8361360b565b915060208301358015158114613abf578182fd5b809150509250929050565b60008060408385031215613adc578182fd5b613ae58361360b565b946020939093013593505050565b60008060008060808587031215613b08578182fd5b613b118561360b565b9350602085013592506040850135915060608501356001600160401b03811115613b39578182fd5b613a84878288016137d5565b60008060408385031215613b57578182fd5b82356001600160401b0380821115613b6d578384fd5b818501915085601f830112613b80578384fd5b81356020613b8d82614691565b604051613b9a82826147e0565b8381528281019150858301600585901b870184018b1015613bb9578889fd5b8896505b84871015613be257613bce8161360b565b835260019690960195918301918301613bbd565b5096505086013592505080821115613bf8578283fd5b50613c0585828601613761565b9150509250929050565b600060208284031215613c20578081fd5b5035919050565b60008060408385031215613c39578182fd5b8235915061386f6020840161360b565b60008060008060008060c08789031215613c61578384fd5b8635955060208701356001600160401b0380821115613c7e578586fd5b613c8a8a838b016137d5565b96506040890135915080821115613c9f578586fd5b613cab8a838b016137d5565b95506060890135915080821115613cc0578283fd5b613ccc8a838b016137d5565b94506080890135915080821115613ce1578283fd5b50613cee89828a01613627565b92505060a087013590509295509295509295565b600080600080600080600060e0888a031215613d1c578485fd5b8735965060208801356001600160401b0380821115613d39578687fd5b613d458b838c016137d5565b975060408a0135915080821115613d5a578687fd5b613d668b838c016137d5565b965060608a0135915080821115613d7b578283fd5b613d878b838c016137d5565b955060808a0135915080821115613d9c578283fd5b50613da98a828b01613627565b93505060a0880135915060c0880135905092959891949750929550565b600060208284031215613dd7578081fd5b8135611fec8161491e565b600060208284031215613df3578081fd5b8151611fec8161491e565b600060208284031215613e0f578081fd5b81516001600160401b03811115613e24578182fd5b8201601f81018413613e34578182fd5b8051613e3f816146b4565b604051613e4c82826147e0565b828152866020848601011115613e60578485fd5b613e7183602083016020870161473d565b9695505050505050565b60008060008060808587031215613e90578182fd5b84356001600160401b03811115613ea5578283fd5b613eb1878288016137d5565b97602087013597506040870135966060013595509350505050565b6000815180845260208085019450808401835b83811015613efb57815187529582019590820190600101613edf565b509495945050505050565b60008151808452613f1e81602086016020860161473d565b601f01601f19169290920160200192915050565b60008251613f4481846020870161473d565b600b60fa1b920191825250600101919050565b60008451613f6981846020890161473d565b6e3d913a3930b4ba2fba3cb832911d1160891b9083019081528451613f9581600f84016020890161473d565b6a1116113b30b63ab2911d1160a91b600f92909101918201528351613fc181601a84016020880161473d565b61227d60f01b601a9290910191820152601c0195945050505050565b60008451613fef81846020890161473d565b80830190507f5d2c227261775f696d616765223a22646174613a696d6167652f7376672b786d8152661b0edd5d198e0b60ca1b6020820152845161403a81602784016020890161473d565b6a11161134b6b0b3b2911d1160a91b60279290910191820152835161406681603284016020880161473d565b61227d60f01b6032929091019182015260340195945050505050565b6000825161409481846020870161473d565b9190910192915050565b600083516140b081846020880161473d565b8351908301906140c481836020880161473d565b01949350505050565b600084516140df81846020890161473d565b8451908301906140f381836020890161473d565b845191019061410681836020880161473d565b0195945050505050565b6000845161412281846020890161473d565b84519083019061413681836020890161473d565b603d60f81b9101908152835161415381600184016020880161473d565b0160010195945050505050565b6000825161417281846020870161473d565b601360f91b920191825250600101919050565b6000835161419781846020880161473d565b602f60f81b90830190815283516141b581600184016020880161473d565b01600101949350505050565b6000835160206141d4828583890161473d565b602f60f81b9184019182528454600190849080831c818416806141f857607f821691505b85821081141561421657634e487b7160e01b88526022600452602488fd5b80801561422a576001811461423f5761426f565b60ff198416888701528288018601945061426f565b60008b815260209020895b848110156142655781548a820189015290870190880161424a565b5050858389010194505b50929a9950505050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c7b226e616d81526332911d1160e11b6020820152600084516142c481602485016020890161473d565b7111161132bc3a32b93730b62fbab936111d1160711b60249184019182015284516142f681603684016020890161473d565b701116113232b9b1b934b83a34b7b7111d1160791b60369290910191820152835161432881604784016020880161473d565b6f222c2261747472696275746573223a5b60801b6047929091019182015260570195945050505050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161438a81601785016020880161473d565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516143bb81602884016020880161473d565b01602801949350505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906143f390830186613ecc565b82810360608401526144058186613ecc565b905082810360808401526144198185613f06565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061445f90830184613f06565b979650505050505050565b6020808252825182820181905260009190848201906040850190845b818110156144a257835183529284019291840191600101614486565b50909695505050505050565b602081526000611fec6020830184613ecc565b6040815260006144d46040830185613ecc565b82810360208401526144e68185613ecc565b95945050505050565b602081526000611fec6020830184613f06565b6080815260006145156080830187613f06565b6020830195909552506040810192909252606090910152919050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60006001600160401b038211156146aa576146aa614867565b5060051b60200190565b60006001600160401b038211156146cd576146cd614867565b50601f01601f191660200190565b600082198211156146ee576146ee61483b565b500190565b60008261470257614702614851565b500490565b60008160001904831182151516156147215761472161483b565b500290565b6000828210156147385761473861483b565b500390565b60005b83811015614758578181015183820152602001614740565b83811115612d535750506000910152565b6000816147785761477861483b565b506000190190565b600181811c9082168061479457607f821691505b602082108114156147b557634e487b7160e01b600052602260045260246000fd5b50919050565b604081018181106001600160401b03821117156147da576147da614867565b60405250565b601f8201601f191681016001600160401b038111828210171561480557614805614867565b6040525050565b60006000198214156148205761482061483b565b5060010190565b60008261483657614836614851565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d111561489257600481823e5160e01c5b90565b600060443d10156148a35790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156148d257505050505090565b82850191508151818111156148ea5750505050505090565b843d87010160208285010111156149045750505050505090565b614913602082860101876147e0565b509095945050505050565b6001600160e01b03198116811461234257600080fdfe828634d95e775031b9ff576b159a8509d3053581a8c9c4d7d86899e0afcd882f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a69265a59ce9426670e5a4dc96720a1debb1a5c18c021885a2362d173df95ebebbaeba4d62c52d64cecad0da9e0302eaa9150e0ceea6b06933b875192a1edba67a3c73766720786d6c6e733d27687474703a2f2f7777772e77332e6f72672f323030302f737667272077696474683d273130303027206865696768743d2731303030272076696577426f783d2730203020313030302031303030273ea2646970667358221220c9d96f12a24c0d1756a7185b437e8f235d1e050bb373ef20c154c73cecb82e5a64736f6c63430008040033828634d95e775031b9ff576b159a8509d3053581a8c9c4d7d86899e0afcd882f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6000000000000000000000000e0172b80b1410e198f94a8213842c635383ceed2000000000000000000000000c0cb97a0e22e9c14fb0b39da6cf6ccdab8078fa9

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102735760003560e01c8063869f759411610151578063bd85b039116100c3578063d547741f11610087578063d547741f1461061f578063e985e9c514610632578063eef4da5f14610645578063f242432a14610658578063f2fde38b1461066b578063f91fe6bf1461067e57600080fd5b8063bd85b03914610595578063bf842211146105b5578063c79178c6146105e2578063c8be2b03146105f5578063d53913931461060a57600080fd5b806395a9ccae1161011557806395a9ccae1461051f578063a217fddf14610532578063a22cb4651461053a578063a39f8d2d1461054d578063b2ceb3f214610560578063b7e545771461058057600080fd5b8063869f7594146104a35780638aeda25a146104c35780638bb52244146104d85780638da5cb5b146104fb57806391d148541461050c57600080fd5b806336568abe116101ea57806363d05cf3116101ae57806363d05cf31461044457806367e851c91461044d5780636d14162b14610462578063715018a614610475578063731133e91461047d5780637bd279971461049057600080fd5b806336568abe146103c957806345a29d40146103dc5780634e1273f4146103ef5780634f558e791461040f57806351a40bfa1461043157600080fd5b80631f7fdffa1161023c5780631f7fdffa1461032d5780631fa4f86e14610342578063248a9ca31461036d5780632c5f13e0146103905780632eb2c2d6146103a35780632f2ff15d146103b657600080fd5b8062fdd58e1461027857806301ffc9a71461029e57806306fdde03146102c15780630a323bea146102f35780630e89341c1461031a575b600080fd5b61028b610286366004613aca565b610691565b6040519081526020015b60405180910390f35b6102b16102ac366004613dc6565b61072d565b6040519015158152602001610295565b60408051808201909152600d81526c19185d984b5bd9999a58da585b609a1b60208201525b60405161029591906144ef565b61028b7f4bcafa307edced29184180ecf3a3ef99cd92e9f26df7c14cbec7a5c02db836f581565b6102e6610328366004613c0f565b61076d565b61034061033b3660046139fc565b6111ac565b005b600654610355906001600160a01b031681565b6040516001600160a01b039091168152602001610295565b61028b61037b366004613c0f565b60009081526020819052604090206001015490565b6102e661039e366004613c0f565b6112e7565b6103406103b1366004613878565b611389565b6103406103c4366004613c27565b611419565b6103406103d7366004613c27565b611444565b6102e66103ea366004613c0f565b6114c2565b6104026103fd366004613b45565b6114df565b60405161029591906144ae565b6102b161041d366004613c0f565b600090815260056020526040902054151590565b6102e661043f366004613c0f565b611640565b61028b60135481565b61028b60008051602061497583398151915281565b6102e6610470366004613c0f565b6116f3565b6103406117c1565b61034061048b366004613af3565b611827565b61034061049e36600461397f565b6118b6565b61028b6104b1366004613c0f565b6000908152600a602052604090205490565b61028b60008051602061493583398151915281565b6104eb6104e6366004613c0f565b611953565b6040516102959493929190614502565b6001546001600160a01b0316610355565b6102b161051a366004613c27565b611a22565b61034061052d366004613d02565b611a4b565b61028b600081565b610340610548366004613a90565b611a95565b61034061055b366004613c49565b611b6c565b61028b61056e366004613c0f565b6000908152600c602052604090205490565b610588611e40565b604051610295919061446a565b61028b6105a3366004613c0f565b60009081526005602052604090205490565b61028b6105c3366004613c0f565b6000908152600c60209081526040808320548352600d90915290205490565b6102e66105f0366004613c0f565b611e51565b61028b60008051602061499583398151915281565b61028b60008051602061495583398151915281565b61034061062d366004613c27565b611f83565b6102b1610640366004613846565b611fa9565b610340610653366004613e7b565b611ff3565b61034061066636600461391d565b6121f3565b61034061067936600461382c565b61227a565b601254610355906001600160a01b031681565b60006001600160a01b0383166107025760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201526a65726f206164647265737360a81b60648201526084015b60405180910390fd5b5060008181526002602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b0319821663a3a3de6b60e01b148061075e57506001600160e01b03198216637965db0b60e01b145b80610727575061072782612351565b6040805160038082526080820190925260609160009190816020015b6060815260200190600190039081610789579050506000848152600c60209081526040808320548352600f825280832054601090925280832054601254915163fbe336ff60e01b8152600080516020614995833981519152600482015294955091939192916001600160a01b039091169063fbe336ff9060240160006040518083038186803b15801561081b57600080fd5b505afa15801561082f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526108579190810190613dfe565b600084815260096020908152604091829020915192935061087b92849291016141c1565b604051602081830303815290604052846000815181106108ab57634e487b7160e01b600052603260045260246000fd5b602002602001018190525080600760020160008881526020019081526020016000206040516020016108de9291906141c1565b6040516020818303038152906040528460018151811061090e57634e487b7160e01b600052603260045260246000fd5b602002602001018190525080600760020160008481526020019081526020016000206040516020016109419291906141c1565b6040516020818303038152906040528460028151811061097157634e487b7160e01b600052603260045260246000fd5b60209081029190910101526000610989306014612391565b60408051600180825281830190925291925060009190816020015b60608152602001906001900390816109a457905050905060405180604001604052806006815260200165696d6167657360d01b815250816000815181106109fb57634e487b7160e01b600052603260045260246000fd5b602090810291909101015260408051600380825260808201909252600091816020015b6060815260200190600190039081610a1e57905050905060405180604001604052806004815260200163696e666f60e01b81525081600081518110610a7357634e487b7160e01b600052603260045260246000fd5b60200260200101819052508281600181518110610aa057634e487b7160e01b600052603260045260246000fd5b6020026020010181905250610ab489612572565b81600281518110610ad557634e487b7160e01b600052603260045260246000fd5b602090810291909101015260408051600380825260808201909252600091816020015b6040805180820190915260608082526020820152815260200190600190039081610af85790505090506040518060400160405280858152602001610b3b89612572565b81525081600081518110610b5f57634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280858152602001610b848c612572565b81525081600181518110610ba857634e487b7160e01b600052603260045260246000fd5b60200260200101819052506040518060400160405280858152602001610bcd88612572565b81525081600281518110610bf157634e487b7160e01b600052603260045260246000fd5b60209081029190910181019190915260008b8152600b9091526040812054610c1a9060016146db565b6001600160401b03811115610c3f57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610c8457816020015b6040805180820190915260608082526020820152815260200190600190039081610c5d5790505b50905060005b60008c8152600b6020526040902054811015610e485760008c8152600b60205260409020805482908110610cce57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060020201604051806040016040529081600082018054610cf790614780565b80601f0160208091040260200160405190810160405280929190818152602001828054610d2390614780565b8015610d705780601f10610d4557610100808354040283529160200191610d70565b820191906000526020600020905b815481529060010190602001808311610d5357829003601f168201915b50505050508152602001600182018054610d8990614780565b80601f0160208091040260200160405190810160405280929190818152602001828054610db590614780565b8015610e025780601f10610dd757610100808354040283529160200191610e02565b820191906000526020600020905b815481529060010190602001808311610de557829003601f168201915b505050505081525050828281518110610e2b57634e487b7160e01b600052603260045260246000fd5b6020908102919091010152610e416001826146db565b9050610c8a565b50604080516080810182526004918101918252635459504560e01b606082015290815260208101610e788d611640565b905260008c8152600b602052604090205482518391908110610eaa57634e487b7160e01b600052603260045260246000fd5b602002602001018190525061119d600760000160008d81526020019081526020016000208054610ed990614780565b80601f0160208091040260200160405190810160405280929190818152602001828054610f0590614780565b8015610f525780601f10610f2757610100808354040283529160200191610f52565b820191906000526020600020905b815481529060010190602001808311610f3557829003601f168201915b50505060008f81526008602052604090208054909250610f729150614780565b80601f0160208091040260200160405190810160405280929190818152602001828054610f9e90614780565b8015610feb5780601f10610fc057610100808354040283529160200191610feb565b820191906000526020600020905b815481529060010190602001808311610fce57829003601f168201915b50505050508b6110b2601260009054906101000a90046001600160a01b03166001600160a01b031663fbe336ff7f4bcafa307edced29184180ecf3a3ef99cd92e9f26df7c14cbec7a5c02db836f56040518263ffffffff1660e01b815260040161105791815260200190565b60006040518083038186803b15801561106f57600080fd5b505afa158015611083573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526110ab9190810190613dfe565b898861268b565b60125460405163fbe336ff60e01b81527f4bcafa307edced29184180ecf3a3ef99cd92e9f26df7c14cbec7a5c02db836f56004820152611197916001600160a01b03169063fbe336ff9060240160006040518083038186803b15801561111757600080fd5b505afa15801561112b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526111539190810190613dfe565b604080516000808252602082019092528b91611191565b604080518082019091526060808252602082015281526020019060019003908161116a5790505b5061268b565b8661280c565b9b9a5050505050505050505050565b6000805160206149558339815191526111c58133612921565b60005b84518110156112d35761120e8582815181106111f457634e487b7160e01b600052603260045260246000fd5b60200260200101516000908152600a602052604090205490565b84828151811061122e57634e487b7160e01b600052603260045260246000fd5b602002602001015161127387848151811061125957634e487b7160e01b600052603260045260246000fd5b602002602001015160009081526005602052604090205490565b61127d91906146db565b11156112c15760405162461bcd60e51b81526020600482015260136024820152722830b93a1d1027baba1037b31039ba37b1b59760691b60448201526064016106f9565b6112cc6001826146db565b90506111c8565b506112e085858585612985565b5050505050565b600081815260086020526040902080546060919061130490614780565b80601f016020809104026020016040519081016040528092919081815260200182805461133090614780565b801561137d5780601f106113525761010080835404028352916020019161137d565b820191906000526020600020905b81548152906001019060200180831161136057829003601f168201915b50505050509050919050565b6001600160a01b0385163314806113a557506113a58533611fa9565b61140c5760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206044820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b60648201526084016106f9565b6112e08585858585612a24565b6000828152602081905260409020600101546114358133612921565b61143f8383612bd7565b505050565b6001600160a01b03811633146114b45760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016106f9565b6114be8282612c5b565b5050565b600081815260076020526040902080546060919061130490614780565b606081518351146115445760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604482015268040dad2e6dac2e8c6d60bb1b60648201526084016106f9565b600083516001600160401b0381111561156d57634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015611596578160200160208202803683370190505b50905060005b8451811015611638576115fd8582815181106115c857634e487b7160e01b600052603260045260246000fd5b60200260200101518583815181106115f057634e487b7160e01b600052603260045260246000fd5b6020026020010151610691565b82828151811061161d57634e487b7160e01b600052603260045260246000fd5b60209081029190910101526116318161480c565b905061159c565b509392505050565b6000818152600c6020908152604080832054808452600e9092529091208054606092919061166d90614780565b80601f016020809104026020016040519081016040528092919081815260200182805461169990614780565b80156116e65780601f106116bb576101008083540402835291602001916116e6565b820191906000526020600020905b8154815290600101906020018083116116c957829003601f168201915b5050505050915050919050565b60125460405163fbe336ff60e01b815260008051602061499583398151915260048201526060916000916001600160a01b039091169063fbe336ff9060240160006040518083038186803b15801561174a57600080fd5b505afa15801561175e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526117869190810190613dfe565b60008481526009602090815260409182902091519293506117aa92849291016141c1565b604051602081830303815290604052915050919050565b6001546001600160a01b0316331461181b5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106f9565b6118256000612cc0565b565b6000805160206149558339815191526118408133612921565b6000848152600a60209081526040808320546005909252909120546118669085906146db565b11156118aa5760405162461bcd60e51b81526020600482015260136024820152722830b93a1d1027baba1037b31039ba37b1b59760691b60448201526064016106f9565b6112e085858585612d12565b6000805160206149558339815191526118cf8133612921565b61194b8686868080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525050604080516020808a02828101820190935289825290935089925088918291850190849080828437600092018290525060408051602081019091529081529250612d47915050565b505050505050565b6000818152600e60205260408120805460609291829182919061197590614780565b80601f01602080910402602001604051908101604052809291908181526020018280546119a190614780565b80156119ee5780601f106119c3576101008083540402835291602001916119ee565b820191906000526020600020905b8154815290600101906020018083116119d157829003601f168201915b50505060009788525050600f60209081526040808820546010835281892054600d9093529720549197909550909350915050565b6000918252602082815260408084206001600160a01b0393909316845291905290205460ff1690565b600080516020614935833981519152611a648133612921565b611a7d6013548360009182526005602052604090912055565b611a8b888888888888611b6c565b5050505050505050565b336001600160a01b0383161415611b005760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604482015268103337b91039b2b63360b91b60648201526084016106f9565b3360008181526003602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b600080516020614935833981519152611b858133612921565b60135460008181526007602090815260409091208851611ba7928a0190613572565b5060008181526008602090815260409091208751611bc792890190613572565b5060008181526009602090815260409091208651611be792880190613572565b506000818152600a60205260409020839055611c04601489612d59565b611c505760405162461bcd60e51b815260206004820152601b60248201527f506172743a206e6f6e206578697374656e742063617465676f7279000000000060448201526064016106f9565b600080516020614975833981519152881415611cd4578215611ccf5760405162461bcd60e51b815260206004820152603260248201527f506172743a206d6178537570706c79206f662064656661756c742063617465676044820152716f72792073686f756c64206265207a65726f60701b60648201526084016106f9565b611d69565b82611d355760405162461bcd60e51b815260206004820152602b60248201527f506172743a206d6178537570706c792073686f756c642062652067726561746560448201526a72207468616e207a65726f60a81b60648201526084016106f9565b6040518181527fbeb6ef1e252bba53ccc7403a1dbbfed2526fd6136f583a36b73c4adb67331b8a9060200160405180910390a15b6000818152600c602052604081208990555b8451811015611e1d576000828152600b602052604090208551869083908110611db457634e487b7160e01b600052603260045260246000fd5b602090810291909101810151825460018101845560009384529282902081518051929460020290910192611ded92849290910190613572565b506020828101518051611e069260018501920190613572565b505050600181611e1691906146db565b9050611d7b565b50600160136000828254611e3191906146db565b90915550505050505050505050565b6060611e4c6014612d71565b905090565b60125460405163fbe336ff60e01b815260008051602061499583398151915260048201526060916000916001600160a01b039091169063fbe336ff9060240160006040518083038186803b158015611ea857600080fd5b505afa158015611ebc573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611ee49190810190613dfe565b60408051600180825281830190925291925060009190816020015b6060815260200190600190039081611eff5750506000858152600960209081526040918290209151929350611f3792859291016141c1565b60405160208183030381529060405281600081518110611f6757634e487b7160e01b600052603260045260246000fd5b6020026020010181905250611f7b81612d7c565b949350505050565b600082815260208190526040902060010154611f9f8133612921565b61143f8383612c5b565b6001600160a01b03808316600090815260036020908152604080832093851683529290529081205460ff1680611fec57506006546001600160a01b038381169116145b9392505050565b60008051602061493583398151915261200c8133612921565b60008560405160200161201f9190614082565b60408051601f1981840301815291905280516020909101209050612044601482612d59565b156120915760405162461bcd60e51b815260206004820152601d60248201527f506172743a20616c7265616479206578697374732063617465676f727900000060448201526064016106f9565b60008381526011602052604090205460ff16156120f05760405162461bcd60e51b815260206004820152601960248201527f506172743a20616c72656164792075736564207a496e6465780000000000000060448201526064016106f9565b6000858152600c602052604090205460008051602061497583398151915214801561213657506000848152600c6020526040902054600080516020614975833981519152145b6121825760405162461bcd60e51b815260206004820181905260248201527f506172743a206672616d6520696d616765206973206e6f74206372656174656460448201526064016106f9565b6000818152600d60209081526040808320869055600e825290912087516121ab92890190613572565b506000818152600f602090815260408083208890556010825280832087905585835260119091529020805460ff191660011790556121ea601482612345565b50505050505050565b6001600160a01b03851633148061220f575061220f8533611fa9565b61226d5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201526808185c1c1c9bdd995960ba1b60648201526084016106f9565b6112e08585858585612e3d565b6001546001600160a01b031633146122d45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106f9565b6001600160a01b0381166123395760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106f9565b61234281612cc0565b50565b6000611fec8383612f5e565b60006001600160e01b03198216636cdb3d1360e11b148061238257506001600160e01b031982166303a24d0760e21b145b80610727575061072782612fad565b606060006123a0836002614707565b6123ab9060026146db565b6001600160401b038111156123d057634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156123fa576020820181803683370190505b509050600360fc1b8160008151811061242357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350600f60fb1b8160018151811061246057634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506000612484846002614707565b61248f9060016146db565b90505b6001811115612523576f181899199a1a9b1b9c1cb0b131b232b360811b85600f16601081106124d157634e487b7160e01b600052603260045260246000fd5b1a60f81b8282815181106124f557634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060049490941c9361251c81614769565b9050612492565b508315611fec5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016106f9565b6060816125965750506040805180820190915260018152600360fc1b602082015290565b8160005b81156125c057806125aa8161480c565b91506125b99050600a836146f3565b915061259a565b6000816001600160401b038111156125e857634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612612576020820181803683370190505b5090505b8415611f7b57612627600183614726565b9150612634600a86614827565b61263f9060306146db565b60f81b81838151811061266257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612684600a866146f3565b9450612616565b60608060005b84518110156126f857858582815181106126bb57634e487b7160e01b600052603260045260246000fd5b60200260200101516040516020016126d4929190614185565b60408051601f1981840301815291905295506126f16001826146db565b9050612691565b5060005b83518110156127df578061272757604051806040016040528060018152602001603f60f81b81525091505b8015612750578160405160200161273e9190614160565b60405160208183030381529060405291505b8184828151811061277157634e487b7160e01b600052603260045260246000fd5b60200260200101516000015185838151811061279d57634e487b7160e01b600052603260045260246000fd5b6020026020010151602001516040516020016127bb93929190614110565b60408051601f1981840301815291905291506127d86001826146db565b90506126fc565b5084816040516020016127f392919061409e565b6040516020818303038152906040529150509392505050565b606060008784886040516020016128259392919061427f565b604051602081830303815290604052905060005b83518110156128e757600084828151811061286457634e487b7160e01b600052603260045260246000fd5b60200260200101519050828160000151826020015160405160200161288b93929190613f57565b6040516020818303038152906040529250600185516128aa9190614726565b8210156128d457826040516020016128c29190613f32565b60405160208183030381529060405292505b506128e06001826146db565b9050612839565b50806128f287612d7c565b8660405160200161290593929190613fdd565b60408051808303601f1901815291905298975050505050505050565b61292b8282611a22565b6114be57612943816001600160a01b03166014612391565b61294e836020612391565b60405160200161295f929190614352565b60408051601f198184030181529082905262461bcd60e51b82526106f9916004016144ef565b61299184848484612fe2565b60005b83518110156112e0578281815181106129bd57634e487b7160e01b600052603260045260246000fd5b6020026020010151600560008684815181106129e957634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000828254612a0e91906146db565b90915550612a1d90508161480c565b9050612994565b8151835114612a455760405162461bcd60e51b81526004016106f990614608565b6001600160a01b038416612a6b5760405162461bcd60e51b81526004016106f990614579565b3360005b8451811015612b71576000858281518110612a9a57634e487b7160e01b600052603260045260246000fd5b602002602001015190506000858381518110612ac657634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160008481526002835260408082206001600160a01b038e168352909352919091205490915081811015612b175760405162461bcd60e51b81526004016106f9906145be565b60008381526002602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612b569084906146db565b9250508190555050505080612b6a9061480c565b9050612a6f565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051612bc19291906144c1565b60405180910390a461194b818787878787613146565b612be18282611a22565b6114be576000828152602081815260408083206001600160a01b03851684529091529020805460ff19166001179055612c173390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b612c658282611a22565b156114be576000828152602081815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612d1e848484846132b1565b60008381526005602052604081208054849290612d3c9084906146db565b909155505050505050565b612d5384848484612fe2565b50505050565b60008181526001830160205260408120541515611fec565b60606107278261337a565b60608060005b8351811015612df15781612dbc858381518110612daf57634e487b7160e01b600052603260045260246000fd5b60200260200101516133d5565b604051602001612dcd92919061409e565b60408051601f198184030181529190529150612dea6001826146db565b9050612d82565b506040518060800160405280605b81526020016149b5605b913981604051806040016040528060068152602001651e17b9bb339f60d11b8152506040516020016117aa939291906140cd565b6001600160a01b038416612e635760405162461bcd60e51b81526004016106f990614579565b33612e7c818787612e738861344f565b6112e08861344f565b60008481526002602090815260408083206001600160a01b038a16845290915290205483811015612ebf5760405162461bcd60e51b81526004016106f9906145be565b60008581526002602090815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290612efe9084906146db565b909155505060408051868152602081018690526001600160a01b03808916928a821692918616917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46121ea8288888888886134a8565b6000818152600183016020526040812054612fa557508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155610727565b506000610727565b60006001600160e01b03198216637965db0b60e01b148061072757506301ffc9a760e01b6001600160e01b0319831614610727565b6001600160a01b0384166130085760405162461bcd60e51b81526004016106f990614650565b81518351146130295760405162461bcd60e51b81526004016106f990614608565b3360005b84518110156130e25783818151811061305657634e487b7160e01b600052603260045260246000fd5b60200260200101516002600087848151811061308257634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b0316815260200190815260200160002060008282546130ca91906146db565b909155508190506130da8161480c565b91505061302d565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516131339291906144c1565b60405180910390a46112e0816000878787875b6001600160a01b0384163b1561194b5760405163bc197c8160e01b81526001600160a01b0385169063bc197c819061318a90899089908890889088906004016143c7565b602060405180830381600087803b1580156131a457600080fd5b505af19250505080156131d4575060408051601f3d908101601f191682019092526131d191810190613de2565b60015b613281576131e061487d565b806308c379a0141561321a57506131f5614895565b80613200575061321c565b8060405162461bcd60e51b81526004016106f991906144ef565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356044820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b60648201526084016106f9565b6001600160e01b0319811663bc197c8160e01b146121ea5760405162461bcd60e51b81526004016106f990614531565b6001600160a01b0384166132d75760405162461bcd60e51b81526004016106f990614650565b336132e881600087612e738861344f565b60008481526002602090815260408083206001600160a01b03891684529091528120805485929061331a9084906146db565b909155505060408051858152602081018590526001600160a01b0380881692600092918516917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46112e0816000878787876134a8565b60608160000180548060200260200160405190810160405280929190818152602001828054801561137d57602002820191906000526020600020905b8154815260200190600101908083116133b65750505050509050919050565b60606040518060400160405280600d81526020016c3c696d61676520687265663d2760981b815250826040518060400160405280601081526020016f13903bb4b23a341e939898181293979f60811b815250604051602001613439939291906140cd565b6040516020818303038152906040529050919050565b6040805160018082528183019092526060916000919060208083019080368337019050509050828160008151811061349757634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b6001600160a01b0384163b1561194b5760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906134ec9089908990889088908890600401614425565b602060405180830381600087803b15801561350657600080fd5b505af1925050508015613536575060408051601f3d908101601f1916820190925261353391810190613de2565b60015b613542576131e061487d565b6001600160e01b0319811663f23a6e6160e01b146121ea5760405162461bcd60e51b81526004016106f990614531565b82805461357e90614780565b90600052602060002090601f0160209004810192826135a057600085556135e6565b82601f106135b957805160ff19168380011785556135e6565b828001600101855582156135e6579182015b828111156135e65782518255916020019190600101906135cb565b506135f29291506135f6565b5090565b5b808211156135f257600081556001016135f7565b80356001600160a01b038116811461362257600080fd5b919050565b600082601f830112613637578081fd5b8135602061364482614691565b6040805161365283826147e0565b8481528381019250868401600586901b88018501891015613671578687fd5b865b8681101561370a5781356001600160401b038082111561369157898afd5b908a0190818c03601f19018613156136a757898afd5b85516136b2816147bb565b88830135828111156136c2578b8cfd5b6136d08e8b838701016137d5565b82525086830135828111156136e3578b8cfd5b6136f18e8b838701016137d5565b828b015250875250509385019390850190600101613673565b509098975050505050505050565b60008083601f840112613729578182fd5b5081356001600160401b0381111561373f578182fd5b6020830191508360208260051b850101111561375a57600080fd5b9250929050565b600082601f830112613771578081fd5b8135602061377e82614691565b60405161378b82826147e0565b8381528281019150858301600585901b870184018810156137aa578586fd5b855b858110156137c8578135845292840192908401906001016137ac565b5090979650505050505050565b600082601f8301126137e5578081fd5b81356137f0816146b4565b6040516137fd82826147e0565b828152856020848701011115613811578384fd5b82602086016020830137918201602001929092529392505050565b60006020828403121561383d578081fd5b611fec8261360b565b60008060408385031215613858578081fd5b6138618361360b565b915061386f6020840161360b565b90509250929050565b600080600080600060a0868803121561388f578081fd5b6138988661360b565b94506138a66020870161360b565b935060408601356001600160401b03808211156138c1578283fd5b6138cd89838a01613761565b945060608801359150808211156138e2578283fd5b6138ee89838a01613761565b93506080880135915080821115613903578283fd5b50613910888289016137d5565b9150509295509295909350565b600080600080600060a08688031215613934578283fd5b61393d8661360b565b945061394b6020870161360b565b9350604086013592506060860135915060808601356001600160401b03811115613973578182fd5b613910888289016137d5565b600080600080600060608688031215613996578283fd5b61399f8661360b565b945060208601356001600160401b03808211156139ba578485fd5b6139c689838a01613718565b909650945060408801359150808211156139de578283fd5b506139eb88828901613718565b969995985093965092949392505050565b60008060008060808587031215613a11578182fd5b613a1a8561360b565b935060208501356001600160401b0380821115613a35578384fd5b613a4188838901613761565b94506040870135915080821115613a56578384fd5b613a6288838901613761565b93506060870135915080821115613a77578283fd5b50613a84878288016137d5565b91505092959194509250565b60008060408385031215613aa2578182fd5b613aab8361360b565b915060208301358015158114613abf578182fd5b809150509250929050565b60008060408385031215613adc578182fd5b613ae58361360b565b946020939093013593505050565b60008060008060808587031215613b08578182fd5b613b118561360b565b9350602085013592506040850135915060608501356001600160401b03811115613b39578182fd5b613a84878288016137d5565b60008060408385031215613b57578182fd5b82356001600160401b0380821115613b6d578384fd5b818501915085601f830112613b80578384fd5b81356020613b8d82614691565b604051613b9a82826147e0565b8381528281019150858301600585901b870184018b1015613bb9578889fd5b8896505b84871015613be257613bce8161360b565b835260019690960195918301918301613bbd565b5096505086013592505080821115613bf8578283fd5b50613c0585828601613761565b9150509250929050565b600060208284031215613c20578081fd5b5035919050565b60008060408385031215613c39578182fd5b8235915061386f6020840161360b565b60008060008060008060c08789031215613c61578384fd5b8635955060208701356001600160401b0380821115613c7e578586fd5b613c8a8a838b016137d5565b96506040890135915080821115613c9f578586fd5b613cab8a838b016137d5565b95506060890135915080821115613cc0578283fd5b613ccc8a838b016137d5565b94506080890135915080821115613ce1578283fd5b50613cee89828a01613627565b92505060a087013590509295509295509295565b600080600080600080600060e0888a031215613d1c578485fd5b8735965060208801356001600160401b0380821115613d39578687fd5b613d458b838c016137d5565b975060408a0135915080821115613d5a578687fd5b613d668b838c016137d5565b965060608a0135915080821115613d7b578283fd5b613d878b838c016137d5565b955060808a0135915080821115613d9c578283fd5b50613da98a828b01613627565b93505060a0880135915060c0880135905092959891949750929550565b600060208284031215613dd7578081fd5b8135611fec8161491e565b600060208284031215613df3578081fd5b8151611fec8161491e565b600060208284031215613e0f578081fd5b81516001600160401b03811115613e24578182fd5b8201601f81018413613e34578182fd5b8051613e3f816146b4565b604051613e4c82826147e0565b828152866020848601011115613e60578485fd5b613e7183602083016020870161473d565b9695505050505050565b60008060008060808587031215613e90578182fd5b84356001600160401b03811115613ea5578283fd5b613eb1878288016137d5565b97602087013597506040870135966060013595509350505050565b6000815180845260208085019450808401835b83811015613efb57815187529582019590820190600101613edf565b509495945050505050565b60008151808452613f1e81602086016020860161473d565b601f01601f19169290920160200192915050565b60008251613f4481846020870161473d565b600b60fa1b920191825250600101919050565b60008451613f6981846020890161473d565b6e3d913a3930b4ba2fba3cb832911d1160891b9083019081528451613f9581600f84016020890161473d565b6a1116113b30b63ab2911d1160a91b600f92909101918201528351613fc181601a84016020880161473d565b61227d60f01b601a9290910191820152601c0195945050505050565b60008451613fef81846020890161473d565b80830190507f5d2c227261775f696d616765223a22646174613a696d6167652f7376672b786d8152661b0edd5d198e0b60ca1b6020820152845161403a81602784016020890161473d565b6a11161134b6b0b3b2911d1160a91b60279290910191820152835161406681603284016020880161473d565b61227d60f01b6032929091019182015260340195945050505050565b6000825161409481846020870161473d565b9190910192915050565b600083516140b081846020880161473d565b8351908301906140c481836020880161473d565b01949350505050565b600084516140df81846020890161473d565b8451908301906140f381836020890161473d565b845191019061410681836020880161473d565b0195945050505050565b6000845161412281846020890161473d565b84519083019061413681836020890161473d565b603d60f81b9101908152835161415381600184016020880161473d565b0160010195945050505050565b6000825161417281846020870161473d565b601360f91b920191825250600101919050565b6000835161419781846020880161473d565b602f60f81b90830190815283516141b581600184016020880161473d565b01600101949350505050565b6000835160206141d4828583890161473d565b602f60f81b9184019182528454600190849080831c818416806141f857607f821691505b85821081141561421657634e487b7160e01b88526022600452602488fd5b80801561422a576001811461423f5761426f565b60ff198416888701528288018601945061426f565b60008b815260209020895b848110156142655781548a820189015290870190880161424a565b5050858389010194505b50929a9950505050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c7b226e616d81526332911d1160e11b6020820152600084516142c481602485016020890161473d565b7111161132bc3a32b93730b62fbab936111d1160711b60249184019182015284516142f681603684016020890161473d565b701116113232b9b1b934b83a34b7b7111d1160791b60369290910191820152835161432881604784016020880161473d565b6f222c2261747472696275746573223a5b60801b6047929091019182015260570195945050505050565b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161438a81601785016020880161473d565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516143bb81602884016020880161473d565b01602801949350505050565b6001600160a01b0386811682528516602082015260a0604082018190526000906143f390830186613ecc565b82810360608401526144058186613ecc565b905082810360808401526144198185613f06565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a06080820181905260009061445f90830184613f06565b979650505050505050565b6020808252825182820181905260009190848201906040850190845b818110156144a257835183529284019291840191600101614486565b50909695505050505050565b602081526000611fec6020830184613ecc565b6040815260006144d46040830185613ecc565b82810360208401526144e68185613ecc565b95945050505050565b602081526000611fec6020830184613f06565b6080815260006145156080830187613f06565b6020830195909552506040810192909252606090910152919050565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b60006001600160401b038211156146aa576146aa614867565b5060051b60200190565b60006001600160401b038211156146cd576146cd614867565b50601f01601f191660200190565b600082198211156146ee576146ee61483b565b500190565b60008261470257614702614851565b500490565b60008160001904831182151516156147215761472161483b565b500290565b6000828210156147385761473861483b565b500390565b60005b83811015614758578181015183820152602001614740565b83811115612d535750506000910152565b6000816147785761477861483b565b506000190190565b600181811c9082168061479457607f821691505b602082108114156147b557634e487b7160e01b600052602260045260246000fd5b50919050565b604081018181106001600160401b03821117156147da576147da614867565b60405250565b601f8201601f191681016001600160401b038111828210171561480557614805614867565b6040525050565b60006000198214156148205761482061483b565b5060010190565b60008261483657614836614851565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600060033d111561489257600481823e5160e01c5b90565b600060443d10156148a35790565b6040516003193d81016004833e81513d6001600160401b0381602484011181841117156148d257505050505090565b82850191508151818111156148ea5750505050505090565b843d87010160208285010111156149045750505050505090565b614913602082860101876147e0565b509095945050505050565b6001600160e01b03198116811461234257600080fdfe828634d95e775031b9ff576b159a8509d3053581a8c9c4d7d86899e0afcd882f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a69265a59ce9426670e5a4dc96720a1debb1a5c18c021885a2362d173df95ebebbaeba4d62c52d64cecad0da9e0302eaa9150e0ceea6b06933b875192a1edba67a3c73766720786d6c6e733d27687474703a2f2f7777772e77332e6f72672f323030302f737667272077696474683d273130303027206865696768743d2731303030272076696577426f783d2730203020313030302031303030273ea2646970667358221220c9d96f12a24c0d1756a7185b437e8f235d1e050bb373ef20c154c73cecb82e5a64736f6c63430008040033

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

000000000000000000000000e0172b80b1410e198f94a8213842c635383ceed2000000000000000000000000c0cb97a0e22e9c14fb0b39da6cf6ccdab8078fa9

-----Decoded View---------------
Arg [0] : gatewayHandler_ (address): 0xe0172b80b1410E198f94a8213842C635383Ceed2
Arg [1] : dava_ (address): 0xC0CB97a0e22E9c14fB0B39da6cF6ccdab8078fa9

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000e0172b80b1410e198f94a8213842c635383ceed2
Arg [1] : 000000000000000000000000c0cb97a0e22e9c14fb0b39da6cf6ccdab8078fa9


Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.