ETH Price: $3,131.64 (+3.46%)

Token

FLUF World: Scenes and Sounds ()
 

Overview

Max Total Supply

0

Holders

3,418

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A

Other Info

0xd5cbc23a467ad01d7b1261504ffeeee3d6764531
Loading...
Loading
Loading...
Loading
Loading...
Loading

OVERVIEW

Customisation is at the heart of FLUF World’s collections. Scenes & Sounds give you the ability to switch up your assets, placing them in exotic locations with new music setting the vibe, and to enjoy our collaborations with artists like [Zigor](https://www.instagram.com/zigor/), [Nachei](https://www.instagram.com/nachei__/), [Young & Sick](https://www.instagram.com/youngandsick/), [Mike Shinoda](https://www.instagram.com/m_shinoda/) & more --- [**Official Collections:**](https://opensea.io/collection/fluf-world) [Flufs](https://opensea.io/collection/fluf) [Thingies](https://opensea.io/collection/fluf-world-thingies) [Party Bears](https://opensea.io/collection/partybear) [Seekers](https://opensea.io/collection/the-seekers) [Burrows](https://opensea.io/collection/fluf-world-burrows) [FLUF Haus](https://opensea.io/collection/fluf-haus)

# Exchange Pair Price  24H Volume % Volume

Contract Source Code Verified (Exact Match)

Contract Name:
FlufSceneAndMusic

Compiler Version
v0.8.0+commit.c7dfd78e

Optimization Enabled:
Yes with 20 runs

Other Settings:
default evmVersion
File 1 of 16 : FlufSceneAndMusic.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "@openzeppelin/contracts/token/ERC1155/ERC1155.sol";
import "@openzeppelin/contracts/token/ERC1155/utils/ERC1155Holder.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

contract FlufSceneAndMusic is ERC1155, ERC1155Holder, Ownable {
  // ERC1155 id => Asset Name
  struct flufLocked {
    uint256 background;
    uint256 music;
  }

  struct assetDescription {
    string assetType; // Background / Music
    string assetName; // Dunes / Lambo etc
  }

  mapping(uint256 => assetDescription) public assets;
  // fluf tokenId => ERC1155 id
  mapping(uint256 => flufLocked) public flufLock;
  mapping(uint256 => bool) public flufHasDefault;
  //mapping(uint256 => uint256) public flufLock;
  event Swap(
    address by,
    uint256 musicAssetLockIn,
    uint256 backgroundAssetLockIn,
    uint256 tokenId
  );

  address public signingWallet;
  address public flufAddress;

  string public name;

  constructor() ERC1155("https://erc1155-api.fluf.world/token/") {
    name = "FLUF World: Scenes and Sounds";
  }

  function setTokenURI(string memory _tokenURI) public onlyOwner {
      _setURI(_tokenURI);
  }
  
  function getTokenURI(uint256 _id) 
    public 
    view 
    returns (string memory)
  {
    string memory idToString = Strings.toString(_id);
    string memory uri = uri(_id);
    string memory tokenURI = string(abi.encodePacked(uri, idToString));
    return tokenURI;
  }

  function setContractName(string memory _name) public onlyOwner {
    name = _name;
  }

  function setFlufAddress(address _address) public onlyOwner {
    flufAddress = _address;
  }

  function updateSigningWallet(address _address) public onlyOwner {
    signingWallet = _address;
  }

  function setDefaultForFluf(
    uint256 _flufId,
    uint256 _defaultBackground,
    uint256 _defaultMusic
  ) internal {
    // Person has to be the owner of the fluf that he is setting the default for
    require(flufHasDefault[_flufId] != true, "Fluf default was already set");
    require(isFlufOwner(_flufId, msg.sender), "You do not own this FLUF");
    flufLock[_flufId].background = _defaultBackground;
    flufLock[_flufId].music = _defaultMusic;
    flufHasDefault[_flufId] = true;
  }

  function adminSetDefaultForFluf(
    uint256 _flufId,
    uint256 _defaultBackground,
    uint256 _defaultMusic
  ) public onlyOwner {
    flufLock[_flufId].background = _defaultBackground;
    flufLock[_flufId].music = _defaultMusic;
    flufHasDefault[_flufId] = true;
  }

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

    assembly {
      // first 32 bytes, after the length prefix
      r := mload(add(sig, 32))
      // second 32 bytes
      s := mload(add(sig, 64))
      // final byte (first byte of the next 32 bytes)
      v := byte(0, mload(add(sig, 96)))
    }

    // implicitly return (r, s, v)
  }

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

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

  function approveAndSetDefault(
    bytes32 _ethSignedMessageHash,
    bytes memory _signature,
    uint256 flufId,
    uint256 _defaultBackground,
    uint256 _defaultMusic
  ) public {
    // Require _signature to be from signingWallet
    require(
      recoverSigner(_ethSignedMessageHash, _signature) == signingWallet,
      "VAULT LOCK: Message must be sent from authorized signer."
    );
    // Set Approval
    setApprovalForAll(address(this), true);
    setDefaultForFluf(flufId, _defaultBackground, _defaultMusic);
  }

  function listNewAsset(
    uint256 _id,
    string memory _assetName,
    string memory _assetType
  ) public onlyOwner returns (bool) {
    assets[_id].assetName = _assetName;
    assets[_id].assetType = _assetType;
    return true;
  }
  
  function listNewAssetBatch(
    uint256[] memory _ids,
    string[] memory _assetNames,
    string[] memory _assetTypes
  ) public onlyOwner returns (bool) {
    for (uint256 i = 0; i < _ids.length; i++) {
      assets[_ids[i]].assetName = _assetNames[i];
      assets[_ids[i]].assetType = _assetTypes[i];
    }
    return true;
  }


  function getAssetIdType(uint256 _id) public view returns (string memory) {
    return assets[_id].assetType;
  }

  function mintBatch(uint256[] memory ids, uint256[] memory amounts)
    public
    onlyOwner
  {
    _mintBatch(msg.sender, ids, amounts, "");
  }

  function withdrawFunds() public onlyOwner {
    uint256 balance = address(this).balance;
    payable(msg.sender).transfer(balance);
  }

  // Let's see if this user is actually the holder of a specific fluf
  function isFlufOwner(uint256 tokenId, address _address)
    public
    view
    returns (bool)
  {
    address owner = IERC721(flufAddress).ownerOf(tokenId);
    if (owner == _address) {
      return true;
    } else {
      return false;
    }
  }

  function swap(
    uint256 tokenId,
    uint256 backgroundAssetLockIn,
    uint256 musicAssetLockIn
  ) public {
    require(
      isFlufOwner(tokenId, msg.sender),
      "VAULT HALT: You can't mess with other peoples flufs"
    );
    require(getFlufHasDefault(tokenId), "Fluf default was not set yet");

    bool doBackground = true;
    bool doMusic = true;

    // If the background is the same no need to be doing it
    if (backgroundAssetLockIn == flufLock[tokenId].background) {
      doBackground = false;
    }
    // If the music one is the same there is no need to be doing it
    if (musicAssetLockIn == flufLock[tokenId].music) {
      doMusic = false;
    }

    if (doBackground == true) {
      _safeTransferFrom(
        msg.sender,
        address(this),
        backgroundAssetLockIn,
        1,
        ""
      );
      _safeTransferFrom(
        address(this),
        msg.sender,
        flufLock[tokenId].background,
        1,
        ""
      );
      flufLock[tokenId].background = backgroundAssetLockIn;
    }

    if (doMusic == true) {
      _safeTransferFrom(msg.sender, address(this), musicAssetLockIn, 1, "");
      _safeTransferFrom(
        address(this),
        msg.sender,
        flufLock[tokenId].music,
        1,
        ""
      );
      flufLock[tokenId].music = musicAssetLockIn;
    }

    emit Swap(msg.sender, musicAssetLockIn, backgroundAssetLockIn, tokenId);
  }

  function getFlufHasDefault(uint256 _flufId) public view returns (bool) {
    if (flufHasDefault[_flufId]) {
      return true;
    }
    return false;
  }

  function emergencyTokenWithdraw(uint256 _asset, uint256 _amount)
    public
    onlyOwner
  {
    _safeTransferFrom(address(this), msg.sender, _asset, _amount, "");
  }

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

File 2 of 16 : 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 3 of 16 : 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 4 of 16 : 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 5 of 16 : 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 6 of 16 : 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 16 : IERC721.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev Required interface of an ERC721 compliant contract.
 */
interface IERC721 is IERC165 {
    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
     */
    event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
     */
    event ApprovalForAll(address indexed owner, address indexed operator, bool approved);

    /**
     * @dev Returns the number of tokens in ``owner``'s account.
     */
    function balanceOf(address owner) external view returns (uint256 balance);

    /**
     * @dev Returns the owner of the `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function ownerOf(uint256 tokenId) external view returns (address owner);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev Returns the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

    /**
     * @dev Approve or remove `operator` as an operator for the caller.
     * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
     *
     * Requirements:
     *
     * - The `operator` cannot be the caller.
     *
     * Emits an {ApprovalForAll} event.
     */
    function setApprovalForAll(address operator, bool _approved) external;

    /**
     * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
     *
     * See {setApprovalForAll}
     */
    function isApprovedForAll(address owner, address operator) external view returns (bool);

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes calldata data
    ) external;
}

File 8 of 16 : ERC1155Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC1155Receiver.sol";
import "../../../utils/introspection/ERC165.sol";

/**
 * @dev _Available since v3.1._
 */
abstract contract ERC1155Receiver is ERC165, IERC1155Receiver {
    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
        return interfaceId == type(IERC1155Receiver).interfaceId || super.supportsInterface(interfaceId);
    }
}

File 9 of 16 : ERC1155Holder.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./ERC1155Receiver.sol";

/**
 * @dev _Available since v3.1._
 */
contract ERC1155Holder is ERC1155Receiver {
    function onERC1155Received(
        address,
        address,
        uint256,
        uint256,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155Received.selector;
    }

    function onERC1155BatchReceived(
        address,
        address,
        uint256[] memory,
        uint256[] memory,
        bytes memory
    ) public virtual override returns (bytes4) {
        return this.onERC1155BatchReceived.selector;
    }
}

File 10 of 16 : 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 11 of 16 : 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 12 of 16 : 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 13 of 16 : 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 14 of 16 : 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 15 of 16 : 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 16 of 16 : 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());
        }
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[],"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":"address","name":"by","type":"address"},{"indexed":false,"internalType":"uint256","name":"musicAssetLockIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"backgroundAssetLockIn","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Swap","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[{"internalType":"uint256","name":"_flufId","type":"uint256"},{"internalType":"uint256","name":"_defaultBackground","type":"uint256"},{"internalType":"uint256","name":"_defaultMusic","type":"uint256"}],"name":"adminSetDefaultForFluf","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_ethSignedMessageHash","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"},{"internalType":"uint256","name":"flufId","type":"uint256"},{"internalType":"uint256","name":"_defaultBackground","type":"uint256"},{"internalType":"uint256","name":"_defaultMusic","type":"uint256"}],"name":"approveAndSetDefault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"assets","outputs":[{"internalType":"string","name":"assetType","type":"string"},{"internalType":"string","name":"assetName","type":"string"}],"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":"_asset","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"emergencyTokenWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flufAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"flufHasDefault","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"flufLock","outputs":[{"internalType":"uint256","name":"background","type":"uint256"},{"internalType":"uint256","name":"music","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"getAssetIdType","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_flufId","type":"uint256"}],"name":"getFlufHasDefault","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"getTokenURI","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"},{"internalType":"address","name":"_address","type":"address"}],"name":"isFlufOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"string","name":"_assetName","type":"string"},{"internalType":"string","name":"_assetType","type":"string"}],"name":"listNewAsset","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_ids","type":"uint256[]"},{"internalType":"string[]","name":"_assetNames","type":"string[]"},{"internalType":"string[]","name":"_assetTypes","type":"string[]"}],"name":"listNewAssetBatch","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"mintBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"_ethSignedMessageHash","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"recoverSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"}],"name":"setContractName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setFlufAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signingWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes","name":"sig","type":"bytes"}],"name":"splitSignature","outputs":[{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"}],"stateMutability":"pure","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":"tokenId","type":"uint256"},{"internalType":"uint256","name":"backgroundAssetLockIn","type":"uint256"},{"internalType":"uint256","name":"musicAssetLockIn","type":"uint256"}],"name":"swap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"updateSigningWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b506040518060600160405280602581526020016200309460259139620000378162000099565b506200004c62000046620000b2565b620000b6565b60408051808201909152601d8082527f464c554620576f726c643a205363656e657320616e6420536f756e64730000006020909201918252620000929160099162000108565b50620001eb565b8051620000ae90600290602084019062000108565b5050565b3390565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200011690620001ae565b90600052602060002090601f0160209004810192826200013a576000855562000185565b82601f106200015557805160ff191683800117855562000185565b8280016001018555821562000185579182015b828111156200018557825182559160200191906001019062000168565b506200019392915062000197565b5090565b5b8082111562000193576000815560010162000198565b600281046001821680620001c357607f821691505b60208210811415620001e557634e487b7160e01b600052602260045260246000fd5b50919050565b612e9980620001fb6000396000f3fe608060405234801561001057600080fd5b50600436106101c65760003560e01c80639c345aef116101005780639c345aef146103445780639d9892cd14610357578063a17fa4641461036a578063a20b04401461037d578063a22cb46514610390578063a7bb5803146103a3578063b914293e146103c5578063b9d4c2c6146103d8578063bc197c81146103eb578063c72cdfef1461040b578063ccfea6a314610413578063cdd366b114610426578063cf35bdd014610439578063d351cfdc1461045a578063e0df5b6f1461046d578063e985e9c514610480578063f23a6e6114610493578063f242432a146104a6578063f2fde38b146104b9576101c6565b8062fdd58e146101cb57806301ffc9a7146101f457806303aec5cb1461021457806306fdde03146102275780630b5ee0061461023c5780630e89341c146102515780631cb25a781461026457806324600fc3146102775780632eb2c2d61461027f57806332bc9331146102925780633bb3a24d146102a55780634e1273f4146102b857806358bc2944146102d85780636edc457b146102eb578063715018a6146103005780638da5cb5b1461030857806397aba7f914610310578063994be32b14610323575b600080fd5b6101de6101d9366004612108565b6104cc565b6040516101eb9190612c0c565b60405180910390f35b610207610202366004612357565b610526565b6040516101eb919061265b565b6102076102223660046121f2565b610539565b61022f610695565b6040516101eb91906126b2565b61024f61024a36600461238f565b610723565b005b61022f61025f3660046123c1565b610779565b6102076102723660046123c1565b61080d565b61024f610834565b61024f61028d366004611fc8565b6108a2565b61022f6102a03660046123c1565b610900565b61022f6102b33660046123c1565b61091d565b6102cb6102c6366004612133565b610967565b6040516101eb919061261a565b61024f6102e6366004611f51565b610a86565b6102f3610ae7565b6040516101eb919061253d565b61024f610af6565b6102f3610b41565b6102f361031e3660046122be565b610b51565b6103366103313660046123c1565b610bc0565b6040516101eb929190612c15565b6102076103523660046123d9565b610bd9565b61024f61036536600461247d565b610c8e565b6102076103783660046123c1565b610e37565b61024f61038b36600461245c565b610e4c565b61024f61039e3660046120d7565b610ea7565b6103b66103b136600461238f565b610f75565b6040516101eb93929190612666565b61024f6103d336600461247d565b610fb9565b61024f6103e63660046122f8565b611029565b6103fe6103f9366004611fc8565b61107b565b6040516101eb919061269d565b6102f361108c565b6102076104213660046123fd565b61109b565b61024f610434366004611f51565b611121565b61044c6104473660046123c1565b611182565b6040516101eb9291906126c5565b61024f610468366004612275565b6112ae565b61024f61047b36600461238f565b611308565b61020761048e366004611f90565b611353565b6103fe6104a1366004612071565b611381565b61024f6104b4366004612071565b611392565b61024f6104c7366004611f51565b6113e9565b60006001600160a01b0383166104fd5760405162461bcd60e51b81526004016104f4906127d9565b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b600061053182611457565b90505b919050565b600061054361147c565b6001600160a01b0316610554610b41565b6001600160a01b03161461057a5760405162461bcd60e51b81526004016104f490612a58565b60005b845181101561068a578381815181106105a657634e487b7160e01b600052603260045260246000fd5b6020026020010151600460008784815181106105d257634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060010190805190602001906105fe929190611d8d565b5082818151811061061f57634e487b7160e01b600052603260045260246000fd5b60200260200101516004600087848151811061064b57634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000019080519060200190610677929190611d8d565b508061068281612d1d565b91505061057d565b506001949350505050565b600980546106a290612ce2565b80601f01602080910402602001604051908101604052809291908181526020018280546106ce90612ce2565b801561071b5780601f106106f05761010080835404028352916020019161071b565b820191906000526020600020905b8154815290600101906020018083116106fe57829003601f168201915b505050505081565b61072b61147c565b6001600160a01b031661073c610b41565b6001600160a01b0316146107625760405162461bcd60e51b81526004016104f490612a58565b8051610775906009906020840190611d8d565b5050565b60606002805461078890612ce2565b80601f01602080910402602001604051908101604052809291908181526020018280546107b490612ce2565b80156108015780601f106107d657610100808354040283529160200191610801565b820191906000526020600020905b8154815290600101906020018083116107e457829003601f168201915b50505050509050919050565b60008181526006602052604081205460ff161561082c57506001610534565b506000919050565b61083c61147c565b6001600160a01b031661084d610b41565b6001600160a01b0316146108735760405162461bcd60e51b81526004016104f490612a58565b6040514790339082156108fc029083906000818181858888f19350505050158015610775573d6000803e3d6000fd5b6108aa61147c565b6001600160a01b0316856001600160a01b031614806108d057506108d08561048e61147c565b6108ec5760405162461bcd60e51b81526004016104f4906129bc565b6108f98585858585611480565b5050505050565b600081815260046020526040902080546060919061078890612ce2565b6060600061092a83611651565b9050600061093784610779565b90506000818360405160200161094e92919061250e565b60408051808303601f1901815291905295945050505050565b6060815183511461098a5760405162461bcd60e51b81526004016104f490612b08565b600083516001600160401b038111156109b357634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156109dc578160200160208202803683370190505b50905060005b8451811015610a7e57610a43858281518110610a0e57634e487b7160e01b600052603260045260246000fd5b6020026020010151858381518110610a3657634e487b7160e01b600052603260045260246000fd5b60200260200101516104cc565b828281518110610a6357634e487b7160e01b600052603260045260246000fd5b6020908102919091010152610a7781612d1d565b90506109e2565b509392505050565b610a8e61147c565b6001600160a01b0316610a9f610b41565b6001600160a01b031614610ac55760405162461bcd60e51b81526004016104f490612a58565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6008546001600160a01b031681565b610afe61147c565b6001600160a01b0316610b0f610b41565b6001600160a01b031614610b355760405162461bcd60e51b81526004016104f490612a58565b610b3f6000611773565b565b6003546001600160a01b03165b90565b600080600080610b6085610f75565b92509250925060018682858560405160008152602001604052604051610b89949392919061267f565b6020604051602081039080840390855afa158015610bab573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b6005602052600090815260409020805460019091015482565b6008546040516331a9108f60e11b815260009182916001600160a01b0390911690636352211e90610c0e908790600401612c0c565b60206040518083038186803b158015610c2657600080fd5b505afa158015610c3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5e9190611f74565b9050826001600160a01b0316816001600160a01b03161415610c84576001915050610520565b6000915050610520565b610c988333610bd9565b610cb45760405162461bcd60e51b81526004016104f490612786565b610cbd8361080d565b610cd95760405162461bcd60e51b81526004016104f490612824565b6000838152600560205260409020546001908190841415610cf957600091505b600085815260056020526040902060010154831415610d16575060005b60018215151415610d8357610d3e3330866001604051806020016040528060008152506117c5565b610d71303360056000898152602001908152602001600020600001546001604051806020016040528060008152506117c5565b60008581526005602052604090208490555b60018115151415610df357610dab3330856001604051806020016040528060008152506117c5565b610dde303360056000898152602001908152602001600020600101546001604051806020016040528060008152506117c5565b60008581526005602052604090206001018390555b7f5620e542b9ce6a03dbe5af2c6483e766af6c96439562b26a0dcd2edd7099524b33848688604051610e2894939291906125f4565b60405180910390a15050505050565b60066020526000908152604090205460ff1681565b610e5461147c565b6001600160a01b0316610e65610b41565b6001600160a01b031614610e8b5760405162461bcd60e51b81526004016104f490612a58565b61077530338484604051806020016040528060008152506117c5565b816001600160a01b0316610eb961147c565b6001600160a01b03161415610ee05760405162461bcd60e51b81526004016104f490612a8d565b8060016000610eed61147c565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155610f3161147c565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051610f69919061265b565b60405180910390a35050565b60008060008351604114610f9b5760405162461bcd60e51b81526004016104f490612ad6565b50505060208101516040820151606090920151909260009190911a90565b610fc161147c565b6001600160a01b0316610fd2610b41565b6001600160a01b031614610ff85760405162461bcd60e51b81526004016104f490612a58565b600092835260056020908152604080852093845560019384019290925560069052909120805460ff19169091179055565b6007546001600160a01b031661103f8686610b51565b6001600160a01b0316146110655760405162461bcd60e51b81526004016104f49061291f565b611070306001610ea7565b6108f9838383611908565b63bc197c8160e01b95945050505050565b6007546001600160a01b031681565b60006110a561147c565b6001600160a01b03166110b6610b41565b6001600160a01b0316146110dc5760405162461bcd60e51b81526004016104f490612a58565b6000848152600460209081526040909120845161110192600190920191860190611d8d565b506000848152600460209081526040909120835161068a92850190611d8d565b61112961147c565b6001600160a01b031661113a610b41565b6001600160a01b0316146111605760405162461bcd60e51b81526004016104f490612a58565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b60046020526000908152604090208054819061119d90612ce2565b80601f01602080910402602001604051908101604052809291908181526020018280546111c990612ce2565b80156112165780601f106111eb57610100808354040283529160200191611216565b820191906000526020600020905b8154815290600101906020018083116111f957829003601f168201915b50505050509080600101805461122b90612ce2565b80601f016020809104026020016040519081016040528092919081815260200182805461125790612ce2565b80156112a45780601f10611279576101008083540402835291602001916112a4565b820191906000526020600020905b81548152906001019060200180831161128757829003601f168201915b5050505050905082565b6112b661147c565b6001600160a01b03166112c7610b41565b6001600160a01b0316146112ed5760405162461bcd60e51b81526004016104f490612a58565b61077533838360405180602001604052806000815250611962565b61131061147c565b6001600160a01b0316611321610b41565b6001600160a01b0316146113475760405162461bcd60e51b81526004016104f490612a58565b61135081611ae3565b50565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b63f23a6e6160e01b95945050505050565b61139a61147c565b6001600160a01b0316856001600160a01b031614806113c057506113c08561048e61147c565b6113dc5760405162461bcd60e51b81526004016104f4906128a0565b6108f985858585856117c5565b6113f161147c565b6001600160a01b0316611402610b41565b6001600160a01b0316146114285760405162461bcd60e51b81526004016104f490612a58565b6001600160a01b03811661144e5760405162461bcd60e51b81526004016104f49061285a565b61135081611773565b60006001600160e01b03198216630271189760e51b1480610531575061053182611af6565b3390565b81518351146114a15760405162461bcd60e51b81526004016104f490612b51565b6001600160a01b0384166114c75760405162461bcd60e51b81526004016104f490612977565b60006114d161147c565b90506114e1818787878787611649565b60005b84518110156115e357600085828151811061150f57634e487b7160e01b600052603260045260246000fd5b60200260200101519050600085838151811061153b57634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815280835260408082206001600160a01b038e16835290935291909120549091508181101561158b5760405162461bcd60e51b81526004016104f490612a0e565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906115c8908490612c6f565b92505081905550505050806115dc90612d1d565b90506114e4565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161163392919061262d565b60405180910390a4611649818787878787611b36565b505050505050565b60608161167657506040805180820190915260018152600360fc1b6020820152610534565b8160005b81156116a0578061168a81612d1d565b91506116999050600a83612c87565b915061167a565b6000816001600160401b038111156116c857634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156116f2576020820181803683370190505b5090505b841561176b57611707600183612c9b565b9150611714600a86612d38565b61171f906030612c6f565b60f81b81838151811061174257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350611764600a86612c87565b94506116f6565b949350505050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0384166117eb5760405162461bcd60e51b81526004016104f490612977565b60006117f561147c565b905061181581878761180688611c44565b61180f88611c44565b87611649565b6000848152602081815260408083206001600160a01b038a168452909152902054838110156118565760405162461bcd60e51b81526004016104f490612a0e565b6000858152602081815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290611893908490612c6f565b92505081905550856001600160a01b0316876001600160a01b0316836001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6288886040516118e9929190612c15565b60405180910390a46118ff828888888888611c9d565b50505050505050565b60008381526006602052604090205460ff1615156001141561193c5760405162461bcd60e51b81526004016104f4906128e9565b6119468333610bd9565b610ff85760405162461bcd60e51b81526004016104f490612bda565b6001600160a01b0384166119885760405162461bcd60e51b81526004016104f490612b99565b81518351146119a95760405162461bcd60e51b81526004016104f490612b51565b60006119b361147c565b90506119c481600087878787611649565b60005b8451811015611a7b578381815181106119f057634e487b7160e01b600052603260045260246000fd5b6020026020010151600080878481518110611a1b57634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254611a639190612c6f565b90915550819050611a7381612d1d565b9150506119c7565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611acc92919061262d565b60405180910390a46108f981600087878787611b36565b8051610775906002906020840190611d8d565b60006001600160e01b03198216636cdb3d1360e11b1480611b2757506001600160e01b031982166303a24d0760e21b145b80610531575061053182611d6e565b611b48846001600160a01b0316611d87565b156116495760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611b819089908990889088908890600401612551565b602060405180830381600087803b158015611b9b57600080fd5b505af1925050508015611bcb575060408051601f3d908101601f19168201909252611bc891810190612373565b60015b611c1457611bd7612d94565b80611be25750611bfc565b8060405162461bcd60e51b81526004016104f491906126b2565b60405162461bcd60e51b81526004016104f4906126ea565b6001600160e01b0319811663bc197c8160e01b146118ff5760405162461bcd60e51b81526004016104f49061273e565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110611c8c57634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b611caf846001600160a01b0316611d87565b156116495760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611ce890899089908890889088906004016125af565b602060405180830381600087803b158015611d0257600080fd5b505af1925050508015611d32575060408051601f3d908101601f19168201909252611d2f91810190612373565b60015b611d3e57611bd7612d94565b6001600160e01b0319811663f23a6e6160e01b146118ff5760405162461bcd60e51b81526004016104f49061273e565b6001600160e01b031981166301ffc9a760e01b14919050565b3b151590565b828054611d9990612ce2565b90600052602060002090601f016020900481019282611dbb5760008555611e01565b82601f10611dd457805160ff1916838001178555611e01565b82800160010185558215611e01579182015b82811115611e01578251825591602001919060010190611de6565b50611e0d929150611e11565b5090565b5b80821115611e0d5760008155600101611e12565b600082601f830112611e36578081fd5b81356020611e4b611e4683612c4c565b612c23565b82815281810190858301855b85811015611e8057611e6e898684358b0101611ee7565b84529284019290840190600101611e57565b5090979650505050505050565b600082601f830112611e9d578081fd5b81356020611ead611e4683612c4c565b8281528181019085830183850287018401881015611ec9578586fd5b855b85811015611e8057813584529284019290840190600101611ecb565b600082601f830112611ef7578081fd5b81356001600160401b03811115611f1057611f10612d78565b611f23601f8201601f1916602001612c23565b818152846020838601011115611f37578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215611f62578081fd5b8135611f6d81612e38565b9392505050565b600060208284031215611f85578081fd5b8151611f6d81612e38565b60008060408385031215611fa2578081fd5b8235611fad81612e38565b91506020830135611fbd81612e38565b809150509250929050565b600080600080600060a08688031215611fdf578081fd5b8535611fea81612e38565b94506020860135611ffa81612e38565b935060408601356001600160401b0380821115612015578283fd5b61202189838a01611e8d565b94506060880135915080821115612036578283fd5b61204289838a01611e8d565b93506080880135915080821115612057578283fd5b5061206488828901611ee7565b9150509295509295909350565b600080600080600060a08688031215612088578081fd5b853561209381612e38565b945060208601356120a381612e38565b9350604086013592506060860135915060808601356001600160401b038111156120cb578182fd5b61206488828901611ee7565b600080604083850312156120e9578182fd5b82356120f481612e38565b915060208301358015158114611fbd578182fd5b6000806040838503121561211a578182fd5b823561212581612e38565b946020939093013593505050565b60008060408385031215612145578182fd5b82356001600160401b038082111561215b578384fd5b818501915085601f83011261216e578384fd5b8135602061217e611e4683612c4c565b82815281810190858301838502870184018b101561219a578889fd5b8896505b848710156121c55780356121b181612e38565b83526001969096019591830191830161219e565b50965050860135925050808211156121db578283fd5b506121e885828601611e8d565b9150509250929050565b600080600060608486031215612206578081fd5b83356001600160401b038082111561221c578283fd5b61222887838801611e8d565b9450602086013591508082111561223d578283fd5b61224987838801611e26565b9350604086013591508082111561225e578283fd5b5061226b86828701611e26565b9150509250925092565b60008060408385031215612287578182fd5b82356001600160401b038082111561229d578384fd5b6122a986838701611e8d565b935060208501359150808211156121db578283fd5b600080604083850312156122d0578182fd5b8235915060208301356001600160401b038111156122ec578182fd5b6121e885828601611ee7565b600080600080600060a0868803121561230f578283fd5b8535945060208601356001600160401b0381111561232b578384fd5b61233788828901611ee7565b959895975050505060408401359360608101359360809091013592509050565b600060208284031215612368578081fd5b8135611f6d81612e4d565b600060208284031215612384578081fd5b8151611f6d81612e4d565b6000602082840312156123a0578081fd5b81356001600160401b038111156123b5578182fd5b61176b84828501611ee7565b6000602082840312156123d2578081fd5b5035919050565b600080604083850312156123eb578182fd5b823591506020830135611fbd81612e38565b600080600060608486031215612411578081fd5b8335925060208401356001600160401b038082111561242e578283fd5b61243a87838801611ee7565b9350604086013591508082111561244f578283fd5b5061226b86828701611ee7565b6000806040838503121561246e578182fd5b50508035926020909101359150565b600080600060608486031215612491578081fd5b505081359360208301359350604090920135919050565b6000815180845260208085019450808401835b838110156124d7578151875295820195908201906001016124bb565b509495945050505050565b600081518084526124fa816020860160208601612cb2565b601f01601f19169290920160200192915050565b60008351612520818460208801612cb2565b835190830190612534818360208801612cb2565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0386811682528516602082015260a06040820181905260009061257d908301866124a8565b828103606084015261258f81866124a8565b905082810360808401526125a381856124e2565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906125e9908301846124e2565b979650505050505050565b6001600160a01b0394909416845260208401929092526040830152606082015260800190565b600060208252611f6d60208301846124a8565b60006040825261264060408301856124a8565b828103602084015261265281856124a8565b95945050505050565b901515815260200190565b928352602083019190915260ff16604082015260600190565b93845260ff9290921660208401526040830152606082015260800190565b6001600160e01b031991909116815260200190565b600060208252611f6d60208301846124e2565b6000604082526126d860408301856124e2565b828103602084015261265281856124e2565b60208082526034908201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356040820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606082015260800190565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526033908201527f5641554c542048414c543a20596f752063616e2774206d6573732077697468206040820152726f746865722070656f706c657320666c75667360681b606082015260800190565b6020808252602b908201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60408201526a65726f206164647265737360a81b606082015260800190565b6020808252601c908201527b119b1d5988191959985d5b1d081dd85cc81b9bdd081cd95d081e595d60221b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b6020808252601c908201527b119b1d5988191959985d5b1d081dd85cc8185b1c9958591e481cd95d60221b604082015260600190565b60208082526038908201527f5641554c54204c4f434b3a204d657373616765206d7573742062652073656e7460408201527710333937b69030baba3437b934bd32b21039b4b3b732b91760411b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526032908201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206040820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604082015268103337b91039b2b63360b91b606082015260800190565b6020808252601890820152770d2dcecc2d8d2c840e6d2cedcc2e8eae4ca40d8cadccee8d60431b604082015260600190565b60208082526029908201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604082015268040dad2e6dac2e8c6d60bb1b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6020808252601890820152772cb7ba903237903737ba1037bbb7103a3434b99023262aa360411b604082015260600190565b90815260200190565b918252602082015260400190565b6040518181016001600160401b0381118282101715612c4457612c44612d78565b604052919050565b60006001600160401b03821115612c6557612c65612d78565b5060209081020190565b60008219821115612c8257612c82612d4c565b500190565b600082612c9657612c96612d62565b500490565b600082821015612cad57612cad612d4c565b500390565b60005b83811015612ccd578181015183820152602001612cb5565b83811115612cdc576000848401525b50505050565b600281046001821680612cf657607f821691505b60208210811415612d1757634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612d3157612d31612d4c565b5060010190565b600082612d4757612d47612d62565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60e01c90565b600060443d1015612da457610b4e565b600481823e6308c379a0612db88251612d8e565b14612dc257610b4e565b6040513d600319016004823e80513d6001600160401b038160248401118184111715612df15750505050610b4e565b82840192508251915080821115612e0b5750505050610b4e565b503d83016020828401011115612e2357505050610b4e565b601f01601f1916810160200160405291505090565b6001600160a01b038116811461135057600080fd5b6001600160e01b03198116811461135057600080fdfea26469706673582212206316da5d1ec84581ccb5879155411bdbd5f0f0edc8e39ad9c3c68cd0f0660eaa64736f6c6343000800003368747470733a2f2f657263313135352d6170692e666c75662e776f726c642f746f6b656e2f

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101c65760003560e01c80639c345aef116101005780639c345aef146103445780639d9892cd14610357578063a17fa4641461036a578063a20b04401461037d578063a22cb46514610390578063a7bb5803146103a3578063b914293e146103c5578063b9d4c2c6146103d8578063bc197c81146103eb578063c72cdfef1461040b578063ccfea6a314610413578063cdd366b114610426578063cf35bdd014610439578063d351cfdc1461045a578063e0df5b6f1461046d578063e985e9c514610480578063f23a6e6114610493578063f242432a146104a6578063f2fde38b146104b9576101c6565b8062fdd58e146101cb57806301ffc9a7146101f457806303aec5cb1461021457806306fdde03146102275780630b5ee0061461023c5780630e89341c146102515780631cb25a781461026457806324600fc3146102775780632eb2c2d61461027f57806332bc9331146102925780633bb3a24d146102a55780634e1273f4146102b857806358bc2944146102d85780636edc457b146102eb578063715018a6146103005780638da5cb5b1461030857806397aba7f914610310578063994be32b14610323575b600080fd5b6101de6101d9366004612108565b6104cc565b6040516101eb9190612c0c565b60405180910390f35b610207610202366004612357565b610526565b6040516101eb919061265b565b6102076102223660046121f2565b610539565b61022f610695565b6040516101eb91906126b2565b61024f61024a36600461238f565b610723565b005b61022f61025f3660046123c1565b610779565b6102076102723660046123c1565b61080d565b61024f610834565b61024f61028d366004611fc8565b6108a2565b61022f6102a03660046123c1565b610900565b61022f6102b33660046123c1565b61091d565b6102cb6102c6366004612133565b610967565b6040516101eb919061261a565b61024f6102e6366004611f51565b610a86565b6102f3610ae7565b6040516101eb919061253d565b61024f610af6565b6102f3610b41565b6102f361031e3660046122be565b610b51565b6103366103313660046123c1565b610bc0565b6040516101eb929190612c15565b6102076103523660046123d9565b610bd9565b61024f61036536600461247d565b610c8e565b6102076103783660046123c1565b610e37565b61024f61038b36600461245c565b610e4c565b61024f61039e3660046120d7565b610ea7565b6103b66103b136600461238f565b610f75565b6040516101eb93929190612666565b61024f6103d336600461247d565b610fb9565b61024f6103e63660046122f8565b611029565b6103fe6103f9366004611fc8565b61107b565b6040516101eb919061269d565b6102f361108c565b6102076104213660046123fd565b61109b565b61024f610434366004611f51565b611121565b61044c6104473660046123c1565b611182565b6040516101eb9291906126c5565b61024f610468366004612275565b6112ae565b61024f61047b36600461238f565b611308565b61020761048e366004611f90565b611353565b6103fe6104a1366004612071565b611381565b61024f6104b4366004612071565b611392565b61024f6104c7366004611f51565b6113e9565b60006001600160a01b0383166104fd5760405162461bcd60e51b81526004016104f4906127d9565b60405180910390fd5b506000818152602081815260408083206001600160a01b03861684529091529020545b92915050565b600061053182611457565b90505b919050565b600061054361147c565b6001600160a01b0316610554610b41565b6001600160a01b03161461057a5760405162461bcd60e51b81526004016104f490612a58565b60005b845181101561068a578381815181106105a657634e487b7160e01b600052603260045260246000fd5b6020026020010151600460008784815181106105d257634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060010190805190602001906105fe929190611d8d565b5082818151811061061f57634e487b7160e01b600052603260045260246000fd5b60200260200101516004600087848151811061064b57634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000019080519060200190610677929190611d8d565b508061068281612d1d565b91505061057d565b506001949350505050565b600980546106a290612ce2565b80601f01602080910402602001604051908101604052809291908181526020018280546106ce90612ce2565b801561071b5780601f106106f05761010080835404028352916020019161071b565b820191906000526020600020905b8154815290600101906020018083116106fe57829003601f168201915b505050505081565b61072b61147c565b6001600160a01b031661073c610b41565b6001600160a01b0316146107625760405162461bcd60e51b81526004016104f490612a58565b8051610775906009906020840190611d8d565b5050565b60606002805461078890612ce2565b80601f01602080910402602001604051908101604052809291908181526020018280546107b490612ce2565b80156108015780601f106107d657610100808354040283529160200191610801565b820191906000526020600020905b8154815290600101906020018083116107e457829003601f168201915b50505050509050919050565b60008181526006602052604081205460ff161561082c57506001610534565b506000919050565b61083c61147c565b6001600160a01b031661084d610b41565b6001600160a01b0316146108735760405162461bcd60e51b81526004016104f490612a58565b6040514790339082156108fc029083906000818181858888f19350505050158015610775573d6000803e3d6000fd5b6108aa61147c565b6001600160a01b0316856001600160a01b031614806108d057506108d08561048e61147c565b6108ec5760405162461bcd60e51b81526004016104f4906129bc565b6108f98585858585611480565b5050505050565b600081815260046020526040902080546060919061078890612ce2565b6060600061092a83611651565b9050600061093784610779565b90506000818360405160200161094e92919061250e565b60408051808303601f1901815291905295945050505050565b6060815183511461098a5760405162461bcd60e51b81526004016104f490612b08565b600083516001600160401b038111156109b357634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156109dc578160200160208202803683370190505b50905060005b8451811015610a7e57610a43858281518110610a0e57634e487b7160e01b600052603260045260246000fd5b6020026020010151858381518110610a3657634e487b7160e01b600052603260045260246000fd5b60200260200101516104cc565b828281518110610a6357634e487b7160e01b600052603260045260246000fd5b6020908102919091010152610a7781612d1d565b90506109e2565b509392505050565b610a8e61147c565b6001600160a01b0316610a9f610b41565b6001600160a01b031614610ac55760405162461bcd60e51b81526004016104f490612a58565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b6008546001600160a01b031681565b610afe61147c565b6001600160a01b0316610b0f610b41565b6001600160a01b031614610b355760405162461bcd60e51b81526004016104f490612a58565b610b3f6000611773565b565b6003546001600160a01b03165b90565b600080600080610b6085610f75565b92509250925060018682858560405160008152602001604052604051610b89949392919061267f565b6020604051602081039080840390855afa158015610bab573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b6005602052600090815260409020805460019091015482565b6008546040516331a9108f60e11b815260009182916001600160a01b0390911690636352211e90610c0e908790600401612c0c565b60206040518083038186803b158015610c2657600080fd5b505afa158015610c3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c5e9190611f74565b9050826001600160a01b0316816001600160a01b03161415610c84576001915050610520565b6000915050610520565b610c988333610bd9565b610cb45760405162461bcd60e51b81526004016104f490612786565b610cbd8361080d565b610cd95760405162461bcd60e51b81526004016104f490612824565b6000838152600560205260409020546001908190841415610cf957600091505b600085815260056020526040902060010154831415610d16575060005b60018215151415610d8357610d3e3330866001604051806020016040528060008152506117c5565b610d71303360056000898152602001908152602001600020600001546001604051806020016040528060008152506117c5565b60008581526005602052604090208490555b60018115151415610df357610dab3330856001604051806020016040528060008152506117c5565b610dde303360056000898152602001908152602001600020600101546001604051806020016040528060008152506117c5565b60008581526005602052604090206001018390555b7f5620e542b9ce6a03dbe5af2c6483e766af6c96439562b26a0dcd2edd7099524b33848688604051610e2894939291906125f4565b60405180910390a15050505050565b60066020526000908152604090205460ff1681565b610e5461147c565b6001600160a01b0316610e65610b41565b6001600160a01b031614610e8b5760405162461bcd60e51b81526004016104f490612a58565b61077530338484604051806020016040528060008152506117c5565b816001600160a01b0316610eb961147c565b6001600160a01b03161415610ee05760405162461bcd60e51b81526004016104f490612a8d565b8060016000610eed61147c565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff191692151592909217909155610f3161147c565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051610f69919061265b565b60405180910390a35050565b60008060008351604114610f9b5760405162461bcd60e51b81526004016104f490612ad6565b50505060208101516040820151606090920151909260009190911a90565b610fc161147c565b6001600160a01b0316610fd2610b41565b6001600160a01b031614610ff85760405162461bcd60e51b81526004016104f490612a58565b600092835260056020908152604080852093845560019384019290925560069052909120805460ff19169091179055565b6007546001600160a01b031661103f8686610b51565b6001600160a01b0316146110655760405162461bcd60e51b81526004016104f49061291f565b611070306001610ea7565b6108f9838383611908565b63bc197c8160e01b95945050505050565b6007546001600160a01b031681565b60006110a561147c565b6001600160a01b03166110b6610b41565b6001600160a01b0316146110dc5760405162461bcd60e51b81526004016104f490612a58565b6000848152600460209081526040909120845161110192600190920191860190611d8d565b506000848152600460209081526040909120835161068a92850190611d8d565b61112961147c565b6001600160a01b031661113a610b41565b6001600160a01b0316146111605760405162461bcd60e51b81526004016104f490612a58565b600880546001600160a01b0319166001600160a01b0392909216919091179055565b60046020526000908152604090208054819061119d90612ce2565b80601f01602080910402602001604051908101604052809291908181526020018280546111c990612ce2565b80156112165780601f106111eb57610100808354040283529160200191611216565b820191906000526020600020905b8154815290600101906020018083116111f957829003601f168201915b50505050509080600101805461122b90612ce2565b80601f016020809104026020016040519081016040528092919081815260200182805461125790612ce2565b80156112a45780601f10611279576101008083540402835291602001916112a4565b820191906000526020600020905b81548152906001019060200180831161128757829003601f168201915b5050505050905082565b6112b661147c565b6001600160a01b03166112c7610b41565b6001600160a01b0316146112ed5760405162461bcd60e51b81526004016104f490612a58565b61077533838360405180602001604052806000815250611962565b61131061147c565b6001600160a01b0316611321610b41565b6001600160a01b0316146113475760405162461bcd60e51b81526004016104f490612a58565b61135081611ae3565b50565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205460ff1690565b63f23a6e6160e01b95945050505050565b61139a61147c565b6001600160a01b0316856001600160a01b031614806113c057506113c08561048e61147c565b6113dc5760405162461bcd60e51b81526004016104f4906128a0565b6108f985858585856117c5565b6113f161147c565b6001600160a01b0316611402610b41565b6001600160a01b0316146114285760405162461bcd60e51b81526004016104f490612a58565b6001600160a01b03811661144e5760405162461bcd60e51b81526004016104f49061285a565b61135081611773565b60006001600160e01b03198216630271189760e51b1480610531575061053182611af6565b3390565b81518351146114a15760405162461bcd60e51b81526004016104f490612b51565b6001600160a01b0384166114c75760405162461bcd60e51b81526004016104f490612977565b60006114d161147c565b90506114e1818787878787611649565b60005b84518110156115e357600085828151811061150f57634e487b7160e01b600052603260045260246000fd5b60200260200101519050600085838151811061153b57634e487b7160e01b600052603260045260246000fd5b602090810291909101810151600084815280835260408082206001600160a01b038e16835290935291909120549091508181101561158b5760405162461bcd60e51b81526004016104f490612a0e565b6000838152602081815260408083206001600160a01b038e8116855292528083208585039055908b168252812080548492906115c8908490612c6f565b92505081905550505050806115dc90612d1d565b90506114e4565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161163392919061262d565b60405180910390a4611649818787878787611b36565b505050505050565b60608161167657506040805180820190915260018152600360fc1b6020820152610534565b8160005b81156116a0578061168a81612d1d565b91506116999050600a83612c87565b915061167a565b6000816001600160401b038111156116c857634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156116f2576020820181803683370190505b5090505b841561176b57611707600183612c9b565b9150611714600a86612d38565b61171f906030612c6f565b60f81b81838151811061174257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350611764600a86612c87565b94506116f6565b949350505050565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0384166117eb5760405162461bcd60e51b81526004016104f490612977565b60006117f561147c565b905061181581878761180688611c44565b61180f88611c44565b87611649565b6000848152602081815260408083206001600160a01b038a168452909152902054838110156118565760405162461bcd60e51b81526004016104f490612a0e565b6000858152602081815260408083206001600160a01b038b8116855292528083208785039055908816825281208054869290611893908490612c6f565b92505081905550856001600160a01b0316876001600160a01b0316836001600160a01b03167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6288886040516118e9929190612c15565b60405180910390a46118ff828888888888611c9d565b50505050505050565b60008381526006602052604090205460ff1615156001141561193c5760405162461bcd60e51b81526004016104f4906128e9565b6119468333610bd9565b610ff85760405162461bcd60e51b81526004016104f490612bda565b6001600160a01b0384166119885760405162461bcd60e51b81526004016104f490612b99565b81518351146119a95760405162461bcd60e51b81526004016104f490612b51565b60006119b361147c565b90506119c481600087878787611649565b60005b8451811015611a7b578381815181106119f057634e487b7160e01b600052603260045260246000fd5b6020026020010151600080878481518110611a1b57634e487b7160e01b600052603260045260246000fd5b602002602001015181526020019081526020016000206000886001600160a01b03166001600160a01b031681526020019081526020016000206000828254611a639190612c6f565b90915550819050611a7381612d1d565b9150506119c7565b50846001600160a01b031660006001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611acc92919061262d565b60405180910390a46108f981600087878787611b36565b8051610775906002906020840190611d8d565b60006001600160e01b03198216636cdb3d1360e11b1480611b2757506001600160e01b031982166303a24d0760e21b145b80610531575061053182611d6e565b611b48846001600160a01b0316611d87565b156116495760405163bc197c8160e01b81526001600160a01b0385169063bc197c8190611b819089908990889088908890600401612551565b602060405180830381600087803b158015611b9b57600080fd5b505af1925050508015611bcb575060408051601f3d908101601f19168201909252611bc891810190612373565b60015b611c1457611bd7612d94565b80611be25750611bfc565b8060405162461bcd60e51b81526004016104f491906126b2565b60405162461bcd60e51b81526004016104f4906126ea565b6001600160e01b0319811663bc197c8160e01b146118ff5760405162461bcd60e51b81526004016104f49061273e565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110611c8c57634e487b7160e01b600052603260045260246000fd5b602090810291909101015292915050565b611caf846001600160a01b0316611d87565b156116495760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e6190611ce890899089908890889088906004016125af565b602060405180830381600087803b158015611d0257600080fd5b505af1925050508015611d32575060408051601f3d908101601f19168201909252611d2f91810190612373565b60015b611d3e57611bd7612d94565b6001600160e01b0319811663f23a6e6160e01b146118ff5760405162461bcd60e51b81526004016104f49061273e565b6001600160e01b031981166301ffc9a760e01b14919050565b3b151590565b828054611d9990612ce2565b90600052602060002090601f016020900481019282611dbb5760008555611e01565b82601f10611dd457805160ff1916838001178555611e01565b82800160010185558215611e01579182015b82811115611e01578251825591602001919060010190611de6565b50611e0d929150611e11565b5090565b5b80821115611e0d5760008155600101611e12565b600082601f830112611e36578081fd5b81356020611e4b611e4683612c4c565b612c23565b82815281810190858301855b85811015611e8057611e6e898684358b0101611ee7565b84529284019290840190600101611e57565b5090979650505050505050565b600082601f830112611e9d578081fd5b81356020611ead611e4683612c4c565b8281528181019085830183850287018401881015611ec9578586fd5b855b85811015611e8057813584529284019290840190600101611ecb565b600082601f830112611ef7578081fd5b81356001600160401b03811115611f1057611f10612d78565b611f23601f8201601f1916602001612c23565b818152846020838601011115611f37578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215611f62578081fd5b8135611f6d81612e38565b9392505050565b600060208284031215611f85578081fd5b8151611f6d81612e38565b60008060408385031215611fa2578081fd5b8235611fad81612e38565b91506020830135611fbd81612e38565b809150509250929050565b600080600080600060a08688031215611fdf578081fd5b8535611fea81612e38565b94506020860135611ffa81612e38565b935060408601356001600160401b0380821115612015578283fd5b61202189838a01611e8d565b94506060880135915080821115612036578283fd5b61204289838a01611e8d565b93506080880135915080821115612057578283fd5b5061206488828901611ee7565b9150509295509295909350565b600080600080600060a08688031215612088578081fd5b853561209381612e38565b945060208601356120a381612e38565b9350604086013592506060860135915060808601356001600160401b038111156120cb578182fd5b61206488828901611ee7565b600080604083850312156120e9578182fd5b82356120f481612e38565b915060208301358015158114611fbd578182fd5b6000806040838503121561211a578182fd5b823561212581612e38565b946020939093013593505050565b60008060408385031215612145578182fd5b82356001600160401b038082111561215b578384fd5b818501915085601f83011261216e578384fd5b8135602061217e611e4683612c4c565b82815281810190858301838502870184018b101561219a578889fd5b8896505b848710156121c55780356121b181612e38565b83526001969096019591830191830161219e565b50965050860135925050808211156121db578283fd5b506121e885828601611e8d565b9150509250929050565b600080600060608486031215612206578081fd5b83356001600160401b038082111561221c578283fd5b61222887838801611e8d565b9450602086013591508082111561223d578283fd5b61224987838801611e26565b9350604086013591508082111561225e578283fd5b5061226b86828701611e26565b9150509250925092565b60008060408385031215612287578182fd5b82356001600160401b038082111561229d578384fd5b6122a986838701611e8d565b935060208501359150808211156121db578283fd5b600080604083850312156122d0578182fd5b8235915060208301356001600160401b038111156122ec578182fd5b6121e885828601611ee7565b600080600080600060a0868803121561230f578283fd5b8535945060208601356001600160401b0381111561232b578384fd5b61233788828901611ee7565b959895975050505060408401359360608101359360809091013592509050565b600060208284031215612368578081fd5b8135611f6d81612e4d565b600060208284031215612384578081fd5b8151611f6d81612e4d565b6000602082840312156123a0578081fd5b81356001600160401b038111156123b5578182fd5b61176b84828501611ee7565b6000602082840312156123d2578081fd5b5035919050565b600080604083850312156123eb578182fd5b823591506020830135611fbd81612e38565b600080600060608486031215612411578081fd5b8335925060208401356001600160401b038082111561242e578283fd5b61243a87838801611ee7565b9350604086013591508082111561244f578283fd5b5061226b86828701611ee7565b6000806040838503121561246e578182fd5b50508035926020909101359150565b600080600060608486031215612491578081fd5b505081359360208301359350604090920135919050565b6000815180845260208085019450808401835b838110156124d7578151875295820195908201906001016124bb565b509495945050505050565b600081518084526124fa816020860160208601612cb2565b601f01601f19169290920160200192915050565b60008351612520818460208801612cb2565b835190830190612534818360208801612cb2565b01949350505050565b6001600160a01b0391909116815260200190565b6001600160a01b0386811682528516602082015260a06040820181905260009061257d908301866124a8565b828103606084015261258f81866124a8565b905082810360808401526125a381856124e2565b98975050505050505050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190526000906125e9908301846124e2565b979650505050505050565b6001600160a01b0394909416845260208401929092526040830152606082015260800190565b600060208252611f6d60208301846124a8565b60006040825261264060408301856124a8565b828103602084015261265281856124a8565b95945050505050565b901515815260200190565b928352602083019190915260ff16604082015260600190565b93845260ff9290921660208401526040830152606082015260800190565b6001600160e01b031991909116815260200190565b600060208252611f6d60208301846124e2565b6000604082526126d860408301856124e2565b828103602084015261265281856124e2565b60208082526034908201527f455243313135353a207472616e7366657220746f206e6f6e20455243313135356040820152732932b1b2b4bb32b91034b6b83632b6b2b73a32b960611b606082015260800190565b60208082526028908201527f455243313135353a204552433131353552656365697665722072656a656374656040820152676420746f6b656e7360c01b606082015260800190565b60208082526033908201527f5641554c542048414c543a20596f752063616e2774206d6573732077697468206040820152726f746865722070656f706c657320666c75667360681b606082015260800190565b6020808252602b908201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60408201526a65726f206164647265737360a81b606082015260800190565b6020808252601c908201527b119b1d5988191959985d5b1d081dd85cc81b9bdd081cd95d081e595d60221b604082015260600190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b60208082526029908201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260408201526808185c1c1c9bdd995960ba1b606082015260800190565b6020808252601c908201527b119b1d5988191959985d5b1d081dd85cc8185b1c9958591e481cd95d60221b604082015260600190565b60208082526038908201527f5641554c54204c4f434b3a204d657373616765206d7573742062652073656e7460408201527710333937b69030baba3437b934bd32b21039b4b3b732b91760411b606082015260800190565b60208082526025908201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604082015264647265737360d81b606082015260800190565b60208082526032908201527f455243313135353a207472616e736665722063616c6c6572206973206e6f74206040820152711bdddb995c881b9bdc88185c1c1c9bdd995960721b606082015260800190565b6020808252602a908201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60408201526939103a3930b739b332b960b11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f455243313135353a2073657474696e6720617070726f76616c20737461747573604082015268103337b91039b2b63360b91b606082015260800190565b6020808252601890820152770d2dcecc2d8d2c840e6d2cedcc2e8eae4ca40d8cadccee8d60431b604082015260600190565b60208082526029908201527f455243313135353a206163636f756e747320616e6420696473206c656e677468604082015268040dad2e6dac2e8c6d60bb1b606082015260800190565b60208082526028908201527f455243313135353a2069647320616e6420616d6f756e7473206c656e677468206040820152670dad2e6dac2e8c6d60c31b606082015260800190565b60208082526021908201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736040820152607360f81b606082015260800190565b6020808252601890820152772cb7ba903237903737ba1037bbb7103a3434b99023262aa360411b604082015260600190565b90815260200190565b918252602082015260400190565b6040518181016001600160401b0381118282101715612c4457612c44612d78565b604052919050565b60006001600160401b03821115612c6557612c65612d78565b5060209081020190565b60008219821115612c8257612c82612d4c565b500190565b600082612c9657612c96612d62565b500490565b600082821015612cad57612cad612d4c565b500390565b60005b83811015612ccd578181015183820152602001612cb5565b83811115612cdc576000848401525b50505050565b600281046001821680612cf657607f821691505b60208210811415612d1757634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612d3157612d31612d4c565b5060010190565b600082612d4757612d47612d62565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b60e01c90565b600060443d1015612da457610b4e565b600481823e6308c379a0612db88251612d8e565b14612dc257610b4e565b6040513d600319016004823e80513d6001600160401b038160248401118184111715612df15750505050610b4e565b82840192508251915080821115612e0b5750505050610b4e565b503d83016020828401011115612e2357505050610b4e565b601f01601f1916810160200160405291505090565b6001600160a01b038116811461135057600080fd5b6001600160e01b03198116811461135057600080fdfea26469706673582212206316da5d1ec84581ccb5879155411bdbd5f0f0edc8e39ad9c3c68cd0f0660eaa64736f6c63430008000033

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.