ETH Price: $1,798.17 (+14.02%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...222974862025-04-18 17:50:474 days ago1744998647IN
FaceArt: F-ART Token
0 ETH0.000040940.84432062
Safe Transfer Fr...222974782025-04-18 17:49:114 days ago1744998551IN
FaceArt: F-ART Token
0 ETH0.000064510.73593951
Set Approval For...220727232025-03-18 8:58:2335 days ago1742288303IN
FaceArt: F-ART Token
0 ETH0.000023640.89628488
Set Approval For...220663022025-03-17 11:25:4736 days ago1742210747IN
FaceArt: F-ART Token
0 ETH0.000022660.85910384
Set Approval For...220662992025-03-17 11:25:1136 days ago1742210711IN
FaceArt: F-ART Token
0 ETH0.00002350.96390726
Set Approval For...212139822024-11-18 10:23:59155 days ago1731925439IN
FaceArt: F-ART Token
0 ETH0.0004859810.0155497
Set Approval For...207416002024-09-13 12:09:11221 days ago1726229351IN
FaceArt: F-ART Token
0 ETH0.000146693.02475182
Transfer From206433502024-08-30 19:01:11235 days ago1725044471IN
FaceArt: F-ART Token
0 ETH0.000164091.94764164
Fusion206432912024-08-30 18:49:23235 days ago1725043763IN
FaceArt: F-ART Token
0 ETH0.000882523.69852136
Transfer From206432662024-08-30 18:44:23235 days ago1725043463IN
FaceArt: F-ART Token
0 ETH0.000144441.71446337
Transfer From206432632024-08-30 18:43:47235 days ago1725043427IN
FaceArt: F-ART Token
0 ETH0.000174271.89960633
Transfer From206428382024-08-30 17:18:35235 days ago1725038315IN
FaceArt: F-ART Token
0 ETH0.000171292.03311263
Transfer From206428302024-08-30 17:16:59235 days ago1725038219IN
FaceArt: F-ART Token
0 ETH0.00020422.2257456
Set Approval For...204181372024-07-30 8:18:23266 days ago1722327503IN
FaceArt: F-ART Token
0 ETH0.00025525.2619852
Safe Transfer Fr...204180702024-07-30 8:04:11266 days ago1722326651IN
FaceArt: F-ART Token
0 ETH0.000424635.0328567
Burn With Ticket204179782024-07-30 7:45:47266 days ago1722325547IN
FaceArt: F-ART Token
0 ETH0.001062286.82068886
Fusion204179692024-07-30 7:43:59266 days ago1722325439IN
FaceArt: F-ART Token
0 ETH0.001457926.10706294
Set Approval For...201761122024-06-26 13:18:11300 days ago1719407891IN
FaceArt: F-ART Token
0 ETH0.000307046.33092913
Safe Transfer Fr...201502072024-06-22 22:25:59304 days ago1719095159IN
FaceArt: F-ART Token
0 ETH0.000191251.95238193
Safe Transfer Fr...201501992024-06-22 22:24:23304 days ago1719095063IN
FaceArt: F-ART Token
0 ETH0.000159552.19873329
Transfer From200604222024-06-10 9:04:59316 days ago1718010299IN
FaceArt: F-ART Token
0 ETH0.0004425.2463451
Safe Transfer Fr...198550672024-05-12 16:15:59345 days ago1715530559IN
FaceArt: F-ART Token
0 ETH0.000374783.82596986
Safe Transfer Fr...198550642024-05-12 16:15:23345 days ago1715530523IN
FaceArt: F-ART Token
0 ETH0.000411834.20417886
Safe Transfer Fr...198550572024-05-12 16:13:59345 days ago1715530439IN
FaceArt: F-ART Token
0 ETH0.000377174.30250097
Safe Transfer Fr...198550512024-05-12 16:12:47345 days ago1715530367IN
FaceArt: F-ART Token
0 ETH0.000309674.10898559
View all transactions

Latest 8 internal transactions

Advanced mode:
Parent Transaction Hash Method Block
From
To
Transfer186822812023-11-30 5:16:59509 days ago1701321419
FaceArt: F-ART Token
0.19 ETH
Transfer186822812023-11-30 5:16:59509 days ago1701321419
FaceArt: F-ART Token
0.57 ETH
Transfer175222322023-06-20 16:55:47672 days ago1687280147
FaceArt: F-ART Token
1.9875 ETH
Transfer175222322023-06-20 16:55:47672 days ago1687280147
FaceArt: F-ART Token
5.9625 ETH
Transfer173781542023-05-31 10:06:11692 days ago1685527571
FaceArt: F-ART Token
5.55 ETH
Transfer173781542023-05-31 10:06:11692 days ago1685527571
FaceArt: F-ART Token
16.65 ETH
Transfer173507442023-05-27 13:39:47696 days ago1685194787
FaceArt: F-ART Token
0.00025 ETH
Transfer173507442023-05-27 13:39:47696 days ago1685194787
FaceArt: F-ART Token
0.00075 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
FaceArt

Compiler Version
v0.8.18+commit.87f61d96

Optimization Enabled:
Yes with 250 runs

Other Settings:
default evmVersion
File 1 of 25 : FaceArt.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;
pragma abicoder v2;
// Uncomment this line to use console.log

// required to accept structs as function parameters
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/interfaces/IERC2981.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/AccessControl.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "@openzeppelin/contracts/utils/math/Math.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/finance/PaymentSplitter.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "@openzeppelin/contracts/utils/cryptography/EIP712.sol";

contract FaceArt is ERC721, ERC721Enumerable, PaymentSplitter, Pausable, ReentrancyGuard, AccessControl, EIP712, IERC2981 {
    using Address for address;
    using Strings for uint256;
    using Counters for Counters.Counter;

    bytes32 public constant OWNER_ROLE = keccak256("OWNER_ROLE");
    bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE");
    string private constant SIGNING_DOMAIN = "FaceArt";
    string private constant SIGNATURE_VERSION = "1";
    string public baseURI;

    enum Level {
        A0,
        B0,
        A1,
        B1,
        C1,
        D1
    }
    uint256 private constant FREEMINT_LOT_SIZE = 3;
    uint256 public mintPrice = 0.001 ether;
    uint256 private maxMintQuantity = 10;
    uint256 private burnVoucherExpiry = 2 hours;
    address public crossmintAddress;
    mapping (address => bool) public blockedMarketplaces;
    mapping(address => mapping(address => bool)) affiliateMapping;
    mapping(address => uint) public affiliateCounter;
    mapping(address => uint) public freeMintCounter;
    mapping(address => bool) public whitelist;
    mapping(address => bool) public minterlist;
    mapping(Level => uint) levelSupply;
    mapping(Level => uint) public levelMintedCounter;
    mapping(uint => Level) public tokenLevel;
    mapping(uint => BurnVoucher) burnVoucher;
    bool private _fusionEnabled;
    Counters.Counter private _tokenIdCounter;
    RoyaltyInfo private _currentRoyaltyInfo;

    address[] private _team = [0x70B66C23F8f7ab6AcACEC011337e58c9314E96cF, 0x99A7130dc775dB71E5252dE59F0f156DF1B96d89];

    uint[] private _shares = [750, 250];

    struct MintVoucher {
        address recipient;
        address referrer;
        bytes signature;
    }

    struct BurnVoucher {
        address recipient;
        uint256 emitTimestamp;
    }

    struct RoyaltyInfo {
        address receiver;
        uint96 royaltyFraction;
    }

    event BurnTicket(address _recipient, uint256 _emitTimestamp, uint256 _tokenId);
    event FreeMintTicket(address _recipient, uint256 _emitTimestamp);
    event EnableFusion(address account);
    event DisableFusion(address account);

    constructor(address _minter) ERC721("FaceArt", "F-ART") EIP712(SIGNING_DOMAIN, SIGNATURE_VERSION) PaymentSplitter(_team, _shares) {
        _pause();
        _setupRole(MINTER_ROLE, _minter);
        _setupRole(OWNER_ROLE, _msgSender());
        crossmintAddress = 0xdAb1a1854214684acE522439684a145E62505233;
        levelSupply[Level.A0] = 3400;
        levelSupply[Level.B0] = 3400;

        levelSupply[Level.A1] = 2000;
        levelSupply[Level.B1] = 800;
        levelSupply[Level.C1] = 400;
        levelSupply[Level.D1] = 200;
    }

    function pause() public onlyRole(OWNER_ROLE) {
        _pause();
    }

    function unpause() public onlyRole(OWNER_ROLE) {
        _unpause();
    }

    function enableFusion() public onlyRole(OWNER_ROLE) {
        _fusionEnabled = true;
    }

    modifier whenFusionEnabled() {
        require(_fusionEnabled, "Fusion not enabled");
        _;
    }

    function setMintPrice(uint256 newMintPrice) public onlyRole(OWNER_ROLE) {
        mintPrice = newMintPrice;
    }

    function setCrossmintAddress(address _crossmintAddress) public onlyRole(OWNER_ROLE) {
        crossmintAddress = _crossmintAddress;
    }

    function getMintPrice() public view returns (uint256) {
        return mintPrice;
    }

    function getFreeMintQuantity(address _account) public view returns (uint256) {
        return freeMintCounter[_account];
    }

    function setBaseURI(string memory newBaseURI) public onlyRole(OWNER_ROLE) {
        baseURI = newBaseURI;
    }

    function _baseURI() internal view override returns (string memory) {
        return baseURI;
    }

    function _levelName(Level _level) internal pure returns (string memory) {
        if (_level == Level.A0) return "A0";
        if (_level == Level.B0) return "B0";
        if (_level == Level.A1) return "A1";
        if (_level == Level.B1) return "B1";
        if (_level == Level.C1) return "C1";
        if (_level == Level.D1) return "D1";
        return "KO";
    }

    function getLevel(uint256 tokenId) public view returns (string memory) {
        _requireMinted(tokenId);
        return _levelName(tokenLevel[tokenId]);
    }

    function gift(uint _quantity, address _to) external onlyRole(OWNER_ROLE) {
        require(_quantity <= maxMintQuantity, "Exceeds max mint quantity per tx");
        require((levelMintedCounter[Level.A0] + levelMintedCounter[Level.B0] + _quantity) <= (levelSupply[Level.A0] + levelSupply[Level.B0]), "Exceeds Level 0 supply");
        for (uint256 i; i < _quantity;) {
            _tokenIdCounter.increment();
            uint256 currentTokenId = _tokenIdCounter.current();
            _safeMint(_to, currentTokenId);
            tokenLevel[currentTokenId] = randomizeLevel0(currentTokenId);

            unchecked {
                levelMintedCounter[tokenLevel[currentTokenId]]++;
                i++;
            }
        }
    }

    function _mint(uint256 quantity, MintVoucher memory voucher) internal {
        require(quantity <= maxMintQuantity, "Exceeds max mint quantity per tx");
        require((levelMintedCounter[Level.A0] + levelMintedCounter[Level.B0] + quantity) <= (levelSupply[Level.A0] + levelSupply[Level.B0]), "Exceeds Level 0 supply");
        if (minterlist[voucher.recipient]) {
            uint256 freeMint = freeMintCounter[voucher.recipient];
            uint256 diffQty = quantity >= freeMint ? quantity - freeMint : 0;

            require( msg.value == mintPrice * diffQty, "Not enough ETH sent");

            if (freeMint != 0) {
                uint256 diffQtyNd = freeMint >= quantity ? freeMint - quantity : 0;
                freeMintCounter[voucher.recipient] = diffQtyNd;
            }
        } else {
            require(msg.value == mintPrice * quantity, "Not enough ETH sent");
        }

        for (uint256 i; i < quantity;) {
            _tokenIdCounter.increment();
            uint256 currentTokenId = _tokenIdCounter.current();
            _safeMint(voucher.recipient, currentTokenId);
            tokenLevel[currentTokenId] = randomizeLevel0(currentTokenId);
            levelMintedCounter[tokenLevel[currentTokenId]]++;

            unchecked {
                i++;
            }
        }

        if (voucher.referrer != address(0)) {
            if (!affiliateMapping[voucher.referrer][voucher.recipient]) {
                affiliateCounter[voucher.referrer]++;
                affiliateMapping[voucher.referrer][voucher.recipient] = true;
                if (affiliateCounter[voucher.referrer] % FREEMINT_LOT_SIZE == 0) {
                    freeMintCounter[voucher.referrer]++;
                    emit FreeMintTicket(voucher.referrer, block.timestamp);
                }
            }
        } else if (!whitelist[voucher.recipient]) {
            whitelist[voucher.recipient] = true;
        }
        if (!minterlist[voucher.recipient]) {
            minterlist[voucher.recipient] = true;
        }
    }

    function mintCrossmint(uint256 quantity, address to, address recipient, address referrer) public payable whenNotPaused {
        require(to == crossmintAddress, "Restricted for crossmint");
        require(_msgSender() == crossmintAddress, "Should be to crossmint");
        require(_msgSender() != referrer, "Referrer can't be crossmint");
        require(recipient != referrer, "Referrer can't be the recipient");

        MintVoucher memory voucher = MintVoucher({recipient: recipient, referrer: referrer, signature: ""});
        _mint(quantity, voucher);
    }

    /// @notice Mint function
    /// @param voucher A signed MintVoucher.
    function mint(uint256 quantity, address to, MintVoucher calldata voucher) public payable whenNotPaused {
        // make sure signature is valid and get the address of the signer
        address signer = _verify(voucher);
        // make sure that the signer is authorized to mint NFTs
        require(hasRole(MINTER_ROLE, signer), "Signature invalid or unauthorized");
        require(to == _msgSender() && (voucher.recipient == _msgSender()), "Voucher is for different caller");
        require(voucher.referrer != _msgSender(), "Referrer can't be the caller");

        _mint(quantity, voucher);
    }

    function randomizeLevel0(uint256 salt) private view returns (Level) {
        if (levelMintedCounter[Level.A0] == levelSupply[Level.A0]) {
            return Level.B0;
        } else if (levelMintedCounter[Level.B0] == levelSupply[Level.B0]) {
            return Level.A0;
        }
        return random(salt, 2) == 0 ? Level.A0 : Level.B0;
    }

    /// @notice Fusion function
    function fusion(uint256 tokenId1, uint256 tokenId2) public whenNotPaused whenFusionEnabled returns (uint256) {
        require(!Address.isContract(_msgSender()), "Cannot be called from contract");
        require(ownerOf(tokenId1) == _msgSender(), "Not owner of NFT");
        require(tokenLevel[tokenId1] < Level.A1, "Invalid level");
        require(ownerOf(tokenId2) == _msgSender(), "Not owner of NFT");
        require(tokenLevel[tokenId2] < Level.A1, "Invalid level");
        require(tokenLevel[tokenId1] != tokenLevel[tokenId2], "Tokens should have different type");

        _burn(tokenId1);
        _burn(tokenId2);
        _tokenIdCounter.increment();
        uint256 currentTokenId = _tokenIdCounter.current();
        _safeMint(_msgSender(), currentTokenId);
        tokenLevel[currentTokenId] = randomizeLevel1(currentTokenId);
        levelMintedCounter[tokenLevel[currentTokenId]]++;
        if (whitelist[_msgSender()]) {
            burnVoucher[currentTokenId] = BurnVoucher({recipient: _msgSender(), emitTimestamp: block.timestamp});
            emit BurnTicket(_msgSender(), block.timestamp, currentTokenId);
        }
        return currentTokenId;
    }

    function burnWithTicket(uint256 burnTokenId) public whenNotPaused {
        require(!Address.isContract(_msgSender()), "Cannot be called from contract");
        require(ownerOf(burnTokenId) == _msgSender(), "Not owner of NFT");
        require(burnVoucher[burnTokenId].emitTimestamp + burnVoucherExpiry >= block.timestamp, "No valid burn ticket");

        if(levelMintedCounter[tokenLevel[burnTokenId]] > 0) levelMintedCounter[tokenLevel[burnTokenId]]--;
        delete burnVoucher[burnTokenId];
        delete tokenLevel[burnTokenId];
        _burn(burnTokenId);
        _tokenIdCounter.increment();
        uint256 currentTokenId = _tokenIdCounter.current();
        _safeMint(_msgSender(), currentTokenId);
        tokenLevel[currentTokenId] = randomizeLevel1(currentTokenId);
        levelMintedCounter[tokenLevel[currentTokenId]]++;
    }

    function randomizeLevel1(uint256 salt) private view returns (Level) {
        uint256[4] memory _level1Supply = [levelSupply[Level.A1], levelSupply[Level.B1], levelSupply[Level.C1], levelSupply[Level.D1]];
        if (levelMintedCounter[Level.A1] == levelSupply[Level.A1]) {
            _level1Supply[0] = 0;
        }
        if (levelMintedCounter[Level.B1] == levelSupply[Level.B1]) {
            _level1Supply[1] = 0;
        }
        if (levelMintedCounter[Level.C1] == levelSupply[Level.C1]) {
            _level1Supply[2] = 0;
        }
        if (levelMintedCounter[Level.D1] == levelSupply[Level.D1]) {
            _level1Supply[3] = 0;
        }
        uint256 randomValue = random(salt, _level1Supply[0] + _level1Supply[1] + _level1Supply[2] + _level1Supply[3]);
        if (randomValue < _level1Supply[0]) {
            return Level.A1;
        }
        if ((randomValue >= _level1Supply[0]) && (randomValue < (_level1Supply[0] + _level1Supply[1]))) {
            return Level.B1;
        }
        if ((randomValue >= (_level1Supply[0] + _level1Supply[1])) && (randomValue < (_level1Supply[0] + _level1Supply[1] + _level1Supply[2]))) {
            return Level.C1;
        }
        return Level.D1;
    }

    function random(uint256 salt, uint256 mod) public view returns (uint256) {
        return uint256(keccak256(abi.encodePacked(block.timestamp, _msgSender(), salt))) % mod;
    }

    /**
     * @notice Release the gains on every accounts
     */
    function releaseAll() external nonReentrant onlyRole(OWNER_ROLE) {
        for (uint i = 0; i < _team.length; i++) {
            release(payable(payee(i)));
        }
    }

    /**
     * @inheritdoc IERC2981
     */
    function royaltyInfo(uint256 , uint256 _salePrice) public view virtual override returns (address, uint256) {
        RoyaltyInfo memory royalty = _currentRoyaltyInfo;

        uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator();

        return (royalty.receiver, royaltyAmount);
    }

    /**
     * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a
     * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an
     * override.
     */
    function _feeDenominator() internal pure virtual returns (uint96) {
        return 10000;
    }

    /**
     * @dev Sets the royalty information that all ids in this contract will default to.
     *
     * Requirements:
     *
     * - `receiver` cannot be the zero address.
     * - `feeNumerator` cannot be greater than the fee denominator.
     */
    function setRoyaltyInfo(address receiver, uint96 feeNumerator) external onlyRole(OWNER_ROLE) {
        require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice");
        require(receiver != address(0), "ERC2981: invalid receiver");

        _currentRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator);
    }

    function approve(address to, uint256 id) public virtual override(ERC721, IERC721) {
        require(!blockedMarketplaces[to], "Invalid marketplace, not allowed");
        super.approve(to, id);
    }

    function setApprovalForAll(address operator, bool approved) public virtual override(ERC721, IERC721) {
        require(!approved || !blockedMarketplaces[operator], "Invalid marketplace, not allowed");
        super.setApprovalForAll(operator, approved);
    }

    function setBlockedMarketplace(address marketplace, bool blocked) public onlyRole(OWNER_ROLE) {
        blockedMarketplaces[marketplace] = blocked;
    }

    //Not allowing receiving ethers outside minting functions
    receive() external payable override {
        revert("Only if you mint");
    }

    /// @notice Returns a hash of the given MintVoucher, prepared using EIP712 typed data hashing rules.
    /// @param voucher An MintVoucher to hash.
    function _hash(MintVoucher calldata voucher) internal view returns (bytes32) {
        return _hashTypedDataV4(keccak256(abi.encode(keccak256("MintVoucher(address recipient,address referrer)"), voucher.recipient, voucher.referrer)));
    }

    /// @notice Verifies the signature for a given MintVoucher, returning the address of the signer.
    /// @dev Will revert if the signature is invalid. Does not verify that the signer is authorized to mint NFTs.
    /// @param voucher An MintVoucher describing an unminted NFT.
    function _verify(MintVoucher calldata voucher) internal view returns (address) {
        bytes32 digest = _hash(voucher);
        return ECDSA.recover(digest, voucher.signature);
    }

    function _beforeTokenTransfer(address from, address to, uint256 tokenId, uint256 batchSize) internal override(ERC721, ERC721Enumerable) {
        super._beforeTokenTransfer(from, to, tokenId, batchSize);
    }

    /// @notice Returns the chain id of the current blockchain.
    /// @dev This is used to workaround an issue with ganache returning different values from the on-chain chainid() function and
    ///  the eth_chainId RPC method. See https://github.com/protocol/nft-website/issues/121 for context.
    function getChainID() external view returns (uint256) {
        uint256 id;
        assembly {
            id := chainid()
        }
        return id;
    }

    // The following functions are overrides required by Solidity.

    function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl, IERC165) returns (bool) {
        return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId);
    }
}

File 2 of 25 : AccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (access/AccessControl.sol)

pragma solidity ^0.8.0;

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

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

    mapping(bytes32 => RoleData) private _roles;

    bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00;

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

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

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

    /**
     * @dev Revert with a standard message if `_msgSender()` is missing `role`.
     * Overriding this function changes the behavior of the {onlyRole} modifier.
     *
     * Format of the revert message is described in {_checkRole}.
     *
     * _Available since v4.6._
     */
    function _checkRole(bytes32 role) internal view virtual {
        _checkRole(role, _msgSender());
    }

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

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

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

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

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

        _revokeRole(role, account);
    }

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

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

    /**
     * @dev Grants `role` to `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleGranted} event.
     */
    function _grantRole(bytes32 role, address account) internal virtual {
        if (!hasRole(role, account)) {
            _roles[role].members[account] = true;
            emit RoleGranted(role, account, _msgSender());
        }
    }

    /**
     * @dev Revokes `role` from `account`.
     *
     * Internal function without access restriction.
     *
     * May emit a {RoleRevoked} event.
     */
    function _revokeRole(bytes32 role, address account) internal virtual {
        if (hasRole(role, account)) {
            _roles[role].members[account] = false;
            emit RoleRevoked(role, account, _msgSender());
        }
    }
}

File 3 of 25 : IAccessControl.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 4 of 25 : PaymentSplitter.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (finance/PaymentSplitter.sol)

pragma solidity ^0.8.0;

import "../token/ERC20/utils/SafeERC20.sol";
import "../utils/Address.sol";
import "../utils/Context.sol";

/**
 * @title PaymentSplitter
 * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware
 * that the Ether will be split in this way, since it is handled transparently by the contract.
 *
 * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each
 * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim
 * an amount proportional to the percentage of total shares they were assigned. The distribution of shares is set at the
 * time of contract deployment and can't be updated thereafter.
 *
 * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the
 * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release}
 * function.
 *
 * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and
 * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you
 * to run tests before sending real value to this contract.
 */
contract PaymentSplitter is Context {
    event PayeeAdded(address account, uint256 shares);
    event PaymentReleased(address to, uint256 amount);
    event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount);
    event PaymentReceived(address from, uint256 amount);

    uint256 private _totalShares;
    uint256 private _totalReleased;

    mapping(address => uint256) private _shares;
    mapping(address => uint256) private _released;
    address[] private _payees;

    mapping(IERC20 => uint256) private _erc20TotalReleased;
    mapping(IERC20 => mapping(address => uint256)) private _erc20Released;

    /**
     * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at
     * the matching position in the `shares` array.
     *
     * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no
     * duplicates in `payees`.
     */
    constructor(address[] memory payees, uint256[] memory shares_) payable {
        require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch");
        require(payees.length > 0, "PaymentSplitter: no payees");

        for (uint256 i = 0; i < payees.length; i++) {
            _addPayee(payees[i], shares_[i]);
        }
    }

    /**
     * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully
     * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the
     * reliability of the events, and not the actual splitting of Ether.
     *
     * To learn more about this see the Solidity documentation for
     * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback
     * functions].
     */
    receive() external payable virtual {
        emit PaymentReceived(_msgSender(), msg.value);
    }

    /**
     * @dev Getter for the total shares held by payees.
     */
    function totalShares() public view returns (uint256) {
        return _totalShares;
    }

    /**
     * @dev Getter for the total amount of Ether already released.
     */
    function totalReleased() public view returns (uint256) {
        return _totalReleased;
    }

    /**
     * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20
     * contract.
     */
    function totalReleased(IERC20 token) public view returns (uint256) {
        return _erc20TotalReleased[token];
    }

    /**
     * @dev Getter for the amount of shares held by an account.
     */
    function shares(address account) public view returns (uint256) {
        return _shares[account];
    }

    /**
     * @dev Getter for the amount of Ether already released to a payee.
     */
    function released(address account) public view returns (uint256) {
        return _released[account];
    }

    /**
     * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an
     * IERC20 contract.
     */
    function released(IERC20 token, address account) public view returns (uint256) {
        return _erc20Released[token][account];
    }

    /**
     * @dev Getter for the address of the payee number `index`.
     */
    function payee(uint256 index) public view returns (address) {
        return _payees[index];
    }

    /**
     * @dev Getter for the amount of payee's releasable Ether.
     */
    function releasable(address account) public view returns (uint256) {
        uint256 totalReceived = address(this).balance + totalReleased();
        return _pendingPayment(account, totalReceived, released(account));
    }

    /**
     * @dev Getter for the amount of payee's releasable `token` tokens. `token` should be the address of an
     * IERC20 contract.
     */
    function releasable(IERC20 token, address account) public view returns (uint256) {
        uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token);
        return _pendingPayment(account, totalReceived, released(token, account));
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the
     * total shares and their previous withdrawals.
     */
    function release(address payable account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 payment = releasable(account);

        require(payment != 0, "PaymentSplitter: account is not due payment");

        // _totalReleased is the sum of all values in _released.
        // If "_totalReleased += payment" does not overflow, then "_released[account] += payment" cannot overflow.
        _totalReleased += payment;
        unchecked {
            _released[account] += payment;
        }

        Address.sendValue(account, payment);
        emit PaymentReleased(account, payment);
    }

    /**
     * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their
     * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20
     * contract.
     */
    function release(IERC20 token, address account) public virtual {
        require(_shares[account] > 0, "PaymentSplitter: account has no shares");

        uint256 payment = releasable(token, account);

        require(payment != 0, "PaymentSplitter: account is not due payment");

        // _erc20TotalReleased[token] is the sum of all values in _erc20Released[token].
        // If "_erc20TotalReleased[token] += payment" does not overflow, then "_erc20Released[token][account] += payment"
        // cannot overflow.
        _erc20TotalReleased[token] += payment;
        unchecked {
            _erc20Released[token][account] += payment;
        }

        SafeERC20.safeTransfer(token, account, payment);
        emit ERC20PaymentReleased(token, account, payment);
    }

    /**
     * @dev internal logic for computing the pending payment of an `account` given the token historical balances and
     * already released amounts.
     */
    function _pendingPayment(
        address account,
        uint256 totalReceived,
        uint256 alreadyReleased
    ) private view returns (uint256) {
        return (totalReceived * _shares[account]) / _totalShares - alreadyReleased;
    }

    /**
     * @dev Add a new payee to the contract.
     * @param account The address of the payee to add.
     * @param shares_ The number of shares owned by the payee.
     */
    function _addPayee(address account, uint256 shares_) private {
        require(account != address(0), "PaymentSplitter: account is the zero address");
        require(shares_ > 0, "PaymentSplitter: shares are 0");
        require(_shares[account] == 0, "PaymentSplitter: account already has shares");

        _payees.push(account);
        _shares[account] = shares_;
        _totalShares = _totalShares + shares_;
        emit PayeeAdded(account, shares_);
    }
}

File 5 of 25 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Interface for the NFT Royalty Standard.
 *
 * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
 * support for royalty payments across all NFT marketplaces and ecosystem participants.
 *
 * _Available since v4.5._
 */
interface IERC2981 is IERC165 {
    /**
     * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
     * exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
     */
    function royaltyInfo(uint256 tokenId, uint256 salePrice)
        external
        view
        returns (address receiver, uint256 royaltyAmount);
}

File 6 of 25 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 7 of 25 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }
}

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

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
 * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
 *
 * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
 * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
 * need to send a transaction, and thus is not required to hold Ether at all.
 */
interface IERC20Permit {
    /**
     * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
     * given ``owner``'s signed approval.
     *
     * IMPORTANT: The same issues {IERC20-approve} has related to transaction
     * ordering also apply here.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `deadline` must be a timestamp in the future.
     * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
     * over the EIP712-formatted function arguments.
     * - the signature must use ``owner``'s current nonce (see {nonces}).
     *
     * For more information on the signature format, see the
     * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
     * section].
     */
    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) external;

    /**
     * @dev Returns the current nonce for `owner`. This value must be
     * included whenever a signature is generated for {permit}.
     *
     * Every successful call to {permit} increases ``owner``'s nonce by one. This
     * prevents a signature from being used multiple times.
     */
    function nonces(address owner) external view returns (uint256);

    /**
     * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
     */
    // solhint-disable-next-line func-name-mixedcase
    function DOMAIN_SEPARATOR() external view returns (bytes32);
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 10 of 25 : SafeERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC20/utils/SafeERC20.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../extensions/draft-IERC20Permit.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    function safePermit(
        IERC20Permit token,
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal {
        uint256 nonceBefore = token.nonces(owner);
        token.permit(owner, spender, value, deadline, v, r, s);
        uint256 nonceAfter = token.nonces(owner);
        require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

File 11 of 25 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.2) (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: address zero is not a valid owner");
        return _balances[owner];
    }

    /**
     * @dev See {IERC721-ownerOf}.
     */
    function ownerOf(uint256 tokenId) public view virtual override returns (address) {
        address owner = _ownerOf(tokenId);
        require(owner != address(0), "ERC721: invalid token ID");
        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) {
        _requireMinted(tokenId);

        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 token owner or approved for all"
        );

        _approve(to, tokenId);
    }

    /**
     * @dev See {IERC721-getApproved}.
     */
    function getApproved(uint256 tokenId) public view virtual override returns (address) {
        _requireMinted(tokenId);

        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: caller is not token owner or 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: caller is not token owner or 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 the owner of the `tokenId`. Does NOT revert if token doesn't exist
     */
    function _ownerOf(uint256 tokenId) internal view virtual returns (address) {
        return _owners[tokenId];
    }

    /**
     * @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 _ownerOf(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) {
        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, 1);

        // Check that tokenId was not minted by `_beforeTokenTransfer` hook
        require(!_exists(tokenId), "ERC721: token already minted");

        unchecked {
            // Will not overflow unless all 2**256 token ids are minted to the same owner.
            // Given that tokens are minted one by one, it is impossible in practice that
            // this ever happens. Might change if we allow batch minting.
            // The ERC fails to describe this case.
            _balances[to] += 1;
        }

        _owners[tokenId] = to;

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

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

    /**
     * @dev Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     * This is an internal function that does not check if the sender is authorized to operate on the token.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId) internal virtual {
        address owner = ERC721.ownerOf(tokenId);

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

        // Update ownership in case tokenId was transferred by `_beforeTokenTransfer` hook
        owner = ERC721.ownerOf(tokenId);

        // Clear approvals
        delete _tokenApprovals[tokenId];

        unchecked {
            // Cannot overflow, as that would require more tokens to be burned/transferred
            // out than the owner initially received through minting and transferring in.
            _balances[owner] -= 1;
        }
        delete _owners[tokenId];

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

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

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

        // Check that tokenId was not transferred by `_beforeTokenTransfer` hook
        require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");

        // Clear approvals from the previous owner
        delete _tokenApprovals[tokenId];

        unchecked {
            // `_balances[from]` cannot overflow for the same reason as described in `_burn`:
            // `from`'s balance is the number of token held, which is at least one before the current
            // transfer.
            // `_balances[to]` could overflow in the conditions described in `_mint`. That would require
            // all 2**256 token ids to be minted, which in practice is impossible.
            _balances[from] -= 1;
            _balances[to] += 1;
        }
        _owners[tokenId] = to;

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId, 1);
    }

    /**
     * @dev Approve `to` to operate on `tokenId`
     *
     * Emits an {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 an {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 Reverts if the `tokenId` has not been minted yet.
     */
    function _requireMinted(uint256 tokenId) internal view virtual {
        require(_exists(tokenId), "ERC721: invalid token ID");
    }

    /**
     * @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 {
                    /// @solidity memory-safe-assembly
                    assembly {
                        revert(add(32, reason), mload(reason))
                    }
                }
            }
        } else {
            return true;
        }
    }

    /**
     * @dev Hook that is called before any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens will be transferred to `to`.
     * - When `from` is zero, the tokens will be minted for `to`.
     * - When `to` is zero, ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual {}

    /**
     * @dev Hook that is called after any token transfer. This includes minting and burning. If {ERC721Consecutive} is
     * used, the hook may be called as part of a consecutive (batch) mint, as indicated by `batchSize` greater than 1.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s tokens were transferred to `to`.
     * - When `from` is zero, the tokens were minted for `to`.
     * - When `to` is zero, ``from``'s tokens were burned.
     * - `from` and `to` are never both zero.
     * - `batchSize` is non-zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual {}

    /**
     * @dev Unsafe write access to the balances, used by extensions that "mint" tokens using an {ownerOf} override.
     *
     * WARNING: Anyone calling this MUST ensure that the balances remain consistent with the ownership. The invariant
     * being that for any address `a` the value returned by `balanceOf(a)` must be equal to the number of tokens such
     * that `ownerOf(tokenId)` is `a`.
     */
    // solhint-disable-next-line func-name-mixedcase
    function __unsafe_increaseBalance(address account, uint256 amount) internal {
        _balances[account] += amount;
    }
}

File 12 of 25 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../ERC721.sol";
import "./IERC721Enumerable.sol";

/**
 * @dev This implements an optional extension of {ERC721} defined in the EIP that adds
 * enumerability of all the token ids in the contract as well as all token ids owned by each
 * account.
 */
abstract contract ERC721Enumerable is ERC721, IERC721Enumerable {
    // Mapping from owner to list of owned token IDs
    mapping(address => mapping(uint256 => uint256)) private _ownedTokens;

    // Mapping from token ID to index of the owner tokens list
    mapping(uint256 => uint256) private _ownedTokensIndex;

    // Array with all token ids, used for enumeration
    uint256[] private _allTokens;

    // Mapping from token id to position in the allTokens array
    mapping(uint256 => uint256) private _allTokensIndex;

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

    /**
     * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds");
        return _ownedTokens[owner][index];
    }

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

    /**
     * @dev See {IERC721Enumerable-tokenByIndex}.
     */
    function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
        require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds");
        return _allTokens[index];
    }

    /**
     * @dev See {ERC721-_beforeTokenTransfer}.
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 firstTokenId,
        uint256 batchSize
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, firstTokenId, batchSize);

        if (batchSize > 1) {
            // Will only trigger during construction. Batch transferring (minting) is not available afterwards.
            revert("ERC721Enumerable: consecutive transfers not supported");
        }

        uint256 tokenId = firstTokenId;

        if (from == address(0)) {
            _addTokenToAllTokensEnumeration(tokenId);
        } else if (from != to) {
            _removeTokenFromOwnerEnumeration(from, tokenId);
        }
        if (to == address(0)) {
            _removeTokenFromAllTokensEnumeration(tokenId);
        } else if (to != from) {
            _addTokenToOwnerEnumeration(to, tokenId);
        }
    }

    /**
     * @dev Private function to add a token to this extension's ownership-tracking data structures.
     * @param to address representing the new owner of the given token ID
     * @param tokenId uint256 ID of the token to be added to the tokens list of the given address
     */
    function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private {
        uint256 length = ERC721.balanceOf(to);
        _ownedTokens[to][length] = tokenId;
        _ownedTokensIndex[tokenId] = length;
    }

    /**
     * @dev Private function to add a token to this extension's token tracking data structures.
     * @param tokenId uint256 ID of the token to be added to the tokens list
     */
    function _addTokenToAllTokensEnumeration(uint256 tokenId) private {
        _allTokensIndex[tokenId] = _allTokens.length;
        _allTokens.push(tokenId);
    }

    /**
     * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that
     * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for
     * gas optimizations e.g. when performing a transfer operation (avoiding double writes).
     * This has O(1) time complexity, but alters the order of the _ownedTokens array.
     * @param from address representing the previous owner of the given token ID
     * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address
     */
    function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private {
        // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = ERC721.balanceOf(from) - 1;
        uint256 tokenIndex = _ownedTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary
        if (tokenIndex != lastTokenIndex) {
            uint256 lastTokenId = _ownedTokens[from][lastTokenIndex];

            _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
            _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index
        }

        // This also deletes the contents at the last position of the array
        delete _ownedTokensIndex[tokenId];
        delete _ownedTokens[from][lastTokenIndex];
    }

    /**
     * @dev Private function to remove a token from this extension's token tracking data structures.
     * This has O(1) time complexity, but alters the order of the _allTokens array.
     * @param tokenId uint256 ID of the token to be removed from the tokens list
     */
    function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private {
        // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and
        // then delete the last slot (swap and pop).

        uint256 lastTokenIndex = _allTokens.length - 1;
        uint256 tokenIndex = _allTokensIndex[tokenId];

        // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so
        // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding
        // an 'if' statement (like in _removeTokenFromOwnerEnumeration)
        uint256 lastTokenId = _allTokens[lastTokenIndex];

        _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token
        _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index

        // This also deletes the contents at the last position of the array
        delete _allTokensIndex[tokenId];
        _allTokens.pop();
    }
}

File 13 of 25 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

/**
 * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
 * @dev See https://eips.ethereum.org/EIPS/eip-721
 */
interface IERC721Enumerable is IERC721 {
    /**
     * @dev Returns the total amount of tokens stored by the contract.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns a token ID owned by `owner` at a given `index` of its token list.
     * Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
     */
    function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256);

    /**
     * @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
     * Use along with {totalSupply} to enumerate all tokens.
     */
    function tokenByIndex(uint256 index) external view returns (uint256);
}

File 14 of 25 : 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 15 of 25 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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 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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721
     * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must
     * understand this adds an external call which potentially creates a reentrancy vulnerability.
     *
     * 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 16 of 25 : 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 17 of 25 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.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 functionCallWithValue(target, data, 0, "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");
        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResultFromTarget(target, 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) {
        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResultFromTarget(target, success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
     * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
     *
     * _Available since v4.8._
     */
    function verifyCallResultFromTarget(
        address target,
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        if (success) {
            if (returndata.length == 0) {
                // only check isContract if the call was successful and the return data is empty
                // otherwise we already know that it was a contract
                require(isContract(target), "Address: call to non-contract");
            }
            return returndata;
        } else {
            _revert(returndata, errorMessage);
        }
    }

    /**
     * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason or 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 {
            _revert(returndata, errorMessage);
        }
    }

    function _revert(bytes memory returndata, string memory errorMessage) private pure {
        // Look for revert reason and bubble it up if present
        if (returndata.length > 0) {
            // The easiest way to bubble the revert reason is using memory via assembly
            /// @solidity memory-safe-assembly
            assembly {
                let returndata_size := mload(returndata)
                revert(add(32, returndata), returndata_size)
            }
        } else {
            revert(errorMessage);
        }
    }
}

File 18 of 25 : 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 19 of 25 : Counters.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Counters.sol)

pragma solidity ^0.8.0;

/**
 * @title Counters
 * @author Matt Condon (@shrugs)
 * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number
 * of elements in a mapping, issuing ERC721 ids, or counting request ids.
 *
 * Include with `using Counters for Counters.Counter;`
 */
library Counters {
    struct Counter {
        // This variable should never be directly accessed by users of the library: interactions must be restricted to
        // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add
        // this feature: see https://github.com/ethereum/solidity/issues/4637
        uint256 _value; // default: 0
    }

    function current(Counter storage counter) internal view returns (uint256) {
        return counter._value;
    }

    function increment(Counter storage counter) internal {
        unchecked {
            counter._value += 1;
        }
    }

    function decrement(Counter storage counter) internal {
        uint256 value = counter._value;
        require(value > 0, "Counter: decrement overflow");
        unchecked {
            counter._value = value - 1;
        }
    }

    function reset(Counter storage counter) internal {
        counter._value = 0;
    }
}

File 20 of 25 : ECDSA.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/ECDSA.sol)

pragma solidity ^0.8.0;

import "../Strings.sol";

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    enum RecoverError {
        NoError,
        InvalidSignature,
        InvalidSignatureLength,
        InvalidSignatureS,
        InvalidSignatureV // Deprecated in v4.8
    }

    function _throwError(RecoverError error) private pure {
        if (error == RecoverError.NoError) {
            return; // no error: do nothing
        } else if (error == RecoverError.InvalidSignature) {
            revert("ECDSA: invalid signature");
        } else if (error == RecoverError.InvalidSignatureLength) {
            revert("ECDSA: invalid signature length");
        } else if (error == RecoverError.InvalidSignatureS) {
            revert("ECDSA: invalid signature 's' value");
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature` or error string. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     *
     * _Available since v4.3._
     */
    function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) {
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            /// @solidity memory-safe-assembly
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return tryRecover(hash, v, r, s);
        } else {
            return (address(0), RecoverError.InvalidSignatureLength);
        }
    }

    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, signature);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately.
     *
     * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures]
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address, RecoverError) {
        bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff);
        uint8 v = uint8((uint256(vs) >> 255) + 27);
        return tryRecover(hash, v, r, s);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately.
     *
     * _Available since v4.2._
     */
    function recover(
        bytes32 hash,
        bytes32 r,
        bytes32 vs
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, r, vs);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Overload of {ECDSA-tryRecover} that receives the `v`,
     * `r` and `s` signature fields separately.
     *
     * _Available since v4.3._
     */
    function tryRecover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address, RecoverError) {
        // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
        // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
        // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most
        // signatures from current libraries generate a unique signature with an s-value in the lower half order.
        //
        // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
        // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
        // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
        // these malleable signatures as well.
        if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
            return (address(0), RecoverError.InvalidSignatureS);
        }

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        if (signer == address(0)) {
            return (address(0), RecoverError.InvalidSignature);
        }

        return (signer, RecoverError.NoError);
    }

    /**
     * @dev Overload of {ECDSA-recover} that receives the `v`,
     * `r` and `s` signature fields separately.
     */
    function recover(
        bytes32 hash,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) internal pure returns (address) {
        (address recovered, RecoverError error) = tryRecover(hash, v, r, s);
        _throwError(error);
        return recovered;
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from a `hash`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
        // 32 is the length in bytes of hash,
        // enforced by the type signature above
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
    }

    /**
     * @dev Returns an Ethereum Signed Message, created from `s`. This
     * produces hash corresponding to the one signed with the
     * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`]
     * JSON-RPC method as part of EIP-191.
     *
     * See {recover}.
     */
    function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s));
    }

    /**
     * @dev Returns an Ethereum Signed Typed Data, created from a
     * `domainSeparator` and a `structHash`. This produces hash corresponding
     * to the one signed with the
     * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`]
     * JSON-RPC method as part of EIP-712.
     *
     * See {recover}.
     */
    function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) {
        return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash));
    }
}

File 21 of 25 : EIP712.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/EIP712.sol)

pragma solidity ^0.8.0;

import "./ECDSA.sol";

/**
 * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data.
 *
 * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible,
 * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding
 * they need in their contracts using a combination of `abi.encode` and `keccak256`.
 *
 * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding
 * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA
 * ({_hashTypedDataV4}).
 *
 * The implementation of the domain separator was designed to be as efficient as possible while still properly updating
 * the chain id to protect against replay attacks on an eventual fork of the chain.
 *
 * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method
 * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask].
 *
 * _Available since v3.4._
 */
abstract contract EIP712 {
    /* solhint-disable var-name-mixedcase */
    // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to
    // invalidate the cached domain separator if the chain id changes.
    bytes32 private immutable _CACHED_DOMAIN_SEPARATOR;
    uint256 private immutable _CACHED_CHAIN_ID;
    address private immutable _CACHED_THIS;

    bytes32 private immutable _HASHED_NAME;
    bytes32 private immutable _HASHED_VERSION;
    bytes32 private immutable _TYPE_HASH;

    /* solhint-enable var-name-mixedcase */

    /**
     * @dev Initializes the domain separator and parameter caches.
     *
     * The meaning of `name` and `version` is specified in
     * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]:
     *
     * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol.
     * - `version`: the current major version of the signing domain.
     *
     * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart
     * contract upgrade].
     */
    constructor(string memory name, string memory version) {
        bytes32 hashedName = keccak256(bytes(name));
        bytes32 hashedVersion = keccak256(bytes(version));
        bytes32 typeHash = keccak256(
            "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"
        );
        _HASHED_NAME = hashedName;
        _HASHED_VERSION = hashedVersion;
        _CACHED_CHAIN_ID = block.chainid;
        _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion);
        _CACHED_THIS = address(this);
        _TYPE_HASH = typeHash;
    }

    /**
     * @dev Returns the domain separator for the current chain.
     */
    function _domainSeparatorV4() internal view returns (bytes32) {
        if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) {
            return _CACHED_DOMAIN_SEPARATOR;
        } else {
            return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION);
        }
    }

    function _buildDomainSeparator(
        bytes32 typeHash,
        bytes32 nameHash,
        bytes32 versionHash
    ) private view returns (bytes32) {
        return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this)));
    }

    /**
     * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this
     * function returns the hash of the fully encoded EIP712 message for this domain.
     *
     * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example:
     *
     * ```solidity
     * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode(
     *     keccak256("Mail(address to,string contents)"),
     *     mailTo,
     *     keccak256(bytes(mailContents))
     * )));
     * address signer = ECDSA.recover(digest, signature);
     * ```
     */
    function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) {
        return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash);
    }
}

File 22 of 25 : 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 23 of 25 : 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 24 of 25 : Math.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.8.0) (utils/math/Math.sol)

pragma solidity ^0.8.0;

/**
 * @dev Standard math utilities missing in the Solidity language.
 */
library Math {
    enum Rounding {
        Down, // Toward negative infinity
        Up, // Toward infinity
        Zero // Toward zero
    }

    /**
     * @dev Returns the largest of two numbers.
     */
    function max(uint256 a, uint256 b) internal pure returns (uint256) {
        return a > b ? a : b;
    }

    /**
     * @dev Returns the smallest of two numbers.
     */
    function min(uint256 a, uint256 b) internal pure returns (uint256) {
        return a < b ? a : b;
    }

    /**
     * @dev Returns the average of two numbers. The result is rounded towards
     * zero.
     */
    function average(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b) / 2 can overflow.
        return (a & b) + (a ^ b) / 2;
    }

    /**
     * @dev Returns the ceiling of the division of two numbers.
     *
     * This differs from standard division with `/` in that it rounds up instead
     * of rounding down.
     */
    function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) {
        // (a + b - 1) / b can overflow on addition, so we distribute.
        return a == 0 ? 0 : (a - 1) / b + 1;
    }

    /**
     * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0
     * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv)
     * with further edits by Uniswap Labs also under MIT license.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator
    ) internal pure returns (uint256 result) {
        unchecked {
            // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use
            // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256
            // variables such that product = prod1 * 2^256 + prod0.
            uint256 prod0; // Least significant 256 bits of the product
            uint256 prod1; // Most significant 256 bits of the product
            assembly {
                let mm := mulmod(x, y, not(0))
                prod0 := mul(x, y)
                prod1 := sub(sub(mm, prod0), lt(mm, prod0))
            }

            // Handle non-overflow cases, 256 by 256 division.
            if (prod1 == 0) {
                return prod0 / denominator;
            }

            // Make sure the result is less than 2^256. Also prevents denominator == 0.
            require(denominator > prod1);

            ///////////////////////////////////////////////
            // 512 by 256 division.
            ///////////////////////////////////////////////

            // Make division exact by subtracting the remainder from [prod1 prod0].
            uint256 remainder;
            assembly {
                // Compute remainder using mulmod.
                remainder := mulmod(x, y, denominator)

                // Subtract 256 bit number from 512 bit number.
                prod1 := sub(prod1, gt(remainder, prod0))
                prod0 := sub(prod0, remainder)
            }

            // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1.
            // See https://cs.stackexchange.com/q/138556/92363.

            // Does not overflow because the denominator cannot be zero at this stage in the function.
            uint256 twos = denominator & (~denominator + 1);
            assembly {
                // Divide denominator by twos.
                denominator := div(denominator, twos)

                // Divide [prod1 prod0] by twos.
                prod0 := div(prod0, twos)

                // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one.
                twos := add(div(sub(0, twos), twos), 1)
            }

            // Shift in bits from prod1 into prod0.
            prod0 |= prod1 * twos;

            // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such
            // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for
            // four bits. That is, denominator * inv = 1 mod 2^4.
            uint256 inverse = (3 * denominator) ^ 2;

            // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works
            // in modular arithmetic, doubling the correct bits in each step.
            inverse *= 2 - denominator * inverse; // inverse mod 2^8
            inverse *= 2 - denominator * inverse; // inverse mod 2^16
            inverse *= 2 - denominator * inverse; // inverse mod 2^32
            inverse *= 2 - denominator * inverse; // inverse mod 2^64
            inverse *= 2 - denominator * inverse; // inverse mod 2^128
            inverse *= 2 - denominator * inverse; // inverse mod 2^256

            // Because the division is now exact we can divide by multiplying with the modular inverse of denominator.
            // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is
            // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1
            // is no longer required.
            result = prod0 * inverse;
            return result;
        }
    }

    /**
     * @notice Calculates x * y / denominator with full precision, following the selected rounding direction.
     */
    function mulDiv(
        uint256 x,
        uint256 y,
        uint256 denominator,
        Rounding rounding
    ) internal pure returns (uint256) {
        uint256 result = mulDiv(x, y, denominator);
        if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) {
            result += 1;
        }
        return result;
    }

    /**
     * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down.
     *
     * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11).
     */
    function sqrt(uint256 a) internal pure returns (uint256) {
        if (a == 0) {
            return 0;
        }

        // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target.
        //
        // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have
        // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`.
        //
        // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)`
        // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))`
        // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)`
        //
        // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit.
        uint256 result = 1 << (log2(a) >> 1);

        // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128,
        // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at
        // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision
        // into the expected uint128 result.
        unchecked {
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            result = (result + a / result) >> 1;
            return min(result, a / result);
        }
    }

    /**
     * @notice Calculates sqrt(a), following the selected rounding direction.
     */
    function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = sqrt(a);
            return result + (rounding == Rounding.Up && result * result < a ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 2, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 128;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 64;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 32;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 16;
            }
            if (value >> 8 > 0) {
                value >>= 8;
                result += 8;
            }
            if (value >> 4 > 0) {
                value >>= 4;
                result += 4;
            }
            if (value >> 2 > 0) {
                value >>= 2;
                result += 2;
            }
            if (value >> 1 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 2, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log2(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log2(value);
            return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 10, rounded down, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >= 10**64) {
                value /= 10**64;
                result += 64;
            }
            if (value >= 10**32) {
                value /= 10**32;
                result += 32;
            }
            if (value >= 10**16) {
                value /= 10**16;
                result += 16;
            }
            if (value >= 10**8) {
                value /= 10**8;
                result += 8;
            }
            if (value >= 10**4) {
                value /= 10**4;
                result += 4;
            }
            if (value >= 10**2) {
                value /= 10**2;
                result += 2;
            }
            if (value >= 10**1) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log10(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log10(value);
            return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0);
        }
    }

    /**
     * @dev Return the log in base 256, rounded down, of a positive value.
     * Returns 0 if given 0.
     *
     * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string.
     */
    function log256(uint256 value) internal pure returns (uint256) {
        uint256 result = 0;
        unchecked {
            if (value >> 128 > 0) {
                value >>= 128;
                result += 16;
            }
            if (value >> 64 > 0) {
                value >>= 64;
                result += 8;
            }
            if (value >> 32 > 0) {
                value >>= 32;
                result += 4;
            }
            if (value >> 16 > 0) {
                value >>= 16;
                result += 2;
            }
            if (value >> 8 > 0) {
                result += 1;
            }
        }
        return result;
    }

    /**
     * @dev Return the log in base 10, following the selected rounding direction, of a positive value.
     * Returns 0 if given 0.
     */
    function log256(uint256 value, Rounding rounding) internal pure returns (uint256) {
        unchecked {
            uint256 result = log256(value);
            return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0);
        }
    }
}

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

pragma solidity ^0.8.0;

import "./math/Math.sol";

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

    /**
     * @dev Converts a `uint256` to its ASCII `string` decimal representation.
     */
    function toString(uint256 value) internal pure returns (string memory) {
        unchecked {
            uint256 length = Math.log10(value) + 1;
            string memory buffer = new string(length);
            uint256 ptr;
            /// @solidity memory-safe-assembly
            assembly {
                ptr := add(buffer, add(32, length))
            }
            while (true) {
                ptr--;
                /// @solidity memory-safe-assembly
                assembly {
                    mstore8(ptr, byte(mod(value, 10), _SYMBOLS))
                }
                value /= 10;
                if (value == 0) break;
            }
            return buffer;
        }
    }

    /**
     * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
     */
    function toHexString(uint256 value) internal pure returns (string memory) {
        unchecked {
            return toHexString(value, Math.log256(value) + 1);
        }
    }

    /**
     * @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] = _SYMBOLS[value & 0xf];
            value >>= 4;
        }
        require(value == 0, "Strings: hex length insufficient");
        return string(buffer);
    }

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

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":false,"internalType":"address","name":"_recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"_emitTimestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"BurnTicket","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"DisableFusion","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"EnableFusion","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"_emitTimestamp","type":"uint256"}],"name":"FreeMintTicket","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OWNER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"affiliateCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"blockedMarketplaces","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"burnTokenId","type":"uint256"}],"name":"burnWithTicket","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"crossmintAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableFusion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"freeMintCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId1","type":"uint256"},{"internalType":"uint256","name":"tokenId2","type":"uint256"}],"name":"fusion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"}],"name":"getFreeMintQuantity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getLevel","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_quantity","type":"uint256"},{"internalType":"address","name":"_to","type":"address"}],"name":"gift","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"enum FaceArt.Level","name":"","type":"uint8"}],"name":"levelMintedCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"components":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"referrer","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct FaceArt.MintVoucher","name":"voucher","type":"tuple"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"address","name":"referrer","type":"address"}],"name":"mintCrossmint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"minterlist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"uint256","name":"mod","type":"uint256"}],"name":"random","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"releasable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"releaseAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"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":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"marketplace","type":"address"},{"internalType":"bool","name":"blocked","type":"bool"}],"name":"setBlockedMarketplace","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_crossmintAddress","type":"address"}],"name":"setCrossmintAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newMintPrice","type":"uint256"}],"name":"setMintPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenLevel","outputs":[{"internalType":"enum FaceArt.Level","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

66038d7ea4c68000601555600a601655611c206017556101806040527370b66c23f8f7ab6acacec011337e58c9314e96cf6101409081527399a7130dc775db71e5252de59f0f156df1b96d89610160526200005f906026906002620008a5565b50604080518082019091526102ee815260fa6020820152620000869060279060026200090f565b503480156200009457600080fd5b50604051620062d5380380620062d5833981016040819052620000b7916200096a565b60405180604001604052806007815260200166119858d9505c9d60ca1b815250604051806040016040528060018152602001603160f81b81525060268054806020026020016040519081016040528092919081815260200182805480156200014957602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116200012a575b505050505060278054806020026020016040519081016040528092919081815260200182805480156200019c57602002820191906000526020600020905b81548152602001906001019080831162000187575b505050505060405180604001604052806007815260200166119858d9505c9d60ca1b81525060405180604001604052806005815260200164118b50549560da1b8152508160009081620001f0919062000a41565b506001620001ff828262000a41565b5050508051825114620002745760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620002c75760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f2070617965657300000000000060448201526064016200026b565b60005b825181101562000333576200031e838281518110620002ed57620002ed62000b0d565b60200260200101518383815181106200030a576200030a62000b0d565b60200260200101516200054960201b60201c565b806200032a8162000b39565b915050620002ca565b50506011805460ff19169055506001601255815160209283012081519183019190912060e08290526101008190524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818801819052818301969096526060810194909452608080850193909352308483018190528151808603909301835260c09485019091528151919095012090529190915261012052620003de62000737565b6200040a7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a68262000794565b620004367fb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214e3362000794565b50601880546001600160a01b03191673dab1a1854214684ace522439684a145e62505233179055601f602052610d487f8c60882dec3cf54096060609fdd16c336781b436ca34f3f27a220dfcfa1d48558190557f820fef5837650fa3b8e45045b88059d8deaf0810350ec511c47ef768a28c2c9b556107d07f5af4fb70d755f38349f04272636124ff9474fedf9ea09deea577daa305383b10556103207f9e71908050462d95d85d10ec71f33c35476f5af9a2363ff3b4f561b1ea620050556101907f44ef42eef5af19d25d4e44ae57c825e0d0624b9f37f2474ab961410a0aa295ff55600560005260c87f8f7baaeb89fd2366535b48ed7d56321470a1399e8ab1b2456eb79477a77d951b5562000b6b565b6001600160a01b038216620005b65760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b60648201526084016200026b565b60008111620006085760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a2073686172657320617265203000000060448201526064016200026b565b6001600160a01b0382166000908152600c602052604090205415620006845760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b60648201526084016200026b565b600e8054600181019091557fbb7b4a454dc3493923482f07822329ed19e8244eff582cc204f8554c3620c3fd0180546001600160a01b0319166001600160a01b0384169081179091556000908152600c60205260409020819055600a54620006ee90829062000b55565b600a55604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b62000741620007a4565b6011805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258620007773390565b6040516001600160a01b03909116815260200160405180910390a1565b620007a08282620007ee565b5050565b60115460ff1615620007ec5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016200026b565b565b620007fa828262000878565b620007a05760008281526013602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620008343390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b60008281526013602090815260408083206001600160a01b038516845290915290205460ff165b92915050565b828054828255906000526020600020908101928215620008fd579160200282015b82811115620008fd57825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190620008c6565b506200090b92915062000953565b5090565b828054828255906000526020600020908101928215620008fd579160200282015b82811115620008fd578251829061ffff1690559160200191906001019062000930565b5b808211156200090b576000815560010162000954565b6000602082840312156200097d57600080fd5b81516001600160a01b03811681146200099557600080fd5b9392505050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620009c757607f821691505b602082108103620009e857634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111562000a3c57600081815260208120601f850160051c8101602086101562000a175750805b601f850160051c820191505b8181101562000a385782815560010162000a23565b5050505b505050565b81516001600160401b0381111562000a5d5762000a5d6200099c565b62000a758162000a6e8454620009b2565b84620009ee565b602080601f83116001811462000aad576000841562000a945750858301515b600019600386901b1c1916600185901b17855562000a38565b600085815260208120601f198616915b8281101562000ade5788860151825594840194600190910190840162000abd565b508582101562000afd5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001820162000b4e5762000b4e62000b23565b5060010190565b808201808211156200089f576200089f62000b23565b60805160a05160c05160e051610100516101205161571a62000bbb60003960006147d701526000614826015260006148010152600061475a01526000614784015260006147ae015261571a6000f3fe6080604052600436106103dd5760003560e01c80636c0360eb116101fd578063a3f8eace11610118578063ce7c2ac2116100ab578063e33b7de31161007a578063e33b7de314610c82578063e58378bb14610c97578063e985e9c514610cb9578063f4a0a52814610d02578063f9c4d16814610d2257600080fd5b8063ce7c2ac214610bc2578063d539139314610bf8578063d547741f14610c2c578063d79779b214610c4c57600080fd5b8063b88d4fde116100e7578063b88d4fde14610b36578063bfab415f14610b56578063c45ac05014610b82578063c87b56dd14610ba257600080fd5b8063a3f8eace14610aa4578063a7f93ebd14610ac4578063a9dd122514610ad9578063ab8ece8b14610af957600080fd5b806390ee3a2911610190578063997556241161015f5780639975562414610a1f5780639b19251a14610a3f578063a217fddf14610a6f578063a22cb46514610a8457600080fd5b806390ee3a29146109a157806391d14854146109b457806395d89b41146109d45780639852595c146109e957600080fd5b806383a076be116101cc57806383a076be1461092c5780638456cb591461094c57806386481d40146109615780638b83209b1461098157600080fd5b80636c0360eb146108a757806370a08231146108bc57806379b41784146108dc57806380880d5d1461090c57600080fd5b80633f4ba83a116102f8578063564b81ef1161028b5780635c975abb1161025a5780635c975abb146108245780636352211e1461083c57806365a8a0371461085c5780636817c76c1461087c578063690ff1361461089257600080fd5b8063564b81ef146107af57806356cbd53b146107c25780635b2a55e4146107ef5780635be7fde81461080f57600080fd5b80634f6ccce7116102c75780634f6ccce7146107195780635238bf8d14610739578063552497291461076f57806355f804b31461078f57600080fd5b80633f4ba83a1461067e578063406072a91461069357806342842e0e146106d957806348b75044146106f957600080fd5b806319165587116103705780632f2ff15d1161033f5780632f2ff15d146106095780632f745c591461062957806336568abe146106495780633a98ef391461066957600080fd5b8063191655871461055a57806323b872dd1461057a578063248a9ca31461059a5780632a55205a146105ca57600080fd5b806306fdde03116103ac57806306fdde03146104c1578063081812fc146104e3578063095ea7b31461051b57806318160ddd1461053b57600080fd5b806301ffc9a714610427578063028f88861461045c57806302fa7c471461048c5780630654ca1c146104ae57600080fd5b366104225760405162461bcd60e51b815260206004820152601060248201526f13db9b1e481a59881e5bdd481b5a5b9d60821b60448201526064015b60405180910390fd5b600080fd5b34801561043357600080fd5b50610447610442366004614c57565b610d4f565b60405190151581526020015b60405180910390f35b34801561046857600080fd5b50610447610477366004614c89565b601e6020526000908152604090205460ff1681565b34801561049857600080fd5b506104ac6104a7366004614ca6565b610d7a565b005b6104ac6104bc366004614ceb565b610e90565b3480156104cd57600080fd5b506104d661101c565b6040516104539190614d9b565b3480156104ef57600080fd5b506105036104fe366004614dae565b6110ae565b6040516001600160a01b039091168152602001610453565b34801561052757600080fd5b506104ac610536366004614dc7565b6110d5565b34801561054757600080fd5b506008545b604051908152602001610453565b34801561056657600080fd5b506104ac610575366004614c89565b61114c565b34801561058657600080fd5b506104ac610595366004614df3565b611233565b3480156105a657600080fd5b5061054c6105b5366004614dae565b60009081526013602052604090206001015490565b3480156105d657600080fd5b506105ea6105e5366004614e34565b611269565b604080516001600160a01b039093168352602083019190915201610453565b34801561061557600080fd5b506104ac610624366004614e56565b6112c8565b34801561063557600080fd5b5061054c610644366004614dc7565b6112ed565b34801561065557600080fd5b506104ac610664366004614e56565b611383565b34801561067557600080fd5b50600a5461054c565b34801561068a57600080fd5b506104ac6113fd565b34801561069f57600080fd5b5061054c6106ae366004614e7b565b6001600160a01b03918216600090815260106020908152604080832093909416825291909152205490565b3480156106e557600080fd5b506104ac6106f4366004614df3565b611420565b34801561070557600080fd5b506104ac610714366004614e7b565b61143b565b34801561072557600080fd5b5061054c610734366004614dae565b61154c565b34801561074557600080fd5b5061054c610754366004614c89565b6001600160a01b03166000908152601c602052604090205490565b34801561077b57600080fd5b506104ac61078a366004614dae565b6115df565b34801561079b57600080fd5b506104ac6107aa366004614f35565b6118a5565b3480156107bb57600080fd5b504661054c565b3480156107ce57600080fd5b5061054c6107dd366004614c89565b601b6020526000908152604090205481565b3480156107fb57600080fd5b50601854610503906001600160a01b031681565b34801561081b57600080fd5b506104ac6118c9565b34801561083057600080fd5b5060115460ff16610447565b34801561084857600080fd5b50610503610857366004614dae565b611922565b34801561086857600080fd5b5061054c610877366004614e34565b611982565b34801561088857600080fd5b5061054c60155481565b34801561089e57600080fd5b506104ac611dc9565b3480156108b357600080fd5b506104d6611df1565b3480156108c857600080fd5b5061054c6108d7366004614c89565b611e7f565b3480156108e857600080fd5b506104476108f7366004614c89565b60196020526000908152604090205460ff1681565b34801561091857600080fd5b506104ac610927366004614f8c565b611f05565b34801561093857600080fd5b506104ac610947366004614e56565b611f49565b34801561095857600080fd5b506104ac612176565b34801561096d57600080fd5b506104d661097c366004614dae565b612196565b34801561098d57600080fd5b5061050361099c366004614dae565b6121bc565b6104ac6109af366004614fba565b6121ec565b3480156109c057600080fd5b506104476109cf366004614e56565b6123be565b3480156109e057600080fd5b506104d66123e9565b3480156109f557600080fd5b5061054c610a04366004614c89565b6001600160a01b03166000908152600d602052604090205490565b348015610a2b57600080fd5b506104ac610a3a366004614c89565b6123f8565b348015610a4b57600080fd5b50610447610a5a366004614c89565b601d6020526000908152604090205460ff1681565b348015610a7b57600080fd5b5061054c600081565b348015610a9057600080fd5b506104ac610a9f366004614f8c565b612433565b348015610ab057600080fd5b5061054c610abf366004614c89565b6124af565b348015610ad057600080fd5b5060155461054c565b348015610ae557600080fd5b5061054c610af4366004614e34565b6124f0565b348015610b0557600080fd5b50610b29610b14366004614dae565b60216020526000908152604090205460ff1681565b6040516104539190615023565b348015610b4257600080fd5b506104ac610b5136600461506b565b612546565b348015610b6257600080fd5b5061054c610b713660046150d7565b602080526000908152604090205481565b348015610b8e57600080fd5b5061054c610b9d366004614e7b565b612578565b348015610bae57600080fd5b506104d6610bbd366004614dae565b612643565b348015610bce57600080fd5b5061054c610bdd366004614c89565b6001600160a01b03166000908152600c602052604090205490565b348015610c0457600080fd5b5061054c7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b348015610c3857600080fd5b506104ac610c47366004614e56565b6126a9565b348015610c5857600080fd5b5061054c610c67366004614c89565b6001600160a01b03166000908152600f602052604090205490565b348015610c8e57600080fd5b50600b5461054c565b348015610ca357600080fd5b5061054c6000805160206156c583398151915281565b348015610cc557600080fd5b50610447610cd4366004614e7b565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610d0e57600080fd5b506104ac610d1d366004614dae565b6126ce565b348015610d2e57600080fd5b5061054c610d3d366004614c89565b601c6020526000908152604090205481565b60006001600160e01b0319821663152a902d60e11b1480610d745750610d74826126ec565b92915050565b6000805160206156c5833981519152610d9281612711565b6127106001600160601b0383161115610e005760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610419565b6001600160a01b038316610e565760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610419565b50604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217602555565b610e9861271b565b6000610ea382612761565b9050610ecf7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6826123be565b610f255760405162461bcd60e51b815260206004820152602160248201527f5369676e617475726520696e76616c6964206f7220756e617574686f72697a656044820152601960fa1b6064820152608401610419565b6001600160a01b03831633148015610f51575033610f466020840184614c89565b6001600160a01b0316145b610f9d5760405162461bcd60e51b815260206004820152601f60248201527f566f756368657220697320666f7220646966666572656e742063616c6c6572006044820152606401610419565b33610fae6040840160208501614c89565b6001600160a01b0316036110045760405162461bcd60e51b815260206004820152601c60248201527f52656665727265722063616e2774206265207468652063616c6c6572000000006044820152606401610419565b61101684611011846150f8565b6127ba565b50505050565b60606000805461102b90615184565b80601f016020809104026020016040519081016040528092919081815260200182805461105790615184565b80156110a45780601f10611079576101008083540402835291602001916110a4565b820191906000526020600020905b81548152906001019060200180831161108757829003601f168201915b5050505050905090565b60006110b982612cfd565b506000908152600460205260409020546001600160a01b031690565b6001600160a01b03821660009081526019602052604090205460ff161561113e5760405162461bcd60e51b815260206004820181905260248201527f496e76616c6964206d61726b6574706c6163652c206e6f7420616c6c6f7765646044820152606401610419565b6111488282612d5c565b5050565b6001600160a01b0381166000908152600c60205260409020546111815760405162461bcd60e51b8152600401610419906151be565b600061118c826124af565b9050806000036111ae5760405162461bcd60e51b815260040161041990615204565b80600b60008282546111c09190615265565b90915550506001600160a01b0382166000908152600d602052604090208054820190556111ed8282612e6c565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050565b61123d3382612f85565b6112595760405162461bcd60e51b815260040161041990615278565b611264838383613003565b505050565b604080518082019091526025546001600160a01b0381168252600160a01b90046001600160601b03166020820181905260009182918290612710906112ae90876152c5565b6112b891906152f2565b91519350909150505b9250929050565b6000828152601360205260409020600101546112e381612711565b6112648383613174565b60006112f883611e7f565b821061135a5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610419565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6001600160a01b03811633146113f35760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610419565b61114882826131fa565b6000805160206156c583398151915261141581612711565b61141d613261565b50565b61126483838360405180602001604052806000815250612546565b6001600160a01b0381166000908152600c60205260409020546114705760405162461bcd60e51b8152600401610419906151be565b600061147c8383612578565b90508060000361149e5760405162461bcd60e51b815260040161041990615204565b6001600160a01b0383166000908152600f6020526040812080548392906114c6908490615265565b90915550506001600160a01b0380841660009081526010602090815260408083209386168352929052208054820190556115018383836132b3565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b600061155760085490565b82106115ba5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610419565b600882815481106115cd576115cd615306565b90600052602060002001549050919050565b6115e761271b565b6115fb335b6001600160a01b03163b151590565b156116485760405162461bcd60e51b815260206004820152601e60248201527f43616e6e6f742062652063616c6c65642066726f6d20636f6e747261637400006044820152606401610419565b3361165282611922565b6001600160a01b03161461169b5760405162461bcd60e51b815260206004820152601060248201526f139bdd081bdddb995c881bd98813919560821b6044820152606401610419565b60175460008281526022602052604090206001015442916116bb91615265565b10156117005760405162461bcd60e51b8152602060048201526014602482015273139bc81d985b1a5908189d5c9b881d1a58dad95d60621b6044820152606401610419565b6000818152602160209081526040822054829060ff1660058111156117275761172761500d565b60058111156117385761173861500d565b81526020019081526020016000205411156117ab57600081815260216020908152604082205490919060ff1660058111156117755761177561500d565b60058111156117865761178661500d565b815260200190815260200160002060008154809291906117a59061531c565b91905055505b600081815260226020908152604080832080546001600160a01b031916815560010183905560219091529020805460ff191690556117e881613305565b6117f6602480546001019055565b600061180160245490565b905061180e335b826133a8565b611817816133c2565b6000828152602160205260409020805460ff1916600183600581111561183f5761183f61500d565b0217905550600081815260216020908152604082205490919060ff16600581111561186c5761186c61500d565b600581111561187d5761187d61500d565b8152602001908152602001600020600081548092919061189c90615333565b91905055505050565b6000805160206156c58339815191526118bd81612711565b6014611264838261539a565b6118d161371c565b6000805160206156c58339815191526118e981612711565b60005b60265481101561191457611902610575826121bc565b8061190c81615333565b9150506118ec565b50506119206001601255565b565b6000818152600260205260408120546001600160a01b031680610d745760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610419565b600061198c61271b565b60235460ff166119d35760405162461bcd60e51b8152602060048201526012602482015271119d5cda5bdb881b9bdd08195b98589b195960721b6044820152606401610419565b6119dc336115ec565b15611a295760405162461bcd60e51b815260206004820152601e60248201527f43616e6e6f742062652063616c6c65642066726f6d20636f6e747261637400006044820152606401610419565b33611a3384611922565b6001600160a01b031614611a7c5760405162461bcd60e51b815260206004820152601060248201526f139bdd081bdddb995c881bd98813919560821b6044820152606401610419565b600260008481526021602052604090205460ff166005811115611aa157611aa161500d565b10611ade5760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081b195d995b609a1b6044820152606401610419565b33611ae883611922565b6001600160a01b031614611b315760405162461bcd60e51b815260206004820152601060248201526f139bdd081bdddb995c881bd98813919560821b6044820152606401610419565b600260008381526021602052604090205460ff166005811115611b5657611b5661500d565b10611b935760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081b195d995b609a1b6044820152606401610419565b60008281526021602052604090205460ff166005811115611bb657611bb661500d565b60008481526021602052604090205460ff166005811115611bd957611bd961500d565b03611c305760405162461bcd60e51b815260206004820152602160248201527f546f6b656e732073686f756c64206861766520646966666572656e74207479706044820152606560f81b6064820152608401610419565b611c3983613305565b611c4282613305565b611c50602480546001019055565b6000611c5b60245490565b9050611c6633611808565b611c6f816133c2565b6000828152602160205260409020805460ff19166001836005811115611c9757611c9761500d565b0217905550600081815260216020908152604082205490919060ff166005811115611cc457611cc461500d565b6005811115611cd557611cd561500d565b81526020019081526020016000206000815480929190611cf490615333565b9190505550601d6000611d043390565b6001600160a01b0316815260208101919091526040016000205460ff1615611dc2576040518060400160405280611d383390565b6001600160a01b0390811682524260209283015260008481526022835260409020835181546001600160a01b03191692169190911781559101516001909101557f44e68ba968178cb8e9a7a1ac2b3cdfbbfc98d57f8ff2541a242cb86371d0693633604080516001600160a01b039092168252426020830152810183905260600160405180910390a15b9392505050565b6000805160206156c5833981519152611de181612711565b506023805460ff19166001179055565b60148054611dfe90615184565b80601f0160208091040260200160405190810160405280929190818152602001828054611e2a90615184565b8015611e775780601f10611e4c57610100808354040283529160200191611e77565b820191906000526020600020905b815481529060010190602001808311611e5a57829003601f168201915b505050505081565b60006001600160a01b038216611ee95760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610419565b506001600160a01b031660009081526003602052604090205490565b6000805160206156c5833981519152611f1d81612711565b506001600160a01b03919091166000908152601960205260409020805460ff1916911515919091179055565b6000805160206156c5833981519152611f6181612711565b601654831115611fb35760405162461bcd60e51b815260206004820181905260248201527f45786365656473206d6178206d696e74207175616e74697479207065722074786044820152606401610419565b601f6020527f820fef5837650fa3b8e45045b88059d8deaf0810350ec511c47ef768a28c2c9b54600080527f8c60882dec3cf54096060609fdd16c336781b436ca34f3f27a220dfcfa1d48555461200a9190615265565b602080527f156774b33c8bc7cb83eda4cbc43b36c7c9490ff8913c488ccd5132cfc71344ea54600080527f29ab76e7ca72530a8284597fb76b039d796325740b21528d71ade454c6f2dbe954859161206191615265565b61206b9190615265565b11156120b25760405162461bcd60e51b815260206004820152601660248201527545786365656473204c6576656c203020737570706c7960501b6044820152606401610419565b60005b83811015611016576120cb602480546001019055565b60006120d660245490565b90506120e284826133a8565b6120eb81613775565b6000828152602160205260409020805460ff191660018360058111156121135761211361500d565b0217905550600081815260216020908152604082205490919060ff1660058111156121405761214061500d565b60058111156121515761215161500d565b81526020810191909152604001600020805460019081019091559190910190506120b5565b6000805160206156c583398151915261218e81612711565b61141d613848565b60606121a182612cfd565b600082815260216020526040902054610d749060ff16613885565b6000600e82815481106121d1576121d1615306565b6000918252602090912001546001600160a01b031692915050565b6121f461271b565b6018546001600160a01b038481169116146122515760405162461bcd60e51b815260206004820152601860248201527f5265737472696374656420666f722063726f73736d696e7400000000000000006044820152606401610419565b6018546001600160a01b0316336001600160a01b0316146122b45760405162461bcd60e51b815260206004820152601660248201527f53686f756c6420626520746f2063726f73736d696e74000000000000000000006044820152606401610419565b6001600160a01b038116330361230c5760405162461bcd60e51b815260206004820152601b60248201527f52656665727265722063616e27742062652063726f73736d696e7400000000006044820152606401610419565b806001600160a01b0316826001600160a01b03160361236d5760405162461bcd60e51b815260206004820152601f60248201527f52656665727265722063616e27742062652074686520726563697069656e74006044820152606401610419565b60006040518060600160405280846001600160a01b03168152602001836001600160a01b031681526020016040518060200160405280600081525081525090506123b785826127ba565b5050505050565b60009182526013602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606001805461102b90615184565b6000805160206156c583398151915261241081612711565b50601880546001600160a01b0319166001600160a01b0392909216919091179055565b80158061245957506001600160a01b03821660009081526019602052604090205460ff16155b6124a55760405162461bcd60e51b815260206004820181905260248201527f496e76616c6964206d61726b6574706c6163652c206e6f7420616c6c6f7765646044820152606401610419565b61114882826139ef565b6000806124bb600b5490565b6124c59047615265565b9050611dc283826124eb866001600160a01b03166000908152600d602052604090205490565b6139fa565b604080514260208201526bffffffffffffffffffffffff193360601b16918101919091526054810183905260009082906074016040516020818303038152906040528051906020012060001c611dc2919061545a565b6125503383612f85565b61256c5760405162461bcd60e51b815260040161041990615278565b61101684848484613a38565b6001600160a01b0382166000908152600f602052604081205481906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa1580156125d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125fb919061546e565b6126059190615265565b6001600160a01b0380861660009081526010602090815260408083209388168352929052205490915061263b90849083906139fa565b949350505050565b606061264e82612cfd565b6000612658613a6b565b905060008151116126785760405180602001604052806000815250611dc2565b8061268284613a7a565b604051602001612693929190615487565b6040516020818303038152906040529392505050565b6000828152601360205260409020600101546126c481612711565b61126483836131fa565b6000805160206156c58339815191526126e681612711565b50601555565b60006001600160e01b03198216637965db0b60e01b1480610d745750610d7482613b0d565b61141d8133613b32565b60115460ff16156119205760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610419565b60008061276d83613b8b565b9050611dc28161278060408601866154b6565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613c0d92505050565b60165482111561280c5760405162461bcd60e51b815260206004820181905260248201527f45786365656473206d6178206d696e74207175616e74697479207065722074786044820152606401610419565b601f6020527f820fef5837650fa3b8e45045b88059d8deaf0810350ec511c47ef768a28c2c9b54600080527f8c60882dec3cf54096060609fdd16c336781b436ca34f3f27a220dfcfa1d4855546128639190615265565b602080527f156774b33c8bc7cb83eda4cbc43b36c7c9490ff8913c488ccd5132cfc71344ea54600080527f29ab76e7ca72530a8284597fb76b039d796325740b21528d71ade454c6f2dbe95484916128ba91615265565b6128c49190615265565b111561290b5760405162461bcd60e51b815260206004820152601660248201527545786365656473204c6576656c203020737570706c7960501b6044820152606401610419565b80516001600160a01b03166000908152601e602052604090205460ff16156129f95780516001600160a01b03166000908152601c60205260408120549081841015612957576000612961565b61296182856154fd565b90508060155461297191906152c5565b34146129b55760405162461bcd60e51b8152602060048201526013602482015272139bdd08195b9bdd59da08115512081cd95b9d606a1b6044820152606401610419565b81156129f2576000848310156129cc5760006129d6565b6129d685846154fd565b84516001600160a01b03166000908152601c6020526040902055505b5050612a4b565b81601554612a0791906152c5565b3414612a4b5760405162461bcd60e51b8152602060048201526013602482015272139bdd08195b9bdd59da08115512081cd95b9d606a1b6044820152606401610419565b60005b82811015612b1b57612a64602480546001019055565b6000612a6f60245490565b9050612a7f8360000151826133a8565b612a8881613775565b6000828152602160205260409020805460ff19166001836005811115612ab057612ab061500d565b0217905550600081815260216020908152604082205490919060ff166005811115612add57612add61500d565b6005811115612aee57612aee61500d565b81526020019081526020016000206000815480929190612b0d90615333565b909155505050600101612a4e565b5060208101516001600160a01b031615612c6e576020808201516001600160a01b039081166000908152601a83526040808220855190931682529190925290205460ff16612c69576020808201516001600160a01b03166000908152601b90915260408120805491612b8c83615333565b9091555050602080820180516001600160a01b039081166000908152601a845260408082208651841683528552808220805460ff1916600117905592519091168152601b909252902054612be29060039061545a565b600003612c69576020808201516001600160a01b03166000908152601c90915260408120805491612c1283615333565b91905055507f2d0dcbbd220ae1f097f44595fe450fa365f101e03c5bd8986b49d5bca2d274fa816020015142604051612c609291906001600160a01b03929092168252602082015260400190565b60405180910390a15b612cb4565b80516001600160a01b03166000908152601d602052604090205460ff16612cb45780516001600160a01b03166000908152601d60205260409020805460ff191660011790555b80516001600160a01b03166000908152601e602052604090205460ff166111485780516001600160a01b03166000908152601e60205260409020805460ff191660011790555050565b6000818152600260205260409020546001600160a01b031661141d5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610419565b6000612d6782611922565b9050806001600160a01b0316836001600160a01b031603612dd45760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610419565b336001600160a01b0382161480612df05750612df08133610cd4565b612e625760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610419565b6112648383613c31565b80471015612ebc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610419565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612f09576040519150601f19603f3d011682016040523d82523d6000602084013e612f0e565b606091505b50509050806112645760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610419565b600080612f9183611922565b9050806001600160a01b0316846001600160a01b03161480612fd857506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b8061263b5750836001600160a01b0316612ff1846110ae565b6001600160a01b031614949350505050565b826001600160a01b031661301682611922565b6001600160a01b03161461303c5760405162461bcd60e51b815260040161041990615510565b6001600160a01b03821661309e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610419565b6130ab8383836001613c9f565b826001600160a01b03166130be82611922565b6001600160a01b0316146130e45760405162461bcd60e51b815260040161041990615510565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b61317e82826123be565b6111485760008281526013602090815260408083206001600160a01b03851684529091529020805460ff191660011790556131b63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61320482826123be565b156111485760008281526013602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b613269613cab565b6011805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611264908490613cf4565b600061331082611922565b9050613320816000846001613c9f565b61332982611922565b600083815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526003845282852080546000190190558785526002909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b611148828260405180602001604052806000815250613dc6565b6000806040518060800160405280601f6000600260058111156133e7576133e761500d565b60058111156133f8576133f861500d565b8152602001908152602001600020548152602001601f6000600360058111156134235761342361500d565b60058111156134345761343461500d565b8152602001908152602001600020548152602001601f60006004600581111561345f5761345f61500d565b60058111156134705761347061500d565b8152602001908152602001600020548152602001601f600060058081111561349a5761349a61500d565b60058111156134ab576134ab61500d565b8152602001908152602001600020548152509050601f6000600260058111156134d6576134d661500d565b60058111156134e7576134e761500d565b815260200190815260200160002054602060006002600581111561350d5761350d61500d565b600581111561351e5761351e61500d565b8152602001908152602001600020540361353757600081525b60036000527f9e71908050462d95d85d10ec71f33c35476f5af9a2363ff3b4f561b1ea62005054602080527f1ae1eab41a4db68d73559dd6c8b7ac16a4bc819634768486d35edbff05543abf540361359157600060208201525b60046000527f44ef42eef5af19d25d4e44ae57c825e0d0624b9f37f2474ab961410a0aa295ff54602080527faf69f7ec271f94daa686978b3a96acf46914b99f1828a3f8265276d5eab630fa54036135eb57600060408201525b60056000527f8f7baaeb89fd2366535b48ed7d56321470a1399e8ab1b2456eb79477a77d951b54602080527f9a7f38673f2403ea220372c36a5d3212283a73c030ab2696398da5299fc8f979540361364557600060608201525b60608101516040820151602083015183516000936136809388939192909161366c91615265565b6136769190615265565b610af49190615265565b8251909150811015613696575060029392505050565b815181108015906136b65750602082015182516136b39190615265565b81105b156136c5575060039392505050565b602082015182516136d69190615265565b811015801561370357506040820151602083015183516136f69190615265565b6137009190615265565b81105b15613712575060049392505050565b5060059392505050565b60026012540361376e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610419565b6002601255565b60008080527f8c60882dec3cf54096060609fdd16c336781b436ca34f3f27a220dfcfa1d485554602080527f29ab76e7ca72530a8284597fb76b039d796325740b21528d71ade454c6f2dbe954036137cf57506001919050565b60016000527f820fef5837650fa3b8e45045b88059d8deaf0810350ec511c47ef768a28c2c9b54602080527f156774b33c8bc7cb83eda4cbc43b36c7c9490ff8913c488ccd5132cfc71344ea540361382957506000919050565b6138348260026124f0565b15613840576001610d74565b600092915050565b61385061271b565b6011805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586132963390565b6060600082600581111561389b5761389b61500d565b036138be575050604080518082019091526002815261041360f41b602082015290565b60018260058111156138d2576138d261500d565b036138f5575050604080518082019091526002815261042360f41b602082015290565b60028260058111156139095761390961500d565b0361392c575050604080518082019091526002815261413160f01b602082015290565b60038260058111156139405761394061500d565b03613963575050604080518082019091526002815261423160f01b602082015290565b60048260058111156139775761397761500d565b0361399a575050604080518082019091526002815261433160f01b602082015290565b60058260058111156139ae576139ae61500d565b036139d1575050604080518082019091526002815261443160f01b602082015290565b50506040805180820190915260028152614b4f60f01b602082015290565b611148338383613df9565b600a546001600160a01b0384166000908152600c602052604081205490918391613a2490866152c5565b613a2e91906152f2565b61263b91906154fd565b613a43848484613003565b613a4f84848484613ec7565b6110165760405162461bcd60e51b815260040161041990615555565b60606014805461102b90615184565b60606000613a8783613fc8565b600101905060008167ffffffffffffffff811115613aa757613aa7614ea9565b6040519080825280601f01601f191660200182016040528015613ad1576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084613adb57509392505050565b60006001600160e01b0319821663780e9d6360e01b1480610d745750610d74826140a0565b613b3c82826123be565b61114857613b49816140f0565b613b54836020614102565b604051602001613b659291906155a7565b60408051601f198184030181529082905262461bcd60e51b825261041991600401614d9b565b6000610d747ffa711a996dd148f301b03c80645ef858dbe69956bce33bcc5ff79a8bee94f09d613bbe6020850185614c89565b613bce6040860160208701614c89565b6040805160208101949094526001600160a01b03928316908401521660608201526080016040516020818303038152906040528051906020012061429e565b6000806000613c1c85856142ec565b91509150613c298161432e565b509392505050565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190613c6682611922565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b61101684848484614478565b60115460ff166119205760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610419565b6000613d49826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166145a59092919063ffffffff16565b8051909150156112645780806020019051810190613d67919061561c565b6112645760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610419565b613dd083836145b4565b613ddd6000848484613ec7565b6112645760405162461bcd60e51b815260040161041990615555565b816001600160a01b0316836001600160a01b031603613e5a5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610419565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60006001600160a01b0384163b15613fbd57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613f0b903390899088908890600401615639565b6020604051808303816000875af1925050508015613f46575060408051601f3d908101601f19168201909252613f4391810190615675565b60015b613fa3573d808015613f74576040519150601f19603f3d011682016040523d82523d6000602084013e613f79565b606091505b508051600003613f9b5760405162461bcd60e51b815260040161041990615555565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061263b565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106140075772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310614033576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061405157662386f26fc10000830492506010015b6305f5e1008310614069576305f5e100830492506008015b612710831061407d57612710830492506004015b6064831061408f576064830492506002015b600a8310610d745760010192915050565b60006001600160e01b031982166380ac58cd60e01b14806140d157506001600160e01b03198216635b5e139f60e01b145b80610d7457506301ffc9a760e01b6001600160e01b0319831614610d74565b6060610d746001600160a01b03831660145b606060006141118360026152c5565b61411c906002615265565b67ffffffffffffffff81111561413457614134614ea9565b6040519080825280601f01601f19166020018201604052801561415e576020820181803683370190505b509050600360fc1b8160008151811061417957614179615306565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106141a8576141a8615306565b60200101906001600160f81b031916908160001a90535060006141cc8460026152c5565b6141d7906001615265565b90505b600181111561424f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061420b5761420b615306565b1a60f81b82828151811061422157614221615306565b60200101906001600160f81b031916908160001a90535060049490941c936142488161531c565b90506141da565b508315611dc25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610419565b6000610d746142ab61474d565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60008082516041036143225760208301516040840151606085015160001a61431687828585614874565b945094505050506112c1565b506000905060026112c1565b60008160048111156143425761434261500d565b0361434a5750565b600181600481111561435e5761435e61500d565b036143ab5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610419565b60028160048111156143bf576143bf61500d565b0361440c5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610419565b60038160048111156144205761442061500d565b0361141d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610419565b60018111156144e75760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610419565b816001600160a01b0385166145435761453e81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b614566565b836001600160a01b0316856001600160a01b031614614566576145668582614938565b6001600160a01b0384166145825761457d816149d5565b6123b7565b846001600160a01b0316846001600160a01b0316146123b7576123b78482614a84565b606061263b8484600085614ac8565b6001600160a01b03821661460a5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610419565b6000818152600260205260409020546001600160a01b03161561466f5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610419565b61467d600083836001613c9f565b6000818152600260205260409020546001600160a01b0316156146e25760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610419565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000306001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161480156147a657507f000000000000000000000000000000000000000000000000000000000000000046145b156147d057507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156148ab575060009050600361492f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156148ff573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166149285760006001925092505061492f565b9150600090505b94509492505050565b6000600161494584611e7f565b61494f91906154fd565b6000838152600760205260409020549091508082146149a2576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906149e7906001906154fd565b60008381526009602052604081205460088054939450909284908110614a0f57614a0f615306565b906000526020600020015490508060088381548110614a3057614a30615306565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480614a6857614a68615692565b6001900381819060005260206000200160009055905550505050565b6000614a8f83611e7f565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b606082471015614b295760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610419565b600080866001600160a01b03168587604051614b4591906156a8565b60006040518083038185875af1925050503d8060008114614b82576040519150601f19603f3d011682016040523d82523d6000602084013e614b87565b606091505b5091509150614b9887838387614ba3565b979650505050505050565b60608315614c12578251600003614c0b576001600160a01b0385163b614c0b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610419565b508161263b565b61263b8383815115614c275781518083602001fd5b8060405162461bcd60e51b81526004016104199190614d9b565b6001600160e01b03198116811461141d57600080fd5b600060208284031215614c6957600080fd5b8135611dc281614c41565b6001600160a01b038116811461141d57600080fd5b600060208284031215614c9b57600080fd5b8135611dc281614c74565b60008060408385031215614cb957600080fd5b8235614cc481614c74565b915060208301356001600160601b0381168114614ce057600080fd5b809150509250929050565b600080600060608486031215614d0057600080fd5b833592506020840135614d1281614c74565b9150604084013567ffffffffffffffff811115614d2e57600080fd5b840160608187031215614d4057600080fd5b809150509250925092565b60005b83811015614d66578181015183820152602001614d4e565b50506000910152565b60008151808452614d87816020860160208601614d4b565b601f01601f19169290920160200192915050565b602081526000611dc26020830184614d6f565b600060208284031215614dc057600080fd5b5035919050565b60008060408385031215614dda57600080fd5b8235614de581614c74565b946020939093013593505050565b600080600060608486031215614e0857600080fd5b8335614e1381614c74565b92506020840135614e2381614c74565b929592945050506040919091013590565b60008060408385031215614e4757600080fd5b50508035926020909101359150565b60008060408385031215614e6957600080fd5b823591506020830135614ce081614c74565b60008060408385031215614e8e57600080fd5b8235614e9981614c74565b91506020830135614ce081614c74565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115614eda57614eda614ea9565b604051601f8501601f19908116603f01168101908282118183101715614f0257614f02614ea9565b81604052809350858152868686011115614f1b57600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215614f4757600080fd5b813567ffffffffffffffff811115614f5e57600080fd5b8201601f81018413614f6f57600080fd5b61263b84823560208401614ebf565b801515811461141d57600080fd5b60008060408385031215614f9f57600080fd5b8235614faa81614c74565b91506020830135614ce081614f7e565b60008060008060808587031215614fd057600080fd5b843593506020850135614fe281614c74565b92506040850135614ff281614c74565b9150606085013561500281614c74565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b602081016006831061504557634e487b7160e01b600052602160045260246000fd5b91905290565b600082601f83011261505c57600080fd5b611dc283833560208501614ebf565b6000806000806080858703121561508157600080fd5b843561508c81614c74565b9350602085013561509c81614c74565b925060408501359150606085013567ffffffffffffffff8111156150bf57600080fd5b6150cb8782880161504b565b91505092959194509250565b6000602082840312156150e957600080fd5b813560068110611dc257600080fd5b60006060823603121561510a57600080fd5b6040516060810167ffffffffffffffff828210818311171561512e5761512e614ea9565b816040528435915061513f82614c74565b90825260208401359061515182614c74565b816020840152604085013591508082111561516b57600080fd5b506151783682860161504b565b60408301525092915050565b600181811c9082168061519857607f821691505b6020821081036151b857634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610d7457610d7461524f565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b8082028115828204841417610d7457610d7461524f565b634e487b7160e01b600052601260045260246000fd5b600082615301576153016152dc565b500490565b634e487b7160e01b600052603260045260246000fd5b60008161532b5761532b61524f565b506000190190565b6000600182016153455761534561524f565b5060010190565b601f82111561126457600081815260208120601f850160051c810160208610156153735750805b601f850160051c820191505b818110156153925782815560010161537f565b505050505050565b815167ffffffffffffffff8111156153b4576153b4614ea9565b6153c8816153c28454615184565b8461534c565b602080601f8311600181146153fd57600084156153e55750858301515b600019600386901b1c1916600185901b178555615392565b600085815260208120601f198616915b8281101561542c5788860151825594840194600190910190840161540d565b508582101561544a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082615469576154696152dc565b500690565b60006020828403121561548057600080fd5b5051919050565b60008351615499818460208801614d4b565b8351908301906154ad818360208801614d4b565b01949350505050565b6000808335601e198436030181126154cd57600080fd5b83018035915067ffffffffffffffff8211156154e857600080fd5b6020019150368190038213156112c157600080fd5b81810381811115610d7457610d7461524f565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155df816017850160208801614d4b565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615610816028840160208801614d4b565b01602801949350505050565b60006020828403121561562e57600080fd5b8151611dc281614f7e565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261566b6080830184614d6f565b9695505050505050565b60006020828403121561568757600080fd5b8151611dc281614c41565b634e487b7160e01b600052603160045260246000fd5b600082516156ba818460208701614d4b565b919091019291505056feb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214ea26469706673582212209a457e007620c206e6887e8addf0617a20575bdecae9c7014e24e17a7690939964736f6c63430008120033000000000000000000000000917d21076cc96a4ca870f8e76c7e7ad55a408304

Deployed Bytecode

0x6080604052600436106103dd5760003560e01c80636c0360eb116101fd578063a3f8eace11610118578063ce7c2ac2116100ab578063e33b7de31161007a578063e33b7de314610c82578063e58378bb14610c97578063e985e9c514610cb9578063f4a0a52814610d02578063f9c4d16814610d2257600080fd5b8063ce7c2ac214610bc2578063d539139314610bf8578063d547741f14610c2c578063d79779b214610c4c57600080fd5b8063b88d4fde116100e7578063b88d4fde14610b36578063bfab415f14610b56578063c45ac05014610b82578063c87b56dd14610ba257600080fd5b8063a3f8eace14610aa4578063a7f93ebd14610ac4578063a9dd122514610ad9578063ab8ece8b14610af957600080fd5b806390ee3a2911610190578063997556241161015f5780639975562414610a1f5780639b19251a14610a3f578063a217fddf14610a6f578063a22cb46514610a8457600080fd5b806390ee3a29146109a157806391d14854146109b457806395d89b41146109d45780639852595c146109e957600080fd5b806383a076be116101cc57806383a076be1461092c5780638456cb591461094c57806386481d40146109615780638b83209b1461098157600080fd5b80636c0360eb146108a757806370a08231146108bc57806379b41784146108dc57806380880d5d1461090c57600080fd5b80633f4ba83a116102f8578063564b81ef1161028b5780635c975abb1161025a5780635c975abb146108245780636352211e1461083c57806365a8a0371461085c5780636817c76c1461087c578063690ff1361461089257600080fd5b8063564b81ef146107af57806356cbd53b146107c25780635b2a55e4146107ef5780635be7fde81461080f57600080fd5b80634f6ccce7116102c75780634f6ccce7146107195780635238bf8d14610739578063552497291461076f57806355f804b31461078f57600080fd5b80633f4ba83a1461067e578063406072a91461069357806342842e0e146106d957806348b75044146106f957600080fd5b806319165587116103705780632f2ff15d1161033f5780632f2ff15d146106095780632f745c591461062957806336568abe146106495780633a98ef391461066957600080fd5b8063191655871461055a57806323b872dd1461057a578063248a9ca31461059a5780632a55205a146105ca57600080fd5b806306fdde03116103ac57806306fdde03146104c1578063081812fc146104e3578063095ea7b31461051b57806318160ddd1461053b57600080fd5b806301ffc9a714610427578063028f88861461045c57806302fa7c471461048c5780630654ca1c146104ae57600080fd5b366104225760405162461bcd60e51b815260206004820152601060248201526f13db9b1e481a59881e5bdd481b5a5b9d60821b60448201526064015b60405180910390fd5b600080fd5b34801561043357600080fd5b50610447610442366004614c57565b610d4f565b60405190151581526020015b60405180910390f35b34801561046857600080fd5b50610447610477366004614c89565b601e6020526000908152604090205460ff1681565b34801561049857600080fd5b506104ac6104a7366004614ca6565b610d7a565b005b6104ac6104bc366004614ceb565b610e90565b3480156104cd57600080fd5b506104d661101c565b6040516104539190614d9b565b3480156104ef57600080fd5b506105036104fe366004614dae565b6110ae565b6040516001600160a01b039091168152602001610453565b34801561052757600080fd5b506104ac610536366004614dc7565b6110d5565b34801561054757600080fd5b506008545b604051908152602001610453565b34801561056657600080fd5b506104ac610575366004614c89565b61114c565b34801561058657600080fd5b506104ac610595366004614df3565b611233565b3480156105a657600080fd5b5061054c6105b5366004614dae565b60009081526013602052604090206001015490565b3480156105d657600080fd5b506105ea6105e5366004614e34565b611269565b604080516001600160a01b039093168352602083019190915201610453565b34801561061557600080fd5b506104ac610624366004614e56565b6112c8565b34801561063557600080fd5b5061054c610644366004614dc7565b6112ed565b34801561065557600080fd5b506104ac610664366004614e56565b611383565b34801561067557600080fd5b50600a5461054c565b34801561068a57600080fd5b506104ac6113fd565b34801561069f57600080fd5b5061054c6106ae366004614e7b565b6001600160a01b03918216600090815260106020908152604080832093909416825291909152205490565b3480156106e557600080fd5b506104ac6106f4366004614df3565b611420565b34801561070557600080fd5b506104ac610714366004614e7b565b61143b565b34801561072557600080fd5b5061054c610734366004614dae565b61154c565b34801561074557600080fd5b5061054c610754366004614c89565b6001600160a01b03166000908152601c602052604090205490565b34801561077b57600080fd5b506104ac61078a366004614dae565b6115df565b34801561079b57600080fd5b506104ac6107aa366004614f35565b6118a5565b3480156107bb57600080fd5b504661054c565b3480156107ce57600080fd5b5061054c6107dd366004614c89565b601b6020526000908152604090205481565b3480156107fb57600080fd5b50601854610503906001600160a01b031681565b34801561081b57600080fd5b506104ac6118c9565b34801561083057600080fd5b5060115460ff16610447565b34801561084857600080fd5b50610503610857366004614dae565b611922565b34801561086857600080fd5b5061054c610877366004614e34565b611982565b34801561088857600080fd5b5061054c60155481565b34801561089e57600080fd5b506104ac611dc9565b3480156108b357600080fd5b506104d6611df1565b3480156108c857600080fd5b5061054c6108d7366004614c89565b611e7f565b3480156108e857600080fd5b506104476108f7366004614c89565b60196020526000908152604090205460ff1681565b34801561091857600080fd5b506104ac610927366004614f8c565b611f05565b34801561093857600080fd5b506104ac610947366004614e56565b611f49565b34801561095857600080fd5b506104ac612176565b34801561096d57600080fd5b506104d661097c366004614dae565b612196565b34801561098d57600080fd5b5061050361099c366004614dae565b6121bc565b6104ac6109af366004614fba565b6121ec565b3480156109c057600080fd5b506104476109cf366004614e56565b6123be565b3480156109e057600080fd5b506104d66123e9565b3480156109f557600080fd5b5061054c610a04366004614c89565b6001600160a01b03166000908152600d602052604090205490565b348015610a2b57600080fd5b506104ac610a3a366004614c89565b6123f8565b348015610a4b57600080fd5b50610447610a5a366004614c89565b601d6020526000908152604090205460ff1681565b348015610a7b57600080fd5b5061054c600081565b348015610a9057600080fd5b506104ac610a9f366004614f8c565b612433565b348015610ab057600080fd5b5061054c610abf366004614c89565b6124af565b348015610ad057600080fd5b5060155461054c565b348015610ae557600080fd5b5061054c610af4366004614e34565b6124f0565b348015610b0557600080fd5b50610b29610b14366004614dae565b60216020526000908152604090205460ff1681565b6040516104539190615023565b348015610b4257600080fd5b506104ac610b5136600461506b565b612546565b348015610b6257600080fd5b5061054c610b713660046150d7565b602080526000908152604090205481565b348015610b8e57600080fd5b5061054c610b9d366004614e7b565b612578565b348015610bae57600080fd5b506104d6610bbd366004614dae565b612643565b348015610bce57600080fd5b5061054c610bdd366004614c89565b6001600160a01b03166000908152600c602052604090205490565b348015610c0457600080fd5b5061054c7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b348015610c3857600080fd5b506104ac610c47366004614e56565b6126a9565b348015610c5857600080fd5b5061054c610c67366004614c89565b6001600160a01b03166000908152600f602052604090205490565b348015610c8e57600080fd5b50600b5461054c565b348015610ca357600080fd5b5061054c6000805160206156c583398151915281565b348015610cc557600080fd5b50610447610cd4366004614e7b565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610d0e57600080fd5b506104ac610d1d366004614dae565b6126ce565b348015610d2e57600080fd5b5061054c610d3d366004614c89565b601c6020526000908152604090205481565b60006001600160e01b0319821663152a902d60e11b1480610d745750610d74826126ec565b92915050565b6000805160206156c5833981519152610d9281612711565b6127106001600160601b0383161115610e005760405162461bcd60e51b815260206004820152602a60248201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646044820152692073616c65507269636560b01b6064820152608401610419565b6001600160a01b038316610e565760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610419565b50604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217602555565b610e9861271b565b6000610ea382612761565b9050610ecf7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6826123be565b610f255760405162461bcd60e51b815260206004820152602160248201527f5369676e617475726520696e76616c6964206f7220756e617574686f72697a656044820152601960fa1b6064820152608401610419565b6001600160a01b03831633148015610f51575033610f466020840184614c89565b6001600160a01b0316145b610f9d5760405162461bcd60e51b815260206004820152601f60248201527f566f756368657220697320666f7220646966666572656e742063616c6c6572006044820152606401610419565b33610fae6040840160208501614c89565b6001600160a01b0316036110045760405162461bcd60e51b815260206004820152601c60248201527f52656665727265722063616e2774206265207468652063616c6c6572000000006044820152606401610419565b61101684611011846150f8565b6127ba565b50505050565b60606000805461102b90615184565b80601f016020809104026020016040519081016040528092919081815260200182805461105790615184565b80156110a45780601f10611079576101008083540402835291602001916110a4565b820191906000526020600020905b81548152906001019060200180831161108757829003601f168201915b5050505050905090565b60006110b982612cfd565b506000908152600460205260409020546001600160a01b031690565b6001600160a01b03821660009081526019602052604090205460ff161561113e5760405162461bcd60e51b815260206004820181905260248201527f496e76616c6964206d61726b6574706c6163652c206e6f7420616c6c6f7765646044820152606401610419565b6111488282612d5c565b5050565b6001600160a01b0381166000908152600c60205260409020546111815760405162461bcd60e51b8152600401610419906151be565b600061118c826124af565b9050806000036111ae5760405162461bcd60e51b815260040161041990615204565b80600b60008282546111c09190615265565b90915550506001600160a01b0382166000908152600d602052604090208054820190556111ed8282612e6c565b604080516001600160a01b0384168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a15050565b61123d3382612f85565b6112595760405162461bcd60e51b815260040161041990615278565b611264838383613003565b505050565b604080518082019091526025546001600160a01b0381168252600160a01b90046001600160601b03166020820181905260009182918290612710906112ae90876152c5565b6112b891906152f2565b91519350909150505b9250929050565b6000828152601360205260409020600101546112e381612711565b6112648383613174565b60006112f883611e7f565b821061135a5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610419565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6001600160a01b03811633146113f35760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610419565b61114882826131fa565b6000805160206156c583398151915261141581612711565b61141d613261565b50565b61126483838360405180602001604052806000815250612546565b6001600160a01b0381166000908152600c60205260409020546114705760405162461bcd60e51b8152600401610419906151be565b600061147c8383612578565b90508060000361149e5760405162461bcd60e51b815260040161041990615204565b6001600160a01b0383166000908152600f6020526040812080548392906114c6908490615265565b90915550506001600160a01b0380841660009081526010602090815260408083209386168352929052208054820190556115018383836132b3565b604080516001600160a01b038481168252602082018490528516917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a2505050565b600061155760085490565b82106115ba5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610419565b600882815481106115cd576115cd615306565b90600052602060002001549050919050565b6115e761271b565b6115fb335b6001600160a01b03163b151590565b156116485760405162461bcd60e51b815260206004820152601e60248201527f43616e6e6f742062652063616c6c65642066726f6d20636f6e747261637400006044820152606401610419565b3361165282611922565b6001600160a01b03161461169b5760405162461bcd60e51b815260206004820152601060248201526f139bdd081bdddb995c881bd98813919560821b6044820152606401610419565b60175460008281526022602052604090206001015442916116bb91615265565b10156117005760405162461bcd60e51b8152602060048201526014602482015273139bc81d985b1a5908189d5c9b881d1a58dad95d60621b6044820152606401610419565b6000818152602160209081526040822054829060ff1660058111156117275761172761500d565b60058111156117385761173861500d565b81526020019081526020016000205411156117ab57600081815260216020908152604082205490919060ff1660058111156117755761177561500d565b60058111156117865761178661500d565b815260200190815260200160002060008154809291906117a59061531c565b91905055505b600081815260226020908152604080832080546001600160a01b031916815560010183905560219091529020805460ff191690556117e881613305565b6117f6602480546001019055565b600061180160245490565b905061180e335b826133a8565b611817816133c2565b6000828152602160205260409020805460ff1916600183600581111561183f5761183f61500d565b0217905550600081815260216020908152604082205490919060ff16600581111561186c5761186c61500d565b600581111561187d5761187d61500d565b8152602001908152602001600020600081548092919061189c90615333565b91905055505050565b6000805160206156c58339815191526118bd81612711565b6014611264838261539a565b6118d161371c565b6000805160206156c58339815191526118e981612711565b60005b60265481101561191457611902610575826121bc565b8061190c81615333565b9150506118ec565b50506119206001601255565b565b6000818152600260205260408120546001600160a01b031680610d745760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610419565b600061198c61271b565b60235460ff166119d35760405162461bcd60e51b8152602060048201526012602482015271119d5cda5bdb881b9bdd08195b98589b195960721b6044820152606401610419565b6119dc336115ec565b15611a295760405162461bcd60e51b815260206004820152601e60248201527f43616e6e6f742062652063616c6c65642066726f6d20636f6e747261637400006044820152606401610419565b33611a3384611922565b6001600160a01b031614611a7c5760405162461bcd60e51b815260206004820152601060248201526f139bdd081bdddb995c881bd98813919560821b6044820152606401610419565b600260008481526021602052604090205460ff166005811115611aa157611aa161500d565b10611ade5760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081b195d995b609a1b6044820152606401610419565b33611ae883611922565b6001600160a01b031614611b315760405162461bcd60e51b815260206004820152601060248201526f139bdd081bdddb995c881bd98813919560821b6044820152606401610419565b600260008381526021602052604090205460ff166005811115611b5657611b5661500d565b10611b935760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081b195d995b609a1b6044820152606401610419565b60008281526021602052604090205460ff166005811115611bb657611bb661500d565b60008481526021602052604090205460ff166005811115611bd957611bd961500d565b03611c305760405162461bcd60e51b815260206004820152602160248201527f546f6b656e732073686f756c64206861766520646966666572656e74207479706044820152606560f81b6064820152608401610419565b611c3983613305565b611c4282613305565b611c50602480546001019055565b6000611c5b60245490565b9050611c6633611808565b611c6f816133c2565b6000828152602160205260409020805460ff19166001836005811115611c9757611c9761500d565b0217905550600081815260216020908152604082205490919060ff166005811115611cc457611cc461500d565b6005811115611cd557611cd561500d565b81526020019081526020016000206000815480929190611cf490615333565b9190505550601d6000611d043390565b6001600160a01b0316815260208101919091526040016000205460ff1615611dc2576040518060400160405280611d383390565b6001600160a01b0390811682524260209283015260008481526022835260409020835181546001600160a01b03191692169190911781559101516001909101557f44e68ba968178cb8e9a7a1ac2b3cdfbbfc98d57f8ff2541a242cb86371d0693633604080516001600160a01b039092168252426020830152810183905260600160405180910390a15b9392505050565b6000805160206156c5833981519152611de181612711565b506023805460ff19166001179055565b60148054611dfe90615184565b80601f0160208091040260200160405190810160405280929190818152602001828054611e2a90615184565b8015611e775780601f10611e4c57610100808354040283529160200191611e77565b820191906000526020600020905b815481529060010190602001808311611e5a57829003601f168201915b505050505081565b60006001600160a01b038216611ee95760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610419565b506001600160a01b031660009081526003602052604090205490565b6000805160206156c5833981519152611f1d81612711565b506001600160a01b03919091166000908152601960205260409020805460ff1916911515919091179055565b6000805160206156c5833981519152611f6181612711565b601654831115611fb35760405162461bcd60e51b815260206004820181905260248201527f45786365656473206d6178206d696e74207175616e74697479207065722074786044820152606401610419565b601f6020527f820fef5837650fa3b8e45045b88059d8deaf0810350ec511c47ef768a28c2c9b54600080527f8c60882dec3cf54096060609fdd16c336781b436ca34f3f27a220dfcfa1d48555461200a9190615265565b602080527f156774b33c8bc7cb83eda4cbc43b36c7c9490ff8913c488ccd5132cfc71344ea54600080527f29ab76e7ca72530a8284597fb76b039d796325740b21528d71ade454c6f2dbe954859161206191615265565b61206b9190615265565b11156120b25760405162461bcd60e51b815260206004820152601660248201527545786365656473204c6576656c203020737570706c7960501b6044820152606401610419565b60005b83811015611016576120cb602480546001019055565b60006120d660245490565b90506120e284826133a8565b6120eb81613775565b6000828152602160205260409020805460ff191660018360058111156121135761211361500d565b0217905550600081815260216020908152604082205490919060ff1660058111156121405761214061500d565b60058111156121515761215161500d565b81526020810191909152604001600020805460019081019091559190910190506120b5565b6000805160206156c583398151915261218e81612711565b61141d613848565b60606121a182612cfd565b600082815260216020526040902054610d749060ff16613885565b6000600e82815481106121d1576121d1615306565b6000918252602090912001546001600160a01b031692915050565b6121f461271b565b6018546001600160a01b038481169116146122515760405162461bcd60e51b815260206004820152601860248201527f5265737472696374656420666f722063726f73736d696e7400000000000000006044820152606401610419565b6018546001600160a01b0316336001600160a01b0316146122b45760405162461bcd60e51b815260206004820152601660248201527f53686f756c6420626520746f2063726f73736d696e74000000000000000000006044820152606401610419565b6001600160a01b038116330361230c5760405162461bcd60e51b815260206004820152601b60248201527f52656665727265722063616e27742062652063726f73736d696e7400000000006044820152606401610419565b806001600160a01b0316826001600160a01b03160361236d5760405162461bcd60e51b815260206004820152601f60248201527f52656665727265722063616e27742062652074686520726563697069656e74006044820152606401610419565b60006040518060600160405280846001600160a01b03168152602001836001600160a01b031681526020016040518060200160405280600081525081525090506123b785826127ba565b5050505050565b60009182526013602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606001805461102b90615184565b6000805160206156c583398151915261241081612711565b50601880546001600160a01b0319166001600160a01b0392909216919091179055565b80158061245957506001600160a01b03821660009081526019602052604090205460ff16155b6124a55760405162461bcd60e51b815260206004820181905260248201527f496e76616c6964206d61726b6574706c6163652c206e6f7420616c6c6f7765646044820152606401610419565b61114882826139ef565b6000806124bb600b5490565b6124c59047615265565b9050611dc283826124eb866001600160a01b03166000908152600d602052604090205490565b6139fa565b604080514260208201526bffffffffffffffffffffffff193360601b16918101919091526054810183905260009082906074016040516020818303038152906040528051906020012060001c611dc2919061545a565b6125503383612f85565b61256c5760405162461bcd60e51b815260040161041990615278565b61101684848484613a38565b6001600160a01b0382166000908152600f602052604081205481906040516370a0823160e01b81523060048201526001600160a01b038616906370a0823190602401602060405180830381865afa1580156125d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906125fb919061546e565b6126059190615265565b6001600160a01b0380861660009081526010602090815260408083209388168352929052205490915061263b90849083906139fa565b949350505050565b606061264e82612cfd565b6000612658613a6b565b905060008151116126785760405180602001604052806000815250611dc2565b8061268284613a7a565b604051602001612693929190615487565b6040516020818303038152906040529392505050565b6000828152601360205260409020600101546126c481612711565b61126483836131fa565b6000805160206156c58339815191526126e681612711565b50601555565b60006001600160e01b03198216637965db0b60e01b1480610d745750610d7482613b0d565b61141d8133613b32565b60115460ff16156119205760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610419565b60008061276d83613b8b565b9050611dc28161278060408601866154b6565b8080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250613c0d92505050565b60165482111561280c5760405162461bcd60e51b815260206004820181905260248201527f45786365656473206d6178206d696e74207175616e74697479207065722074786044820152606401610419565b601f6020527f820fef5837650fa3b8e45045b88059d8deaf0810350ec511c47ef768a28c2c9b54600080527f8c60882dec3cf54096060609fdd16c336781b436ca34f3f27a220dfcfa1d4855546128639190615265565b602080527f156774b33c8bc7cb83eda4cbc43b36c7c9490ff8913c488ccd5132cfc71344ea54600080527f29ab76e7ca72530a8284597fb76b039d796325740b21528d71ade454c6f2dbe95484916128ba91615265565b6128c49190615265565b111561290b5760405162461bcd60e51b815260206004820152601660248201527545786365656473204c6576656c203020737570706c7960501b6044820152606401610419565b80516001600160a01b03166000908152601e602052604090205460ff16156129f95780516001600160a01b03166000908152601c60205260408120549081841015612957576000612961565b61296182856154fd565b90508060155461297191906152c5565b34146129b55760405162461bcd60e51b8152602060048201526013602482015272139bdd08195b9bdd59da08115512081cd95b9d606a1b6044820152606401610419565b81156129f2576000848310156129cc5760006129d6565b6129d685846154fd565b84516001600160a01b03166000908152601c6020526040902055505b5050612a4b565b81601554612a0791906152c5565b3414612a4b5760405162461bcd60e51b8152602060048201526013602482015272139bdd08195b9bdd59da08115512081cd95b9d606a1b6044820152606401610419565b60005b82811015612b1b57612a64602480546001019055565b6000612a6f60245490565b9050612a7f8360000151826133a8565b612a8881613775565b6000828152602160205260409020805460ff19166001836005811115612ab057612ab061500d565b0217905550600081815260216020908152604082205490919060ff166005811115612add57612add61500d565b6005811115612aee57612aee61500d565b81526020019081526020016000206000815480929190612b0d90615333565b909155505050600101612a4e565b5060208101516001600160a01b031615612c6e576020808201516001600160a01b039081166000908152601a83526040808220855190931682529190925290205460ff16612c69576020808201516001600160a01b03166000908152601b90915260408120805491612b8c83615333565b9091555050602080820180516001600160a01b039081166000908152601a845260408082208651841683528552808220805460ff1916600117905592519091168152601b909252902054612be29060039061545a565b600003612c69576020808201516001600160a01b03166000908152601c90915260408120805491612c1283615333565b91905055507f2d0dcbbd220ae1f097f44595fe450fa365f101e03c5bd8986b49d5bca2d274fa816020015142604051612c609291906001600160a01b03929092168252602082015260400190565b60405180910390a15b612cb4565b80516001600160a01b03166000908152601d602052604090205460ff16612cb45780516001600160a01b03166000908152601d60205260409020805460ff191660011790555b80516001600160a01b03166000908152601e602052604090205460ff166111485780516001600160a01b03166000908152601e60205260409020805460ff191660011790555050565b6000818152600260205260409020546001600160a01b031661141d5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610419565b6000612d6782611922565b9050806001600160a01b0316836001600160a01b031603612dd45760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610419565b336001600160a01b0382161480612df05750612df08133610cd4565b612e625760405162461bcd60e51b815260206004820152603d60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206f7220617070726f76656420666f7220616c6c0000006064820152608401610419565b6112648383613c31565b80471015612ebc5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610419565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612f09576040519150601f19603f3d011682016040523d82523d6000602084013e612f0e565b606091505b50509050806112645760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610419565b600080612f9183611922565b9050806001600160a01b0316846001600160a01b03161480612fd857506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b8061263b5750836001600160a01b0316612ff1846110ae565b6001600160a01b031614949350505050565b826001600160a01b031661301682611922565b6001600160a01b03161461303c5760405162461bcd60e51b815260040161041990615510565b6001600160a01b03821661309e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610419565b6130ab8383836001613c9f565b826001600160a01b03166130be82611922565b6001600160a01b0316146130e45760405162461bcd60e51b815260040161041990615510565b600081815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0387811680865260038552838620805460001901905590871680865283862080546001019055868652600290945282852080549092168417909155905184937fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b61317e82826123be565b6111485760008281526013602090815260408083206001600160a01b03851684529091529020805460ff191660011790556131b63390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b61320482826123be565b156111485760008281526013602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b613269613cab565b6011805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052611264908490613cf4565b600061331082611922565b9050613320816000846001613c9f565b61332982611922565b600083815260046020908152604080832080546001600160a01b03199081169091556001600160a01b0385168085526003845282852080546000190190558785526002909352818420805490911690555192935084927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b611148828260405180602001604052806000815250613dc6565b6000806040518060800160405280601f6000600260058111156133e7576133e761500d565b60058111156133f8576133f861500d565b8152602001908152602001600020548152602001601f6000600360058111156134235761342361500d565b60058111156134345761343461500d565b8152602001908152602001600020548152602001601f60006004600581111561345f5761345f61500d565b60058111156134705761347061500d565b8152602001908152602001600020548152602001601f600060058081111561349a5761349a61500d565b60058111156134ab576134ab61500d565b8152602001908152602001600020548152509050601f6000600260058111156134d6576134d661500d565b60058111156134e7576134e761500d565b815260200190815260200160002054602060006002600581111561350d5761350d61500d565b600581111561351e5761351e61500d565b8152602001908152602001600020540361353757600081525b60036000527f9e71908050462d95d85d10ec71f33c35476f5af9a2363ff3b4f561b1ea62005054602080527f1ae1eab41a4db68d73559dd6c8b7ac16a4bc819634768486d35edbff05543abf540361359157600060208201525b60046000527f44ef42eef5af19d25d4e44ae57c825e0d0624b9f37f2474ab961410a0aa295ff54602080527faf69f7ec271f94daa686978b3a96acf46914b99f1828a3f8265276d5eab630fa54036135eb57600060408201525b60056000527f8f7baaeb89fd2366535b48ed7d56321470a1399e8ab1b2456eb79477a77d951b54602080527f9a7f38673f2403ea220372c36a5d3212283a73c030ab2696398da5299fc8f979540361364557600060608201525b60608101516040820151602083015183516000936136809388939192909161366c91615265565b6136769190615265565b610af49190615265565b8251909150811015613696575060029392505050565b815181108015906136b65750602082015182516136b39190615265565b81105b156136c5575060039392505050565b602082015182516136d69190615265565b811015801561370357506040820151602083015183516136f69190615265565b6137009190615265565b81105b15613712575060049392505050565b5060059392505050565b60026012540361376e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610419565b6002601255565b60008080527f8c60882dec3cf54096060609fdd16c336781b436ca34f3f27a220dfcfa1d485554602080527f29ab76e7ca72530a8284597fb76b039d796325740b21528d71ade454c6f2dbe954036137cf57506001919050565b60016000527f820fef5837650fa3b8e45045b88059d8deaf0810350ec511c47ef768a28c2c9b54602080527f156774b33c8bc7cb83eda4cbc43b36c7c9490ff8913c488ccd5132cfc71344ea540361382957506000919050565b6138348260026124f0565b15613840576001610d74565b600092915050565b61385061271b565b6011805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586132963390565b6060600082600581111561389b5761389b61500d565b036138be575050604080518082019091526002815261041360f41b602082015290565b60018260058111156138d2576138d261500d565b036138f5575050604080518082019091526002815261042360f41b602082015290565b60028260058111156139095761390961500d565b0361392c575050604080518082019091526002815261413160f01b602082015290565b60038260058111156139405761394061500d565b03613963575050604080518082019091526002815261423160f01b602082015290565b60048260058111156139775761397761500d565b0361399a575050604080518082019091526002815261433160f01b602082015290565b60058260058111156139ae576139ae61500d565b036139d1575050604080518082019091526002815261443160f01b602082015290565b50506040805180820190915260028152614b4f60f01b602082015290565b611148338383613df9565b600a546001600160a01b0384166000908152600c602052604081205490918391613a2490866152c5565b613a2e91906152f2565b61263b91906154fd565b613a43848484613003565b613a4f84848484613ec7565b6110165760405162461bcd60e51b815260040161041990615555565b60606014805461102b90615184565b60606000613a8783613fc8565b600101905060008167ffffffffffffffff811115613aa757613aa7614ea9565b6040519080825280601f01601f191660200182016040528015613ad1576020820181803683370190505b5090508181016020015b600019016f181899199a1a9b1b9c1cb0b131b232b360811b600a86061a8153600a8504945084613adb57509392505050565b60006001600160e01b0319821663780e9d6360e01b1480610d745750610d74826140a0565b613b3c82826123be565b61114857613b49816140f0565b613b54836020614102565b604051602001613b659291906155a7565b60408051601f198184030181529082905262461bcd60e51b825261041991600401614d9b565b6000610d747ffa711a996dd148f301b03c80645ef858dbe69956bce33bcc5ff79a8bee94f09d613bbe6020850185614c89565b613bce6040860160208701614c89565b6040805160208101949094526001600160a01b03928316908401521660608201526080016040516020818303038152906040528051906020012061429e565b6000806000613c1c85856142ec565b91509150613c298161432e565b509392505050565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190613c6682611922565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b61101684848484614478565b60115460ff166119205760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610419565b6000613d49826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166145a59092919063ffffffff16565b8051909150156112645780806020019051810190613d67919061561c565b6112645760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610419565b613dd083836145b4565b613ddd6000848484613ec7565b6112645760405162461bcd60e51b815260040161041990615555565b816001600160a01b0316836001600160a01b031603613e5a5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610419565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60006001600160a01b0384163b15613fbd57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613f0b903390899088908890600401615639565b6020604051808303816000875af1925050508015613f46575060408051601f3d908101601f19168201909252613f4391810190615675565b60015b613fa3573d808015613f74576040519150601f19603f3d011682016040523d82523d6000602084013e613f79565b606091505b508051600003613f9b5760405162461bcd60e51b815260040161041990615555565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061263b565b506001949350505050565b60008072184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b83106140075772184f03e93ff9f4daa797ed6e38ed64bf6a1f0160401b830492506040015b6d04ee2d6d415b85acef81000000008310614033576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc10000831061405157662386f26fc10000830492506010015b6305f5e1008310614069576305f5e100830492506008015b612710831061407d57612710830492506004015b6064831061408f576064830492506002015b600a8310610d745760010192915050565b60006001600160e01b031982166380ac58cd60e01b14806140d157506001600160e01b03198216635b5e139f60e01b145b80610d7457506301ffc9a760e01b6001600160e01b0319831614610d74565b6060610d746001600160a01b03831660145b606060006141118360026152c5565b61411c906002615265565b67ffffffffffffffff81111561413457614134614ea9565b6040519080825280601f01601f19166020018201604052801561415e576020820181803683370190505b509050600360fc1b8160008151811061417957614179615306565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106141a8576141a8615306565b60200101906001600160f81b031916908160001a90535060006141cc8460026152c5565b6141d7906001615265565b90505b600181111561424f576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061420b5761420b615306565b1a60f81b82828151811061422157614221615306565b60200101906001600160f81b031916908160001a90535060049490941c936142488161531c565b90506141da565b508315611dc25760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610419565b6000610d746142ab61474d565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b60008082516041036143225760208301516040840151606085015160001a61431687828585614874565b945094505050506112c1565b506000905060026112c1565b60008160048111156143425761434261500d565b0361434a5750565b600181600481111561435e5761435e61500d565b036143ab5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e617475726500000000000000006044820152606401610419565b60028160048111156143bf576143bf61500d565b0361440c5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e677468006044820152606401610419565b60038160048111156144205761442061500d565b0361141d5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b6064820152608401610419565b60018111156144e75760405162461bcd60e51b815260206004820152603560248201527f455243373231456e756d657261626c653a20636f6e7365637574697665207472604482015274185b9cd9995c9cc81b9bdd081cdd5c1c1bdc9d1959605a1b6064820152608401610419565b816001600160a01b0385166145435761453e81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b614566565b836001600160a01b0316856001600160a01b031614614566576145668582614938565b6001600160a01b0384166145825761457d816149d5565b6123b7565b846001600160a01b0316846001600160a01b0316146123b7576123b78482614a84565b606061263b8484600085614ac8565b6001600160a01b03821661460a5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610419565b6000818152600260205260409020546001600160a01b03161561466f5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610419565b61467d600083836001613c9f565b6000818152600260205260409020546001600160a01b0316156146e25760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610419565b6001600160a01b038216600081815260036020908152604080832080546001019055848352600290915280822080546001600160a01b0319168417905551839291907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000306001600160a01b037f000000000000000000000000e6605cf4412db54bbd8b8a10f655155300154584161480156147a657507f000000000000000000000000000000000000000000000000000000000000000146145b156147d057507f3d0020fc179946e50a9cfbbf89fcc5103a575481ddfa0733f95889aac015412890565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527f293fb328b8a471018f9ce067ecfdbb658bac0ad4d2e75953b6c7cee6361a1a49828401527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156148ab575060009050600361492f565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156148ff573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166149285760006001925092505061492f565b9150600090505b94509492505050565b6000600161494584611e7f565b61494f91906154fd565b6000838152600760205260409020549091508082146149a2576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906149e7906001906154fd565b60008381526009602052604081205460088054939450909284908110614a0f57614a0f615306565b906000526020600020015490508060088381548110614a3057614a30615306565b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480614a6857614a68615692565b6001900381819060005260206000200160009055905550505050565b6000614a8f83611e7f565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b606082471015614b295760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610419565b600080866001600160a01b03168587604051614b4591906156a8565b60006040518083038185875af1925050503d8060008114614b82576040519150601f19603f3d011682016040523d82523d6000602084013e614b87565b606091505b5091509150614b9887838387614ba3565b979650505050505050565b60608315614c12578251600003614c0b576001600160a01b0385163b614c0b5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610419565b508161263b565b61263b8383815115614c275781518083602001fd5b8060405162461bcd60e51b81526004016104199190614d9b565b6001600160e01b03198116811461141d57600080fd5b600060208284031215614c6957600080fd5b8135611dc281614c41565b6001600160a01b038116811461141d57600080fd5b600060208284031215614c9b57600080fd5b8135611dc281614c74565b60008060408385031215614cb957600080fd5b8235614cc481614c74565b915060208301356001600160601b0381168114614ce057600080fd5b809150509250929050565b600080600060608486031215614d0057600080fd5b833592506020840135614d1281614c74565b9150604084013567ffffffffffffffff811115614d2e57600080fd5b840160608187031215614d4057600080fd5b809150509250925092565b60005b83811015614d66578181015183820152602001614d4e565b50506000910152565b60008151808452614d87816020860160208601614d4b565b601f01601f19169290920160200192915050565b602081526000611dc26020830184614d6f565b600060208284031215614dc057600080fd5b5035919050565b60008060408385031215614dda57600080fd5b8235614de581614c74565b946020939093013593505050565b600080600060608486031215614e0857600080fd5b8335614e1381614c74565b92506020840135614e2381614c74565b929592945050506040919091013590565b60008060408385031215614e4757600080fd5b50508035926020909101359150565b60008060408385031215614e6957600080fd5b823591506020830135614ce081614c74565b60008060408385031215614e8e57600080fd5b8235614e9981614c74565b91506020830135614ce081614c74565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115614eda57614eda614ea9565b604051601f8501601f19908116603f01168101908282118183101715614f0257614f02614ea9565b81604052809350858152868686011115614f1b57600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215614f4757600080fd5b813567ffffffffffffffff811115614f5e57600080fd5b8201601f81018413614f6f57600080fd5b61263b84823560208401614ebf565b801515811461141d57600080fd5b60008060408385031215614f9f57600080fd5b8235614faa81614c74565b91506020830135614ce081614f7e565b60008060008060808587031215614fd057600080fd5b843593506020850135614fe281614c74565b92506040850135614ff281614c74565b9150606085013561500281614c74565b939692955090935050565b634e487b7160e01b600052602160045260246000fd5b602081016006831061504557634e487b7160e01b600052602160045260246000fd5b91905290565b600082601f83011261505c57600080fd5b611dc283833560208501614ebf565b6000806000806080858703121561508157600080fd5b843561508c81614c74565b9350602085013561509c81614c74565b925060408501359150606085013567ffffffffffffffff8111156150bf57600080fd5b6150cb8782880161504b565b91505092959194509250565b6000602082840312156150e957600080fd5b813560068110611dc257600080fd5b60006060823603121561510a57600080fd5b6040516060810167ffffffffffffffff828210818311171561512e5761512e614ea9565b816040528435915061513f82614c74565b90825260208401359061515182614c74565b816020840152604085013591508082111561516b57600080fd5b506151783682860161504b565b60408301525092915050565b600181811c9082168061519857607f821691505b6020821081036151b857634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b80820180821115610d7457610d7461524f565b6020808252602d908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526c1c881bdc88185c1c1c9bdd9959609a1b606082015260800190565b8082028115828204841417610d7457610d7461524f565b634e487b7160e01b600052601260045260246000fd5b600082615301576153016152dc565b500490565b634e487b7160e01b600052603260045260246000fd5b60008161532b5761532b61524f565b506000190190565b6000600182016153455761534561524f565b5060010190565b601f82111561126457600081815260208120601f850160051c810160208610156153735750805b601f850160051c820191505b818110156153925782815560010161537f565b505050505050565b815167ffffffffffffffff8111156153b4576153b4614ea9565b6153c8816153c28454615184565b8461534c565b602080601f8311600181146153fd57600084156153e55750858301515b600019600386901b1c1916600185901b178555615392565b600085815260208120601f198616915b8281101561542c5788860151825594840194600190910190840161540d565b508582101561544a5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082615469576154696152dc565b500690565b60006020828403121561548057600080fd5b5051919050565b60008351615499818460208801614d4b565b8351908301906154ad818360208801614d4b565b01949350505050565b6000808335601e198436030181126154cd57600080fd5b83018035915067ffffffffffffffff8211156154e857600080fd5b6020019150368190038213156112c157600080fd5b81810381811115610d7457610d7461524f565b60208082526025908201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060408201526437bbb732b960d91b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516155df816017850160208801614d4b565b7001034b99036b4b9b9b4b733903937b6329607d1b6017918401918201528351615610816028840160208801614d4b565b01602801949350505050565b60006020828403121561562e57600080fd5b8151611dc281614f7e565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261566b6080830184614d6f565b9695505050505050565b60006020828403121561568757600080fd5b8151611dc281614c41565b634e487b7160e01b600052603160045260246000fd5b600082516156ba818460208701614d4b565b919091019291505056feb19546dff01e856fb3f010c267a7b1c60363cf8a4664e21cc89c26224620214ea26469706673582212209a457e007620c206e6887e8addf0617a20575bdecae9c7014e24e17a7690939964736f6c63430008120033

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

000000000000000000000000917d21076cc96a4ca870f8e76c7e7ad55a408304

-----Decoded View---------------
Arg [0] : _minter (address): 0x917D21076CC96A4ca870f8e76c7e7AD55A408304

-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 000000000000000000000000917d21076cc96a4ca870f8e76c7e7ad55a408304


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

OVERVIEW

FaceArt est une collection de NFT originaux représentant les quatres fondateurs de la start-up Theartist.

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ 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.