ETH Price: $2,988.98 (+1.27%)
Gas: 33 Gwei

Contract

0xafe4126da89c03c4fB63A82A863083A7b675a936
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Set Approval For...161569372022-12-10 21:17:11440 days 23 hrs ago1670707031IN
0xafe412...b675a936
0 ETH0.0006327813.7148143
Set Approval For...161569362022-12-10 21:16:59440 days 23 hrs ago1670707019IN
0xafe412...b675a936
0 ETH0.0006373313.8386546
Set Approval For...160512532022-11-26 2:43:47455 days 18 hrs ago1669430627IN
0xafe412...b675a936
0 ETH0.0005503511.94999711
Set Approval For...159878852022-11-17 6:14:47464 days 14 hrs ago1668665687IN
0xafe412...b675a936
0 ETH0.0006194713.45084956
Set Approval For...158174582022-10-24 10:46:23488 days 10 hrs ago1666608383IN
0xafe412...b675a936
0 ETH0.0007206815.64840245
Mint With Asset158076952022-10-23 2:02:47489 days 18 hrs ago1666490567IN
0xafe412...b675a936
0 ETH0.0220129512.91088614
Mint With Asset158068512022-10-22 23:12:47489 days 21 hrs ago1666480367IN
0xafe412...b675a936
0 ETH0.018191615.96983541
Mint With Asset158068452022-10-22 23:11:35489 days 21 hrs ago1666480295IN
0xafe412...b675a936
0 ETH0.0365513514.05259368
Mint With Asset158066552022-10-22 22:33:35489 days 22 hrs ago1666478015IN
0xafe412...b675a936
0 ETH0.0387297814.645101
Mint With Asset158065312022-10-22 22:08:23489 days 22 hrs ago1666476503IN
0xafe412...b675a936
0 ETH0.0163307915.79961491
Mint With Asset158062562022-10-22 21:12:59489 days 23 hrs ago1666473179IN
0xafe412...b675a936
0 ETH0.0313411816.92679867
Mint With Asset158061802022-10-22 20:57:23490 days ago1666472243IN
0xafe412...b675a936
0 ETH0.0441242621.20598181
Mint With Asset158056772022-10-22 19:16:11490 days 1 hr ago1666466171IN
0xafe412...b675a936
0 ETH0.0337568620.75049442
Mint With Asset158055122022-10-22 18:42:59490 days 2 hrs ago1666464179IN
0xafe412...b675a936
0 ETH0.0141050617.65852282
Mint With Asset158051722022-10-22 17:34:47490 days 3 hrs ago1666460087IN
0xafe412...b675a936
0 ETH0.0184041430.89291731
Set Approval For...157082072022-10-09 4:39:47503 days 16 hrs ago1665290387IN
0xafe412...b675a936
0 ETH0.0012446927.02622301
Set Approval For...156091192022-09-25 8:13:47517 days 12 hrs ago1664093627IN
0xafe412...b675a936
0 ETH0.000264135.73522068
Safe Transfer Fr...156017402022-09-24 7:31:23518 days 13 hrs ago1664004683IN
0xafe412...b675a936
0 ETH0.00049465.71347118
Set Approval For...155369842022-09-15 5:02:39527 days 15 hrs ago1663218159IN
0xafe412...b675a936
0 ETH0.000175147.25461254
Set Approval For...155267202022-09-13 11:38:20529 days 9 hrs ago1663069100IN
0xafe412...b675a936
0 ETH0.000230449.54487921
Set Approval For...154936772022-09-08 1:26:03534 days 19 hrs ago1662600363IN
0xafe412...b675a936
0 ETH0.0012976428.17603619
Mint With Asset154246892022-08-28 0:22:46545 days 20 hrs ago1661646166IN
0xafe412...b675a936
0 ETH0.017870275.16279124
Set Approval For...154239402022-08-27 21:25:38545 days 23 hrs ago1661635538IN
0xafe412...b675a936
0 ETH0.000459289.97262641
Mint With Asset154219522022-08-27 13:58:41546 days 6 hrs ago1661608721IN
0xafe412...b675a936
0 ETH0.0184769413.21028048
Set Approval For...154151432022-08-26 11:42:10547 days 9 hrs ago1661514130IN
0xafe412...b675a936
0 ETH0.00044669.69716423
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
EmojiFlagToken

Compiler Version
v0.8.6+commit.11564f7e

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 18 : EmojiFlagToken.sol
// SPDX-License-Identifier: MIT

/*
 * Kamon NFT (ERC721). The mint function takes IAssetStore.AssetInfo as a parameter.
 * It registers the specified asset to the AssetStore and mint a token which represents
 * the "minter" of the asset (who paid the gas fee), along with two additional bonus tokens.
 * 
 * It uses ERC721A as the base contract, which is quite efficent to mint multiple tokens
 * with a single transaction. 
 *
 * Once minted, the asset will beome available to other smart contract developers,
 * for free, either CC0, CC-BY-SA(Attribution-ShareAlike), Appache, MIT or similar.
 * 
 * Created by Satoshi Nakajima (@snakajima)
 */

pragma solidity ^0.8.6;

import { Ownable } from '@openzeppelin/contracts/access/Ownable.sol';
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "erc721a/contracts/ERC721A.sol";
import { IAssetStoreRegistry, IAssetStore } from './interfaces/IAssetStore.sol';
import { IAssetStoreToken } from './interfaces/IAssetStoreToken.sol';
import { Base64 } from 'base64-sol/base64.sol';
import "@openzeppelin/contracts/utils/Strings.sol";
import { IProxyRegistry } from './external/opensea/IProxyRegistry.sol';

contract EmojiFlagToken is Ownable, ERC721A, IAssetStoreToken {
  using Strings for uint256;
  using Strings for uint16;

  IAssetStoreRegistry public immutable registry;
  IAssetStore public immutable assetStore;

  uint256 constant _tokensPerAsset = 4;
  mapping(uint256 => uint256) assetIds; // tokenId / _tokensPerAsset => assetId

  // description
  string public description = "This is one of effts to create (On-Chain Asset Store)[https://assetstore.wtf]. "
  "All the emoji vectors are came from OpenEoji project [https://openmoji.org/].";

  // developer address.
  address public developer;

  // OpenSea's Proxy Registry
  IProxyRegistry public immutable proxyRegistry;

  /*
   * @notice both _registry and _assetStore points to the AssetStore.
   */
  constructor(
    IAssetStoreRegistry _registry, 
    IAssetStore _assetStore,
    address _developer,
    IProxyRegistry _proxyRegistry
  ) ERC721A("OpenMoji Flags", "OPENMOJIFLAGS") {
    registry = _registry;
    assetStore = _assetStore;
    developer = _developer;
    proxyRegistry = _proxyRegistry;
  }

  function _isPrimary(uint256 _tokenId) internal pure returns(bool) {
    return _tokenId % _tokensPerAsset == 0;
  }

  /*
   * It registers the specified asset to the AssetStore and
   * mint three tokens to the msg.sender, and one additional
   * token to either the affiliator, the developer or the owner.npnkda
   */
  function mintWithAsset(IAssetStoreRegistry.AssetInfo memory _assetInfo, uint256 _affiliate) external {
    _assetInfo.group = "OpenMoji (CC BY-SA 4.0)";
    uint256 assetId = registry.registerAsset(_assetInfo);
    uint256 tokenId = _nextTokenId(); 

    assetIds[tokenId / _tokensPerAsset] = assetId;
    _mint(msg.sender, _tokensPerAsset - 1);

    // Specified affliate token must be one of the primary tokens and not owned by the minter.
    if (_affiliate > 0 && _isPrimary(_affiliate) && ownerOf(_affiliate) != msg.sender) {
      _mint(ownerOf(_affiliate), 1);
    } else if ((tokenId / _tokensPerAsset) % 4 == 0) {
      // 1 in 16 tokens of non-affiliated mints go to the developer
      _mint(developer, 1);
    } else {
      // the rest goes to the owner for distribution
      _mint(owner(), 1);
    }
  }
  /*
   * @notice get next tokenId.
   */
  function getCurrentToken() external view returns (uint256) {                  
    return _nextTokenId();
  }

  /**
    * @notice Override isApprovedForAll to whitelist user's OpenSea proxy accounts to enable gas-less listings.
    */
  function isApprovedForAll(address owner, address operator) public view override returns (bool) {
      // Whitelist OpenSea proxy contract for easy trading.
      if (proxyRegistry.proxies(owner) == operator) {
          return true;
      }
      return super.isApprovedForAll(owner, operator);
  }

  string constant SVGHeader = '<svg viewBox="0 0 1024 1024'
      '"  xmlns="http://www.w3.org/2000/svg">\n'
      '<defs>\n';

  /*
   * A function of IAssetStoreToken interface.
   * It generates SVG with the specified style, using the given "SVG Part".
   */
  function generateSVG(string memory _svgPart, uint256 _style, string memory _tag) public pure override returns (string memory) {
    // Constants of non-value type not yet implemented by Solidity
    string[4] memory backColors = [
      "white", "url(#silver)", "url(#gold)", "url(#sky)" 
    ];

    bytes memory assetTag = abi.encodePacked('#', _tag);
    uint index = _style % _tokensPerAsset;
    bytes memory image = abi.encodePacked(
      SVGHeader,
      _svgPart);
    if (index == 1) {
      image = abi.encodePacked(
        image, 
        '<linearGradient id="silver" x1="0.2" x2="0" y1="0" y2="1">\n'
        '  <stop offset="0%" stop-color="#80807F"/>\n'
        ' <stop offset="50%" stop-color="#EEF0F2" />\n'
        ' <stop offset="100%" stop-color="#80807F"/>\n'
        '</linearGradient>\n');
    } else if (index == 2) {
      image = abi.encodePacked(
        image, 
        '<linearGradient id="gold" x1="0.2" x2="0" y1="0" y2="1">\n'
        '  <stop offset="0%" stop-color="#CCAB09"/>\n'
        ' <stop offset="50%" stop-color="#FFF186" />\n'
        ' <stop offset="100%" stop-color="#CCAB09"/>\n'
        '</linearGradient>\n');
    } else if (index == 3) {
      image = abi.encodePacked(
        image, 
        '<radialGradient id="sky" cx="0.8" cy="0.33">\n'
        '  <stop offset="0%" stop-color="#FFFFFF"/>\n'
        ' <stop offset="20%" stop-color="#FFFFFF" />\n'
        ' <stop offset="100%" stop-color="#00B5E2"/>\n'
        '</radialGradient>\n');
    }
    image =  abi.encodePacked(
      image,
      '</defs>\n'
      ' <rect x="0" y="0" width="100%" height="100%" fill="',backColors[index],'" />\n'
      ' <use href="', assetTag, '" />\n'
      '</svg>\n');
    return string(image);
  }

  /*
   * A function of IAssetStoreToken interface.
   * It returns the assetId, which this token uses.
   */
  function assetIdOfToken(uint256 _tokenId) public view override returns(uint256) {
    require(_exists(_tokenId), 'EmojiFlagToken.assetIdOfToken: nonexistent token');
    return assetIds[_tokenId / _tokensPerAsset];
  }

  /*
   * A function of IAssetStoreToken interface.
   * Each 16-bit represents the number of possible styles, allowing various combinations.
   */
  function styles() external pure override returns(uint256) {
    return _tokensPerAsset;
  }

  function _generateTraits(uint256 _tokenId, IAssetStore.AssetAttributes memory _attr) internal view returns (bytes memory) {
    return abi.encodePacked(
      '{'
        '"trait_type":"Primary",'
        '"value":"', _isPrimary(_tokenId) ? 'Yes':'No', '"' 
      '},{'
        '"trait_type":"Group",'
        '"value":"', _attr.group, '"' 
      '},{'
        '"trait_type":"Category",'
        '"value":"', _attr.category, '"' 
      '},{'
        '"trait_type":"Name",'
        '"value":"', _attr.name, '"' 
      '},{'
        '"trait_type":"Minter",'
        '"value":"', (bytes(_attr.minter).length > 0)?
              assetStore.getStringValidator().sanitizeJason(_attr.minter) : bytes('(anonymous)'), '"' 
      '}'
    );
  }

  function setDescription(string memory _description) external onlyOwner {
      description = _description;
  }

  /**
    * @notice A distinct Uniform Resource Identifier (URI) for a given asset.
    * @dev See {IERC721Metadata-tokenURI}.
    */
  function tokenURI(uint256 _tokenId) public view override returns (string memory) {
    require(_exists(_tokenId), 'EmojiFlagToken.tokenURI: nonexistent token');
    uint256 assetId = assetIdOfToken(_tokenId);
    IAssetStore.AssetAttributes memory attr = assetStore.getAttributes(assetId);
    string memory svgPart = assetStore.generateSVGPart(assetId, attr.tag);
    bytes memory image = bytes(generateSVG(svgPart, _tokenId % _tokensPerAsset, attr.tag));

    return string(
      abi.encodePacked(
        'data:application/json;base64,',
        Base64.encode(
          bytes(
            abi.encodePacked(
              '{"name":"', attr.name, 
                '","description":"', description, 
                '","attributes":[', _generateTraits(_tokenId, attr), 
                '],"image":"data:image/svg+xml;base64,', 
                Base64.encode(image), 
              '"}')
          )
        )
      )
    );
  }  

  function tokensPerAsset() public pure returns(uint256) {
    return _tokensPerAsset;
  }
}

File 2 of 18 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

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

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

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

    /**
     * @dev 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 {
        _transferOwnership(address(0));
    }

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

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

File 3 of 18 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
 * the Metadata extension, but not including the Enumerable extension, which is available separately as
 * {ERC721Enumerable}.
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
    using Address for address;
    using Strings for uint256;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to owner address
    mapping(uint256 => address) private _owners;

    // Mapping owner address to token count
    mapping(address => uint256) private _balances;

    // Mapping from token ID to approved address
    mapping(uint256 => address) private _tokenApprovals;

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

    /**
     * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

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

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view virtual override returns (uint256) {
        require(owner != address(0), "ERC721: balance query for the zero address");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _owners[tokenId];
        require(owner != address(0), "ERC721: owner query for nonexistent token");
        return owner;
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");

        string memory baseURI = _baseURI();
        return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return "";
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public virtual override {
        address owner = ERC721.ownerOf(tokenId);
        require(to != owner, "ERC721: approval to current owner");

        require(
            _msgSender() == owner || isApprovedForAll(owner, _msgSender()),
            "ERC721: approve caller is not owner nor approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        require(_exists(tokenId), "ERC721: approved query for nonexistent token");

        return _tokenApprovals[tokenId];
    }

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");

        _transfer(from, to, tokenId);
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, "");
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
        _safeTransfer(from, to, tokenId, _data);
    }

    /**
     * @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.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     * and stop existing when they are burned (`_burn`).
     */
    function _exists(uint256 tokenId) internal view virtual returns (bool) {
        return _owners[tokenId] != address(0);
    }

    /**
     * @dev Returns whether `spender` is allowed to manage `tokenId`.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
        require(_exists(tokenId), "ERC721: operator query for nonexistent token");
        address owner = ERC721.ownerOf(tokenId);
        return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender);
    }

    /**
     * @dev Safely mints `tokenId` and transfers it to `to`.
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeMint(address to, uint256 tokenId) internal virtual {
        _safeMint(to, tokenId, "");
    }

    /**
     * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
     * forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
     */
    function _safeMint(
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _mint(to, tokenId);
        require(
            _checkOnERC721Received(address(0), to, tokenId, _data),
            "ERC721: transfer to non ERC721Receiver implementer"
        );
    }

    /**
     * @dev Mints `tokenId` and transfers it to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
     *
     * Requirements:
     *
     * - `tokenId` must not exist.
     * - `to` cannot be the zero address.
     *
     * Emits a {Transfer} event.
     */
    function _mint(address to, uint256 tokenId) internal virtual {
        require(to != address(0), "ERC721: mint to the zero address");
        require(!_exists(tokenId), "ERC721: token already minted");

        _beforeTokenTransfer(address(0), to, tokenId);

        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(address(0), to, tokenId);

        _afterTokenTransfer(address(0), to, tokenId);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

        _beforeTokenTransfer(owner, address(0), tokenId);

        // Clear approvals
        _approve(address(0), tokenId);

        _balances[owner] -= 1;
        delete _owners[tokenId];

        emit Transfer(owner, address(0), tokenId);

        _afterTokenTransfer(owner, address(0), tokenId);
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *  As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function _transfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual {
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
        require(to != address(0), "ERC721: transfer to the zero address");

        _beforeTokenTransfer(from, to, tokenId);

        // Clear approvals from the previous owner
        _approve(address(0), tokenId);

        _balances[from] -= 1;
        _balances[to] += 1;
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address to, uint256 tokenId) internal virtual {
        _tokenApprovals[tokenId] = to;
        emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
    }

    /**
     * @dev Approve `operator` to operate on all of `owner` tokens
     *
     * Emits a {ApprovalForAll} event.
     */
    function _setApprovalForAll(
        address owner,
        address operator,
        bool approved
    ) internal virtual {
        require(owner != operator, "ERC721: approve to caller");
        _operatorApprovals[owner][operator] = approved;
        emit ApprovalForAll(owner, operator, approved);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
     * The call is not executed if the target address is not a contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        if (to.isContract()) {
            try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
                return retval == IERC721Receiver.onERC721Received.selector;
            } catch (bytes memory reason) {
                if (reason.length == 0) {
                    revert("ERC721: transfer to non ERC721Receiver implementer");
                } else {
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

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

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

File 4 of 18 : ERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.1.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

/**
 * @dev ERC721 token receiver interface.
 */
interface ERC721A__IERC721Receiver {
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

/**
 * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard,
 * including the Metadata extension. Built to optimize for lower gas during batch mints.
 *
 * Assumes serials are sequentially minted starting at `_startTokenId()`
 * (defaults to 0, e.g. 0, 1, 2, 3..).
 *
 * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply.
 *
 * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721A is IERC721A {
    // Mask of an entry in packed address data.
    uint256 private constant BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1;

    // The bit position of `numberMinted` in packed address data.
    uint256 private constant BITPOS_NUMBER_MINTED = 64;

    // The bit position of `numberBurned` in packed address data.
    uint256 private constant BITPOS_NUMBER_BURNED = 128;

    // The bit position of `aux` in packed address data.
    uint256 private constant BITPOS_AUX = 192;

    // Mask of all 256 bits in packed address data except the 64 bits for `aux`.
    uint256 private constant BITMASK_AUX_COMPLEMENT = (1 << 192) - 1;

    // The bit position of `startTimestamp` in packed ownership.
    uint256 private constant BITPOS_START_TIMESTAMP = 160;

    // The bit mask of the `burned` bit in packed ownership.
    uint256 private constant BITMASK_BURNED = 1 << 224;

    // The bit position of the `nextInitialized` bit in packed ownership.
    uint256 private constant BITPOS_NEXT_INITIALIZED = 225;

    // The bit mask of the `nextInitialized` bit in packed ownership.
    uint256 private constant BITMASK_NEXT_INITIALIZED = 1 << 225;

    // The bit position of `extraData` in packed ownership.
    uint256 private constant BITPOS_EXTRA_DATA = 232;

    // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`.
    uint256 private constant BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1;

    // The mask of the lower 160 bits for addresses.
    uint256 private constant BITMASK_ADDRESS = (1 << 160) - 1;

    // The maximum `quantity` that can be minted with `_mintERC2309`.
    // This limit is to prevent overflows on the address data entries.
    // For a limit of 5000, a total of 3.689e15 calls to `_mintERC2309`
    // is required to cause an overflow, which is unrealistic.
    uint256 private constant MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000;

    // The tokenId of the next token to be minted.
    uint256 private _currentIndex;

    // The number of tokens burned.
    uint256 private _burnCounter;

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

    // Mapping from token ID to ownership details
    // An empty struct value does not necessarily mean the token is unowned.
    // See `_packedOwnershipOf` implementation for details.
    //
    // Bits Layout:
    // - [0..159]   `addr`
    // - [160..223] `startTimestamp`
    // - [224]      `burned`
    // - [225]      `nextInitialized`
    // - [232..255] `extraData`
    mapping(uint256 => uint256) private _packedOwnerships;

    // Mapping owner address to address data.
    //
    // Bits Layout:
    // - [0..63]    `balance`
    // - [64..127]  `numberMinted`
    // - [128..191] `numberBurned`
    // - [192..255] `aux`
    mapping(address => uint256) private _packedAddressData;

    // Mapping from token ID to approved address.
    mapping(uint256 => address) private _tokenApprovals;

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

    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
        _currentIndex = _startTokenId();
    }

    /**
     * @dev Returns the starting token ID.
     * To change the starting token ID, please override this function.
     */
    function _startTokenId() internal view virtual returns (uint256) {
        return 0;
    }

    /**
     * @dev Returns the next token ID to be minted.
     */
    function _nextTokenId() internal view returns (uint256) {
        return _currentIndex;
    }

    /**
     * @dev Returns the total number of tokens in existence.
     * Burned tokens will reduce the count.
     * To get the total number of tokens minted, please see `_totalMinted`.
     */
    function totalSupply() public view override returns (uint256) {
        // Counter underflow is impossible as _burnCounter cannot be incremented
        // more than `_currentIndex - _startTokenId()` times.
        unchecked {
            return _currentIndex - _burnCounter - _startTokenId();
        }
    }

    /**
     * @dev Returns the total amount of tokens minted in the contract.
     */
    function _totalMinted() internal view returns (uint256) {
        // Counter underflow is impossible as _currentIndex does not decrement,
        // and it is initialized to `_startTokenId()`
        unchecked {
            return _currentIndex - _startTokenId();
        }
    }

    /**
     * @dev Returns the total number of tokens burned.
     */
    function _totalBurned() internal view returns (uint256) {
        return _burnCounter;
    }

    /**
     * @dev See {IERC165-supportsInterface}.
     */
    function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
        // The interface IDs are constants representing the first 4 bytes of the XOR of
        // all function selectors in the interface. See: https://eips.ethereum.org/EIPS/eip-165
        // e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`
        return
            interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165.
            interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721.
            interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata.
    }

    /**
     * @dev See {IERC721-balanceOf}.
     */
    function balanceOf(address owner) public view override returns (uint256) {
        if (owner == address(0)) revert BalanceQueryForZeroAddress();
        return _packedAddressData[owner] & BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens minted by `owner`.
     */
    function _numberMinted(address owner) internal view returns (uint256) {
        return (_packedAddressData[owner] >> BITPOS_NUMBER_MINTED) & BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the number of tokens burned by or on behalf of `owner`.
     */
    function _numberBurned(address owner) internal view returns (uint256) {
        return (_packedAddressData[owner] >> BITPOS_NUMBER_BURNED) & BITMASK_ADDRESS_DATA_ENTRY;
    }

    /**
     * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     */
    function _getAux(address owner) internal view returns (uint64) {
        return uint64(_packedAddressData[owner] >> BITPOS_AUX);
    }

    /**
     * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used).
     * If there are multiple variables, please pack them into a uint64.
     */
    function _setAux(address owner, uint64 aux) internal {
        uint256 packed = _packedAddressData[owner];
        uint256 auxCasted;
        // Cast `aux` with assembly to avoid redundant masking.
        assembly {
            auxCasted := aux
        }
        packed = (packed & BITMASK_AUX_COMPLEMENT) | (auxCasted << BITPOS_AUX);
        _packedAddressData[owner] = packed;
    }

    /**
     * Returns the packed ownership data of `tokenId`.
     */
    function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) {
        uint256 curr = tokenId;

        unchecked {
            if (_startTokenId() <= curr)
                if (curr < _currentIndex) {
                    uint256 packed = _packedOwnerships[curr];
                    // If not burned.
                    if (packed & BITMASK_BURNED == 0) {
                        // Invariant:
                        // There will always be an ownership that has an address and is not burned
                        // before an ownership that does not have an address and is not burned.
                        // Hence, curr will not underflow.
                        //
                        // We can directly compare the packed value.
                        // If the address is zero, packed is zero.
                        while (packed == 0) {
                            packed = _packedOwnerships[--curr];
                        }
                        return packed;
                    }
                }
        }
        revert OwnerQueryForNonexistentToken();
    }

    /**
     * Returns the unpacked `TokenOwnership` struct from `packed`.
     */
    function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) {
        ownership.addr = address(uint160(packed));
        ownership.startTimestamp = uint64(packed >> BITPOS_START_TIMESTAMP);
        ownership.burned = packed & BITMASK_BURNED != 0;
        ownership.extraData = uint24(packed >> BITPOS_EXTRA_DATA);
    }

    /**
     * Returns the unpacked `TokenOwnership` struct at `index`.
     */
    function _ownershipAt(uint256 index) internal view returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnerships[index]);
    }

    /**
     * @dev Initializes the ownership slot minted at `index` for efficiency purposes.
     */
    function _initializeOwnershipAt(uint256 index) internal {
        if (_packedOwnerships[index] == 0) {
            _packedOwnerships[index] = _packedOwnershipOf(index);
        }
    }

    /**
     * Gas spent here starts off proportional to the maximum mint batch size.
     * It gradually moves to O(1) as tokens get transferred around in the collection over time.
     */
    function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) {
        return _unpackedOwnership(_packedOwnershipOf(tokenId));
    }

    /**
     * @dev Packs ownership data into a single uint256.
     */
    function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) {
        assembly {
            // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean.
            owner := and(owner, BITMASK_ADDRESS)
            // `owner | (block.timestamp << BITPOS_START_TIMESTAMP) | flags`.
            result := or(owner, or(shl(BITPOS_START_TIMESTAMP, timestamp()), flags))
        }
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view override returns (address) {
        return address(uint160(_packedOwnershipOf(tokenId)));
    }

    /**
     * @dev See {IERC721Metadata-name}.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev See {IERC721Metadata-symbol}.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev See {IERC721Metadata-tokenURI}.
     */
    function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
        if (!_exists(tokenId)) revert URIQueryForNonexistentToken();

        string memory baseURI = _baseURI();
        return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : '';
    }

    /**
     * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
     * token will be the concatenation of the `baseURI` and the `tokenId`. Empty
     * by default, it can be overridden in child contracts.
     */
    function _baseURI() internal view virtual returns (string memory) {
        return '';
    }

    /**
     * @dev Returns the `nextInitialized` flag set if `quantity` equals 1.
     */
    function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) {
        // For branchless setting of the `nextInitialized` flag.
        assembly {
            // `(quantity == 1) << BITPOS_NEXT_INITIALIZED`.
            result := shl(BITPOS_NEXT_INITIALIZED, eq(quantity, 1))
        }
    }

    /**
     * @dev See {IERC721-approve}.
     */
    function approve(address to, uint256 tokenId) public override {
        address owner = ownerOf(tokenId);

        if (_msgSenderERC721A() != owner)
            if (!isApprovedForAll(owner, _msgSenderERC721A())) {
                revert ApprovalCallerNotOwnerNorApproved();
            }

        _tokenApprovals[tokenId] = to;
        emit Approval(owner, to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view override returns (address) {
        if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken();

        return _tokenApprovals[tokenId];
    }

    /**
     * @dev See {IERC721-setApprovalForAll}.
     */
    function setApprovalForAll(address operator, bool approved) public virtual override {
        if (operator == _msgSenderERC721A()) revert ApproveToCaller();

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

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

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        safeTransferFrom(from, to, tokenId, '');
    }

    /**
     * @dev See {IERC721-safeTransferFrom}.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) public virtual override {
        transferFrom(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
     *
     * Tokens start existing when they are minted (`_mint`),
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return
            _startTokenId() <= tokenId &&
            tokenId < _currentIndex && // If within bounds,
            _packedOwnerships[tokenId] & BITMASK_BURNED == 0; // and not burned.
    }

    /**
     * @dev Equivalent to `_safeMint(to, quantity, '')`.
     */
    function _safeMint(address to, uint256 quantity) internal {
        _safeMint(to, quantity, '');
    }

    /**
     * @dev Safely mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - If `to` refers to a smart contract, it must implement
     *   {IERC721Receiver-onERC721Received}, which is called for each safe transfer.
     * - `quantity` must be greater than 0.
     *
     * See {_mint}.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _safeMint(
        address to,
        uint256 quantity,
        bytes memory _data
    ) internal {
        _mint(to, quantity);

        unchecked {
            if (to.code.length != 0) {
                uint256 end = _currentIndex;
                uint256 index = end - quantity;
                do {
                    if (!_checkContractOnERC721Received(address(0), to, index++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (index < end);
                // Reentrancy protection.
                if (_currentIndex != end) revert();
            }
        }
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {Transfer} event for each mint.
     */
    function _mint(address to, uint256 quantity) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are incredibly unrealistic.
        // `balance` and `numberMinted` have a maximum limit of 2**64.
        // `tokenId` has a maximum limit of 2**256.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            uint256 tokenId = startTokenId;
            uint256 end = startTokenId + quantity;
            do {
                emit Transfer(address(0), to, tokenId++);
            } while (tokenId < end);

            _currentIndex = end;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Mints `quantity` tokens and transfers them to `to`.
     *
     * This function is intended for efficient minting only during contract creation.
     *
     * It emits only one {ConsecutiveTransfer} as defined in
     * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309),
     * instead of a sequence of {Transfer} event(s).
     *
     * Calling this function outside of contract creation WILL make your contract
     * non-compliant with the ERC721 standard.
     * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309
     * {ConsecutiveTransfer} event is only permissible during contract creation.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `quantity` must be greater than 0.
     *
     * Emits a {ConsecutiveTransfer} event.
     */
    function _mintERC2309(address to, uint256 quantity) internal {
        uint256 startTokenId = _currentIndex;
        if (to == address(0)) revert MintToZeroAddress();
        if (quantity == 0) revert MintZeroQuantity();
        if (quantity > MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit();

        _beforeTokenTransfers(address(0), to, startTokenId, quantity);

        // Overflows are unrealistic due to the above check for `quantity` to be below the limit.
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the `balance` and `numberMinted`.
            _packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] = _packOwnershipData(
                to,
                _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0)
            );

            emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to);

            _currentIndex = startTokenId + quantity;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

    /**
     * @dev Returns the storage slot and value for the approved address of `tokenId`.
     */
    function _getApprovedAddress(uint256 tokenId)
        private
        view
        returns (uint256 approvedAddressSlot, address approvedAddress)
    {
        mapping(uint256 => address) storage tokenApprovalsPtr = _tokenApprovals;
        // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId]`.
        assembly {
            // Compute the slot.
            mstore(0x00, tokenId)
            mstore(0x20, tokenApprovalsPtr.slot)
            approvedAddressSlot := keccak256(0x00, 0x40)
            // Load the slot's value from storage.
            approvedAddress := sload(approvedAddressSlot)
        }
    }

    /**
     * @dev Returns whether the `approvedAddress` is equals to `from` or `msgSender`.
     */
    function _isOwnerOrApproved(
        address approvedAddress,
        address from,
        address msgSender
    ) private pure returns (bool result) {
        assembly {
            // Mask `from` to the lower 160 bits, in case the upper bits somehow aren't clean.
            from := and(from, BITMASK_ADDRESS)
            // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean.
            msgSender := and(msgSender, BITMASK_ADDRESS)
            // `msgSender == from || msgSender == approvedAddress`.
            result := or(eq(msgSender, from), eq(msgSender, approvedAddress))
        }
    }

    /**
     * @dev Transfers `tokenId` from `from` to `to`.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner();

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedAddress(tokenId);

        // The nested ifs save around 20+ gas over a compound boolean condition.
        if (!_isOwnerOrApproved(approvedAddress, from, _msgSenderERC721A()))
            if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();

        if (to == address(0)) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            // We can directly increment and decrement the balances.
            --_packedAddressData[from]; // Updates: `balance -= 1`.
            ++_packedAddressData[to]; // Updates: `balance += 1`.

            // Updates:
            // - `address` to the next owner.
            // - `startTimestamp` to the timestamp of transfering.
            // - `burned` to `false`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _packOwnershipData(
                to,
                BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

        emit Transfer(from, to, tokenId);
        _afterTokenTransfers(from, to, tokenId, 1);
    }

    /**
     * @dev Equivalent to `_burn(tokenId, false)`.
     */
    function _burn(uint256 tokenId) internal virtual {
        _burn(tokenId, false);
    }

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId, bool approvalCheck) internal virtual {
        uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId);

        address from = address(uint160(prevOwnershipPacked));

        (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedAddress(tokenId);

        if (approvalCheck) {
            // The nested ifs save around 20+ gas over a compound boolean condition.
            if (!_isOwnerOrApproved(approvedAddress, from, _msgSenderERC721A()))
                if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved();
        }

        _beforeTokenTransfers(from, address(0), tokenId, 1);

        // Clear approvals from the previous owner.
        assembly {
            if approvedAddress {
                // This is equivalent to `delete _tokenApprovals[tokenId]`.
                sstore(approvedAddressSlot, 0)
            }
        }

        // Underflow of the sender's balance is impossible because we check for
        // ownership above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256.
        unchecked {
            // Updates:
            // - `balance -= 1`.
            // - `numberBurned += 1`.
            //
            // We can directly decrement the balance, and increment the number burned.
            // This is equivalent to `packed -= 1; packed += 1 << BITPOS_NUMBER_BURNED;`.
            _packedAddressData[from] += (1 << BITPOS_NUMBER_BURNED) - 1;

            // Updates:
            // - `address` to the last owner.
            // - `startTimestamp` to the timestamp of burning.
            // - `burned` to `true`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] = _packOwnershipData(
                from,
                (BITMASK_BURNED | BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked)
            );

            // If the next slot may not have been initialized (i.e. `nextInitialized == false`) .
            if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) {
                uint256 nextTokenId = tokenId + 1;
                // If the next slot's address is zero and not burned (i.e. packed value is zero).
                if (_packedOwnerships[nextTokenId] == 0) {
                    // If the next slot is within bounds.
                    if (nextTokenId != _currentIndex) {
                        // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`.
                        _packedOwnerships[nextTokenId] = prevOwnershipPacked;
                    }
                }
            }
        }

        emit Transfer(from, address(0), tokenId);
        _afterTokenTransfers(from, address(0), tokenId, 1);

        // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times.
        unchecked {
            _burnCounter++;
        }
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * @param from address representing the previous owner of the given token ID
     * @param to target address that will receive the tokens
     * @param tokenId uint256 ID of the token to be transferred
     * @param _data bytes optional data to send along with the call
     * @return bool whether the call correctly returned the expected magic value
     */
    function _checkContractOnERC721Received(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) private returns (bool) {
        try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns (
            bytes4 retval
        ) {
            return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector;
        } catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            } else {
                assembly {
                    revert(add(32, reason), mload(reason))
                }
            }
        }
    }

    /**
     * @dev Directly sets the extra data for the ownership data `index`.
     */
    function _setExtraDataAt(uint256 index, uint24 extraData) internal {
        uint256 packed = _packedOwnerships[index];
        if (packed == 0) revert OwnershipNotInitializedForExtraData();
        uint256 extraDataCasted;
        // Cast `extraData` with assembly to avoid redundant masking.
        assembly {
            extraDataCasted := extraData
        }
        packed = (packed & BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << BITPOS_EXTRA_DATA);
        _packedOwnerships[index] = packed;
    }

    /**
     * @dev Returns the next extra data for the packed ownership data.
     * The returned result is shifted into position.
     */
    function _nextExtraData(
        address from,
        address to,
        uint256 prevOwnershipPacked
    ) private view returns (uint256) {
        uint24 extraData = uint24(prevOwnershipPacked >> BITPOS_EXTRA_DATA);
        return uint256(_extraData(from, to, extraData)) << BITPOS_EXTRA_DATA;
    }

    /**
     * @dev Called during each token transfer to set the 24bit `extraData` field.
     * Intended to be overridden by the cosumer contract.
     *
     * `previousExtraData` - the value of `extraData` before transfer.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _extraData(
        address from,
        address to,
        uint24 previousExtraData
    ) internal view virtual returns (uint24) {}

    /**
     * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred.
     * This includes minting.
     * And also called before burning one token.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, `tokenId` will be burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _beforeTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Hook that is called after a set of serially-ordered token ids have been transferred.
     * This includes minting.
     * And also called after one token has been burned.
     *
     * startTokenId - the first token id to be transferred
     * quantity - the amount to be transferred
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been
     * transferred to `to`.
     * - When `from` is zero, `tokenId` has been minted for `to`.
     * - When `to` is zero, `tokenId` has been burned by `from`.
     * - `from` and `to` are never both zero.
     */
    function _afterTokenTransfers(
        address from,
        address to,
        uint256 startTokenId,
        uint256 quantity
    ) internal virtual {}

    /**
     * @dev Returns the message sender (defaults to `msg.sender`).
     *
     * If you are writing GSN compatible contracts, you need to override this function.
     */
    function _msgSenderERC721A() internal view virtual returns (address) {
        return msg.sender;
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function _toString(uint256 value) internal pure returns (string memory ptr) {
        assembly {
            // The maximum value of a uint256 contains 78 digits (1 byte per digit),
            // but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged.
            // We will need 1 32-byte word to store the length,
            // and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128.
            ptr := add(mload(0x40), 128)
            // Update the free memory pointer to allocate.
            mstore(0x40, ptr)

            // Cache the end of the memory to calculate the length later.
            let end := ptr

            // We write the string from the rightmost digit to the leftmost digit.
            // The following is essentially a do-while loop that also handles the zero case.
            // Costs a bit more than early returning for the zero case,
            // but cheaper in terms of deployment and overall runtime costs.
            for {
                // Initialize and perform the first pass without check.
                let temp := value
                // Move the pointer 1 byte leftwards to point to an empty character slot.
                ptr := sub(ptr, 1)
                // Write the character to the pointer. 48 is the ASCII index of '0'.
                mstore8(ptr, add(48, mod(temp, 10)))
                temp := div(temp, 10)
            } temp {
                // Keep dividing `temp` until zero.
                temp := div(temp, 10)
            } {
                // Body of the for loop.
                ptr := sub(ptr, 1)
                mstore8(ptr, add(48, mod(temp, 10)))
            }

            let length := sub(end, ptr)
            // Move the pointer 32 bytes leftwards to make room for the length.
            ptr := sub(ptr, 32)
            // Store the length.
            mstore(ptr, length)
        }
    }
}

File 5 of 18 : IAssetStore.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.6;

import { IStringValidator } from './IStringValidator.sol';

// IAssetStore is the inteface for consumers of the AsseStore.
interface IAssetStore {
  // Browsing
  function getGroupCount() external view returns(uint32);
  function getGroupNameAtIndex(uint32 _groupIndex) external view returns(string memory);
  function getCategoryCount(string memory _group) external view returns(uint32);
  function getCategoryNameAtIndex(string memory _group, uint32 _categoryIndex) external view returns(string memory);
  function getAssetCountInCategory(string memory _group, string memory _category) external view returns(uint32);
  function getAssetIdInCategory(string memory _group, string memory _category, uint32 _assetIndex) external view returns(uint256);
  function getAssetIdWithName(string memory _group, string memory _category, string memory _name) external view returns(uint256);

  // Fetching
  struct AssetAttributes {
    string group;
    string category;
    string name;
    string tag; // the id in SVG
    string minter; // the name of the minter (who paid the gas fee)
    address soulbound; // wallet address of the minter
    bytes metadata; // group/category specific metadata
    uint16 width;
    uint16 height;
  }

  function generateSVG(uint256 _assetId) external view returns(string memory);
  function generateSVGPart(uint256 _assetId, string memory _tag) external view returns(string memory);
  function getAttributes(uint256 _assetId) external view returns(AssetAttributes memory);
  function getStringValidator() external view returns(IStringValidator);
}

// IAssetStoreRegistry is the interface for contracts who registers assets to the AssetStore.
interface IAssetStoreRegistry {
  struct Part {
    bytes body;
    string color;
  }

  struct AssetInfo {
    string group;
    string category;
    string name;
    string minter; // the name of the minter, who is paying the gas fee
    address soulbound; // wallet address of the minter
    bytes metadata; // group/category specific metadata (optional)
    Part[] parts;
  }

  event AssetRegistered(address from, uint256 assetId);
  event GroupAdded(string group);
  event CategoryAdded(string group, string category);

  function registerAsset(AssetInfo memory _assetInfo) external returns(uint256);
  function registerAssets(AssetInfo[] memory _assetInfos) external;
}

File 6 of 18 : IAssetStoreToken.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.6;

interface IAssetStoreToken {
  function generateSVG(string memory _svgPart, uint256 _style, string memory _tag) external returns (string memory);
  function assetIdOfToken(uint256 _tokenId) external returns(uint256);
  function styles() external returns(uint256);
}

File 7 of 18 : base64.sol
// SPDX-License-Identifier: MIT

pragma solidity >=0.6.0;

/// @title Base64
/// @author Brecht Devos - <[email protected]>
/// @notice Provides functions for encoding/decoding base64
library Base64 {
    string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
    bytes  internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000"
                                            hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000"
                                            hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000"
                                            hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000";

    function encode(bytes memory data) internal pure returns (string memory) {
        if (data.length == 0) return '';

        // load the table into memory
        string memory table = TABLE_ENCODE;

        // multiply by 4/3 rounded up
        uint256 encodedLen = 4 * ((data.length + 2) / 3);

        // add some extra buffer at the end required for the writing
        string memory result = new string(encodedLen + 32);

        assembly {
            // set the actual output length
            mstore(result, encodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 3 bytes at a time
            for {} lt(dataPtr, endPtr) {}
            {
                // read 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

                // write 4 characters
                mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F))))
                resultPtr := add(resultPtr, 1)
                mstore8(resultPtr, mload(add(tablePtr, and(        input,  0x3F))))
                resultPtr := add(resultPtr, 1)
            }

            // padding with '='
            switch mod(mload(data), 3)
            case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) }
            case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) }
        }

        return result;
    }

    function decode(string memory _data) internal pure returns (bytes memory) {
        bytes memory data = bytes(_data);

        if (data.length == 0) return new bytes(0);
        require(data.length % 4 == 0, "invalid base64 decoder input");

        // load the table into memory
        bytes memory table = TABLE_DECODE;

        // every 4 characters represent 3 bytes
        uint256 decodedLen = (data.length / 4) * 3;

        // add some extra buffer at the end required for the writing
        bytes memory result = new bytes(decodedLen + 32);

        assembly {
            // padding with '='
            let lastBytes := mload(add(data, mload(data)))
            if eq(and(lastBytes, 0xFF), 0x3d) {
                decodedLen := sub(decodedLen, 1)
                if eq(and(lastBytes, 0xFFFF), 0x3d3d) {
                    decodedLen := sub(decodedLen, 1)
                }
            }

            // set the actual output length
            mstore(result, decodedLen)

            // prepare the lookup table
            let tablePtr := add(table, 1)

            // input ptr
            let dataPtr := data
            let endPtr := add(dataPtr, mload(data))

            // result ptr, jump over length
            let resultPtr := add(result, 32)

            // run over the input, 4 characters at a time
            for {} lt(dataPtr, endPtr) {}
            {
               // read 4 characters
               dataPtr := add(dataPtr, 4)
               let input := mload(dataPtr)

               // write 3 bytes
               let output := add(
                   add(
                       shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)),
                       shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))),
                   add(
                       shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)),
                               and(mload(add(tablePtr, and(        input , 0xFF))), 0xFF)
                    )
                )
                mstore(resultPtr, shl(232, output))
                resultPtr := add(resultPtr, 3)
            }
        }

        return result;
    }
}

File 8 of 18 : Strings.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Strings.sol)

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 9 of 18 : IProxyRegistry.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.6;

interface IProxyRegistry {
    function proxies(address) external view returns (address);
}

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

pragma solidity ^0.8.0;

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

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

File 11 of 18 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol)

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`.
     *
     * 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;

    /**
     * @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 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 the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

File 12 of 18 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol)

pragma solidity ^0.8.0;

/**
 * @title ERC721 token receiver interface
 * @dev Interface for any contract that wants to support safeTransfers
 * from ERC721 asset contracts.
 */
interface IERC721Receiver {
    /**
     * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
     * by `operator` from `from`, this function is called.
     *
     * It must return its Solidity selector to confirm the token transfer.
     * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
     *
     * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 13 of 18 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional metadata extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Metadata is IERC721 {
    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.0;

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

File 17 of 18 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.1.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

/**
 * @dev Interface of an ERC721A compliant contract.
 */
interface IERC721A {
    /**
     * The caller must own the token or be an approved operator.
     */
    error ApprovalCallerNotOwnerNorApproved();

    /**
     * The token does not exist.
     */
    error ApprovalQueryForNonexistentToken();

    /**
     * The caller cannot approve to their own address.
     */
    error ApproveToCaller();

    /**
     * Cannot query the balance for the zero address.
     */
    error BalanceQueryForZeroAddress();

    /**
     * Cannot mint to the zero address.
     */
    error MintToZeroAddress();

    /**
     * The quantity of tokens minted must be more than zero.
     */
    error MintZeroQuantity();

    /**
     * The token does not exist.
     */
    error OwnerQueryForNonexistentToken();

    /**
     * The caller must own the token or be an approved operator.
     */
    error TransferCallerNotOwnerNorApproved();

    /**
     * The token must be owned by `from`.
     */
    error TransferFromIncorrectOwner();

    /**
     * Cannot safely transfer to a contract that does not implement the ERC721Receiver interface.
     */
    error TransferToNonERC721ReceiverImplementer();

    /**
     * Cannot transfer to the zero address.
     */
    error TransferToZeroAddress();

    /**
     * The token does not exist.
     */
    error URIQueryForNonexistentToken();

    /**
     * The `quantity` minted with ERC2309 exceeds the safety limit.
     */
    error MintERC2309QuantityExceedsLimit();

    /**
     * The `extraData` cannot be set on an unintialized ownership slot.
     */
    error OwnershipNotInitializedForExtraData();

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
        // Arbitrary data similar to `startTimestamp` that can be set through `_extraData`.
        uint24 extraData;
    }

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     *
     * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens.
     */
    function totalSupply() external view returns (uint256);

    // ==============================
    //            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);

    // ==============================
    //            IERC721
    // ==============================

    /**
     * @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`.
     *
     * 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;

    /**
     * @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 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 the account approved for `tokenId` token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     */
    function getApproved(uint256 tokenId) external view returns (address operator);

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

    // ==============================
    //        IERC721Metadata
    // ==============================

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

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

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);

    // ==============================
    //            IERC2309
    // ==============================

    /**
     * @dev Emitted when tokens in `fromTokenId` to `toTokenId` (inclusive) is transferred from `from` to `to`,
     * as defined in the ERC2309 standard. See `_mintERC2309` for more details.
     */
    event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to);
}

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

pragma solidity ^0.8.6;

interface IStringValidator {
  function validate(bytes memory str) external pure returns (bool);
  function sanitizeJason(string memory _str) external pure returns(bytes memory);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"contract IAssetStoreRegistry","name":"_registry","type":"address"},{"internalType":"contract IAssetStore","name":"_assetStore","type":"address"},{"internalType":"address","name":"_developer","type":"address"},{"internalType":"contract IProxyRegistry","name":"_proxyRegistry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","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":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"assetIdOfToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"assetStore","outputs":[{"internalType":"contract IAssetStore","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"developer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_svgPart","type":"string"},{"internalType":"uint256","name":"_style","type":"uint256"},{"internalType":"string","name":"_tag","type":"string"}],"name":"generateSVG","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"group","type":"string"},{"internalType":"string","name":"category","type":"string"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"minter","type":"string"},{"internalType":"address","name":"soulbound","type":"address"},{"internalType":"bytes","name":"metadata","type":"bytes"},{"components":[{"internalType":"bytes","name":"body","type":"bytes"},{"internalType":"string","name":"color","type":"string"}],"internalType":"struct IAssetStoreRegistry.Part[]","name":"parts","type":"tuple[]"}],"internalType":"struct IAssetStoreRegistry.AssetInfo","name":"_assetInfo","type":"tuple"},{"internalType":"uint256","name":"_affiliate","type":"uint256"}],"name":"mintWithAsset","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"proxyRegistry","outputs":[{"internalType":"contract IProxyRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"registry","outputs":[{"internalType":"contract IAssetStoreRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","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":"_description","type":"string"}],"name":"setDescription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"styles","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokensPerAsset","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

6101a0604052609c60e081815290620033b56101003980516200002b91600a9160209091019062000194565b503480156200003957600080fd5b5060405162003451380380620034518339810160408190526200005c916200023a565b6040518060400160405280600e81526020016d4f70656e4d6f6a6920466c61677360901b8152506040518060400160405280600d81526020016c4f50454e4d4f4a49464c41475360981b815250620000c3620000bd6200014060201b60201c565b62000144565b8151620000d890600390602085019062000194565b508051620000ee90600490602084019062000194565b5060006001555050606093841b6001600160601b031990811660805292841b831660a052600b80546001600160a01b0319166001600160a01b03939093169290921790915590911b1660c052620002f8565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b828054620001a290620002a2565b90600052602060002090601f016020900481019282620001c6576000855562000211565b82601f10620001e157805160ff191683800117855562000211565b8280016001018555821562000211579182015b8281111562000211578251825591602001919060010190620001f4565b506200021f92915062000223565b5090565b5b808211156200021f576000815560010162000224565b600080600080608085870312156200025157600080fd5b84516200025e81620002df565b60208601519094506200027181620002df565b60408601519093506200028481620002df565b60608601519092506200029781620002df565b939692955090935050565b600181811c90821680620002b757607f821691505b60208210811415620002d957634e487b7160e01b600052602260045260246000fd5b50919050565b6001600160a01b0381168114620002f557600080fd5b50565b60805160601c60a05160601c60c05160601c613061620003546000396000818161039801526112a10152600081816102d5015281816110930152818161114c01526118440152600081816103320152610b8e01526130616000f3fe608060405234801561001057600080fd5b50600436106101ce5760003560e01c8063715018a611610104578063a22cb465116100a2578063ca4b208b11610071578063ca4b208b146103e0578063e985e9c5146103f3578063ef2d174614610406578063f2fde38b1461040e57600080fd5b8063a22cb46514610380578063b50cbd9f14610393578063b88d4fde146103ba578063c87b56dd146103cd57600080fd5b80637b103999116100de5780637b1039991461032d5780638da5cb5b1461035457806390c3f38f1461036557806395d89b411461037857600080fd5b8063715018a61461031d5780637284e41614610325578063786f94c6146102b657600080fd5b80632ab72d2f116101715780634f38687b1161014b5780634f38687b146102bd578063597a0e36146102d05780636352211e146102f757806370a082311461030a57600080fd5b80632ab72d2f1461029057806342842e0e146102a35780634b00371f146102b657600080fd5b8063081812fc116101ad578063081812fc14610227578063095ea7b31461025257806318160ddd1461026757806323b872dd1461027d57600080fd5b80626e59e9146101d357806301ffc9a7146101fc57806306fdde031461021f575b600080fd5b6101e66101e1366004611f9e565b610421565b6040516101f39190612c78565b60405180910390f35b61020f61020a366004611efa565b610632565b60405190151581526020016101f3565b6101e66106cf565b61023a61023536600461229f565b610761565b6040516001600160a01b0390911681526020016101f3565b610265610260366004611ece565b6107be565b005b600254600154035b6040519081526020016101f3565b61026561028b366004611dee565b610884565b61026f61029e36600461229f565b610a61565b6102656102b1366004611dee565b610b08565b600461026f565b6102656102cb366004612165565b610b28565b61023a7f000000000000000000000000000000000000000000000000000000000000000081565b61023a61030536600461229f565b610cf4565b61026f610318366004611d7b565b610cff565b610265610d67565b6101e6610dcd565b61023a7f000000000000000000000000000000000000000000000000000000000000000081565b6000546001600160a01b031661023a565b610265610373366004611f69565b610e5b565b6101e6610ecc565b61026561038e366004611e9b565b610edb565b61023a7f000000000000000000000000000000000000000000000000000000000000000081565b6102656103c8366004611e2f565b610f8a565b6101e66103db36600461229f565b610fce565b600b5461023a906001600160a01b031681565b61020f610401366004611db5565b611262565b61026f611363565b61026561041c366004611d7b565b611373565b6040805160c0810182526005608082019081527f776869746500000000000000000000000000000000000000000000000000000060a0830152815281518083018352600c81527f75726c282373696c7665722900000000000000000000000000000000000000006020828101919091528083019190915282518084018452600a81527f75726c2823676f6c642900000000000000000000000000000000000000000000818301528284015282518084018452600981527f75726c2823736b79290000000000000000000000000000000000000000000000818301526060838101919091529251600091610516918691016129e2565b60408051601f1981840301815291905290506000610535600487612f0b565b90506000604051806080016040528060498152602001612fe360499139886040516020016105649291906127eb565b604051602081830303815290604052905081600114156105a5578060405160200161058f91906124b9565b60405160208183030381529060405290506105eb565b81600214156105bf578060405160200161058f9190612394565b81600314156105eb57806040516020016105d991906125de565b60405160208183030381529060405290505b808483600481106105fe576105fe612f4b565b60200201518460405160200161061693929190612703565b60408051808303601f1901815291905298975050505050505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316148061069557507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b806106c957507f5b5e139f000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6060600380546106de90612ed0565b80601f016020809104026020016040519081016040528092919081815260200182805461070a90612ed0565b80156107575780601f1061072c57610100808354040283529160200191610757565b820191906000526020600020905b81548152906001019060200180831161073a57829003601f168201915b5050505050905090565b600061076c82611455565b6107a2576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b60006107c982610cf4565b9050336001600160a01b0382161461081b576107e58133611262565b61081b576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260076020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061088f8261147d565b9050836001600160a01b0316816001600160a01b0316146108dc576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526007602052604090208054338082146001600160a01b038816909114176109425761090c8633611262565b610942576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516610982576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b801561098d57600082555b6001600160a01b038681166000908152600660205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260056020526040902055600160e11b8316610a185760018401600081815260056020526040902054610a16576001548114610a165760008181526005602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b6000610a6c82611455565b610ae35760405162461bcd60e51b815260206004820152603060248201527f456d6f6a69466c6167546f6b656e2e617373657449644f66546f6b656e3a206e60448201527f6f6e6578697374656e7420746f6b656e0000000000000000000000000000000060648201526084015b60405180910390fd5b60096000610af2600485612e5a565b8152602001908152602001600020549050919050565b610b2383838360405180602001604052806000815250610f8a565b505050565b604080518082018252601781527f4f70656e4d6f6a69202843432042592d534120342e302900000000000000000060208201528352517f5b7eea860000000000000000000000000000000000000000000000000000000081526000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690635b7eea8690610bc3908690600401612c8b565b602060405180830381600087803b158015610bdd57600080fd5b505af1158015610bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1591906122b8565b90506000610c2260015490565b90508160096000610c34600485612e5a565b8152602081019190915260400160002055610c5a33610c5560016004612e8d565b6114f7565b600083118015610c6e5750610c6e83611607565b8015610c8b575033610c7f84610cf4565b6001600160a01b031614155b15610ca857610ca3610c9c84610cf4565b60016114f7565b610cee565b6004610cb48183612e5a565b610cbe9190612f0b565b610cd957600b54610ca3906001600160a01b031660016114f7565b610cee610c9c6000546001600160a01b031690565b50505050565b60006106c98261147d565b60006001600160a01b038216610d41576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526006602052604090205467ffffffffffffffff1690565b6000546001600160a01b03163314610dc15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ada565b610dcb600061161b565b565b600a8054610dda90612ed0565b80601f0160208091040260200160405190810160405280929190818152602001828054610e0690612ed0565b8015610e535780601f10610e2857610100808354040283529160200191610e53565b820191906000526020600020905b815481529060010190602001808311610e3657829003601f168201915b505050505081565b6000546001600160a01b03163314610eb55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ada565b8051610ec890600a906020840190611b1e565b5050565b6060600480546106de90612ed0565b6001600160a01b038216331415610f1e576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610f95848484610884565b6001600160a01b0383163b15610cee57610fb184848484611678565b610cee576040516368d2bf6b60e11b815260040160405180910390fd5b6060610fd982611455565b61104b5760405162461bcd60e51b815260206004820152602a60248201527f456d6f6a69466c6167546f6b656e2e746f6b656e5552493a206e6f6e6578697360448201527f74656e7420746f6b656e000000000000000000000000000000000000000000006064820152608401610ada565b600061105683610a61565b6040517f4378a6e3000000000000000000000000000000000000000000000000000000008152600481018290529091506000906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690634378a6e39060240160006040518083038186803b1580156110d557600080fd5b505afa1580156110e9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611111919081019061200b565b60608101516040517f34320bf10000000000000000000000000000000000000000000000000000000081529192506000916001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016916334320bf191611181918791600401612d60565b60006040518083038186803b15801561119957600080fd5b505afa1580156111ad573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526111d59190810190611f34565b905060006111f2826111e8600489612f0b565b8560600151610421565b90506112388360400151600a6112088987611770565b61121185611981565b604051602001611224949392919061281a565b604051602081830303815290604052611981565b6040516020016112489190612a27565b604051602081830303815290604052945050505050919050565b6040517fc45527910000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152600091818416917f0000000000000000000000000000000000000000000000000000000000000000169063c45527919060240160206040518083038186803b1580156112e357600080fd5b505afa1580156112f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131b9190611d98565b6001600160a01b03161415611332575060016106c9565b6001600160a01b0380841660009081526008602090815260408083209386168352929052205460ff165b9392505050565b600061136e60015490565b905090565b6000546001600160a01b031633146113cd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ada565b6001600160a01b0381166114495760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610ada565b6114528161161b565b50565b6000600154821080156106c9575050600090815260056020526040902054600160e01b161590565b6000816001548110156114c557600081815260056020526040902054600160e01b81166114c3575b8061135c5750600019016000818152600560205260409020546114a5565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001546001600160a01b03831661153a576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81611571576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038316600081815260066020526040902080546801000000000000000185020190554260a01b6001841460e11b1717600082815260056020526040902055808281015b6040516001830192906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48082106115bb5760015550505050565b6000611614600483612f0b565b1592915050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906116ad903390899088908890600401612c3c565b602060405180830381600087803b1580156116c757600080fd5b505af19250505080156116f7575060408051601f3d908101601f191682019092526116f491810190611f17565b60015b611752573d808015611725576040519150601f19603f3d011682016040523d82523d6000602084013e61172a565b606091505b50805161174a576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b606061177b83611607565b6117ba576040518060400160405280600281526020017f4e6f0000000000000000000000000000000000000000000000000000000000008152506117f1565b6040518060400160405280600381526020017f59657300000000000000000000000000000000000000000000000000000000008152505b825160208401516040850151608086015151611842576040518060400160405280600b81526020017f28616e6f6e796d6f757329000000000000000000000000000000000000000000815250611956565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663a57cfb246040518163ffffffff1660e01b815260040160206040518083038186803b15801561189b57600080fd5b505afa1580156118af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118d39190611d98565b6001600160a01b031663841b9d9787608001516040518263ffffffff1660e01b81526004016119029190612c78565b60006040518083038186803b15801561191a57600080fd5b505afa15801561192e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526119569190810190611f34565b60405160200161196a959493929190612a6c565b604051602081830303815290604052905092915050565b60608151600014156119a157505060408051602081019091526000815290565b6000604051806060016040528060408152602001612fa360409139905060006003845160026119d09190612e42565b6119da9190612e5a565b6119e5906004612e6e565b905060006119f4826020612e42565b67ffffffffffffffff811115611a0c57611a0c612f61565b6040519080825280601f01601f191660200182016040528015611a36576020820181803683370190505b509050818152600183018586518101602084015b81831015611aa2576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f8116850151825350600101611a4a565b600389510660018114611abc5760028114611ae857611b10565b7f3d3d000000000000000000000000000000000000000000000000000000000000600119830152611b10565b7f3d000000000000000000000000000000000000000000000000000000000000006000198301525b509398975050505050505050565b828054611b2a90612ed0565b90600052602060002090601f016020900481019282611b4c5760008555611b92565b82601f10611b6557805160ff1916838001178555611b92565b82800160010185558215611b92579182015b82811115611b92578251825591602001919060010190611b77565b50611b9e929150611ba2565b5090565b5b80821115611b9e5760008155600101611ba3565b8035611bc281612f77565b919050565b8051611bc281612f77565b600082601f830112611be357600080fd5b8135602067ffffffffffffffff80831115611c0057611c00612f61565b8260051b611c0f838201612de9565b8481528381019087850183890186018a1015611c2a57600080fd5b600093505b86841015611cc157803585811115611c4657600080fd5b89016040818c03601f1901811315611c5d57600080fd5b611c65612d79565b8883013588811115611c7657600080fd5b611c848e8b83870101611cce565b825250908201359087821115611c9957600080fd5b611ca78d8a84860101611cce565b818a01528552505060019390930192918501918501611c2f565b5098975050505050505050565b600082601f830112611cdf57600080fd5b8135611cf2611ced82612e1a565b612de9565b818152846020838601011115611d0757600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f830112611d3557600080fd5b8151611d43611ced82612e1a565b818152846020838601011115611d5857600080fd5b611768826020830160208701612ea4565b805161ffff81168114611bc257600080fd5b600060208284031215611d8d57600080fd5b813561135c81612f77565b600060208284031215611daa57600080fd5b815161135c81612f77565b60008060408385031215611dc857600080fd5b8235611dd381612f77565b91506020830135611de381612f77565b809150509250929050565b600080600060608486031215611e0357600080fd5b8335611e0e81612f77565b92506020840135611e1e81612f77565b929592945050506040919091013590565b60008060008060808587031215611e4557600080fd5b8435611e5081612f77565b93506020850135611e6081612f77565b925060408501359150606085013567ffffffffffffffff811115611e8357600080fd5b611e8f87828801611cce565b91505092959194509250565b60008060408385031215611eae57600080fd5b8235611eb981612f77565b915060208301358015158114611de357600080fd5b60008060408385031215611ee157600080fd5b8235611eec81612f77565b946020939093013593505050565b600060208284031215611f0c57600080fd5b813561135c81612f8c565b600060208284031215611f2957600080fd5b815161135c81612f8c565b600060208284031215611f4657600080fd5b815167ffffffffffffffff811115611f5d57600080fd5b61176884828501611d24565b600060208284031215611f7b57600080fd5b813567ffffffffffffffff811115611f9257600080fd5b61176884828501611cce565b600080600060608486031215611fb357600080fd5b833567ffffffffffffffff80821115611fcb57600080fd5b611fd787838801611cce565b9450602086013593506040860135915080821115611ff457600080fd5b5061200186828701611cce565b9150509250925092565b60006020828403121561201d57600080fd5b815167ffffffffffffffff8082111561203557600080fd5b90830190610120828603121561204a57600080fd5b612052612da2565b82518281111561206157600080fd5b61206d87828601611d24565b82525060208301518281111561208257600080fd5b61208e87828601611d24565b6020830152506040830151828111156120a657600080fd5b6120b287828601611d24565b6040830152506060830151828111156120ca57600080fd5b6120d687828601611d24565b6060830152506080830151828111156120ee57600080fd5b6120fa87828601611d24565b60808301525061210c60a08401611bc7565b60a082015260c08301518281111561212357600080fd5b61212f87828601611d24565b60c08301525061214160e08401611d69565b60e08201526101009150612156828401611d69565b91810191909152949350505050565b6000806040838503121561217857600080fd5b823567ffffffffffffffff8082111561219057600080fd5b9084019060e082870312156121a457600080fd5b6121ac612dc6565b8235828111156121bb57600080fd5b6121c788828601611cce565b8252506020830135828111156121dc57600080fd5b6121e888828601611cce565b60208301525060408301358281111561220057600080fd5b61220c88828601611cce565b60408301525060608301358281111561222457600080fd5b61223088828601611cce565b60608301525061224260808401611bb7565b608082015260a08301358281111561225957600080fd5b61226588828601611cce565b60a08301525060c08301358281111561227d57600080fd5b61228988828601611bd2565b60c0830152509660209590950135955050505050565b6000602082840312156122b157600080fd5b5035919050565b6000602082840312156122ca57600080fd5b5051919050565b600081518084526020808501808196508360051b8101915082860160005b8581101561233f5782840389528151604081518187526123118288018261234c565b9150508682015191508581038787015261232b818361234c565b9a87019a95505050908401906001016122ef565b5091979650505050505050565b60008151808452612364816020860160208601612ea4565b601f01601f19169290920160200192915050565b6000815161238a818560208601612ea4565b9290920192915050565b600082516123a6818460208701612ea4565b7f3c6c696e6561724772616469656e742069643d22676f6c64222078313d22302e9201918252507f32222078323d2230222079313d2230222079323d2231223e0a20203c73746f7060208201527f206f66667365743d223025222073746f702d636f6c6f723d222343434142303960408201527f222f3e0a203c73746f70206f66667365743d22353025222073746f702d636f6c60608201527f6f723d222346464631383622202f3e0a203c73746f70206f66667365743d223160808201527f303025222073746f702d636f6c6f723d2223434341423039222f3e0a3c2f6c6960a08201527f6e6561724772616469656e743e0a00000000000000000000000000000000000060c082015260ce01919050565b600082516124cb818460208701612ea4565b7f3c6c696e6561724772616469656e742069643d2273696c766572222078313d229201918252507f302e32222078323d2230222079313d2230222079323d2231223e0a20203c737460208201527f6f70206f66667365743d223025222073746f702d636f6c6f723d22233830383060408201527f3746222f3e0a203c73746f70206f66667365743d22353025222073746f702d6360608201527f6f6c6f723d222345454630463222202f3e0a203c73746f70206f66667365743d60808201527f2231303025222073746f702d636f6c6f723d2223383038303746222f3e0a3c2f60a08201527f6c696e6561724772616469656e743e0a0000000000000000000000000000000060c082015260d001919050565b600082516125f0818460208701612ea4565b7f3c72616469616c4772616469656e742069643d22736b79222063783d22302e389201918252507f222063793d22302e3333223e0a20203c73746f70206f66667365743d2230252260208201527f2073746f702d636f6c6f723d2223464646464646222f3e0a203c73746f70206f60408201527f66667365743d22323025222073746f702d636f6c6f723d22234646464646462260608201527f202f3e0a203c73746f70206f66667365743d2231303025222073746f702d636f60808201527f6c6f723d2223303042354532222f3e0a3c2f72616469616c4772616469656e7460a08201527f3e0a00000000000000000000000000000000000000000000000000000000000060c082015260c201919050565b60008451612715818460208901612ea4565b80830190507f3c2f646566733e0a203c7265637420783d22302220793d22302220776964746881527f3d223130302522206865696768743d2231303025222066696c6c3d22000000006020820152845161277681603c840160208901612ea4565b7f22202f3e0a203c75736520687265663d22000000000000000000000000000000603c929091019182015283516127b481604d840160208801612ea4565b7f22202f3e0a3c2f7376673e0a0000000000000000000000000000000000000000604d929091019182015260590195945050505050565b600083516127fd818460208801612ea4565b835190830190612811818360208801612ea4565b01949350505050565b7f7b226e616d65223a22000000000000000000000000000000000000000000000081526000855160206128538260098601838b01612ea4565b7f222c226465736372697074696f6e223a220000000000000000000000000000006009928501928301528654601a90600090600181811c908083168061289a57607f831692505b8683108114156128b857634e487b7160e01b85526022600452602485fd5b8080156128cc57600181146128e157612912565b60ff1985168988015283890187019550612912565b60008e81526020902060005b858110156129085781548b82018a01529084019089016128ed565b505086848a010195505b50505050506129d46129ab6129a5612956612950857f222c2261747472696275746573223a5b00000000000000000000000000000000815260100190565b8c612378565b7f5d2c22696d616765223a22646174613a696d6167652f7376672b786d6c3b626181527f736536342c000000000000000000000000000000000000000000000000000000602082015260250190565b89612378565b7f227d000000000000000000000000000000000000000000000000000000000000815260020190565b9a9950505050505050505050565b7f2300000000000000000000000000000000000000000000000000000000000000815260008251612a1a816001850160208701612ea4565b9190910160010192915050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251612a5f81601d850160208701612ea4565b91909101601d0192915050565b7f7b2274726169745f74797065223a225072696d617279222c2276616c7565223a815260007f22000000000000000000000000000000000000000000000000000000000000008060208401528751612acb816021860160208c01612ea4565b7f227d2c7b2274726169745f74797065223a2247726f7570222c2276616c7565226021918501918201527f3a2200000000000000000000000000000000000000000000000000000000000060418201528751612b2e816043840160208c01612ea4565b7f227d2c7b2274726169745f74797065223a2243617465676f7279222c2276616c604392909101918201527f7565223a2200000000000000000000000000000000000000000000000000000060638201528651612b92816068840160208b01612ea4565b8082019150507f227d2c7b2274726169745f74797065223a224e616d65222c2276616c7565223a6068820152816088820152612c2f6129ab612c29612bda608985018a612378565b7f227d2c7b2274726169745f74797065223a224d696e746572222c2276616c756581527f223a220000000000000000000000000000000000000000000000000000000000602082015260230190565b87612378565b9998505050505050505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612c6e608083018461234c565b9695505050505050565b60208152600061135c602083018461234c565b602081526000825160e06020840152612ca861010084018261234c565b90506020840151601f1980858403016040860152612cc6838361234c565b92506040860151915080858403016060860152612ce3838361234c565b92506060860151915080858403016080860152612d00838361234c565b925060808601519150612d1e60a08601836001600160a01b03169052565b60a08601519150808584030160c0860152612d39838361234c565b925060c08601519150808584030160e086015250612d5782826122d1565b95945050505050565b828152604060208201526000611768604083018461234c565b6040805190810167ffffffffffffffff81118282101715612d9c57612d9c612f61565b60405290565b604051610120810167ffffffffffffffff81118282101715612d9c57612d9c612f61565b60405160e0810167ffffffffffffffff81118282101715612d9c57612d9c612f61565b604051601f8201601f1916810167ffffffffffffffff81118282101715612e1257612e12612f61565b604052919050565b600067ffffffffffffffff821115612e3457612e34612f61565b50601f01601f191660200190565b60008219821115612e5557612e55612f1f565b500190565b600082612e6957612e69612f35565b500490565b6000816000190483118215151615612e8857612e88612f1f565b500290565b600082821015612e9f57612e9f612f1f565b500390565b60005b83811015612ebf578181015183820152602001612ea7565b83811115610cee5750506000910152565b600181811c90821680612ee457607f821691505b60208210811415612f0557634e487b7160e01b600052602260045260246000fd5b50919050565b600082612f1a57612f1a612f35565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461145257600080fd5b6001600160e01b03198116811461145257600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f3c7376672076696577426f783d2230203020313032342031303234222020786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f737667223e0a3c646566733e0aa2646970667358221220432165f0d51165a7cc77553f8d826b1ee2a33deafb61e1bd350ce499a356b9b764736f6c6343000806003354686973206973206f6e65206f6620656666747320746f2063726561746520284f6e2d436861696e2041737365742053746f7265295b68747470733a2f2f617373657473746f72652e7774665d2e20416c6c2074686520656d6f6a6920766563746f7273206172652063616d652066726f6d204f70656e456f6a692070726f6a656374205b68747470733a2f2f6f70656e6d6f6a692e6f72672f5d2e000000000000000000000000847a044af5225f994c60f43e8cf74d20f756187c000000000000000000000000847a044af5225f994c60f43e8cf74d20f756187c0000000000000000000000006a615ca8d7053c0a0de2d11cacb6f321ca63bd62000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101ce5760003560e01c8063715018a611610104578063a22cb465116100a2578063ca4b208b11610071578063ca4b208b146103e0578063e985e9c5146103f3578063ef2d174614610406578063f2fde38b1461040e57600080fd5b8063a22cb46514610380578063b50cbd9f14610393578063b88d4fde146103ba578063c87b56dd146103cd57600080fd5b80637b103999116100de5780637b1039991461032d5780638da5cb5b1461035457806390c3f38f1461036557806395d89b411461037857600080fd5b8063715018a61461031d5780637284e41614610325578063786f94c6146102b657600080fd5b80632ab72d2f116101715780634f38687b1161014b5780634f38687b146102bd578063597a0e36146102d05780636352211e146102f757806370a082311461030a57600080fd5b80632ab72d2f1461029057806342842e0e146102a35780634b00371f146102b657600080fd5b8063081812fc116101ad578063081812fc14610227578063095ea7b31461025257806318160ddd1461026757806323b872dd1461027d57600080fd5b80626e59e9146101d357806301ffc9a7146101fc57806306fdde031461021f575b600080fd5b6101e66101e1366004611f9e565b610421565b6040516101f39190612c78565b60405180910390f35b61020f61020a366004611efa565b610632565b60405190151581526020016101f3565b6101e66106cf565b61023a61023536600461229f565b610761565b6040516001600160a01b0390911681526020016101f3565b610265610260366004611ece565b6107be565b005b600254600154035b6040519081526020016101f3565b61026561028b366004611dee565b610884565b61026f61029e36600461229f565b610a61565b6102656102b1366004611dee565b610b08565b600461026f565b6102656102cb366004612165565b610b28565b61023a7f000000000000000000000000847a044af5225f994c60f43e8cf74d20f756187c81565b61023a61030536600461229f565b610cf4565b61026f610318366004611d7b565b610cff565b610265610d67565b6101e6610dcd565b61023a7f000000000000000000000000847a044af5225f994c60f43e8cf74d20f756187c81565b6000546001600160a01b031661023a565b610265610373366004611f69565b610e5b565b6101e6610ecc565b61026561038e366004611e9b565b610edb565b61023a7f000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c181565b6102656103c8366004611e2f565b610f8a565b6101e66103db36600461229f565b610fce565b600b5461023a906001600160a01b031681565b61020f610401366004611db5565b611262565b61026f611363565b61026561041c366004611d7b565b611373565b6040805160c0810182526005608082019081527f776869746500000000000000000000000000000000000000000000000000000060a0830152815281518083018352600c81527f75726c282373696c7665722900000000000000000000000000000000000000006020828101919091528083019190915282518084018452600a81527f75726c2823676f6c642900000000000000000000000000000000000000000000818301528284015282518084018452600981527f75726c2823736b79290000000000000000000000000000000000000000000000818301526060838101919091529251600091610516918691016129e2565b60408051601f1981840301815291905290506000610535600487612f0b565b90506000604051806080016040528060498152602001612fe360499139886040516020016105649291906127eb565b604051602081830303815290604052905081600114156105a5578060405160200161058f91906124b9565b60405160208183030381529060405290506105eb565b81600214156105bf578060405160200161058f9190612394565b81600314156105eb57806040516020016105d991906125de565b60405160208183030381529060405290505b808483600481106105fe576105fe612f4b565b60200201518460405160200161061693929190612703565b60408051808303601f1901815291905298975050505050505050565b60007f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316148061069557507f80ac58cd000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b806106c957507f5b5e139f000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6060600380546106de90612ed0565b80601f016020809104026020016040519081016040528092919081815260200182805461070a90612ed0565b80156107575780601f1061072c57610100808354040283529160200191610757565b820191906000526020600020905b81548152906001019060200180831161073a57829003601f168201915b5050505050905090565b600061076c82611455565b6107a2576040517fcf4700e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506000908152600760205260409020546001600160a01b031690565b60006107c982610cf4565b9050336001600160a01b0382161461081b576107e58133611262565b61081b576040517fcfb3b94200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600082815260076020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600061088f8261147d565b9050836001600160a01b0316816001600160a01b0316146108dc576040517fa114810000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008281526007602052604090208054338082146001600160a01b038816909114176109425761090c8633611262565b610942576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038516610982576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b801561098d57600082555b6001600160a01b038681166000908152600660205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260056020526040902055600160e11b8316610a185760018401600081815260056020526040902054610a16576001548114610a165760008181526005602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b6000610a6c82611455565b610ae35760405162461bcd60e51b815260206004820152603060248201527f456d6f6a69466c6167546f6b656e2e617373657449644f66546f6b656e3a206e60448201527f6f6e6578697374656e7420746f6b656e0000000000000000000000000000000060648201526084015b60405180910390fd5b60096000610af2600485612e5a565b8152602001908152602001600020549050919050565b610b2383838360405180602001604052806000815250610f8a565b505050565b604080518082018252601781527f4f70656e4d6f6a69202843432042592d534120342e302900000000000000000060208201528352517f5b7eea860000000000000000000000000000000000000000000000000000000081526000906001600160a01b037f000000000000000000000000847a044af5225f994c60f43e8cf74d20f756187c1690635b7eea8690610bc3908690600401612c8b565b602060405180830381600087803b158015610bdd57600080fd5b505af1158015610bf1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1591906122b8565b90506000610c2260015490565b90508160096000610c34600485612e5a565b8152602081019190915260400160002055610c5a33610c5560016004612e8d565b6114f7565b600083118015610c6e5750610c6e83611607565b8015610c8b575033610c7f84610cf4565b6001600160a01b031614155b15610ca857610ca3610c9c84610cf4565b60016114f7565b610cee565b6004610cb48183612e5a565b610cbe9190612f0b565b610cd957600b54610ca3906001600160a01b031660016114f7565b610cee610c9c6000546001600160a01b031690565b50505050565b60006106c98261147d565b60006001600160a01b038216610d41576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b506001600160a01b031660009081526006602052604090205467ffffffffffffffff1690565b6000546001600160a01b03163314610dc15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ada565b610dcb600061161b565b565b600a8054610dda90612ed0565b80601f0160208091040260200160405190810160405280929190818152602001828054610e0690612ed0565b8015610e535780601f10610e2857610100808354040283529160200191610e53565b820191906000526020600020905b815481529060010190602001808311610e3657829003601f168201915b505050505081565b6000546001600160a01b03163314610eb55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ada565b8051610ec890600a906020840190611b1e565b5050565b6060600480546106de90612ed0565b6001600160a01b038216331415610f1e576040517fb06307db00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b3360008181526008602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b610f95848484610884565b6001600160a01b0383163b15610cee57610fb184848484611678565b610cee576040516368d2bf6b60e11b815260040160405180910390fd5b6060610fd982611455565b61104b5760405162461bcd60e51b815260206004820152602a60248201527f456d6f6a69466c6167546f6b656e2e746f6b656e5552493a206e6f6e6578697360448201527f74656e7420746f6b656e000000000000000000000000000000000000000000006064820152608401610ada565b600061105683610a61565b6040517f4378a6e3000000000000000000000000000000000000000000000000000000008152600481018290529091506000906001600160a01b037f000000000000000000000000847a044af5225f994c60f43e8cf74d20f756187c1690634378a6e39060240160006040518083038186803b1580156110d557600080fd5b505afa1580156110e9573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052611111919081019061200b565b60608101516040517f34320bf10000000000000000000000000000000000000000000000000000000081529192506000916001600160a01b037f000000000000000000000000847a044af5225f994c60f43e8cf74d20f756187c16916334320bf191611181918791600401612d60565b60006040518083038186803b15801561119957600080fd5b505afa1580156111ad573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526111d59190810190611f34565b905060006111f2826111e8600489612f0b565b8560600151610421565b90506112388360400151600a6112088987611770565b61121185611981565b604051602001611224949392919061281a565b604051602081830303815290604052611981565b6040516020016112489190612a27565b604051602081830303815290604052945050505050919050565b6040517fc45527910000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152600091818416917f000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1169063c45527919060240160206040518083038186803b1580156112e357600080fd5b505afa1580156112f7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061131b9190611d98565b6001600160a01b03161415611332575060016106c9565b6001600160a01b0380841660009081526008602090815260408083209386168352929052205460ff165b9392505050565b600061136e60015490565b905090565b6000546001600160a01b031633146113cd5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ada565b6001600160a01b0381166114495760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610ada565b6114528161161b565b50565b6000600154821080156106c9575050600090815260056020526040902054600160e01b161590565b6000816001548110156114c557600081815260056020526040902054600160e01b81166114c3575b8061135c5750600019016000818152600560205260409020546114a5565b505b6040517fdf2d9b4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001546001600160a01b03831661153a576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81611571576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b038316600081815260066020526040902080546801000000000000000185020190554260a01b6001841460e11b1717600082815260056020526040902055808281015b6040516001830192906001600160a01b038716906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a48082106115bb5760015550505050565b6000611614600483612f0b565b1592915050565b600080546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906116ad903390899088908890600401612c3c565b602060405180830381600087803b1580156116c757600080fd5b505af19250505080156116f7575060408051601f3d908101601f191682019092526116f491810190611f17565b60015b611752573d808015611725576040519150601f19603f3d011682016040523d82523d6000602084013e61172a565b606091505b50805161174a576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490505b949350505050565b606061177b83611607565b6117ba576040518060400160405280600281526020017f4e6f0000000000000000000000000000000000000000000000000000000000008152506117f1565b6040518060400160405280600381526020017f59657300000000000000000000000000000000000000000000000000000000008152505b825160208401516040850151608086015151611842576040518060400160405280600b81526020017f28616e6f6e796d6f757329000000000000000000000000000000000000000000815250611956565b7f000000000000000000000000847a044af5225f994c60f43e8cf74d20f756187c6001600160a01b031663a57cfb246040518163ffffffff1660e01b815260040160206040518083038186803b15801561189b57600080fd5b505afa1580156118af573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118d39190611d98565b6001600160a01b031663841b9d9787608001516040518263ffffffff1660e01b81526004016119029190612c78565b60006040518083038186803b15801561191a57600080fd5b505afa15801561192e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526119569190810190611f34565b60405160200161196a959493929190612a6c565b604051602081830303815290604052905092915050565b60608151600014156119a157505060408051602081019091526000815290565b6000604051806060016040528060408152602001612fa360409139905060006003845160026119d09190612e42565b6119da9190612e5a565b6119e5906004612e6e565b905060006119f4826020612e42565b67ffffffffffffffff811115611a0c57611a0c612f61565b6040519080825280601f01601f191660200182016040528015611a36576020820181803683370190505b509050818152600183018586518101602084015b81831015611aa2576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f8116850151825350600101611a4a565b600389510660018114611abc5760028114611ae857611b10565b7f3d3d000000000000000000000000000000000000000000000000000000000000600119830152611b10565b7f3d000000000000000000000000000000000000000000000000000000000000006000198301525b509398975050505050505050565b828054611b2a90612ed0565b90600052602060002090601f016020900481019282611b4c5760008555611b92565b82601f10611b6557805160ff1916838001178555611b92565b82800160010185558215611b92579182015b82811115611b92578251825591602001919060010190611b77565b50611b9e929150611ba2565b5090565b5b80821115611b9e5760008155600101611ba3565b8035611bc281612f77565b919050565b8051611bc281612f77565b600082601f830112611be357600080fd5b8135602067ffffffffffffffff80831115611c0057611c00612f61565b8260051b611c0f838201612de9565b8481528381019087850183890186018a1015611c2a57600080fd5b600093505b86841015611cc157803585811115611c4657600080fd5b89016040818c03601f1901811315611c5d57600080fd5b611c65612d79565b8883013588811115611c7657600080fd5b611c848e8b83870101611cce565b825250908201359087821115611c9957600080fd5b611ca78d8a84860101611cce565b818a01528552505060019390930192918501918501611c2f565b5098975050505050505050565b600082601f830112611cdf57600080fd5b8135611cf2611ced82612e1a565b612de9565b818152846020838601011115611d0757600080fd5b816020850160208301376000918101602001919091529392505050565b600082601f830112611d3557600080fd5b8151611d43611ced82612e1a565b818152846020838601011115611d5857600080fd5b611768826020830160208701612ea4565b805161ffff81168114611bc257600080fd5b600060208284031215611d8d57600080fd5b813561135c81612f77565b600060208284031215611daa57600080fd5b815161135c81612f77565b60008060408385031215611dc857600080fd5b8235611dd381612f77565b91506020830135611de381612f77565b809150509250929050565b600080600060608486031215611e0357600080fd5b8335611e0e81612f77565b92506020840135611e1e81612f77565b929592945050506040919091013590565b60008060008060808587031215611e4557600080fd5b8435611e5081612f77565b93506020850135611e6081612f77565b925060408501359150606085013567ffffffffffffffff811115611e8357600080fd5b611e8f87828801611cce565b91505092959194509250565b60008060408385031215611eae57600080fd5b8235611eb981612f77565b915060208301358015158114611de357600080fd5b60008060408385031215611ee157600080fd5b8235611eec81612f77565b946020939093013593505050565b600060208284031215611f0c57600080fd5b813561135c81612f8c565b600060208284031215611f2957600080fd5b815161135c81612f8c565b600060208284031215611f4657600080fd5b815167ffffffffffffffff811115611f5d57600080fd5b61176884828501611d24565b600060208284031215611f7b57600080fd5b813567ffffffffffffffff811115611f9257600080fd5b61176884828501611cce565b600080600060608486031215611fb357600080fd5b833567ffffffffffffffff80821115611fcb57600080fd5b611fd787838801611cce565b9450602086013593506040860135915080821115611ff457600080fd5b5061200186828701611cce565b9150509250925092565b60006020828403121561201d57600080fd5b815167ffffffffffffffff8082111561203557600080fd5b90830190610120828603121561204a57600080fd5b612052612da2565b82518281111561206157600080fd5b61206d87828601611d24565b82525060208301518281111561208257600080fd5b61208e87828601611d24565b6020830152506040830151828111156120a657600080fd5b6120b287828601611d24565b6040830152506060830151828111156120ca57600080fd5b6120d687828601611d24565b6060830152506080830151828111156120ee57600080fd5b6120fa87828601611d24565b60808301525061210c60a08401611bc7565b60a082015260c08301518281111561212357600080fd5b61212f87828601611d24565b60c08301525061214160e08401611d69565b60e08201526101009150612156828401611d69565b91810191909152949350505050565b6000806040838503121561217857600080fd5b823567ffffffffffffffff8082111561219057600080fd5b9084019060e082870312156121a457600080fd5b6121ac612dc6565b8235828111156121bb57600080fd5b6121c788828601611cce565b8252506020830135828111156121dc57600080fd5b6121e888828601611cce565b60208301525060408301358281111561220057600080fd5b61220c88828601611cce565b60408301525060608301358281111561222457600080fd5b61223088828601611cce565b60608301525061224260808401611bb7565b608082015260a08301358281111561225957600080fd5b61226588828601611cce565b60a08301525060c08301358281111561227d57600080fd5b61228988828601611bd2565b60c0830152509660209590950135955050505050565b6000602082840312156122b157600080fd5b5035919050565b6000602082840312156122ca57600080fd5b5051919050565b600081518084526020808501808196508360051b8101915082860160005b8581101561233f5782840389528151604081518187526123118288018261234c565b9150508682015191508581038787015261232b818361234c565b9a87019a95505050908401906001016122ef565b5091979650505050505050565b60008151808452612364816020860160208601612ea4565b601f01601f19169290920160200192915050565b6000815161238a818560208601612ea4565b9290920192915050565b600082516123a6818460208701612ea4565b7f3c6c696e6561724772616469656e742069643d22676f6c64222078313d22302e9201918252507f32222078323d2230222079313d2230222079323d2231223e0a20203c73746f7060208201527f206f66667365743d223025222073746f702d636f6c6f723d222343434142303960408201527f222f3e0a203c73746f70206f66667365743d22353025222073746f702d636f6c60608201527f6f723d222346464631383622202f3e0a203c73746f70206f66667365743d223160808201527f303025222073746f702d636f6c6f723d2223434341423039222f3e0a3c2f6c6960a08201527f6e6561724772616469656e743e0a00000000000000000000000000000000000060c082015260ce01919050565b600082516124cb818460208701612ea4565b7f3c6c696e6561724772616469656e742069643d2273696c766572222078313d229201918252507f302e32222078323d2230222079313d2230222079323d2231223e0a20203c737460208201527f6f70206f66667365743d223025222073746f702d636f6c6f723d22233830383060408201527f3746222f3e0a203c73746f70206f66667365743d22353025222073746f702d6360608201527f6f6c6f723d222345454630463222202f3e0a203c73746f70206f66667365743d60808201527f2231303025222073746f702d636f6c6f723d2223383038303746222f3e0a3c2f60a08201527f6c696e6561724772616469656e743e0a0000000000000000000000000000000060c082015260d001919050565b600082516125f0818460208701612ea4565b7f3c72616469616c4772616469656e742069643d22736b79222063783d22302e389201918252507f222063793d22302e3333223e0a20203c73746f70206f66667365743d2230252260208201527f2073746f702d636f6c6f723d2223464646464646222f3e0a203c73746f70206f60408201527f66667365743d22323025222073746f702d636f6c6f723d22234646464646462260608201527f202f3e0a203c73746f70206f66667365743d2231303025222073746f702d636f60808201527f6c6f723d2223303042354532222f3e0a3c2f72616469616c4772616469656e7460a08201527f3e0a00000000000000000000000000000000000000000000000000000000000060c082015260c201919050565b60008451612715818460208901612ea4565b80830190507f3c2f646566733e0a203c7265637420783d22302220793d22302220776964746881527f3d223130302522206865696768743d2231303025222066696c6c3d22000000006020820152845161277681603c840160208901612ea4565b7f22202f3e0a203c75736520687265663d22000000000000000000000000000000603c929091019182015283516127b481604d840160208801612ea4565b7f22202f3e0a3c2f7376673e0a0000000000000000000000000000000000000000604d929091019182015260590195945050505050565b600083516127fd818460208801612ea4565b835190830190612811818360208801612ea4565b01949350505050565b7f7b226e616d65223a22000000000000000000000000000000000000000000000081526000855160206128538260098601838b01612ea4565b7f222c226465736372697074696f6e223a220000000000000000000000000000006009928501928301528654601a90600090600181811c908083168061289a57607f831692505b8683108114156128b857634e487b7160e01b85526022600452602485fd5b8080156128cc57600181146128e157612912565b60ff1985168988015283890187019550612912565b60008e81526020902060005b858110156129085781548b82018a01529084019089016128ed565b505086848a010195505b50505050506129d46129ab6129a5612956612950857f222c2261747472696275746573223a5b00000000000000000000000000000000815260100190565b8c612378565b7f5d2c22696d616765223a22646174613a696d6167652f7376672b786d6c3b626181527f736536342c000000000000000000000000000000000000000000000000000000602082015260250190565b89612378565b7f227d000000000000000000000000000000000000000000000000000000000000815260020190565b9a9950505050505050505050565b7f2300000000000000000000000000000000000000000000000000000000000000815260008251612a1a816001850160208701612ea4565b9190910160010192915050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251612a5f81601d850160208701612ea4565b91909101601d0192915050565b7f7b2274726169745f74797065223a225072696d617279222c2276616c7565223a815260007f22000000000000000000000000000000000000000000000000000000000000008060208401528751612acb816021860160208c01612ea4565b7f227d2c7b2274726169745f74797065223a2247726f7570222c2276616c7565226021918501918201527f3a2200000000000000000000000000000000000000000000000000000000000060418201528751612b2e816043840160208c01612ea4565b7f227d2c7b2274726169745f74797065223a2243617465676f7279222c2276616c604392909101918201527f7565223a2200000000000000000000000000000000000000000000000000000060638201528651612b92816068840160208b01612ea4565b8082019150507f227d2c7b2274726169745f74797065223a224e616d65222c2276616c7565223a6068820152816088820152612c2f6129ab612c29612bda608985018a612378565b7f227d2c7b2274726169745f74797065223a224d696e746572222c2276616c756581527f223a220000000000000000000000000000000000000000000000000000000000602082015260230190565b87612378565b9998505050505050505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612c6e608083018461234c565b9695505050505050565b60208152600061135c602083018461234c565b602081526000825160e06020840152612ca861010084018261234c565b90506020840151601f1980858403016040860152612cc6838361234c565b92506040860151915080858403016060860152612ce3838361234c565b92506060860151915080858403016080860152612d00838361234c565b925060808601519150612d1e60a08601836001600160a01b03169052565b60a08601519150808584030160c0860152612d39838361234c565b925060c08601519150808584030160e086015250612d5782826122d1565b95945050505050565b828152604060208201526000611768604083018461234c565b6040805190810167ffffffffffffffff81118282101715612d9c57612d9c612f61565b60405290565b604051610120810167ffffffffffffffff81118282101715612d9c57612d9c612f61565b60405160e0810167ffffffffffffffff81118282101715612d9c57612d9c612f61565b604051601f8201601f1916810167ffffffffffffffff81118282101715612e1257612e12612f61565b604052919050565b600067ffffffffffffffff821115612e3457612e34612f61565b50601f01601f191660200190565b60008219821115612e5557612e55612f1f565b500190565b600082612e6957612e69612f35565b500490565b6000816000190483118215151615612e8857612e88612f1f565b500290565b600082821015612e9f57612e9f612f1f565b500390565b60005b83811015612ebf578181015183820152602001612ea7565b83811115610cee5750506000910152565b600181811c90821680612ee457607f821691505b60208210811415612f0557634e487b7160e01b600052602260045260246000fd5b50919050565b600082612f1a57612f1a612f35565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b038116811461145257600080fd5b6001600160e01b03198116811461145257600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f3c7376672076696577426f783d2230203020313032342031303234222020786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f737667223e0a3c646566733e0aa2646970667358221220432165f0d51165a7cc77553f8d826b1ee2a33deafb61e1bd350ce499a356b9b764736f6c63430008060033

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

000000000000000000000000847a044af5225f994c60f43e8cf74d20f756187c000000000000000000000000847a044af5225f994c60f43e8cf74d20f756187c0000000000000000000000006a615ca8d7053c0a0de2d11cacb6f321ca63bd62000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1

-----Decoded View---------------
Arg [0] : _registry (address): 0x847A044aF5225f994C60f43e8cF74d20F756187C
Arg [1] : _assetStore (address): 0x847A044aF5225f994C60f43e8cF74d20F756187C
Arg [2] : _developer (address): 0x6a615Ca8D7053c0A0De2d11CACB6f321CA63BD62
Arg [3] : _proxyRegistry (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000847a044af5225f994c60f43e8cf74d20f756187c
Arg [1] : 000000000000000000000000847a044af5225f994c60f43e8cf74d20f756187c
Arg [2] : 0000000000000000000000006a615ca8d7053c0a0de2d11cacb6f321ca63bd62
Arg [3] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

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

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