ETH Price: $2,521.63 (-0.11%)

Token

Tozzi Ducks (TZDUCKS)
 

Overview

Max Total Supply

18 TZDUCKS

Holders

18

Market

Volume (24H)

N/A

Min Price (24H)

N/A

Max Price (24H)

N/A
Balance
1 TZDUCKS
0x493304495b1d6708c40d47f056547eceb8834373
Loading...
Loading
Loading...
Loading
Loading...
Loading

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

Contract Source Code Verified (Exact Match)

Contract Name:
TheAmazingTozziDuckMachine

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 20 : TheAmazingTozziDuckMachine.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.9;

import "./interfaces/ITheAmazingTozziDuckMachine.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";
import "@rari-capital/solmate/src/utils/SSTORE2.sol";
import "@rari-capital/solmate/src/utils/SafeTransferLib.sol";
import {Base64} from "./lib/base64.sol";

/// @title Tozzi Ducks
/// @author (ediv, exp.table) === CHAIN/SAW

/*
 *                     ;@######@b,,,,,,      ,,,,
 *                  .;##b      8@      #N,,{@#### N,
 *                ,###b                8@          #Q;;;;;;;;,
 *              ;###b                              88#########Qssp
 *             !@#b            j@###############N            88##@@p
 *             !@#b        ;@################### #N              ?8@@Q
 *             "@@###N  @@ ###################### #N              ?8@@Q
 *               '7@#    ##b''''''''''''''''''7@### #N              @@ b
 *                  ^^3 ###@#        @#######   "@#####S            @@ b
 *                  .@#^                    '@#   '@###Q,,,,      .,@##b
 *                  !@    ,####,    ,######,        '@### #Qpppppp@@#b
 *                  '@#p;##   '@#  @@b    '@#        @ # b'@#### ### b
 *                    '@#~    '@   @ ~   ,s@           7bN,     '@###Q,
 *                   ;@@ ~   ,s@   @ ~ ,s@##             @ b     8@####Qp
 *                 ;## # ~  '@##   @ ~'@####   ;sssssso  @ b       %@@# b
 *                !@#b'8@@Q '@#####  ~'@########888888@@#  b         ""
 *               @########### ####@@ ~ '8 ####T^j@###N^7@@ b
 *             @##""""""""""""""@@### ######"^  '"""@@#N'"@@#p
 *          .@##^ ;########Q,,,,,j""""""""^       ;###@@#N@  b
 *          '@ Q@##b^jQQQQ@#      #Q,,,,,,,,,,,,@@#b^  jQ,@@#b
 *            "@#QQp@### # Q@ ##Q$@#           ### b ,@####b
 *              '@###b  '@  #Q@###QSG9^     .$@ #b.s###b
 *                           '@#Q## #N      l@@## Q##b`
 *                            '@#b@  Q  .l@@###@##b
 *                              %8@##@@######@@##b
 *                               "@@##8888@@## b
 *                                  ""^!@#  '%@ b
 *                                    @#b     @###p
 *                                ,@###       j@# #p
 *                              .@##99@##    @##99@##p
 *                              ;@ #GG$$@#######QpG8@##Q,,,,
 *                            .{@ #GGGG@# #Qp9Q@ ##GG9Q######WN,,,
 *                         ,s#888@QQGG@@##Wb788@QQ@@@ #      7@# Q,
 *
 *   ________________________________   _____________  _______________ _________
 *   ___  __/_  __ \__  /__  /___  _/   ___  __ \_  / / /_  ____/__  //_/_  ___/
 *   __  /  _  / / /_  /__  / __  /     __  / / /  / / /_  /    __  ,<  _____ \ 
 *   _  /   / /_/ /_  /__  /___/ /      _  /_/ // /_/ / / /___  _  /| | ____/ / 
 *   /_/    \____/ /____/____/___/      /_____/ \____/  \____/  /_/ |_| /____/  
 *
 *                                                  JIM TOZZI x CHAIN/SAW         
 */

contract TheAmazingTozziDuckMachine is ERC721Burnable, ERC721Enumerable, Ownable, ITheAmazingTozziDuckMachine {
    using Strings for uint256;    
    
    uint256 private constant TOZZI_DUCKS = 200;    
    uint256 public constant OWNERSHIP_TOKEN_ID = 420;
    uint256 public constant probationPeriod = 1 weeks;    
    bytes32 private constant MERKLE_ROOT = 0x76cf55ec8f156f88221bd1f5b7840a0e6427cafd0518667edd4ca7e530b535f3;    
    uint256 private _nextCustomDuckTokenId;
    uint256 private _numCustomDucks;
    string private _ownershipTokenURI;     
    
    MachineConfig public machineConfig;
    mapping(uint256 => address) public duckCreators;
    mapping(uint256 => bytes32) public artists;
    mapping(uint256 => bytes32) public duckTitles;
    mapping(uint256 => bool) public probationEnded;
    mapping(address => DuckAllowance) public duckAllowances;
    mapping(uint256 => DuckProfile) public duckProfiles;
    mapping(uint256 => address) public duckImageData;
    mapping(bytes32 => bool) public duckExists;
    mapping(uint256 => uint256) public customDuckHatchedTimes;
    
    modifier onlyMachineOwner() {        
        if (!_isApprovedOrOwner(_msgSender(), OWNERSHIP_TOKEN_ID)) revert Unauthorized();
        _;
    }

    modifier onlyExtantDuck(uint256 tokenId) {
        require(_exists(tokenId), "ERC721: owner query for nonexistent token");
        _;
    }

    constructor(
        MachineConfig memory _machineConfig, 
        string memory ownershipTokenURI
    ) ERC721("Tozzi Ducks", "TZDUCKS") {
        machineConfig = _machineConfig;
        _ownershipTokenURI = ownershipTokenURI;
        _safeMint(_msgSender(), OWNERSHIP_TOKEN_ID);
    }

    /**
     * @notice Configure the machine to manage the growth of the duck population responsibly.
     */
    function setMachineConfig(MachineConfig calldata _machineConfig) external override onlyMachineOwner {
        machineConfig = _machineConfig;
        require(_machineConfig.maxCustomDucks >= _numCustomDucks);
        emit MachineConfigUpdated(
            _machineOwner(),
            _machineConfig.tozziDuckPrice,
            _machineConfig.customDuckPrice,
            _machineConfig.maxCustomDucks,
            _machineConfig.tozziDuckMintStatus,
            _machineConfig.customDuckMintStatus
        );
    }

    /**
     * @notice Adjust the media associated with the token representing ownership of the machine.
     */
    function setOwnershipTokenURI(
        string calldata ownershipTokenUri
    ) external override onlyMachineOwner {
        _ownershipTokenURI = ownershipTokenUri;
    }

    /**
     * @notice Share the latest news with the flock.
     * @dev Emits an event to be picked up and displayed by front-ends.
     */
    function setMOTD(string calldata motd) external override onlyMachineOwner {
        emit MOTDSet(_msgSender(), motd);
    }

    /**
     * @notice Manage the duck allowance for an individual account. A duck allowance specifies how many of each type of duck
     * (Tozzi and Custom) a given user is able to mint. A user's duck allowances will deplete with each mint. Note: Duck allowances 
     * are only taken into account when mint status for a particular duck type is set to MintStatus.Allow.
     */
    function setDuckAllowance(
        address who, 
        DuckAllowance calldata allowance
    ) external override onlyMachineOwner {        
        duckAllowances[who] = allowance;        
    }

    /**
     * @notice Set duck allowances for multiple accounts at once. Useful for whitelisting groups of accounts. Obviously,
     * this can get expensive so please use responsibly.
     */
    function setDuckAllowances(
        address[] calldata who,
        DuckAllowance calldata allowance
    ) external override onlyMachineOwner {
        for (uint i = 0; i < who.length; i++) {
            duckAllowances[who[i]] = allowance;
        }
    }

    /**
     * @notice Immediately end probationary period for a custom duck. For use-cases where the duck looks so fine
     * you just can't wait a week to make them official.
     */
    function endProbation(uint256 tokenId) 
        external 
        override 
        onlyExtantDuck(tokenId) 
        onlyMachineOwner 
    {
        if (!_isCustomDuck(tokenId)) revert InvalidDuckId();
        if (!_isOnProbation(tokenId)) revert ProbationEnded();
        probationEnded[tokenId] = true;
    }

    /**
     * @notice Burn a freshly minted custom duck because you hate it's face. Custom ducks that are less than
     * 1 WEEK old are subject to the destructive whims of the machine's owner.
     */
    function burnRenegadeDuck(
        uint256 tokenId, 
        string calldata reason
    ) external override onlyExtantDuck(tokenId) onlyMachineOwner {
        if (!_isCustomDuck(tokenId)) revert InvalidDuckId();
        if (!_isOnProbation(tokenId)) revert ProbationEnded();
        address owner = ownerOf(tokenId);
        string memory webp = string(SSTORE2.read(duckImageData[tokenId]));
        _burn(tokenId);
        _numCustomDucks -= 1;
        emit CustomDuckBurned(tokenId, owner, _machineOwner(), webp, reason);
    }
    
    /**
     * @notice Grant a special title to a deserving duck.
     */
    function setDuckTitle(
        uint256 tokenId, 
        bytes32 title
    ) external override onlyExtantDuck(tokenId) onlyMachineOwner {
        duckTitles[tokenId] = title;
        emit DuckTitleGranted(tokenId, title, _machineOwner());
    }

     /**
     * @notice Mint a custom duck directly to specified recipient bypassing minting fees. The resulting duck will have 
     * it's 'Creator' attribute set to the supplied artist parameter.
     */
    function ownerMint(
        address to, 
        string calldata webp
    ) external override onlyMachineOwner {                
        if (_numCustomDucks >= machineConfig.maxCustomDucks) 
            revert CustomDuckLimitReached();        
        if (_nextCustomDuckTokenId + TOZZI_DUCKS == OWNERSHIP_TOKEN_ID) 
            _nextCustomDuckTokenId += 1;
        bytes32 webpHash = keccak256(abi.encodePacked(webp));
        if (duckExists[webpHash]) revert DuckAlreadyExists();
        duckExists[webpHash] = true;
        uint256 tokenId = TOZZI_DUCKS + (_nextCustomDuckTokenId++);
        address pointer = SSTORE2.write(bytes(webp));
        duckImageData[tokenId] = pointer;
        _safeMint(to, tokenId);
        customDuckHatchedTimes[tokenId] = block.timestamp;
        _numCustomDucks += 1;
        emit DuckMinted(
            tokenId,
            webpHash,
            _msgSender(),
            to,
            DuckType.Custom,
            machineConfig.customDuckPrice
        );
    }

    /**
     * @notice Shout out the artist who created a custom duck.
     */
    function setArtistName(
        uint256 tokenId, 
        bytes32 name
    ) external override onlyExtantDuck(tokenId) onlyMachineOwner {
        if (!_isCustomDuck(tokenId)) revert InvalidDuckId();
        artists[tokenId] = name;
    }

    /**
     * @notice After all ... Why shouldn't you take profits?
     */
    function withdraw(address recipient, uint256 amount) external override onlyMachineOwner {
        if (amount > address(this).balance) revert InsufficientFunds();
        if (amount == 0) revert AmountMustBeNonZero();
        SafeTransferLib.safeTransferETH(recipient, amount);
    }

    /**
     * @notice Update your duck's profile by providing a custom name, status, and description.
     * @dev Customized duck profiles are used within tokenURI() when constructing a duck's metadata.
     */
    function setDuckProfile(
        uint256 tokenId,
        bytes32 name,
        bytes32 status,
        string calldata description
    ) onlyExtantDuck(tokenId) external override {        
        if (!_isApprovedOrOwner(_msgSender(), tokenId)) revert Unauthorized();
        duckProfiles[tokenId] = DuckProfile(name, status, description);
        emit DuckProfileUpdated(tokenId, name, status, description);
    }
       
    /**
     * @notice Mint one of 200 official Tozzi Ducks created by Jim Tozzi. Image storage costs paid by minter.
     * @dev User supplies webp data to be stored on chain. The provided proof is used verify that provided
     * duck image data is legit. 
     */
    function mintTozziDuck(
        address to,
        uint256 duckId,
        string calldata webp,
        bytes32[] calldata merkleProof
    ) external override payable {
        if (machineConfig.tozziDuckMintStatus == MintStatus.Disabled)
            revert MintingDisabled();
        if (msg.value != machineConfig.tozziDuckPrice)
            revert IncorrectDuckPrice();
        if (machineConfig.tozziDuckMintStatus == MintStatus.Allow) {
            if (duckAllowances[_msgSender()].tozziDuckAllowance <= 0)
                revert InsufficientDuckAllowance();
            duckAllowances[_msgSender()].tozziDuckAllowance--;
        }
        bytes32 webpHash = keccak256(abi.encodePacked(webp));
        bytes32 node = keccak256(abi.encodePacked(duckId, webp));
        if (!MerkleProof.verify(merkleProof, MERKLE_ROOT, node))
            revert InvalidProof();
        address pointer = SSTORE2.write(bytes(webp));
        duckImageData[duckId] = pointer;
        _safeMint(to, duckId);
        emit DuckMinted(
            duckId,
            webpHash,
            _msgSender(),
            to,
            DuckType.Tozzi,
            machineConfig.tozziDuckPrice
        );
    }

    /**
     * @notice Mint your very own custom duck. Minter pays fees associated with on-chain storage of webp image data. Newly minted
     * custom ducks are born into a 1 WEEK probation period. While under probation, custom ducks can be destroyed by the machine's
     * current owner.
     */
    function mintCustomDuck(address to, string calldata webp) external override payable {
        if (machineConfig.customDuckMintStatus == MintStatus.Disabled)
            revert MintingDisabled();
        if (_numCustomDucks >= machineConfig.maxCustomDucks)
            revert CustomDuckLimitReached();
        if (msg.value != machineConfig.customDuckPrice)
            revert IncorrectDuckPrice();
        if (machineConfig.customDuckMintStatus == MintStatus.Allow) {
            if (duckAllowances[_msgSender()].customDuckAllowance <= 0)
                revert InsufficientDuckAllowance();
            duckAllowances[_msgSender()].customDuckAllowance--;
        }
        if (_nextCustomDuckTokenId + TOZZI_DUCKS == OWNERSHIP_TOKEN_ID)
            _nextCustomDuckTokenId += 1;
        bytes32 webpHash = keccak256(abi.encodePacked(webp));
        if (duckExists[webpHash]) revert DuckAlreadyExists();
        duckExists[webpHash] = true;
        uint256 tokenId = TOZZI_DUCKS + (_nextCustomDuckTokenId++);
        address pointer = SSTORE2.write(bytes(webp));
        duckImageData[tokenId] = pointer;
        _safeMint(to, tokenId);
        duckCreators[tokenId] = _msgSender();
        customDuckHatchedTimes[tokenId] = block.timestamp;
        _numCustomDucks += 1;
        emit DuckMinted(
            tokenId,
            webpHash,
            _msgSender(),
            to,
            DuckType.Custom,
            machineConfig.customDuckPrice
        );
    }

    function tokenURI(uint256 tokenId) public view override onlyExtantDuck(tokenId) returns (string memory) {
        if (tokenId == OWNERSHIP_TOKEN_ID) return _ownershipTokenURI;        
        
        DuckProfile memory profile = duckProfiles[tokenId];
        string memory name = _defaultDuckName(tokenId);
        string memory description = name;
        if (!_isEmptyBytes32(profile.name)) name = _bytes32ToString(profile.name);        
        if (bytes(profile.description).length > 0) description = profile.description;
        string memory image = string(abi.encodePacked("data:image/webp;base64,", string(SSTORE2.read(duckImageData[tokenId]))));        

        return string(abi.encodePacked(
            "data:application/json;base64,",
            Base64.encode(abi.encodePacked(
                '{', 
                    '"name":"', name, '",', 
                    '"description":"', description, '",', 
                    '"image": "', image, '",',
                    '"attributes":', _generateMetadataAttributes(tokenId, profile),
                '}'
            ))
        ));
    }

    function _getDuckCreator(uint256 tokenId) internal view returns (string memory) {
        if (tokenId < TOZZI_DUCKS) return "Jim Tozzi";
        bytes32 artist = artists[tokenId];
        if (!_isEmptyBytes32(artist)) {
            return string(abi.encodePacked(_bytes32ToString(artist)));
        }        
        return string(abi.encodePacked(_addressToString(duckCreators[tokenId])));
    }

    function _generateMetadataAttributes(
        uint256 tokenId, 
        DuckProfile memory profile
    ) internal view returns (string memory attributes) {
        string memory duckType = _isTozziDuck(tokenId) ? "Tozzi" : "Custom";
        string memory creator = _getDuckCreator(tokenId);
        
        bytes memory _attributes = abi.encodePacked(
            '{',
                '"trait_type": "Duck Type",', 
                '"value":', '"', duckType, '"',
            '},'
            '{', 
                '"trait_type": "Creator",',
                '"value":', '"', creator, '"',
            '}'
        );

        if (_isOnProbation(tokenId)) {
            _attributes = abi.encodePacked(
                _attributes, 
                ',', 
                '{', 
                    '"trait_type": "Status",',
                    '"value": "Probation"',
                '}'
            );
        } else if (!_isEmptyBytes32(profile.status)) {
            _attributes = abi.encodePacked(
                _attributes, 
                ',', 
                '{', 
                    '"trait_type": "Status",',
                    '"value":', '"', _bytes32ToString(profile.status), '"',
                '}'
            );
        }

        bytes32 title = duckTitles[tokenId];
        if (!_isEmptyBytes32(title)) {
            _attributes = abi.encodePacked(
                _attributes, 
                ',', 
                '{', 
                    '"trait_type": "Title",',
                    '"value":', '"', _bytes32ToString(title), '"',
                '}'
            );
        }
        return string(abi.encodePacked('[', _attributes, ']'));
    }

    function _addressToString(address _address) internal pure returns (string memory) {
        return Strings.toHexString(uint256(uint160(_address)), 20);
    }

    function _machineOwner() internal view returns (address machineOwner) {
        return ownerOf(OWNERSHIP_TOKEN_ID);
    }

    function _isTozziDuck(uint256 tokenId) internal pure returns (bool) {
        return tokenId < TOZZI_DUCKS;
    }

    function _isCustomDuck(uint256 tokenId) internal pure returns (bool) {
        return tokenId >= TOZZI_DUCKS && tokenId != OWNERSHIP_TOKEN_ID;
    }

    function _defaultDuckName(uint256 tokenId) internal pure returns (string memory) {
        return string(abi.encodePacked("Tozzi Duck ", tokenId.toString()));       
    }

    function _isEmptyBytes32(bytes32 _bytes32) internal pure returns (bool) {
        bytes32 empty;
        return _bytes32 == empty;
    }

    function _isOnProbation(uint256 tokenId) internal view returns (bool) {
        if (!_isCustomDuck(tokenId)) return false;
        if (probationEnded[tokenId]) return false;
        return block.timestamp <= customDuckHatchedTimes[tokenId] + probationPeriod;
    }

    function _bytes32ToString(bytes32 _bytes32) internal pure returns (string memory) {
        uint8 i = 0;
        while(i < 32 && _bytes32[i] != 0) {
            i++;
        }
        bytes memory bytesArray = new bytes(i);
        for (i = 0; i < 32 && _bytes32[i] != 0; i++) {
            bytesArray[i] = _bytes32[i];
        }
        return string(bytesArray);
    }

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

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

File 2 of 20 : ITheAmazingTozziDuckMachine.sol
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.9;

interface ITheAmazingTozziDuckMachine {
    error AmountMustBeNonZero();
    error ProbationEnded();
    error CustomDuckLimitReached();
    error DuckAlreadyExists();
    error IncorrectDuckPrice();
    error InsufficientDuckAllowance();
    error InsufficientFunds();
    error InvalidDuckId();
    error InvalidProof();
    error InvalidStatusId();
    error MintingDisabled();
    error Unauthorized();

    enum DuckType {
        Tozzi,
        Custom
    }

    enum MintStatus {
        Enabled,
        Disabled,
        Allow
    }

    struct DuckAllowance {
        uint128 tozziDuckAllowance;
        uint128 customDuckAllowance;
    }
    
    struct DuckProfile {
        bytes32 name;
        bytes32 status;
        string description;
    }
    
    struct MachineConfig {
        uint256 tozziDuckPrice;
        uint256 customDuckPrice;
        uint256 maxCustomDucks;
        MintStatus tozziDuckMintStatus;
        MintStatus customDuckMintStatus;
    }    

    event CustomDuckBurned(
        uint256 indexed duckId,
        address indexed duckOwner,
        address machineOwner,        
        string webp,
        string reason
    );

    event DuckMinted(
        uint256 indexed tokenId,
        bytes32 indexed webpHash,
        address indexed creator,
        address recipient,
        DuckType duckType,    
        uint256 price
    );

    event DuckProfileUpdated(
        uint256 indexed duckId,
        bytes32 indexed name,
        bytes32 indexed status,
        string description
    );

    event DuckTitleGranted(
        uint256 indexed tokenId,
        bytes32 indexed title,
        address indexed owner
    );

    event MachineConfigUpdated(
        address indexed who,
        uint256 tozziDuckPrice,
        uint256 customDuckPrice,
        uint256 maxCustomDucks,
        MintStatus tozziDuckMintStatus,
        MintStatus customDuckMintStatus
    );

    event MOTDSet(address indexed owner, string message);

    function burnRenegadeDuck(uint256 tokenId, string calldata reason) external;
    function endProbation(uint256 tokenId) external;
    function mintCustomDuck(address to, string calldata webp) external payable;
    function mintTozziDuck(address to, uint256 duckId, string calldata webp, bytes32[] calldata merkleProof) external payable;
    function ownerMint(address to, string calldata webp) external;
    function setArtistName(uint256 tokenId, bytes32 name) external;
    function setDuckAllowance(address who, DuckAllowance calldata allowance) external;
    function setDuckAllowances(address[] calldata who, DuckAllowance calldata allowance) external;
    function setDuckProfile(uint256 tokenId, bytes32 name, bytes32 status, string calldata description) external;    
    function setDuckTitle(uint256 tokenId, bytes32 title) external;
    function setMOTD(string calldata motd) external;
    function setMachineConfig(MachineConfig calldata _machineConfig) external;
    function setOwnershipTokenURI(string calldata ownershipTokenUri) external;
    function withdraw(address recipient, uint256 amount) external;
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 4 of 20 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 Hook that is called before any token transfer. This includes minting
     * and burning.
     *
     * Calling conditions:
     *
     * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
     * transferred to `to`.
     * - When `from` is zero, `tokenId` will be minted for `to`.
     * - When `to` is zero, ``from``'s `tokenId` will be burned.
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 tokenId
    ) internal virtual override {
        super._beforeTokenTransfer(from, to, tokenId);

        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 5 of 20 : ERC721Burnable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Burnable.sol)

pragma solidity ^0.8.0;

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

/**
 * @title ERC721 Burnable Token
 * @dev ERC721 Token that can be irreversibly burned (destroyed).
 */
abstract contract ERC721Burnable is Context, ERC721 {
    /**
     * @dev Burns `tokenId`. See {ERC721-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) public virtual {
        //solhint-disable-next-line max-line-length
        require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved");
        _burn(tokenId);
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

File 7 of 20 : MerkleProof.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/cryptography/MerkleProof.sol)

pragma solidity ^0.8.0;

/**
 * @dev These functions deal with verification of Merkle Trees proofs.
 *
 * The proofs can be generated using the JavaScript library
 * https://github.com/miguelmota/merkletreejs[merkletreejs].
 * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled.
 *
 * See `test/utils/cryptography/MerkleProof.test.js` for some examples.
 */
library MerkleProof {
    /**
     * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree
     * defined by `root`. For this, a `proof` must be provided, containing
     * sibling hashes on the branch from the leaf to the root of the tree. Each
     * pair of leaves and each pair of pre-images are assumed to be sorted.
     */
    function verify(
        bytes32[] memory proof,
        bytes32 root,
        bytes32 leaf
    ) internal pure returns (bool) {
        return processProof(proof, leaf) == root;
    }

    /**
     * @dev Returns the rebuilt hash obtained by traversing a Merklee tree up
     * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt
     * hash matches the root of the tree. When processing the proof, the pairs
     * of leafs & pre-images are assumed to be sorted.
     *
     * _Available since v4.4._
     */
    function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) {
        bytes32 computedHash = leaf;
        for (uint256 i = 0; i < proof.length; i++) {
            bytes32 proofElement = proof[i];
            if (computedHash <= proofElement) {
                // Hash(current computed hash + current element of the proof)
                computedHash = _efficientHash(computedHash, proofElement);
            } else {
                // Hash(current element of the proof + current computed hash)
                computedHash = _efficientHash(proofElement, computedHash);
            }
        }
        return computedHash;
    }

    function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) {
        assembly {
            mstore(0x00, a)
            mstore(0x20, b)
            value := keccak256(0x00, 0x40)
        }
    }
}

File 8 of 20 : SSTORE2.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Read and write to persistent storage at a fraction of the cost.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SSTORE2.sol)
/// @author Modified from 0xSequence (https://github.com/0xSequence/sstore2/blob/master/contracts/SSTORE2.sol)
library SSTORE2 {
    uint256 internal constant DATA_OFFSET = 1; // We skip the first byte as it's a STOP opcode to ensure the contract can't be called.

    /*///////////////////////////////////////////////////////////////
                               WRITE LOGIC
    //////////////////////////////////////////////////////////////*/

    function write(bytes memory data) internal returns (address pointer) {
        // Prefix the bytecode with a STOP opcode to ensure it cannot be called.
        bytes memory runtimeCode = abi.encodePacked(hex"00", data);

        bytes memory creationCode = abi.encodePacked(
            //---------------------------------------------------------------------------------------------------------------//
            // Opcode  | Opcode + Arguments  | Description  | Stack View                                                     //
            //---------------------------------------------------------------------------------------------------------------//
            // 0x60    |  0x600B             | PUSH1 11     | codeOffset                                                     //
            // 0x59    |  0x59               | MSIZE        | 0 codeOffset                                                   //
            // 0x81    |  0x81               | DUP2         | codeOffset 0 codeOffset                                        //
            // 0x38    |  0x38               | CODESIZE     | codeSize codeOffset 0 codeOffset                               //
            // 0x03    |  0x03               | SUB          | (codeSize - codeOffset) 0 codeOffset                           //
            // 0x80    |  0x80               | DUP          | (codeSize - codeOffset) (codeSize - codeOffset) 0 codeOffset   //
            // 0x92    |  0x92               | SWAP3        | codeOffset (codeSize - codeOffset) 0 (codeSize - codeOffset)   //
            // 0x59    |  0x59               | MSIZE        | 0 codeOffset (codeSize - codeOffset) 0 (codeSize - codeOffset) //
            // 0x39    |  0x39               | CODECOPY     | 0 (codeSize - codeOffset)                                      //
            // 0xf3    |  0xf3               | RETURN       |                                                                //
            //---------------------------------------------------------------------------------------------------------------//
            hex"60_0B_59_81_38_03_80_92_59_39_F3", // Returns all code in the contract except for the first 11 (0B in hex) bytes.
            runtimeCode // The bytecode we want the contract to have after deployment. Capped at 1 byte less than the code size limit.
        );

        assembly {
            // Deploy a new contract with the generated creation code.
            // We start 32 bytes into the code to avoid copying the byte length.
            pointer := create(0, add(creationCode, 32), mload(creationCode))
        }

        require(pointer != address(0), "DEPLOYMENT_FAILED");
    }

    /*///////////////////////////////////////////////////////////////
                               READ LOGIC
    //////////////////////////////////////////////////////////////*/

    function read(address pointer) internal view returns (bytes memory) {
        return readBytecode(pointer, DATA_OFFSET, pointer.code.length - DATA_OFFSET);
    }

    function read(address pointer, uint256 start) internal view returns (bytes memory) {
        start += DATA_OFFSET;

        return readBytecode(pointer, start, pointer.code.length - start);
    }

    function read(
        address pointer,
        uint256 start,
        uint256 end
    ) internal view returns (bytes memory) {
        start += DATA_OFFSET;
        end += DATA_OFFSET;

        require(pointer.code.length >= end, "OUT_OF_BOUNDS");

        return readBytecode(pointer, start, end - start);
    }

    /*///////////////////////////////////////////////////////////////
                         INTERNAL HELPER LOGIC
    //////////////////////////////////////////////////////////////*/

    function readBytecode(
        address pointer,
        uint256 start,
        uint256 size
    ) private view returns (bytes memory data) {
        assembly {
            // Get a pointer to some free memory.
            data := mload(0x40)

            // Update the free memory pointer to prevent overriding our data.
            // We use and(x, not(31)) as a cheaper equivalent to sub(x, mod(x, 32)).
            // Adding 31 to size and running the result through the logic above ensures
            // the memory pointer remains word-aligned, following the Solidity convention.
            mstore(0x40, add(data, and(add(add(size, 32), 31), not(31))))

            // Store the size of the data in the first 32 byte chunk of free memory.
            mstore(data, size)

            // Copy the code into memory right after the 32 bytes we used to store the size.
            extcodecopy(pointer, add(data, 32), start, size)
        }
    }
}

File 9 of 20 : SafeTransferLib.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

import {ERC20} from "../tokens/ERC20.sol";

/// @notice Safe ETH and ERC20 transfer library that gracefully handles missing return values.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/utils/SafeTransferLib.sol)
/// @author Modified from Gnosis (https://github.com/gnosis/gp-v2-contracts/blob/main/src/contracts/libraries/GPv2SafeERC20.sol)
/// @dev Use with caution! Some functions in this library knowingly create dirty bits at the destination of the free memory pointer.
library SafeTransferLib {
    /*///////////////////////////////////////////////////////////////
                            ETH OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferETH(address to, uint256 amount) internal {
        bool callStatus;

        assembly {
            // Transfer the ETH and store if it succeeded or not.
            callStatus := call(gas(), to, amount, 0, 0, 0, 0)
        }

        require(callStatus, "ETH_TRANSFER_FAILED");
    }

    /*///////////////////////////////////////////////////////////////
                           ERC20 OPERATIONS
    //////////////////////////////////////////////////////////////*/

    function safeTransferFrom(
        ERC20 token,
        address from,
        address to,
        uint256 amount
    ) internal {
        bool callStatus;

        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata to memory piece by piece:
            mstore(freeMemoryPointer, 0x23b872dd00000000000000000000000000000000000000000000000000000000) // Begin with the function selector.
            mstore(add(freeMemoryPointer, 4), and(from, 0xffffffffffffffffffffffffffffffffffffffff)) // Mask and append the "from" argument.
            mstore(add(freeMemoryPointer, 36), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Mask and append the "to" argument.
            mstore(add(freeMemoryPointer, 68), amount) // Finally append the "amount" argument. No mask as it's a full 32 byte value.

            // Call the token and store if it succeeded or not.
            // We use 100 because the calldata length is 4 + 32 * 3.
            callStatus := call(gas(), token, 0, freeMemoryPointer, 100, 0, 0)
        }

        require(didLastOptionalReturnCallSucceed(callStatus), "TRANSFER_FROM_FAILED");
    }

    function safeTransfer(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool callStatus;

        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata to memory piece by piece:
            mstore(freeMemoryPointer, 0xa9059cbb00000000000000000000000000000000000000000000000000000000) // Begin with the function selector.
            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Mask and append the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Finally append the "amount" argument. No mask as it's a full 32 byte value.

            // Call the token and store if it succeeded or not.
            // We use 68 because the calldata length is 4 + 32 * 2.
            callStatus := call(gas(), token, 0, freeMemoryPointer, 68, 0, 0)
        }

        require(didLastOptionalReturnCallSucceed(callStatus), "TRANSFER_FAILED");
    }

    function safeApprove(
        ERC20 token,
        address to,
        uint256 amount
    ) internal {
        bool callStatus;

        assembly {
            // Get a pointer to some free memory.
            let freeMemoryPointer := mload(0x40)

            // Write the abi-encoded calldata to memory piece by piece:
            mstore(freeMemoryPointer, 0x095ea7b300000000000000000000000000000000000000000000000000000000) // Begin with the function selector.
            mstore(add(freeMemoryPointer, 4), and(to, 0xffffffffffffffffffffffffffffffffffffffff)) // Mask and append the "to" argument.
            mstore(add(freeMemoryPointer, 36), amount) // Finally append the "amount" argument. No mask as it's a full 32 byte value.

            // Call the token and store if it succeeded or not.
            // We use 68 because the calldata length is 4 + 32 * 2.
            callStatus := call(gas(), token, 0, freeMemoryPointer, 68, 0, 0)
        }

        require(didLastOptionalReturnCallSucceed(callStatus), "APPROVE_FAILED");
    }

    /*///////////////////////////////////////////////////////////////
                         INTERNAL HELPER LOGIC
    //////////////////////////////////////////////////////////////*/

    function didLastOptionalReturnCallSucceed(bool callStatus) private pure returns (bool success) {
        assembly {
            // Get how many bytes the call returned.
            let returnDataSize := returndatasize()

            // If the call reverted:
            if iszero(callStatus) {
                // Copy the revert message into memory.
                returndatacopy(0, 0, returnDataSize)

                // Revert with the same message.
                revert(0, returnDataSize)
            }

            switch returnDataSize
            case 32 {
                // Copy the return data into memory.
                returndatacopy(0, 0, returnDataSize)

                // Set success to whether it returned true.
                success := iszero(iszero(mload(0)))
            }
            case 0 {
                // There was no return data.
                success := 1
            }
            default {
                // It returned some malformed input.
                success := 0
            }
        }
    }
}

File 10 of 20 : base64.sol
// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0;

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

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

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

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

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

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

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

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

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

            // run over the input, 3 bytes at a time
            for {

            } lt(dataPtr, endPtr) {

            } {
                // read 3 bytes
                dataPtr := add(dataPtr, 3)
                let input := mload(dataPtr)

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

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

        return result;
    }

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

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

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

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

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

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

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

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

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

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

            // run over the input, 4 characters at a time
            for {

            } lt(dataPtr, endPtr) {

            } {
                // read 4 characters
                dataPtr := add(dataPtr, 4)
                let input := mload(dataPtr)

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

        return result;
    }
}

File 11 of 20 : 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 12 of 20 : ERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

    /**
     * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * `_data` is additional data, it has no specified format and it is sent in call to `to`.
     *
     * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
     * implement alternative mechanisms to perform token transfer, such as signature-based.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function _safeTransfer(
        address from,
        address to,
        uint256 tokenId,
        bytes memory _data
    ) internal virtual {
        _transfer(from, to, tokenId);
        require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);

        _afterTokenTransfer(from, to, tokenId);
    }

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

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

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

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

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

File 13 of 20 : 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 20 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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`, checking first that contract recipients
     * are aware of the ERC721 protocol to prevent tokens from being forever locked.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must exist and be owned by `from`.
     * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

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

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

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

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

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

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

File 15 of 20 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (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 `IERC721.onERC721Received.selector`.
     */
    function onERC721Received(
        address operator,
        address from,
        uint256 tokenId,
        bytes calldata data
    ) external returns (bytes4);
}

File 16 of 20 : 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 17 of 20 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 18 of 20 : 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 19 of 20 : 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 20 of 20 : ERC20.sol
// SPDX-License-Identifier: AGPL-3.0-only
pragma solidity >=0.8.0;

/// @notice Modern and gas efficient ERC20 + EIP-2612 implementation.
/// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol)
/// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol)
/// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it.
abstract contract ERC20 {
    /*///////////////////////////////////////////////////////////////
                                  EVENTS
    //////////////////////////////////////////////////////////////*/

    event Transfer(address indexed from, address indexed to, uint256 amount);

    event Approval(address indexed owner, address indexed spender, uint256 amount);

    /*///////////////////////////////////////////////////////////////
                             METADATA STORAGE
    //////////////////////////////////////////////////////////////*/

    string public name;

    string public symbol;

    uint8 public immutable decimals;

    /*///////////////////////////////////////////////////////////////
                              ERC20 STORAGE
    //////////////////////////////////////////////////////////////*/

    uint256 public totalSupply;

    mapping(address => uint256) public balanceOf;

    mapping(address => mapping(address => uint256)) public allowance;

    /*///////////////////////////////////////////////////////////////
                             EIP-2612 STORAGE
    //////////////////////////////////////////////////////////////*/

    bytes32 public constant PERMIT_TYPEHASH =
        keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)");

    uint256 internal immutable INITIAL_CHAIN_ID;

    bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR;

    mapping(address => uint256) public nonces;

    /*///////////////////////////////////////////////////////////////
                               CONSTRUCTOR
    //////////////////////////////////////////////////////////////*/

    constructor(
        string memory _name,
        string memory _symbol,
        uint8 _decimals
    ) {
        name = _name;
        symbol = _symbol;
        decimals = _decimals;

        INITIAL_CHAIN_ID = block.chainid;
        INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator();
    }

    /*///////////////////////////////////////////////////////////////
                              ERC20 LOGIC
    //////////////////////////////////////////////////////////////*/

    function approve(address spender, uint256 amount) public virtual returns (bool) {
        allowance[msg.sender][spender] = amount;

        emit Approval(msg.sender, spender, amount);

        return true;
    }

    function transfer(address to, uint256 amount) public virtual returns (bool) {
        balanceOf[msg.sender] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(msg.sender, to, amount);

        return true;
    }

    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual returns (bool) {
        uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals.

        if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount;

        balanceOf[from] -= amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(from, to, amount);

        return true;
    }

    /*///////////////////////////////////////////////////////////////
                              EIP-2612 LOGIC
    //////////////////////////////////////////////////////////////*/

    function permit(
        address owner,
        address spender,
        uint256 value,
        uint256 deadline,
        uint8 v,
        bytes32 r,
        bytes32 s
    ) public virtual {
        require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED");

        // Unchecked because the only math done is incrementing
        // the owner's nonce which cannot realistically overflow.
        unchecked {
            bytes32 digest = keccak256(
                abi.encodePacked(
                    "\x19\x01",
                    DOMAIN_SEPARATOR(),
                    keccak256(abi.encode(PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline))
                )
            );

            address recoveredAddress = ecrecover(digest, v, r, s);

            require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER");

            allowance[recoveredAddress][spender] = value;
        }

        emit Approval(owner, spender, value);
    }

    function DOMAIN_SEPARATOR() public view virtual returns (bytes32) {
        return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator();
    }

    function computeDomainSeparator() internal view virtual returns (bytes32) {
        return
            keccak256(
                abi.encode(
                    keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"),
                    keccak256(bytes(name)),
                    keccak256("1"),
                    block.chainid,
                    address(this)
                )
            );
    }

    /*///////////////////////////////////////////////////////////////
                       INTERNAL MINT/BURN LOGIC
    //////////////////////////////////////////////////////////////*/

    function _mint(address to, uint256 amount) internal virtual {
        totalSupply += amount;

        // Cannot overflow because the sum of all user
        // balances can't exceed the max uint256 value.
        unchecked {
            balanceOf[to] += amount;
        }

        emit Transfer(address(0), to, amount);
    }

    function _burn(address from, uint256 amount) internal virtual {
        balanceOf[from] -= amount;

        // Cannot underflow because a user's balance
        // will never be larger than the total supply.
        unchecked {
            totalSupply -= amount;
        }

        emit Transfer(from, address(0), amount);
    }
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"components":[{"internalType":"uint256","name":"tozziDuckPrice","type":"uint256"},{"internalType":"uint256","name":"customDuckPrice","type":"uint256"},{"internalType":"uint256","name":"maxCustomDucks","type":"uint256"},{"internalType":"enum ITheAmazingTozziDuckMachine.MintStatus","name":"tozziDuckMintStatus","type":"uint8"},{"internalType":"enum ITheAmazingTozziDuckMachine.MintStatus","name":"customDuckMintStatus","type":"uint8"}],"internalType":"struct ITheAmazingTozziDuckMachine.MachineConfig","name":"_machineConfig","type":"tuple"},{"internalType":"string","name":"ownershipTokenURI","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AmountMustBeNonZero","type":"error"},{"inputs":[],"name":"CustomDuckLimitReached","type":"error"},{"inputs":[],"name":"DuckAlreadyExists","type":"error"},{"inputs":[],"name":"IncorrectDuckPrice","type":"error"},{"inputs":[],"name":"InsufficientDuckAllowance","type":"error"},{"inputs":[],"name":"InsufficientFunds","type":"error"},{"inputs":[],"name":"InvalidDuckId","type":"error"},{"inputs":[],"name":"InvalidProof","type":"error"},{"inputs":[],"name":"InvalidStatusId","type":"error"},{"inputs":[],"name":"MintingDisabled","type":"error"},{"inputs":[],"name":"ProbationEnded","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"duckId","type":"uint256"},{"indexed":true,"internalType":"address","name":"duckOwner","type":"address"},{"indexed":false,"internalType":"address","name":"machineOwner","type":"address"},{"indexed":false,"internalType":"string","name":"webp","type":"string"},{"indexed":false,"internalType":"string","name":"reason","type":"string"}],"name":"CustomDuckBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"webpHash","type":"bytes32"},{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"enum ITheAmazingTozziDuckMachine.DuckType","name":"duckType","type":"uint8"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"DuckMinted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"duckId","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"name","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"status","type":"bytes32"},{"indexed":false,"internalType":"string","name":"description","type":"string"}],"name":"DuckProfileUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"bytes32","name":"title","type":"bytes32"},{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"DuckTitleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"MOTDSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"who","type":"address"},{"indexed":false,"internalType":"uint256","name":"tozziDuckPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"customDuckPrice","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxCustomDucks","type":"uint256"},{"indexed":false,"internalType":"enum ITheAmazingTozziDuckMachine.MintStatus","name":"tozziDuckMintStatus","type":"uint8"},{"indexed":false,"internalType":"enum ITheAmazingTozziDuckMachine.MintStatus","name":"customDuckMintStatus","type":"uint8"}],"name":"MachineConfigUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"OWNERSHIP_TOKEN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"artists","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"reason","type":"string"}],"name":"burnRenegadeDuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"customDuckHatchedTimes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"duckAllowances","outputs":[{"internalType":"uint128","name":"tozziDuckAllowance","type":"uint128"},{"internalType":"uint128","name":"customDuckAllowance","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"duckCreators","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"duckExists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"duckImageData","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"duckProfiles","outputs":[{"internalType":"bytes32","name":"name","type":"bytes32"},{"internalType":"bytes32","name":"status","type":"bytes32"},{"internalType":"string","name":"description","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"duckTitles","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"endProbation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[],"name":"machineConfig","outputs":[{"internalType":"uint256","name":"tozziDuckPrice","type":"uint256"},{"internalType":"uint256","name":"customDuckPrice","type":"uint256"},{"internalType":"uint256","name":"maxCustomDucks","type":"uint256"},{"internalType":"enum ITheAmazingTozziDuckMachine.MintStatus","name":"tozziDuckMintStatus","type":"uint8"},{"internalType":"enum ITheAmazingTozziDuckMachine.MintStatus","name":"customDuckMintStatus","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"string","name":"webp","type":"string"}],"name":"mintCustomDuck","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"duckId","type":"uint256"},{"internalType":"string","name":"webp","type":"string"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"mintTozziDuck","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"string","name":"webp","type":"string"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"probationEnded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"probationPeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"name","type":"bytes32"}],"name":"setArtistName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"who","type":"address"},{"components":[{"internalType":"uint128","name":"tozziDuckAllowance","type":"uint128"},{"internalType":"uint128","name":"customDuckAllowance","type":"uint128"}],"internalType":"struct ITheAmazingTozziDuckMachine.DuckAllowance","name":"allowance","type":"tuple"}],"name":"setDuckAllowance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"who","type":"address[]"},{"components":[{"internalType":"uint128","name":"tozziDuckAllowance","type":"uint128"},{"internalType":"uint128","name":"customDuckAllowance","type":"uint128"}],"internalType":"struct ITheAmazingTozziDuckMachine.DuckAllowance","name":"allowance","type":"tuple"}],"name":"setDuckAllowances","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"name","type":"bytes32"},{"internalType":"bytes32","name":"status","type":"bytes32"},{"internalType":"string","name":"description","type":"string"}],"name":"setDuckProfile","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes32","name":"title","type":"bytes32"}],"name":"setDuckTitle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"motd","type":"string"}],"name":"setMOTD","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"tozziDuckPrice","type":"uint256"},{"internalType":"uint256","name":"customDuckPrice","type":"uint256"},{"internalType":"uint256","name":"maxCustomDucks","type":"uint256"},{"internalType":"enum ITheAmazingTozziDuckMachine.MintStatus","name":"tozziDuckMintStatus","type":"uint8"},{"internalType":"enum ITheAmazingTozziDuckMachine.MintStatus","name":"customDuckMintStatus","type":"uint8"}],"internalType":"struct ITheAmazingTozziDuckMachine.MachineConfig","name":"_machineConfig","type":"tuple"}],"name":"setMachineConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"ownershipTokenUri","type":"string"}],"name":"setOwnershipTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"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":"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":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b5060405162005945380380620059458339810160408190526200003491620009e9565b604080518082018252600b81526a546f7a7a69204475636b7360a81b602080830191825283518085019094526007845266545a4455434b5360c81b908401528151919291620000869160009162000854565b5080516200009c90600190602084019062000854565b505050620000b9620000b36200015960201b60201c565b6200015d565b8151600e9081556020830151600f556040830151601055606083015160118054859392919060ff19166001836002811115620000f957620000f962000aa6565b0217905550608082015160038201805461ff00191661010083600281111562000126576200012662000aa6565b0217905550508151620001429150600d90602084019062000854565b5062000151336101a4620001af565b505062000bf9565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b620001d1828260405180602001604052806000815250620001d560201b60201c565b5050565b620001e1838362000251565b620001f06000848484620003a7565b6200024c5760405162461bcd60e51b815260206004820152603260248201526000805160206200592583398151915260448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084015b60405180910390fd5b505050565b6001600160a01b038216620002a95760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640162000243565b6000818152600260205260409020546001600160a01b031615620003105760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640162000243565b6200031e6000838362000510565b6001600160a01b03821660009081526003602052604081208054600192906200034990849062000ad2565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000620003c8846001600160a01b03166200052860201b620025421760201c565b156200050457604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906200040290339089908890889060040162000aed565b602060405180830381600087803b1580156200041d57600080fd5b505af192505050801562000450575060408051601f3d908101601f191682019092526200044d9181019062000b43565b60015b620004e9573d80801562000481576040519150601f19603f3d011682016040523d82523d6000602084013e62000486565b606091505b508051620004e15760405162461bcd60e51b815260206004820152603260248201526000805160206200592583398151915260448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606482015260840162000243565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905062000508565b5060015b949350505050565b6200024c8383836200053760201b620025511760201c565b6001600160a01b03163b151590565b6200054f8383836200024c60201b62000c5a1760201c565b6001600160a01b038316620005ad57620005a781600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b620005d3565b816001600160a01b0316836001600160a01b031614620005d357620005d3838262000613565b6001600160a01b038216620005ed576200024c81620006c0565b826001600160a01b0316826001600160a01b0316146200024c576200024c82826200077a565b600060016200062d84620007cb60201b620018c21760201c565b62000639919062000b76565b6000838152600760205260409020549091508082146200068d576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090620006d49060019062000b76565b60008381526009602052604081205460088054939450909284908110620006ff57620006ff62000b90565b90600052602060002001549050806008838154811062000723576200072362000b90565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806200075e576200075e62000ba6565b6001900381819060005260206000200160009055905550505050565b60006200079283620007cb60201b620018c21760201c565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60006001600160a01b038216620008385760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840162000243565b506001600160a01b031660009081526003602052604090205490565b828054620008629062000bbc565b90600052602060002090601f016020900481019282620008865760008555620008d1565b82601f10620008a157805160ff1916838001178555620008d1565b82800160010185558215620008d1579182015b82811115620008d1578251825591602001919060010190620008b4565b50620008df929150620008e3565b5090565b5b80821115620008df5760008155600101620008e4565b634e487b7160e01b600052604160045260246000fd5b8051600381106200092057600080fd5b919050565b60005b838110156200094257818101518382015260200162000928565b8381111562000952576000848401525b50505050565b600082601f8301126200096a57600080fd5b81516001600160401b0380821115620009875762000987620008fa565b604051601f8301601f19908116603f01168101908282118183101715620009b257620009b2620008fa565b81604052838152866020858801011115620009cc57600080fd5b620009df84602083016020890162000925565b9695505050505050565b60008082840360c0811215620009fe57600080fd5b60a081121562000a0d57600080fd5b5060405160a081016001600160401b03808211838310171562000a345762000a34620008fa565b8160405285518352602086015160208401526040860151604084015262000a5e6060870162000910565b606084015262000a716080870162000910565b608084015260a08601519294508083111562000a8c57600080fd5b505062000a9c8582860162000958565b9150509250929050565b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000821982111562000ae85762000ae862000abc565b500190565b600060018060a01b03808716835280861660208401525083604083015260806060830152825180608084015262000b2c8160a085016020870162000925565b601f01601f19169190910160a00195945050505050565b60006020828403121562000b5657600080fd5b81516001600160e01b03198116811462000b6f57600080fd5b9392505050565b60008282101562000b8b5762000b8b62000abc565b500390565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b600181811c9082168062000bd157607f821691505b6020821081141562000bf357634e487b7160e01b600052602260045260246000fd5b50919050565b614d1c8062000c096000396000f3fe6080604052600436106102fd5760003560e01c80636664bc8d1161018f578063a22cb465116100e1578063d0b8f6741161008a578063f2fde38b11610064578063f2fde38b1461096a578063f3fef3a31461098a578063fb8b45cf146109aa57600080fd5b8063d0b8f674146108d1578063d44835f5146108f1578063e985e9c51461092157600080fd5b8063b88d4fde116100bb578063b88d4fde14610864578063c87b56dd14610884578063cd7e10c1146108a457600080fd5b8063a22cb465146107e5578063b70e0f7d14610805578063b88a1d2c1461083457600080fd5b8063715018a6116101435780638da5cb5b1161011d5780638da5cb5b14610792578063934308c0146107b057806395d89b41146107d057600080fd5b8063715018a61461073d5780637f481d0614610752578063820e215f1461077257600080fd5b80636a4e7dc1116101745780636a4e7dc1146106c75780636fa62175146106fd57806370a082311461071d57600080fd5b80636664bc8d146106875780636885653f146106a757600080fd5b80632dabc24f1161025357806342966c68116101fc5780634f6ccce7116101d65780634f6ccce71461061a5780636352211e1461063a5780636587e6391461065a57600080fd5b806342966c68146105c45780634c02fc6a146105e45780634d5ea80e1461060457600080fd5b806340e1696e1161022d57806340e1696e1461054e57806341d5b8031461058457806342842e0e146105a457600080fd5b80632dabc24f146104d75780632f745c59146105175780633ec75eba1461053757600080fd5b806312d049f8116102b557806318160ddd1161028f57806318160ddd1461048257806323b872dd146104975780632a5d53da146104b757600080fd5b806312d049f8146103d357806314372534146103e65780631789bd621461042157600080fd5b8063081812fc116102e6578063081812fc14610359578063095ea7b3146103915780630adf673f146103b357600080fd5b806301ffc9a71461030257806306fdde0314610337575b600080fd5b34801561030e57600080fd5b5061032261031d366004613d0a565b6109bd565b60405190151581526020015b60405180910390f35b34801561034357600080fd5b5061034c610a01565b60405161032e9190613d7f565b34801561036557600080fd5b50610379610374366004613d92565b610a93565b6040516001600160a01b03909116815260200161032e565b34801561039d57600080fd5b506103b16103ac366004613dc7565b610b2d565b005b3480156103bf57600080fd5b506103b16103ce366004613df1565b610c5f565b6103b16103e1366004613e5c565b610d39565b3480156103f257600080fd5b50610413610401366004613d92565b601a6020526000908152604090205481565b60405190815260200161032e565b34801561042d57600080fd5b5061046261043c366004613eaf565b6016602052600090815260409020546001600160801b0380821691600160801b90041682565b604080516001600160801b0393841681529290911660208301520161032e565b34801561048e57600080fd5b50600854610413565b3480156104a357600080fd5b506103b16104b2366004613eca565b61103b565b3480156104c357600080fd5b506103b16104d2366004613f06565b6110c3565b3480156104e357600080fd5b50600e54600f546010546011546105069392919060ff8082169161010090041685565b60405161032e959493929190613f91565b34801561052357600080fd5b50610413610532366004613dc7565b611221565b34801561054357600080fd5b5061041362093a8081565b34801561055a57600080fd5b50610379610569366004613d92565b6012602052600090815260409020546001600160a01b031681565b34801561059057600080fd5b506103b161059f366004613e5c565b6112c9565b3480156105b057600080fd5b506103b16105bf366004613eca565b611471565b3480156105d057600080fd5b506103b16105df366004613d92565b61148c565b3480156105f057600080fd5b506103b16105ff366004613d92565b611513565b34801561061057600080fd5b506104136101a481565b34801561062657600080fd5b50610413610635366004613d92565b611618565b34801561064657600080fd5b50610379610655366004613d92565b6116bc565b34801561066657600080fd5b50610413610675366004613d92565b60146020526000908152604090205481565b34801561069357600080fd5b506103b16106a2366004613df1565b611733565b3480156106b357600080fd5b506103b16106c2366004613fca565b611825565b3480156106d357600080fd5b506103796106e2366004613d92565b6018602052600090815260409020546001600160a01b031681565b34801561070957600080fd5b506103b1610718366004613fca565b611856565b34801561072957600080fd5b50610413610738366004613eaf565b6118c2565b34801561074957600080fd5b506103b161195c565b34801561075e57600080fd5b506103b161076d36600461400c565b6119c2565b34801561077e57600080fd5b506103b161078d36600461401e565b611a83565b34801561079e57600080fd5b50600a546001600160a01b0316610379565b3480156107bc57600080fd5b506103b16107cb3660046140a8565b611c16565b3480156107dc57600080fd5b5061034c611cb0565b3480156107f157600080fd5b506103b16108003660046140fd565b611cbf565b34801561081157600080fd5b50610825610820366004613d92565b611cce565b60405161032e93929190614139565b34801561084057600080fd5b5061032261084f366004613d92565b60156020526000908152604090205460ff1681565b34801561087057600080fd5b506103b161087f366004614177565b611d79565b34801561089057600080fd5b5061034c61089f366004613d92565b611e01565b3480156108b057600080fd5b506104136108bf366004613d92565b60136020526000908152604090205481565b3480156108dd57600080fd5b506103b16108ec366004614253565b6120c3565b3480156108fd57600080fd5b5061032261090c366004613d92565b60196020526000908152604090205460ff1681565b34801561092d57600080fd5b5061032261093c366004614287565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561097657600080fd5b506103b1610985366004613eaf565b61210c565b34801561099657600080fd5b506103b16109a5366004613dc7565b6121eb565b6103b16109b83660046142b1565b61228b565b60006001600160e01b031982167fe80ab5320000000000000000000000000000000000000000000000000000000014806109fb57506109fb82612609565b92915050565b606060008054610a109061433b565b80601f0160208091040260200160405190810160405280929190818152602001828054610a3c9061433b565b8015610a895780601f10610a5e57610100808354040283529160200191610a89565b820191906000526020600020905b815481529060010190602001808311610a6c57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610b115760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610b38826116bc565b9050806001600160a01b0316836001600160a01b03161415610bc25760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610b08565b336001600160a01b0382161480610bde5750610bde813361093c565b610c505760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610b08565b610c5a8383612647565b505050565b60008281526002602052604090205482906001600160a01b0316610cd75760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b08565b610ce4335b6101a46126b5565b610d00576040516282b42960e81b815260040160405180910390fd5b610d09836127ac565b610d2657604051634fcb49e760e11b815260040160405180910390fd5b5060009182526013602052604090912055565b6001601154610100900460ff166002811115610d5757610d57613f67565b1415610d765760405163af79b43760e01b815260040160405180910390fd5b601054600c5410610d995760405162cf4d0360e41b815260040160405180910390fd5b600f543414610dbb5760405163b1401e8b60e01b815260040160405180910390fd5b6002601154610100900460ff166002811115610dd957610dd9613f67565b1415610e6f5733600090815260166020526040902054600160801b90046001600160801b0316610e1c5760405163185ca0ed60e11b815260040160405180910390fd5b3360009081526016602052604090208054600160801b90046001600160801b0316906010610e4983614386565b91906101000a8154816001600160801b0302191690836001600160801b03160217905550505b6101a460c8600b54610e8191906143a9565b1415610ea0576001600b6000828254610e9a91906143a9565b90915550505b60008282604051602001610eb59291906143c1565b60408051601f1981840301815291815281516020928301206000818152601990935291205490915060ff1615610efe57604051631f45246560e21b815260040160405180910390fd5b6000818152601960205260408120805460ff19166001179055600b80549082610f26836143d1565b90915550610f359060c86143a9565b90506000610f7885858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506127c392505050565b600083815260186020526040902080546001600160a01b0319166001600160a01b0383161790559050610fab8683612874565b600082815260126020908152604080832080546001600160a01b03191633179055601a9091528120429055600c805460019290610fe99084906143a9565b9091555050600f546040513391859185917f0389f94f0af58100e0818f1d62d09ab446a00f774715223afb94dd75be8b06bc9161102b918c91600191906143ec565b60405180910390a4505050505050565b611046335b826126b5565b6110b85760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610b08565b610c5a83838361288e565b60008581526002602052604090205485906001600160a01b031661113b5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b08565b61114533876126b5565b611161576040516282b42960e81b815260040160405180910390fd5b604051806060016040528086815260200185815260200184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093909452505088815260176020908152604091829020845181558482015160018201559184015180519293506111e99260028501929190910190613be7565b509050508385877f64cc791d98926552b9dfc30dfd5246c6db24c0e2d41c5c42fd3be62355857202868660405161102b929190614446565b600061122c836118c2565b82106112a05760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610b08565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6112d233610cdc565b6112ee576040516282b42960e81b815260040160405180910390fd5b601054600c54106113115760405162cf4d0360e41b815260040160405180910390fd5b6101a460c8600b5461132391906143a9565b1415611342576001600b600082825461133c91906143a9565b90915550505b600082826040516020016113579291906143c1565b60408051601f1981840301815291815281516020928301206000818152601990935291205490915060ff16156113a057604051631f45246560e21b815260040160405180910390fd5b6000818152601960205260408120805460ff19166001179055600b805490826113c8836143d1565b909155506113d79060c86143a9565b9050600061141a85858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506127c392505050565b600083815260186020526040902080546001600160a01b0319166001600160a01b038316179055905061144d8683612874565b6000828152601a60205260408120429055600c805460019290610fe99084906143a9565b610c5a83838360405180602001604052806000815250611d79565b61149533611040565b6115075760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f766564000000000000000000000000000000006064820152608401610b08565b61151081612a66565b50565b60008181526002602052604090205481906001600160a01b031661158b5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b08565b61159433610cdc565b6115b0576040516282b42960e81b815260040160405180910390fd5b6115b9826127ac565b6115d657604051634fcb49e760e11b815260040160405180910390fd5b6115df82612b0d565b6115fc57604051632ab1437d60e21b815260040160405180910390fd5b506000908152601560205260409020805460ff19166001179055565b600061162360085490565b82106116975760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610b08565b600882815481106116aa576116aa61445a565b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b0316806109fb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b08565b60008281526002602052604090205482906001600160a01b03166117ab5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b08565b6117b433610cdc565b6117d0576040516282b42960e81b815260040160405180910390fd5b60008381526014602052604090208290556117e9612b69565b6001600160a01b031682847f700d28293f4da9cfe035e38919d756bf895145991d9f519e53c3c3bc8bdda84160405160405180910390a4505050565b61182e33610cdc565b61184a576040516282b42960e81b815260040160405180910390fd5b610c5a600d8383613c6b565b61185f33610cdc565b61187b576040516282b42960e81b815260040160405180910390fd5b336001600160a01b03167f108ca51e831f3a035bf5e7eac979db4911d79e5d3719646a90c935c21611278283836040516118b6929190614446565b60405180910390a25050565b60006001600160a01b0382166119405760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610b08565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146119b65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b08565b6119c06000612b7b565b565b6119cb33610cdc565b6119e7576040516282b42960e81b815260040160405180910390fd5b80600e6119f4828261447d565b5050600c5460408201351015611a0957600080fd5b611a11612b69565b6001600160a01b03167fa547036398b1f32c06d940988af208fbfd500b225dc09d43b56358c528ca3400823560208401356040850135611a576080870160608801614501565b611a6760a0880160808901614501565b604051611a78959493929190613f91565b60405180910390a250565b60008381526002602052604090205483906001600160a01b0316611afb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b08565b611b0433610cdc565b611b20576040516282b42960e81b815260040160405180910390fd5b611b29846127ac565b611b4657604051634fcb49e760e11b815260040160405180910390fd5b611b4f84612b0d565b611b6c57604051632ab1437d60e21b815260040160405180910390fd5b6000611b77856116bc565b60008681526018602052604081205491925090611b9c906001600160a01b0316612bcd565b9050611ba786612a66565b6001600c6000828254611bba919061451e565b90915550506001600160a01b038216867f8810580bd4a907aa442c2fe06e05ecf512e09652fcf5a14c14f700bc3a39b2d0611bf3612b69565b848989604051611c069493929190614535565b60405180910390a3505050505050565b611c1f33610cdc565b611c3b576040516282b42960e81b815260040160405180910390fd5b60005b82811015611caa578160166000868685818110611c5d57611c5d61445a565b9050602002016020810190611c729190613eaf565b6001600160a01b031681526020810191909152604001600020611c95828261458e565b50819050611ca2816143d1565b915050611c3e565b50505050565b606060018054610a109061433b565b611cca338383612bee565b5050565b60176020526000908152604090208054600182015460028301805492939192611cf69061433b565b80601f0160208091040260200160405190810160405280929190818152602001828054611d229061433b565b8015611d6f5780601f10611d4457610100808354040283529160200191611d6f565b820191906000526020600020905b815481529060010190602001808311611d5257829003601f168201915b5050505050905083565b611d8333836126b5565b611df55760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610b08565b611caa84848484612cbd565b606081611e25816000908152600260205260409020546001600160a01b0316151590565b611e835760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b08565b6101a4831415611f1f57600d8054611e9a9061433b565b80601f0160208091040260200160405190810160405280929190818152602001828054611ec69061433b565b8015611f135780601f10611ee857610100808354040283529160200191611f13565b820191906000526020600020905b815481529060010190602001808311611ef657829003601f168201915b505050505091506120bd565b6000601760008581526020019081526020016000206040518060600160405290816000820154815260200160018201548152602001600282018054611f639061433b565b80601f0160208091040260200160405190810160405280929190818152602001828054611f8f9061433b565b8015611fdc5780601f10611fb157610100808354040283529160200191611fdc565b820191906000526020600020905b815481529060010190602001808311611fbf57829003601f168201915b50505050508152505090506000611ff285612d3b565b825190915081901561200c57825161200990612d6c565b91505b6040830151511561201e575060408201515b60008681526018602052604081205461203f906001600160a01b0316612bcd565b60405160200161204f9190614600565b60405160208183030381529060405290506120978383836120708b89612ed3565b6040516020016120839493929190614645565b60405160208183030381529060405261306a565b6040516020016120a7919061477a565b6040516020818303038152906040529550505050505b50919050565b6120cc33610cdc565b6120e8576040516282b42960e81b815260040160405180910390fd5b6001600160a01b03821660009081526016602052604090208190611caa828261458e565b600a546001600160a01b031633146121665760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b08565b6001600160a01b0381166121e25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b08565b61151081612b7b565b6121f433610cdc565b612210576040516282b42960e81b815260040160405180910390fd5b4781111561224a576040517f356680b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80612281576040517f0561bfa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611cca8282613207565b600160115460ff1660028111156122a4576122a4613f67565b14156122c35760405163af79b43760e01b815260040160405180910390fd5b600e5434146122e55760405163b1401e8b60e01b815260040160405180910390fd5b600260115460ff1660028111156122fe576122fe613f67565b141561238457336000908152601660205260409020546001600160801b031661233a5760405163185ca0ed60e11b815260040160405180910390fd5b33600090815260166020526040812080546001600160801b03169161235e83614386565b91906101000a8154816001600160801b0302191690836001600160801b03160217905550505b600084846040516020016123999291906143c1565b60405160208183030381529060405280519060200120905060008686866040516020016123c8939291906147bf565b6040516020818303038152906040528051906020012090506124408484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507f76cf55ec8f156f88221bd1f5b7840a0e6427cafd0518667edd4ca7e530b535f392508591506132629050565b612476576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006124b787878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506127c392505050565b600089815260186020526040902080546001600160a01b0319166001600160a01b03831617905590506124ea8989612874565b336001600160a01b031683897f0389f94f0af58100e0818f1d62d09ab446a00f774715223afb94dd75be8b06bc8c6000600e6000015460405161252f939291906143ec565b60405180910390a4505050505050505050565b6001600160a01b03163b151590565b6001600160a01b0383166125ac576125a781600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6125cf565b816001600160a01b0316836001600160a01b0316146125cf576125cf8382613278565b6001600160a01b0382166125e657610c5a81613315565b826001600160a01b0316826001600160a01b031614610c5a57610c5a82826133c4565b60006001600160e01b031982167f780e9d630000000000000000000000000000000000000000000000000000000014806109fb57506109fb82613408565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061267c826116bc565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b031661272e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b08565b6000612739836116bc565b9050806001600160a01b0316846001600160a01b031614806127745750836001600160a01b031661276984610a93565b6001600160a01b0316145b806127a457506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b600060c882101580156109fb5750506101a4141590565b600080826040516020016127d791906147d9565b60405160208183030381529060405290506000816040516020016127fb91906147ff565b60405160208183030381529060405290508051602082016000f092506001600160a01b03831661286d5760405162461bcd60e51b815260206004820152601160248201527f4445504c4f594d454e545f4641494c45440000000000000000000000000000006044820152606401610b08565b5050919050565b611cca8282604051806020016040528060008152506134a3565b826001600160a01b03166128a1826116bc565b6001600160a01b03161461291d5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610b08565b6001600160a01b0382166129985760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610b08565b6129a3838383613521565b6129ae600082612647565b6001600160a01b03831660009081526003602052604081208054600192906129d790849061451e565b90915550506001600160a01b0382166000908152600360205260408120805460019290612a059084906143a9565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000612a71826116bc565b9050612a7f81600084613521565b612a8a600083612647565b6001600160a01b0381166000908152600360205260408120805460019290612ab390849061451e565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000612b18826127ac565b612b2457506000919050565b60008281526015602052604090205460ff1615612b4357506000919050565b6000828152601a6020526040902054612b609062093a80906143a9565b42111592915050565b6000612b766101a46116bc565b905090565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606109fb826001612be9816001600160a01b0384163b61451e565b61352c565b816001600160a01b0316836001600160a01b03161415612c505760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b08565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612cc884848461288e565b612cd48484848461354f565b611caa5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610b08565b6060612d46826136a7565b604051602001612d569190614844565b6040516020818303038152906040529050919050565b606060005b60208160ff16108015612dbd5750828160ff1660208110612d9457612d9461445a565b1a60f81b7fff000000000000000000000000000000000000000000000000000000000000001615155b15612dd45780612dcc8161487c565b915050612d71565b60008160ff1667ffffffffffffffff811115612df257612df2614161565b6040519080825280601f01601f191660200182016040528015612e1c576020820181803683370190505b509050600091505b60208260ff16108015612e705750838260ff1660208110612e4757612e4761445a565b1a60f81b7fff000000000000000000000000000000000000000000000000000000000000001615155b15612ecc57838260ff1660208110612e8a57612e8a61445a565b1a60f81b818360ff1681518110612ea357612ea361445a565b60200101906001600160f81b031916908160001a90535081612ec48161487c565b925050612e24565b9392505050565b60606000612ee18460c81190565b612f20576040518060400160405280600681526020017f437573746f6d0000000000000000000000000000000000000000000000000000815250612f57565b6040518060400160405280600581526020017f546f7a7a690000000000000000000000000000000000000000000000000000008152505b90506000612f64856137a5565b905060008282604051602001612f7b92919061489c565b6040516020818303038152906040529050612f9586612b0d565b15612fc15780604051602001612fab919061498c565b6040516020818303038152906040529050612ffc565b602085015115612ffc5780612fd98660200151612d6c565b604051602001612fea929190614a11565b60405160208183030381529060405290505b600086815260146020526040902054801561303e578161301b82612d6c565b60405160200161302c929190614aab565b60405160208183030381529060405291505b8160405160200161304f9190614b45565b60405160208183030381529060405294505050505092915050565b606081516000141561308a57505060408051602081019091526000815290565b6000604051806060016040528060408152602001614ca760409139905060006003845160026130b991906143a9565b6130c39190614bc7565b6130ce906004614bdb565b905060006130dd8260206143a9565b67ffffffffffffffff8111156130f5576130f5614161565b6040519080825280601f01601f19166020018201604052801561311f576020820181803683370190505b509050818152600183018586518101602084015b8183101561318b576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f8116850151825350600101613133565b6003895106600181146131a557600281146131d1576131f9565b7f3d3d0000000000000000000000000000000000000000000000000000000000006001198301526131f9565b7f3d000000000000000000000000000000000000000000000000000000000000006000198301525b509398975050505050505050565b600080600080600085875af1905080610c5a5760405162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c4544000000000000000000000000006044820152606401610b08565b60008261326f858461384f565b14949350505050565b60006001613285846118c2565b61328f919061451e565b6000838152600760205260409020549091508082146132e2576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906133279060019061451e565b6000838152600960205260408120546008805493945090928490811061334f5761334f61445a565b9060005260206000200154905080600883815481106133705761337061445a565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806133a8576133a8614bfa565b6001900381819060005260206000200160009055905550505050565b60006133cf836118c2565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061346b57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806109fb57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316146109fb565b6134ad83836138c3565b6134ba600084848461354f565b610c5a5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610b08565b610c5a838383612551565b60408051603f8301601f19168101909152818152818360208301863c9392505050565b60006001600160a01b0384163b1561369c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613593903390899088908890600401614c10565b602060405180830381600087803b1580156135ad57600080fd5b505af19250505080156135dd575060408051601f3d908101601f191682019092526135da91810190614c42565b60015b613682573d80801561360b576040519150601f19603f3d011682016040523d82523d6000602084013e613610565b606091505b50805161367a5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610b08565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506127a4565b506001949350505050565b6060816136cb5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156136f557806136df816143d1565b91506136ee9050600a83614bc7565b91506136cf565b60008167ffffffffffffffff81111561371057613710614161565b6040519080825280601f01601f19166020018201604052801561373a576020820181803683370190505b5090505b84156127a45761374f60018361451e565b915061375c600a86614c5f565b6137679060306143a9565b60f81b81838151811061377c5761377c61445a565b60200101906001600160f81b031916908160001a90535061379e600a86614bc7565b945061373e565b606060c88210156137e957505060408051808201909152600981527f4a696d20546f7a7a690000000000000000000000000000000000000000000000602082015290565b600082815260136020526040902054801561382e5761380781612d6c565b6040516020016138179190614c73565b604051602081830303815290604052915050919050565b600083815260126020526040902054613807906001600160a01b0316613a11565b600081815b84518110156138bb5760008582815181106138715761387161445a565b6020026020010151905080831161389757600083815260208290526040902092506138a8565b600081815260208490526040902092505b50806138b3816143d1565b915050613854565b509392505050565b6001600160a01b0382166139195760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b08565b6000818152600260205260409020546001600160a01b03161561397e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b08565b61398a60008383613521565b6001600160a01b03821660009081526003602052604081208054600192906139b39084906143a9565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60606109fb826001600160a01b0316601460606000613a31836002614bdb565b613a3c9060026143a9565b67ffffffffffffffff811115613a5457613a54614161565b6040519080825280601f01601f191660200182016040528015613a7e576020820181803683370190505b509050600360fc1b81600081518110613a9957613a9961445a565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613ae457613ae461445a565b60200101906001600160f81b031916908160001a9053506000613b08846002614bdb565b613b139060016143a9565b90505b6001811115613b98577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613b5457613b5461445a565b1a60f81b828281518110613b6a57613b6a61445a565b60200101906001600160f81b031916908160001a90535060049490941c93613b9181614c8f565b9050613b16565b508315612ecc5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b08565b828054613bf39061433b565b90600052602060002090601f016020900481019282613c155760008555613c5b565b82601f10613c2e57805160ff1916838001178555613c5b565b82800160010185558215613c5b579182015b82811115613c5b578251825591602001919060010190613c40565b50613c67929150613cdf565b5090565b828054613c779061433b565b90600052602060002090601f016020900481019282613c995760008555613c5b565b82601f10613cb25782800160ff19823516178555613c5b565b82800160010185558215613c5b579182015b82811115613c5b578235825591602001919060010190613cc4565b5b80821115613c675760008155600101613ce0565b6001600160e01b03198116811461151057600080fd5b600060208284031215613d1c57600080fd5b8135612ecc81613cf4565b60005b83811015613d42578181015183820152602001613d2a565b83811115611caa5750506000910152565b60008151808452613d6b816020860160208601613d27565b601f01601f19169290920160200192915050565b602081526000612ecc6020830184613d53565b600060208284031215613da457600080fd5b5035919050565b80356001600160a01b0381168114613dc257600080fd5b919050565b60008060408385031215613dda57600080fd5b613de383613dab565b946020939093013593505050565b60008060408385031215613e0457600080fd5b50508035926020909101359150565b60008083601f840112613e2557600080fd5b50813567ffffffffffffffff811115613e3d57600080fd5b602083019150836020828501011115613e5557600080fd5b9250929050565b600080600060408486031215613e7157600080fd5b613e7a84613dab565b9250602084013567ffffffffffffffff811115613e9657600080fd5b613ea286828701613e13565b9497909650939450505050565b600060208284031215613ec157600080fd5b612ecc82613dab565b600080600060608486031215613edf57600080fd5b613ee884613dab565b9250613ef660208501613dab565b9150604084013590509250925092565b600080600080600060808688031215613f1e57600080fd5b853594506020860135935060408601359250606086013567ffffffffffffffff811115613f4a57600080fd5b613f5688828901613e13565b969995985093965092949392505050565b634e487b7160e01b600052602160045260246000fd5b60038110613f8d57613f8d613f67565b9052565b858152602081018590526040810184905260a08101613fb36060830185613f7d565b613fc06080830184613f7d565b9695505050505050565b60008060208385031215613fdd57600080fd5b823567ffffffffffffffff811115613ff457600080fd5b61400085828601613e13565b90969095509350505050565b600060a082840312156120bd57600080fd5b60008060006040848603121561403357600080fd5b83359250602084013567ffffffffffffffff811115613e9657600080fd5b60008083601f84011261406357600080fd5b50813567ffffffffffffffff81111561407b57600080fd5b6020830191508360208260051b8501011115613e5557600080fd5b6000604082840312156120bd57600080fd5b6000806000606084860312156140bd57600080fd5b833567ffffffffffffffff8111156140d457600080fd5b6140e086828701614051565b90945092506140f490508560208601614096565b90509250925092565b6000806040838503121561411057600080fd5b61411983613dab565b91506020830135801515811461412e57600080fd5b809150509250929050565b8381528260208201526060604082015260006141586060830184613d53565b95945050505050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561418d57600080fd5b61419685613dab565b93506141a460208601613dab565b925060408501359150606085013567ffffffffffffffff808211156141c857600080fd5b818701915087601f8301126141dc57600080fd5b8135818111156141ee576141ee614161565b604051601f8201601f19908116603f0116810190838211818310171561421657614216614161565b816040528281528a602084870101111561422f57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806060838503121561426657600080fd5b61426f83613dab565b915061427e8460208501614096565b90509250929050565b6000806040838503121561429a57600080fd5b6142a383613dab565b915061427e60208401613dab565b600080600080600080608087890312156142ca57600080fd5b6142d387613dab565b955060208701359450604087013567ffffffffffffffff808211156142f757600080fd5b6143038a838b01613e13565b9096509450606089013591508082111561431c57600080fd5b5061432989828a01614051565b979a9699509497509295939492505050565b600181811c9082168061434f57607f821691505b602082108114156120bd57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001600160801b0382168061439f5761439f614370565b6000190192915050565b600082198211156143bc576143bc614370565b500190565b8183823760009101908152919050565b60006000198214156143e5576143e5614370565b5060010190565b6001600160a01b0384168152606081016002841061440c5761440c613f67565b602082019390935260400152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260006127a460208301848661441d565b634e487b7160e01b600052603260045260246000fd5b6003811061151057600080fd5b8135815560208201356001820155604082013560028201556003810160608301356144a781614470565b600381106144b7576144b7613f67565b815460ff821691508160ff19821617835560808501356144d681614470565b600381106144e6576144e6613f67565b61ff008160081b168361ffff19841617178455505050505050565b60006020828403121561451357600080fd5b8135612ecc81614470565b60008282101561453057614530614370565b500390565b6001600160a01b03851681526060602082015260006145576060830186613d53565b828103604084015261456a81858761441d565b979650505050505050565b600081356001600160801b03811681146109fb57600080fd5b6001600160801b0361459f83614575565b167fffffffffffffffffffffffffffffffff000000000000000000000000000000008181845416178355806145d660208601614575565b60801b168217835550505050565b600081516145f6818560208601613d27565b9290920192915050565b7f646174613a696d6167652f776562703b6261736536342c000000000000000000815260008251614638816017850160208701613d27565b9190910160170192915050565b607b60f81b81527f226e616d65223a22000000000000000000000000000000000000000000000000600182015260008551614687816009850160208a01613d27565b80830190507f222c0000000000000000000000000000000000000000000000000000000000008060098301527f226465736372697074696f6e223a220000000000000000000000000000000000600b83015286516146ec81601a850160208b01613d27565b601a92019182018190527f22696d616765223a202200000000000000000000000000000000000000000000601c830152855161472f816026850160208a01613d27565b60269201918201527f2261747472696275746573223a00000000000000000000000000000000000000602882015261456a61476d60358301866145e4565b607d60f81b815260010190565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516147b281601d850160208701613d27565b91909101601d0192915050565b838152818360208301376000910160200190815292915050565b60008152600082516147f2816001850160208701613d27565b9190910160010192915050565b7f600b5981380380925939f300000000000000000000000000000000000000000081526000825161483781600b850160208701613d27565b91909101600b0192915050565b7f546f7a7a69204475636b2000000000000000000000000000000000000000000081526000825161483781600b850160208701613d27565b600060ff821660ff81141561489357614893614370565b60010192915050565b607b60f81b81527f2274726169745f74797065223a20224475636b2054797065222c0000000000006001820152600067113b30b63ab2911d60c11b80601b840152601160f91b80602385015285516148fb816024870160208a01613d27565b80850190508160248201527f7d2c7b000000000000000000000000000000000000000000000000000000000060258201527f2274726169745f74797065223a202243726561746f72222c0000000000000000602882015282604082015281604882015285519250614973836049830160208901613d27565b61456a61476d604985840101601160f91b815260010190565b6000825161499e818460208701613d27565b600b60fa1b920191825250607b60f81b60018201527f2274726169745f74797065223a2022537461747573222c00000000000000000060028201527f2276616c7565223a202250726f626174696f6e220000000000000000000000006019820152607d60f81b602d820152602e01919050565b60008351614a23818460208801613d27565b8083019050600b60fa1b8152607b60f81b60018201527f2274726169745f74797065223a2022537461747573222c000000000000000000600282015267113b30b63ab2911d60c11b6019820152601160f91b8060218301528451614a8e816022850160208901613d27565b6022920191820152607d60f81b6023820152602401949350505050565b60008351614abd818460208801613d27565b8083019050600b60fa1b8152607b60f81b60018201527f2274726169745f74797065223a20225469746c65222c00000000000000000000600282015267113b30b63ab2911d60c11b6018820152601160f91b8060208301528451614b28816021850160208901613d27565b6021920191820152607d60f81b6022820152602301949350505050565b7f5b00000000000000000000000000000000000000000000000000000000000000815260008251614b7d816001850160208701613d27565b7f5d000000000000000000000000000000000000000000000000000000000000006001939091019283015250600201919050565b634e487b7160e01b600052601260045260246000fd5b600082614bd657614bd6614bb1565b500490565b6000816000190483118215151615614bf557614bf5614370565b500290565b634e487b7160e01b600052603160045260246000fd5b60006001600160a01b03808716835280861660208401525083604083015260806060830152613fc06080830184613d53565b600060208284031215614c5457600080fd5b8151612ecc81613cf4565b600082614c6e57614c6e614bb1565b500690565b60008251614c85818460208701613d27565b9190910192915050565b600081614c9e57614c9e614370565b50600019019056fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220838cc7485ee793f4ee5e1f703b0649a5d774d74441cfa318e793f554304cd05e64736f6c634300080900334552433732313a207472616e7366657220746f206e6f6e2045524337323152650000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000004368747470733a2f2f697066732e696f2f697066732f516d5332797045716b6164645a56546978386d526533663134444a6b74596641513769626b676e6863466b3936370000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x6080604052600436106102fd5760003560e01c80636664bc8d1161018f578063a22cb465116100e1578063d0b8f6741161008a578063f2fde38b11610064578063f2fde38b1461096a578063f3fef3a31461098a578063fb8b45cf146109aa57600080fd5b8063d0b8f674146108d1578063d44835f5146108f1578063e985e9c51461092157600080fd5b8063b88d4fde116100bb578063b88d4fde14610864578063c87b56dd14610884578063cd7e10c1146108a457600080fd5b8063a22cb465146107e5578063b70e0f7d14610805578063b88a1d2c1461083457600080fd5b8063715018a6116101435780638da5cb5b1161011d5780638da5cb5b14610792578063934308c0146107b057806395d89b41146107d057600080fd5b8063715018a61461073d5780637f481d0614610752578063820e215f1461077257600080fd5b80636a4e7dc1116101745780636a4e7dc1146106c75780636fa62175146106fd57806370a082311461071d57600080fd5b80636664bc8d146106875780636885653f146106a757600080fd5b80632dabc24f1161025357806342966c68116101fc5780634f6ccce7116101d65780634f6ccce71461061a5780636352211e1461063a5780636587e6391461065a57600080fd5b806342966c68146105c45780634c02fc6a146105e45780634d5ea80e1461060457600080fd5b806340e1696e1161022d57806340e1696e1461054e57806341d5b8031461058457806342842e0e146105a457600080fd5b80632dabc24f146104d75780632f745c59146105175780633ec75eba1461053757600080fd5b806312d049f8116102b557806318160ddd1161028f57806318160ddd1461048257806323b872dd146104975780632a5d53da146104b757600080fd5b806312d049f8146103d357806314372534146103e65780631789bd621461042157600080fd5b8063081812fc116102e6578063081812fc14610359578063095ea7b3146103915780630adf673f146103b357600080fd5b806301ffc9a71461030257806306fdde0314610337575b600080fd5b34801561030e57600080fd5b5061032261031d366004613d0a565b6109bd565b60405190151581526020015b60405180910390f35b34801561034357600080fd5b5061034c610a01565b60405161032e9190613d7f565b34801561036557600080fd5b50610379610374366004613d92565b610a93565b6040516001600160a01b03909116815260200161032e565b34801561039d57600080fd5b506103b16103ac366004613dc7565b610b2d565b005b3480156103bf57600080fd5b506103b16103ce366004613df1565b610c5f565b6103b16103e1366004613e5c565b610d39565b3480156103f257600080fd5b50610413610401366004613d92565b601a6020526000908152604090205481565b60405190815260200161032e565b34801561042d57600080fd5b5061046261043c366004613eaf565b6016602052600090815260409020546001600160801b0380821691600160801b90041682565b604080516001600160801b0393841681529290911660208301520161032e565b34801561048e57600080fd5b50600854610413565b3480156104a357600080fd5b506103b16104b2366004613eca565b61103b565b3480156104c357600080fd5b506103b16104d2366004613f06565b6110c3565b3480156104e357600080fd5b50600e54600f546010546011546105069392919060ff8082169161010090041685565b60405161032e959493929190613f91565b34801561052357600080fd5b50610413610532366004613dc7565b611221565b34801561054357600080fd5b5061041362093a8081565b34801561055a57600080fd5b50610379610569366004613d92565b6012602052600090815260409020546001600160a01b031681565b34801561059057600080fd5b506103b161059f366004613e5c565b6112c9565b3480156105b057600080fd5b506103b16105bf366004613eca565b611471565b3480156105d057600080fd5b506103b16105df366004613d92565b61148c565b3480156105f057600080fd5b506103b16105ff366004613d92565b611513565b34801561061057600080fd5b506104136101a481565b34801561062657600080fd5b50610413610635366004613d92565b611618565b34801561064657600080fd5b50610379610655366004613d92565b6116bc565b34801561066657600080fd5b50610413610675366004613d92565b60146020526000908152604090205481565b34801561069357600080fd5b506103b16106a2366004613df1565b611733565b3480156106b357600080fd5b506103b16106c2366004613fca565b611825565b3480156106d357600080fd5b506103796106e2366004613d92565b6018602052600090815260409020546001600160a01b031681565b34801561070957600080fd5b506103b1610718366004613fca565b611856565b34801561072957600080fd5b50610413610738366004613eaf565b6118c2565b34801561074957600080fd5b506103b161195c565b34801561075e57600080fd5b506103b161076d36600461400c565b6119c2565b34801561077e57600080fd5b506103b161078d36600461401e565b611a83565b34801561079e57600080fd5b50600a546001600160a01b0316610379565b3480156107bc57600080fd5b506103b16107cb3660046140a8565b611c16565b3480156107dc57600080fd5b5061034c611cb0565b3480156107f157600080fd5b506103b16108003660046140fd565b611cbf565b34801561081157600080fd5b50610825610820366004613d92565b611cce565b60405161032e93929190614139565b34801561084057600080fd5b5061032261084f366004613d92565b60156020526000908152604090205460ff1681565b34801561087057600080fd5b506103b161087f366004614177565b611d79565b34801561089057600080fd5b5061034c61089f366004613d92565b611e01565b3480156108b057600080fd5b506104136108bf366004613d92565b60136020526000908152604090205481565b3480156108dd57600080fd5b506103b16108ec366004614253565b6120c3565b3480156108fd57600080fd5b5061032261090c366004613d92565b60196020526000908152604090205460ff1681565b34801561092d57600080fd5b5061032261093c366004614287565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561097657600080fd5b506103b1610985366004613eaf565b61210c565b34801561099657600080fd5b506103b16109a5366004613dc7565b6121eb565b6103b16109b83660046142b1565b61228b565b60006001600160e01b031982167fe80ab5320000000000000000000000000000000000000000000000000000000014806109fb57506109fb82612609565b92915050565b606060008054610a109061433b565b80601f0160208091040260200160405190810160405280929190818152602001828054610a3c9061433b565b8015610a895780601f10610a5e57610100808354040283529160200191610a89565b820191906000526020600020905b815481529060010190602001808311610a6c57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610b115760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610b38826116bc565b9050806001600160a01b0316836001600160a01b03161415610bc25760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610b08565b336001600160a01b0382161480610bde5750610bde813361093c565b610c505760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610b08565b610c5a8383612647565b505050565b60008281526002602052604090205482906001600160a01b0316610cd75760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b08565b610ce4335b6101a46126b5565b610d00576040516282b42960e81b815260040160405180910390fd5b610d09836127ac565b610d2657604051634fcb49e760e11b815260040160405180910390fd5b5060009182526013602052604090912055565b6001601154610100900460ff166002811115610d5757610d57613f67565b1415610d765760405163af79b43760e01b815260040160405180910390fd5b601054600c5410610d995760405162cf4d0360e41b815260040160405180910390fd5b600f543414610dbb5760405163b1401e8b60e01b815260040160405180910390fd5b6002601154610100900460ff166002811115610dd957610dd9613f67565b1415610e6f5733600090815260166020526040902054600160801b90046001600160801b0316610e1c5760405163185ca0ed60e11b815260040160405180910390fd5b3360009081526016602052604090208054600160801b90046001600160801b0316906010610e4983614386565b91906101000a8154816001600160801b0302191690836001600160801b03160217905550505b6101a460c8600b54610e8191906143a9565b1415610ea0576001600b6000828254610e9a91906143a9565b90915550505b60008282604051602001610eb59291906143c1565b60408051601f1981840301815291815281516020928301206000818152601990935291205490915060ff1615610efe57604051631f45246560e21b815260040160405180910390fd5b6000818152601960205260408120805460ff19166001179055600b80549082610f26836143d1565b90915550610f359060c86143a9565b90506000610f7885858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506127c392505050565b600083815260186020526040902080546001600160a01b0319166001600160a01b0383161790559050610fab8683612874565b600082815260126020908152604080832080546001600160a01b03191633179055601a9091528120429055600c805460019290610fe99084906143a9565b9091555050600f546040513391859185917f0389f94f0af58100e0818f1d62d09ab446a00f774715223afb94dd75be8b06bc9161102b918c91600191906143ec565b60405180910390a4505050505050565b611046335b826126b5565b6110b85760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610b08565b610c5a83838361288e565b60008581526002602052604090205485906001600160a01b031661113b5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b08565b61114533876126b5565b611161576040516282b42960e81b815260040160405180910390fd5b604051806060016040528086815260200185815260200184848080601f016020809104026020016040519081016040528093929190818152602001838380828437600092018290525093909452505088815260176020908152604091829020845181558482015160018201559184015180519293506111e99260028501929190910190613be7565b509050508385877f64cc791d98926552b9dfc30dfd5246c6db24c0e2d41c5c42fd3be62355857202868660405161102b929190614446565b600061122c836118c2565b82106112a05760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201527f74206f6620626f756e64730000000000000000000000000000000000000000006064820152608401610b08565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6112d233610cdc565b6112ee576040516282b42960e81b815260040160405180910390fd5b601054600c54106113115760405162cf4d0360e41b815260040160405180910390fd5b6101a460c8600b5461132391906143a9565b1415611342576001600b600082825461133c91906143a9565b90915550505b600082826040516020016113579291906143c1565b60408051601f1981840301815291815281516020928301206000818152601990935291205490915060ff16156113a057604051631f45246560e21b815260040160405180910390fd5b6000818152601960205260408120805460ff19166001179055600b805490826113c8836143d1565b909155506113d79060c86143a9565b9050600061141a85858080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506127c392505050565b600083815260186020526040902080546001600160a01b0319166001600160a01b038316179055905061144d8683612874565b6000828152601a60205260408120429055600c805460019290610fe99084906143a9565b610c5a83838360405180602001604052806000815250611d79565b61149533611040565b6115075760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f766564000000000000000000000000000000006064820152608401610b08565b61151081612a66565b50565b60008181526002602052604090205481906001600160a01b031661158b5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b08565b61159433610cdc565b6115b0576040516282b42960e81b815260040160405180910390fd5b6115b9826127ac565b6115d657604051634fcb49e760e11b815260040160405180910390fd5b6115df82612b0d565b6115fc57604051632ab1437d60e21b815260040160405180910390fd5b506000908152601560205260409020805460ff19166001179055565b600061162360085490565b82106116975760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201527f7574206f6620626f756e647300000000000000000000000000000000000000006064820152608401610b08565b600882815481106116aa576116aa61445a565b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b0316806109fb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b08565b60008281526002602052604090205482906001600160a01b03166117ab5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b08565b6117b433610cdc565b6117d0576040516282b42960e81b815260040160405180910390fd5b60008381526014602052604090208290556117e9612b69565b6001600160a01b031682847f700d28293f4da9cfe035e38919d756bf895145991d9f519e53c3c3bc8bdda84160405160405180910390a4505050565b61182e33610cdc565b61184a576040516282b42960e81b815260040160405180910390fd5b610c5a600d8383613c6b565b61185f33610cdc565b61187b576040516282b42960e81b815260040160405180910390fd5b336001600160a01b03167f108ca51e831f3a035bf5e7eac979db4911d79e5d3719646a90c935c21611278283836040516118b6929190614446565b60405180910390a25050565b60006001600160a01b0382166119405760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610b08565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146119b65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b08565b6119c06000612b7b565b565b6119cb33610cdc565b6119e7576040516282b42960e81b815260040160405180910390fd5b80600e6119f4828261447d565b5050600c5460408201351015611a0957600080fd5b611a11612b69565b6001600160a01b03167fa547036398b1f32c06d940988af208fbfd500b225dc09d43b56358c528ca3400823560208401356040850135611a576080870160608801614501565b611a6760a0880160808901614501565b604051611a78959493929190613f91565b60405180910390a250565b60008381526002602052604090205483906001600160a01b0316611afb5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b08565b611b0433610cdc565b611b20576040516282b42960e81b815260040160405180910390fd5b611b29846127ac565b611b4657604051634fcb49e760e11b815260040160405180910390fd5b611b4f84612b0d565b611b6c57604051632ab1437d60e21b815260040160405180910390fd5b6000611b77856116bc565b60008681526018602052604081205491925090611b9c906001600160a01b0316612bcd565b9050611ba786612a66565b6001600c6000828254611bba919061451e565b90915550506001600160a01b038216867f8810580bd4a907aa442c2fe06e05ecf512e09652fcf5a14c14f700bc3a39b2d0611bf3612b69565b848989604051611c069493929190614535565b60405180910390a3505050505050565b611c1f33610cdc565b611c3b576040516282b42960e81b815260040160405180910390fd5b60005b82811015611caa578160166000868685818110611c5d57611c5d61445a565b9050602002016020810190611c729190613eaf565b6001600160a01b031681526020810191909152604001600020611c95828261458e565b50819050611ca2816143d1565b915050611c3e565b50505050565b606060018054610a109061433b565b611cca338383612bee565b5050565b60176020526000908152604090208054600182015460028301805492939192611cf69061433b565b80601f0160208091040260200160405190810160405280929190818152602001828054611d229061433b565b8015611d6f5780601f10611d4457610100808354040283529160200191611d6f565b820191906000526020600020905b815481529060010190602001808311611d5257829003601f168201915b5050505050905083565b611d8333836126b5565b611df55760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610b08565b611caa84848484612cbd565b606081611e25816000908152600260205260409020546001600160a01b0316151590565b611e835760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b08565b6101a4831415611f1f57600d8054611e9a9061433b565b80601f0160208091040260200160405190810160405280929190818152602001828054611ec69061433b565b8015611f135780601f10611ee857610100808354040283529160200191611f13565b820191906000526020600020905b815481529060010190602001808311611ef657829003601f168201915b505050505091506120bd565b6000601760008581526020019081526020016000206040518060600160405290816000820154815260200160018201548152602001600282018054611f639061433b565b80601f0160208091040260200160405190810160405280929190818152602001828054611f8f9061433b565b8015611fdc5780601f10611fb157610100808354040283529160200191611fdc565b820191906000526020600020905b815481529060010190602001808311611fbf57829003601f168201915b50505050508152505090506000611ff285612d3b565b825190915081901561200c57825161200990612d6c565b91505b6040830151511561201e575060408201515b60008681526018602052604081205461203f906001600160a01b0316612bcd565b60405160200161204f9190614600565b60405160208183030381529060405290506120978383836120708b89612ed3565b6040516020016120839493929190614645565b60405160208183030381529060405261306a565b6040516020016120a7919061477a565b6040516020818303038152906040529550505050505b50919050565b6120cc33610cdc565b6120e8576040516282b42960e81b815260040160405180910390fd5b6001600160a01b03821660009081526016602052604090208190611caa828261458e565b600a546001600160a01b031633146121665760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610b08565b6001600160a01b0381166121e25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610b08565b61151081612b7b565b6121f433610cdc565b612210576040516282b42960e81b815260040160405180910390fd5b4781111561224a576040517f356680b700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80612281576040517f0561bfa700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b611cca8282613207565b600160115460ff1660028111156122a4576122a4613f67565b14156122c35760405163af79b43760e01b815260040160405180910390fd5b600e5434146122e55760405163b1401e8b60e01b815260040160405180910390fd5b600260115460ff1660028111156122fe576122fe613f67565b141561238457336000908152601660205260409020546001600160801b031661233a5760405163185ca0ed60e11b815260040160405180910390fd5b33600090815260166020526040812080546001600160801b03169161235e83614386565b91906101000a8154816001600160801b0302191690836001600160801b03160217905550505b600084846040516020016123999291906143c1565b60405160208183030381529060405280519060200120905060008686866040516020016123c8939291906147bf565b6040516020818303038152906040528051906020012090506124408484808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152507f76cf55ec8f156f88221bd1f5b7840a0e6427cafd0518667edd4ca7e530b535f392508591506132629050565b612476576040517f09bde33900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60006124b787878080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506127c392505050565b600089815260186020526040902080546001600160a01b0319166001600160a01b03831617905590506124ea8989612874565b336001600160a01b031683897f0389f94f0af58100e0818f1d62d09ab446a00f774715223afb94dd75be8b06bc8c6000600e6000015460405161252f939291906143ec565b60405180910390a4505050505050505050565b6001600160a01b03163b151590565b6001600160a01b0383166125ac576125a781600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6125cf565b816001600160a01b0316836001600160a01b0316146125cf576125cf8382613278565b6001600160a01b0382166125e657610c5a81613315565b826001600160a01b0316826001600160a01b031614610c5a57610c5a82826133c4565b60006001600160e01b031982167f780e9d630000000000000000000000000000000000000000000000000000000014806109fb57506109fb82613408565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061267c826116bc565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b031661272e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b08565b6000612739836116bc565b9050806001600160a01b0316846001600160a01b031614806127745750836001600160a01b031661276984610a93565b6001600160a01b0316145b806127a457506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b600060c882101580156109fb5750506101a4141590565b600080826040516020016127d791906147d9565b60405160208183030381529060405290506000816040516020016127fb91906147ff565b60405160208183030381529060405290508051602082016000f092506001600160a01b03831661286d5760405162461bcd60e51b815260206004820152601160248201527f4445504c4f594d454e545f4641494c45440000000000000000000000000000006044820152606401610b08565b5050919050565b611cca8282604051806020016040528060008152506134a3565b826001600160a01b03166128a1826116bc565b6001600160a01b03161461291d5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610b08565b6001600160a01b0382166129985760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610b08565b6129a3838383613521565b6129ae600082612647565b6001600160a01b03831660009081526003602052604081208054600192906129d790849061451e565b90915550506001600160a01b0382166000908152600360205260408120805460019290612a059084906143a9565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6000612a71826116bc565b9050612a7f81600084613521565b612a8a600083612647565b6001600160a01b0381166000908152600360205260408120805460019290612ab390849061451e565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6000612b18826127ac565b612b2457506000919050565b60008281526015602052604090205460ff1615612b4357506000919050565b6000828152601a6020526040902054612b609062093a80906143a9565b42111592915050565b6000612b766101a46116bc565b905090565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60606109fb826001612be9816001600160a01b0384163b61451e565b61352c565b816001600160a01b0316836001600160a01b03161415612c505760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610b08565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612cc884848461288e565b612cd48484848461354f565b611caa5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610b08565b6060612d46826136a7565b604051602001612d569190614844565b6040516020818303038152906040529050919050565b606060005b60208160ff16108015612dbd5750828160ff1660208110612d9457612d9461445a565b1a60f81b7fff000000000000000000000000000000000000000000000000000000000000001615155b15612dd45780612dcc8161487c565b915050612d71565b60008160ff1667ffffffffffffffff811115612df257612df2614161565b6040519080825280601f01601f191660200182016040528015612e1c576020820181803683370190505b509050600091505b60208260ff16108015612e705750838260ff1660208110612e4757612e4761445a565b1a60f81b7fff000000000000000000000000000000000000000000000000000000000000001615155b15612ecc57838260ff1660208110612e8a57612e8a61445a565b1a60f81b818360ff1681518110612ea357612ea361445a565b60200101906001600160f81b031916908160001a90535081612ec48161487c565b925050612e24565b9392505050565b60606000612ee18460c81190565b612f20576040518060400160405280600681526020017f437573746f6d0000000000000000000000000000000000000000000000000000815250612f57565b6040518060400160405280600581526020017f546f7a7a690000000000000000000000000000000000000000000000000000008152505b90506000612f64856137a5565b905060008282604051602001612f7b92919061489c565b6040516020818303038152906040529050612f9586612b0d565b15612fc15780604051602001612fab919061498c565b6040516020818303038152906040529050612ffc565b602085015115612ffc5780612fd98660200151612d6c565b604051602001612fea929190614a11565b60405160208183030381529060405290505b600086815260146020526040902054801561303e578161301b82612d6c565b60405160200161302c929190614aab565b60405160208183030381529060405291505b8160405160200161304f9190614b45565b60405160208183030381529060405294505050505092915050565b606081516000141561308a57505060408051602081019091526000815290565b6000604051806060016040528060408152602001614ca760409139905060006003845160026130b991906143a9565b6130c39190614bc7565b6130ce906004614bdb565b905060006130dd8260206143a9565b67ffffffffffffffff8111156130f5576130f5614161565b6040519080825280601f01601f19166020018201604052801561311f576020820181803683370190505b509050818152600183018586518101602084015b8183101561318b576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f8116850151825350600101613133565b6003895106600181146131a557600281146131d1576131f9565b7f3d3d0000000000000000000000000000000000000000000000000000000000006001198301526131f9565b7f3d000000000000000000000000000000000000000000000000000000000000006000198301525b509398975050505050505050565b600080600080600085875af1905080610c5a5760405162461bcd60e51b815260206004820152601360248201527f4554485f5452414e534645525f4641494c4544000000000000000000000000006044820152606401610b08565b60008261326f858461384f565b14949350505050565b60006001613285846118c2565b61328f919061451e565b6000838152600760205260409020549091508082146132e2576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906133279060019061451e565b6000838152600960205260408120546008805493945090928490811061334f5761334f61445a565b9060005260206000200154905080600883815481106133705761337061445a565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806133a8576133a8614bfa565b6001900381819060005260206000200160009055905550505050565b60006133cf836118c2565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061346b57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806109fb57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316146109fb565b6134ad83836138c3565b6134ba600084848461354f565b610c5a5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610b08565b610c5a838383612551565b60408051603f8301601f19168101909152818152818360208301863c9392505050565b60006001600160a01b0384163b1561369c57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613593903390899088908890600401614c10565b602060405180830381600087803b1580156135ad57600080fd5b505af19250505080156135dd575060408051601f3d908101601f191682019092526135da91810190614c42565b60015b613682573d80801561360b576040519150601f19603f3d011682016040523d82523d6000602084013e613610565b606091505b50805161367a5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401610b08565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506127a4565b506001949350505050565b6060816136cb5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156136f557806136df816143d1565b91506136ee9050600a83614bc7565b91506136cf565b60008167ffffffffffffffff81111561371057613710614161565b6040519080825280601f01601f19166020018201604052801561373a576020820181803683370190505b5090505b84156127a45761374f60018361451e565b915061375c600a86614c5f565b6137679060306143a9565b60f81b81838151811061377c5761377c61445a565b60200101906001600160f81b031916908160001a90535061379e600a86614bc7565b945061373e565b606060c88210156137e957505060408051808201909152600981527f4a696d20546f7a7a690000000000000000000000000000000000000000000000602082015290565b600082815260136020526040902054801561382e5761380781612d6c565b6040516020016138179190614c73565b604051602081830303815290604052915050919050565b600083815260126020526040902054613807906001600160a01b0316613a11565b600081815b84518110156138bb5760008582815181106138715761387161445a565b6020026020010151905080831161389757600083815260208290526040902092506138a8565b600081815260208490526040902092505b50806138b3816143d1565b915050613854565b509392505050565b6001600160a01b0382166139195760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b08565b6000818152600260205260409020546001600160a01b03161561397e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b08565b61398a60008383613521565b6001600160a01b03821660009081526003602052604081208054600192906139b39084906143a9565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60606109fb826001600160a01b0316601460606000613a31836002614bdb565b613a3c9060026143a9565b67ffffffffffffffff811115613a5457613a54614161565b6040519080825280601f01601f191660200182016040528015613a7e576020820181803683370190505b509050600360fc1b81600081518110613a9957613a9961445a565b60200101906001600160f81b031916908160001a9053507f780000000000000000000000000000000000000000000000000000000000000081600181518110613ae457613ae461445a565b60200101906001600160f81b031916908160001a9053506000613b08846002614bdb565b613b139060016143a9565b90505b6001811115613b98577f303132333435363738396162636465660000000000000000000000000000000085600f1660108110613b5457613b5461445a565b1a60f81b828281518110613b6a57613b6a61445a565b60200101906001600160f81b031916908160001a90535060049490941c93613b9181614c8f565b9050613b16565b508315612ecc5760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610b08565b828054613bf39061433b565b90600052602060002090601f016020900481019282613c155760008555613c5b565b82601f10613c2e57805160ff1916838001178555613c5b565b82800160010185558215613c5b579182015b82811115613c5b578251825591602001919060010190613c40565b50613c67929150613cdf565b5090565b828054613c779061433b565b90600052602060002090601f016020900481019282613c995760008555613c5b565b82601f10613cb25782800160ff19823516178555613c5b565b82800160010185558215613c5b579182015b82811115613c5b578235825591602001919060010190613cc4565b5b80821115613c675760008155600101613ce0565b6001600160e01b03198116811461151057600080fd5b600060208284031215613d1c57600080fd5b8135612ecc81613cf4565b60005b83811015613d42578181015183820152602001613d2a565b83811115611caa5750506000910152565b60008151808452613d6b816020860160208601613d27565b601f01601f19169290920160200192915050565b602081526000612ecc6020830184613d53565b600060208284031215613da457600080fd5b5035919050565b80356001600160a01b0381168114613dc257600080fd5b919050565b60008060408385031215613dda57600080fd5b613de383613dab565b946020939093013593505050565b60008060408385031215613e0457600080fd5b50508035926020909101359150565b60008083601f840112613e2557600080fd5b50813567ffffffffffffffff811115613e3d57600080fd5b602083019150836020828501011115613e5557600080fd5b9250929050565b600080600060408486031215613e7157600080fd5b613e7a84613dab565b9250602084013567ffffffffffffffff811115613e9657600080fd5b613ea286828701613e13565b9497909650939450505050565b600060208284031215613ec157600080fd5b612ecc82613dab565b600080600060608486031215613edf57600080fd5b613ee884613dab565b9250613ef660208501613dab565b9150604084013590509250925092565b600080600080600060808688031215613f1e57600080fd5b853594506020860135935060408601359250606086013567ffffffffffffffff811115613f4a57600080fd5b613f5688828901613e13565b969995985093965092949392505050565b634e487b7160e01b600052602160045260246000fd5b60038110613f8d57613f8d613f67565b9052565b858152602081018590526040810184905260a08101613fb36060830185613f7d565b613fc06080830184613f7d565b9695505050505050565b60008060208385031215613fdd57600080fd5b823567ffffffffffffffff811115613ff457600080fd5b61400085828601613e13565b90969095509350505050565b600060a082840312156120bd57600080fd5b60008060006040848603121561403357600080fd5b83359250602084013567ffffffffffffffff811115613e9657600080fd5b60008083601f84011261406357600080fd5b50813567ffffffffffffffff81111561407b57600080fd5b6020830191508360208260051b8501011115613e5557600080fd5b6000604082840312156120bd57600080fd5b6000806000606084860312156140bd57600080fd5b833567ffffffffffffffff8111156140d457600080fd5b6140e086828701614051565b90945092506140f490508560208601614096565b90509250925092565b6000806040838503121561411057600080fd5b61411983613dab565b91506020830135801515811461412e57600080fd5b809150509250929050565b8381528260208201526060604082015260006141586060830184613d53565b95945050505050565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561418d57600080fd5b61419685613dab565b93506141a460208601613dab565b925060408501359150606085013567ffffffffffffffff808211156141c857600080fd5b818701915087601f8301126141dc57600080fd5b8135818111156141ee576141ee614161565b604051601f8201601f19908116603f0116810190838211818310171561421657614216614161565b816040528281528a602084870101111561422f57600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6000806060838503121561426657600080fd5b61426f83613dab565b915061427e8460208501614096565b90509250929050565b6000806040838503121561429a57600080fd5b6142a383613dab565b915061427e60208401613dab565b600080600080600080608087890312156142ca57600080fd5b6142d387613dab565b955060208701359450604087013567ffffffffffffffff808211156142f757600080fd5b6143038a838b01613e13565b9096509450606089013591508082111561431c57600080fd5b5061432989828a01614051565b979a9699509497509295939492505050565b600181811c9082168061434f57607f821691505b602082108114156120bd57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60006001600160801b0382168061439f5761439f614370565b6000190192915050565b600082198211156143bc576143bc614370565b500190565b8183823760009101908152919050565b60006000198214156143e5576143e5614370565b5060010190565b6001600160a01b0384168152606081016002841061440c5761440c613f67565b602082019390935260400152919050565b81835281816020850137506000828201602090810191909152601f909101601f19169091010190565b6020815260006127a460208301848661441d565b634e487b7160e01b600052603260045260246000fd5b6003811061151057600080fd5b8135815560208201356001820155604082013560028201556003810160608301356144a781614470565b600381106144b7576144b7613f67565b815460ff821691508160ff19821617835560808501356144d681614470565b600381106144e6576144e6613f67565b61ff008160081b168361ffff19841617178455505050505050565b60006020828403121561451357600080fd5b8135612ecc81614470565b60008282101561453057614530614370565b500390565b6001600160a01b03851681526060602082015260006145576060830186613d53565b828103604084015261456a81858761441d565b979650505050505050565b600081356001600160801b03811681146109fb57600080fd5b6001600160801b0361459f83614575565b167fffffffffffffffffffffffffffffffff000000000000000000000000000000008181845416178355806145d660208601614575565b60801b168217835550505050565b600081516145f6818560208601613d27565b9290920192915050565b7f646174613a696d6167652f776562703b6261736536342c000000000000000000815260008251614638816017850160208701613d27565b9190910160170192915050565b607b60f81b81527f226e616d65223a22000000000000000000000000000000000000000000000000600182015260008551614687816009850160208a01613d27565b80830190507f222c0000000000000000000000000000000000000000000000000000000000008060098301527f226465736372697074696f6e223a220000000000000000000000000000000000600b83015286516146ec81601a850160208b01613d27565b601a92019182018190527f22696d616765223a202200000000000000000000000000000000000000000000601c830152855161472f816026850160208a01613d27565b60269201918201527f2261747472696275746573223a00000000000000000000000000000000000000602882015261456a61476d60358301866145e4565b607d60f81b815260010190565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008152600082516147b281601d850160208701613d27565b91909101601d0192915050565b838152818360208301376000910160200190815292915050565b60008152600082516147f2816001850160208701613d27565b9190910160010192915050565b7f600b5981380380925939f300000000000000000000000000000000000000000081526000825161483781600b850160208701613d27565b91909101600b0192915050565b7f546f7a7a69204475636b2000000000000000000000000000000000000000000081526000825161483781600b850160208701613d27565b600060ff821660ff81141561489357614893614370565b60010192915050565b607b60f81b81527f2274726169745f74797065223a20224475636b2054797065222c0000000000006001820152600067113b30b63ab2911d60c11b80601b840152601160f91b80602385015285516148fb816024870160208a01613d27565b80850190508160248201527f7d2c7b000000000000000000000000000000000000000000000000000000000060258201527f2274726169745f74797065223a202243726561746f72222c0000000000000000602882015282604082015281604882015285519250614973836049830160208901613d27565b61456a61476d604985840101601160f91b815260010190565b6000825161499e818460208701613d27565b600b60fa1b920191825250607b60f81b60018201527f2274726169745f74797065223a2022537461747573222c00000000000000000060028201527f2276616c7565223a202250726f626174696f6e220000000000000000000000006019820152607d60f81b602d820152602e01919050565b60008351614a23818460208801613d27565b8083019050600b60fa1b8152607b60f81b60018201527f2274726169745f74797065223a2022537461747573222c000000000000000000600282015267113b30b63ab2911d60c11b6019820152601160f91b8060218301528451614a8e816022850160208901613d27565b6022920191820152607d60f81b6023820152602401949350505050565b60008351614abd818460208801613d27565b8083019050600b60fa1b8152607b60f81b60018201527f2274726169745f74797065223a20225469746c65222c00000000000000000000600282015267113b30b63ab2911d60c11b6018820152601160f91b8060208301528451614b28816021850160208901613d27565b6021920191820152607d60f81b6022820152602301949350505050565b7f5b00000000000000000000000000000000000000000000000000000000000000815260008251614b7d816001850160208701613d27565b7f5d000000000000000000000000000000000000000000000000000000000000006001939091019283015250600201919050565b634e487b7160e01b600052601260045260246000fd5b600082614bd657614bd6614bb1565b500490565b6000816000190483118215151615614bf557614bf5614370565b500290565b634e487b7160e01b600052603160045260246000fd5b60006001600160a01b03808716835280861660208401525083604083015260806060830152613fc06080830184613d53565b600060208284031215614c5457600080fd5b8151612ecc81613cf4565b600082614c6e57614c6e614bb1565b500690565b60008251614c85818460208701613d27565b9190910192915050565b600081614c9e57614c9e614370565b50600019019056fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220838cc7485ee793f4ee5e1f703b0649a5d774d74441cfa318e793f554304cd05e64736f6c63430008090033

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

0000000000000000000000000000000000000000000000000de0b6b3a76400000000000000000000000000000000000000000000000000000de0b6b3a764000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000c0000000000000000000000000000000000000000000000000000000000000004368747470733a2f2f697066732e696f2f697066732f516d5332797045716b6164645a56546978386d526533663134444a6b74596641513769626b676e6863466b3936370000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _machineConfig (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]
Arg [1] : ownershipTokenURI (string): https://ipfs.io/ipfs/QmS2ypEqkaddZVTix8mRe3f14DJktYfAQ7ibkgnhcFk967

-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000de0b6b3a7640000
Arg [1] : 0000000000000000000000000000000000000000000000000de0b6b3a7640000
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000010
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [5] : 00000000000000000000000000000000000000000000000000000000000000c0
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000043
Arg [7] : 68747470733a2f2f697066732e696f2f697066732f516d5332797045716b6164
Arg [8] : 645a56546978386d526533663134444a6b74596641513769626b676e6863466b
Arg [9] : 3936370000000000000000000000000000000000000000000000000000000000


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

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