ETH Price: $3,889.63 (-0.60%)

Token

ERC-20: Nanobits (NANOB)
 

Overview

Max Total Supply

51,410,261.237705018277104149 NANOB

Holders

776

Market

Onchain Market Cap

$0.00

Circulating Supply Market Cap

-

Other Info

Token Contract (WITH 18 Decimals)

Balance
776.132638499995032748 NANOB

Value
$0.00
0xe02f813f584e25f10ad0acfe6cbf4fba7020ed6a
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:
Nanobits

Compiler Version
v0.8.15+commit.e14f2714

Optimization Enabled:
Yes with 200 runs

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

import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol";
import "./ERC721AV4.sol";

contract Nanobits is ERC20Burnable, Ownable {
    uint256 public _maxSupply = 100000000 * 10**18;
    uint256 public _initialSupply = 51000000 * 10**18;
    bool public isStakingLive = false;

    uint256 public constant legendaryRatePerDay = 69444444444444; // 6 $NANOBITS per day for 1/1s
    uint256 public constant commonRatePerDay = 34722222222222; // 3 $NANOBITS per day for common

    struct StakingData {
        uint256 timeStaked;
        address owner;
        uint256 rarity;
    }

    struct StakingParams {
        uint256 tokenId;
        uint256 rarity;
    }

    mapping(uint256 => StakingData) stakedData;
    mapping(address => uint256[]) internal tokenIds;

    mapping(address => uint256) addressBlockBought;
    address signer;

    address public constant PROJECT_ADDRESS = 0xf3a823bf459b00702904C9bA90BFA19e04787261; 

    ERC721A private yagiContract;
    constructor(address _signer, address _yagiContract) ERC20("Nanobits", "NANOB") {
        signer = _signer;
        yagiContract = ERC721A(_yagiContract);
        _mint(PROJECT_ADDRESS, _initialSupply);
    }

    function getStaked(address _owner) public view returns (uint256[] memory) {
        return tokenIds[_owner];
    }

    function getOwner(uint256 tokenId) public view returns (address) {
        return stakedData[tokenId].owner;
    }
    
    function toggleStaking() external onlyOwner {
        isStakingLive = !isStakingLive;
    }

    function removeTokenIdFromArray(uint256[] storage array, uint256 tokenId) internal {
        uint256 length = array.length;
        for (uint256 i = 0; i < length; i++) {
            if (array[i] == tokenId) {
                length--;
                if (i < length) {
                    array[i] = array[length];
                }
                array.pop();
                break;
            }
        }
    }

    // STAKING FUNCTIONS
    function stake(uint256[] memory _tokenIds, uint64 expireTime, bytes memory sig, uint256[] calldata rarity) external {
        require(totalSupply() <= _maxSupply, "NO_MORE_MINTABLE_SUPPLY");
        require(addressBlockBought[msg.sender] < block.timestamp, "CANNOT_TRANSACT_THE_SAME_BLOCK");
        require(tx.origin == msg.sender,"CONTRACTS_NOT_ALLOWED_TO_MINT");
        require(isStakingLive, "STAKING_IS_NOT_YET_ACTIVE");
        bytes32 digest = keccak256(abi.encodePacked(msg.sender, expireTime));
        require(isAuthorized(sig,digest),"CONTRACT_MINT_NOT_ALLOWED");
        for (uint256 i = 0; i < _tokenIds.length; i++) {
            uint256 id = _tokenIds[i];
            require(yagiContract.ownerOf(id) == msg.sender && stakedData[id].owner == address(0), "TOKEN_IS_NOT_YOURS");
            yagiContract.transferFrom(msg.sender, address(this), id);

            tokenIds[msg.sender].push(id);
            stakedData[id].timeStaked = block.timestamp;
            stakedData[id].owner = msg.sender;
            stakedData[id].rarity = rarity[i];
            addressBlockBought[msg.sender] = block.timestamp;
        }
    }

    // UNSTAKE FUNCTIONS
    function unstake(uint256[] memory _tokenIds) public {
        require(tokenIds[msg.sender].length > 0, "NO_STAKED_YAGI");
        uint256 totalRewards = 0;

        for (uint256 i = 0; i < _tokenIds.length; i++) {
            uint256 id = _tokenIds[i];
            require(stakedData[id].owner == msg.sender, "Not Owner");

            yagiContract.transferFrom(address(this), msg.sender, id);
            uint256 rewards = claim(id);
            totalRewards += rewards;

            removeTokenIdFromArray(tokenIds[msg.sender], id);
            stakedData[id].owner = address(0);
        }
        if(totalSupply() <= _maxSupply) {
            _mint(msg.sender, totalRewards);
        }
    }

    // CLAIM FUNCTIONS
    function claimAll() public {
        require(totalSupply() <= _maxSupply, "NO_MORE_MINTABLE_SUPPLY");
        require(tokenIds[msg.sender].length > 0, "NO_STAKED_YAGI");
        uint256 totalRewards = 0;

        uint256[] memory _tokensIds = tokenIds[msg.sender];
        for (uint256 i = 0; i < _tokensIds.length; i++) {
            uint256 id = _tokensIds[i];
            require(stakedData[id].owner == msg.sender, "Not Owner");

            uint256 rewards = claim(id);
            stakedData[id].timeStaked = block.timestamp;
            totalRewards += rewards;
        }

        _mint(msg.sender, totalRewards);
    }

    function claim(uint256 id) internal view returns(uint256) {
        uint256 totalRewards = 0;
        uint256 ratePerday = 0;

        if(stakedData[id].rarity == 1) {
            ratePerday = legendaryRatePerDay;
        } else {
            ratePerday = commonRatePerDay;
        }
        uint256 numOfDays = ((block.timestamp - stakedData[id].timeStaked) / 1 days) * 1e18;
        if(numOfDays > 14) {
            uint256 reward = ((block.timestamp - stakedData[id].timeStaked) * ratePerday);
            uint256 multiplier = 1e18 + (numOfDays * 14 / 1000000);
            totalRewards = (reward * multiplier) / 1e18;
        }

        if(numOfDays > 30) {
            uint256 reward = ((block.timestamp - stakedData[id].timeStaked) * ratePerday);
            uint256 multiplier = 1e18 + (numOfDays * 28 / 1000000);
            totalRewards = (reward * multiplier) / 1e18;
        }

        if(numOfDays > 90) {
            uint256 reward = ((block.timestamp - stakedData[id].timeStaked) * ratePerday); // days reward
            uint256 multiplier = 1e18 + (numOfDays * 98 / 1000000);
            totalRewards = (reward * multiplier) / 1e18;
        }

        if(numOfDays < 14) {
            totalRewards += ((block.timestamp - stakedData[id].timeStaked) * ratePerday);
        }

        return totalRewards;
    }


    // CHECKERS
    function checkRewardsByIds(uint256 tokenId) external view returns (uint256) {
        require(stakedData[tokenId].owner != address(0), "TOKEN_NOT_BURIED");

        uint256 rewards = claim(tokenId);
        return rewards;
    }

    function checkAllRewards(address _owner) external view returns (uint256) {
        uint256 totalRewards = 0;
        uint256[] memory _tokensIds = tokenIds[_owner];

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

            uint256 rewards = claim(id);
            totalRewards += rewards;
        }

        return totalRewards;
    }
    // SETTERS

    function setSigner(address _signer) external onlyOwner{
        signer = _signer;
    }

    function setYagiContract(address yagiContractAddress) external onlyOwner{
        yagiContract = ERC721A(yagiContractAddress);
    }

    function isAuthorized(bytes memory sig, bytes32 digest) private view returns (bool) {
        return ECDSA.recover(digest, sig) == signer;
    }
}

File 2 of 10 : IERC721A.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.0.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

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

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

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

    /**
     * The caller cannot approve to the current owner.
     */
    error ApprovalToCurrentOwner();

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

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

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

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

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

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

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

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

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

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
    }

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

    // ==============================
    //            IERC165
    // ==============================

    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);

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

    /**
     * @dev Emitted when `tokenId` token is transferred from `from` to `to`.
     */
    event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 3 of 10 : ERC721AV4.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.0.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import './IERC721A.sol';

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

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

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

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

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

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

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

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

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

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    /**
     * @dev Casts the address to uint256 without masking.
     */
    function _addressToUint256(address value) private pure returns (uint256 result) {
        assembly {
            result := value
        }
    }

    /**
     * @dev Casts the boolean to uint256 without branching.
     */
    function _boolToUint256(bool value) private pure returns (uint256 result) {
        assembly {
            result := value
        }
    }

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

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

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

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

        return _tokenApprovals[tokenId];
    }

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

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

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

    /**
     * @dev See {IERC721-transferFrom}.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) public virtual override {
        _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 {
        _transfer(from, to, tokenId);
        if (to.code.length != 0)
            if (!_checkContractOnERC721Received(from, to, tokenId, _data)) {
                revert TransferToNonERC721ReceiverImplementer();
            }
    }

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

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

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

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

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the balance and number minted.
            _packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] =
                _addressToUint256(to) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            if (to.code.length != 0) {
                do {
                    emit Transfer(address(0), to, updatedIndex);
                    if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (updatedIndex < end);
                // Reentrancy protection
                if (_currentIndex != startTokenId) revert();
            } else {
                do {
                    emit Transfer(address(0), to, updatedIndex++);
                } while (updatedIndex < end);
            }
            _currentIndex = updatedIndex;
        }
        _afterTokenTransfers(address(0), to, startTokenId, quantity);
    }

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

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

        // Overflows are incredibly unrealistic.
        // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1
        unchecked {
            // Updates:
            // - `balance += quantity`.
            // - `numberMinted += quantity`.
            //
            // We can directly add to the balance and number minted.
            _packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1);

            // Updates:
            // - `address` to the owner.
            // - `startTimestamp` to the timestamp of minting.
            // - `burned` to `false`.
            // - `nextInitialized` to `quantity == 1`.
            _packedOwnerships[startTokenId] =
                _addressToUint256(to) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED);

            uint256 updatedIndex = startTokenId;
            uint256 end = updatedIndex + quantity;

            do {
                emit Transfer(address(0), to, updatedIndex++);
            } while (updatedIndex < end);

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

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

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

        address approvedAddress = _tokenApprovals[tokenId];

        bool isApprovedOrOwner = (_msgSenderERC721A() == from ||
            isApprovedForAll(from, _msgSenderERC721A()) ||
            approvedAddress == _msgSenderERC721A());

        if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        if (_addressToUint256(to) == 0) revert TransferToZeroAddress();

        _beforeTokenTransfers(from, to, tokenId, 1);

        // Clear approvals from the previous owner.
        if (_addressToUint256(approvedAddress) != 0) {
            delete _tokenApprovals[tokenId];
        }

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

            // Updates:
            // - `address` to the next owner.
            // - `startTimestamp` to the timestamp of transfering.
            // - `burned` to `false`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] =
                _addressToUint256(to) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                BITMASK_NEXT_INITIALIZED;

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

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

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

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

        address from = address(uint160(prevOwnershipPacked));
        address approvedAddress = _tokenApprovals[tokenId];

        if (approvalCheck) {
            bool isApprovedOrOwner = (_msgSenderERC721A() == from ||
                isApprovedForAll(from, _msgSenderERC721A()) ||
                approvedAddress == _msgSenderERC721A());

            if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved();
        }

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

        // Clear approvals from the previous owner.
        if (_addressToUint256(approvedAddress) != 0) {
            delete _tokenApprovals[tokenId];
        }

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

            // Updates:
            // - `address` to the last owner.
            // - `startTimestamp` to the timestamp of burning.
            // - `burned` to `true`.
            // - `nextInitialized` to `true`.
            _packedOwnerships[tokenId] =
                _addressToUint256(from) |
                (block.timestamp << BITPOS_START_TIMESTAMP) |
                BITMASK_BURNED | 
                BITMASK_NEXT_INITIALIZED;

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

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

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

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

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

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

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

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

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

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

File 4 of 10 : ECDSA.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
 *
 * These functions can be used to verify that a message was signed by the holder
 * of the private keys of a given address.
 */
library ECDSA {
    /**
     * @dev Returns the address that signed a hashed message (`hash`) with
     * `signature`. This address can then be used for verification purposes.
     *
     * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
     * this function rejects them by requiring the `s` value to be in the lower
     * half order, and the `v` value to be either 27 or 28.
     *
     * IMPORTANT: `hash` _must_ be the result of a hash operation for the
     * verification to be secure: it is possible to craft signatures that
     * recover to arbitrary addresses for non-hashed data. A safe way to ensure
     * this is by receiving a hash of the original message (which may otherwise
     * be too long), and then calling {toEthSignedMessageHash} on it.
     *
     * Documentation for signature generation:
     * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js]
     * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers]
     */
    function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
        // Check the signature length
        // - case 65: r,s,v signature (standard)
        // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._
        if (signature.length == 65) {
            bytes32 r;
            bytes32 s;
            uint8 v;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                s := mload(add(signature, 0x40))
                v := byte(0, mload(add(signature, 0x60)))
            }
            return recover(hash, v, r, s);
        } else if (signature.length == 64) {
            bytes32 r;
            bytes32 vs;
            // ecrecover takes the signature parameters, and the only way to get them
            // currently is to use assembly.
            assembly {
                r := mload(add(signature, 0x20))
                vs := mload(add(signature, 0x40))
            }
            return recover(hash, r, vs);
        } else {
            revert("ECDSA: invalid signature length");
        }
    }

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

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

        // If the signature is valid (and not malleable), return the signer address
        address signer = ecrecover(hash, v, r, s);
        require(signer != address(0), "ECDSA: invalid signature");

        return signer;
    }

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

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

File 5 of 10 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 6 of 10 : IERC20Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

File 7 of 10 : ERC20Burnable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

/**
 * @dev Extension of {ERC20} that allows token holders to destroy both their own
 * tokens and those that they have an allowance for, in a way that can be
 * recognized off-chain (via event analysis).
 */
abstract contract ERC20Burnable is Context, ERC20 {
    /**
     * @dev Destroys `amount` tokens from the caller.
     *
     * See {ERC20-_burn}.
     */
    function burn(uint256 amount) public virtual {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, deducting from the caller's
     * allowance.
     *
     * See {ERC20-_burn} and {ERC20-allowance}.
     *
     * Requirements:
     *
     * - the caller must have allowance for ``accounts``'s tokens of at least
     * `amount`.
     */
    function burnFrom(address account, uint256 amount) public virtual {
        uint256 currentAllowance = allowance(account, _msgSender());
        require(currentAllowance >= amount, "ERC20: burn amount exceeds allowance");
        unchecked {
            _approve(account, _msgSender(), currentAllowance - amount);
        }
        _burn(account, amount);
    }
}

File 8 of 10 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

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

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

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

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

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

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

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

File 9 of 10 : ERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin guidelines: functions revert instead
 * of returning `false` on failure. This behavior is nonetheless conventional
 * and does not conflict with the expectations of ERC20 applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5,05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

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

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `recipient` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * Requirements:
     *
     * - `sender` and `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     * - the caller must have allowance for ``sender``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address sender,
        address recipient,
        uint256 amount
    ) public virtual override returns (bool) {
        _transfer(sender, recipient, amount);

        uint256 currentAllowance = _allowances[sender][_msgSender()];
        require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
        unchecked {
            _approve(sender, _msgSender(), currentAllowance - amount);
        }

        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        uint256 currentAllowance = _allowances[_msgSender()][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(_msgSender(), spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `sender` cannot be the zero address.
     * - `recipient` cannot be the zero address.
     * - `sender` must have a balance of at least `amount`.
     */
    function _transfer(
        address sender,
        address recipient,
        uint256 amount
    ) internal virtual {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(sender, recipient, amount);

        uint256 senderBalance = _balances[sender];
        require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[sender] = senderBalance - amount;
        }
        _balances[recipient] += amount;

        emit Transfer(sender, recipient, amount);

        _afterTokenTransfer(sender, recipient, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

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

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens 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 amount
    ) 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, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_signer","type":"address"},{"internalType":"address","name":"_yagiContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","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":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"PROJECT_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_initialSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_maxSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"checkAllRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"checkRewardsByIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"commonRatePerDay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"getStaked","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"isStakingLive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"legendaryRatePerDay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_signer","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"yagiContractAddress","type":"address"}],"name":"setYagiContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint64","name":"expireTime","type":"uint64"},{"internalType":"bytes","name":"sig","type":"bytes"},{"internalType":"uint256[]","name":"rarity","type":"uint256[]"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040526a52b7d2dcc80cd2e40000006006556a2a2fab8a32d357130000006007556008805460ff191690553480156200003957600080fd5b5060405162002728380380620027288339810160408190526200005c9162000294565b604051806040016040528060088152602001674e616e6f6269747360c01b815250604051806040016040528060058152602001642720a727a160d91b8152508160039081620000ac919062000370565b506004620000bb828262000370565b505050620000d8620000d26200013460201b60201c565b62000138565b600c80546001600160a01b038085166001600160a01b031992831617909255600d8054928416929091169190911790556007546200012c9073f3a823bf459b00702904c9ba90bfa19e04787261906200018a565b505062000463565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038216620001e55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b8060026000828254620001f991906200043c565b90915550506001600160a01b03821660009081526020819052604081208054839290620002289084906200043c565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b505050565b80516001600160a01b03811681146200028f57600080fd5b919050565b60008060408385031215620002a857600080fd5b620002b38362000277565b9150620002c36020840162000277565b90509250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620002f757607f821691505b6020821081036200031857634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200027257600081815260208120601f850160051c81016020861015620003475750805b601f850160051c820191505b81811015620003685782815560010162000353565b505050505050565b81516001600160401b038111156200038c576200038c620002cc565b620003a4816200039d8454620002e2565b846200031e565b602080601f831160018114620003dc5760008415620003c35750858301515b600019600386901b1c1916600185901b17855562000368565b600085815260208120601f198616915b828110156200040d57888601518255948401946001909101908401620003ec565b50858210156200042c5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b600082198211156200045e57634e487b7160e01b600052601160045260246000fd5b500190565b6122b580620004736000396000f3fe608060405234801561001057600080fd5b50600436106101f05760003560e01c8063715018a61161010f578063bdcf604a116100a2578063dd62ed3e11610071578063dd62ed3e14610429578063ddf9a93d14610462578063e449f34114610475578063f2fde38b1461048857600080fd5b8063bdcf604a146103df578063c3b2d337146103ec578063c41a360a146103f5578063d1058e591461042157600080fd5b806395d89b41116100de57806395d89b411461039e578063a457c2d7146103a6578063a9059cbb146103b9578063b9c169d7146103cc57600080fd5b8063715018a61461036557806379cc67901461036d5780638cc62250146103805780638da5cb5b1461038d57600080fd5b806339509351116101875780634bf94070116101565780634bf94070146102e3578063558a496a146103165780636c19e7831461032957806370a082311461033c57600080fd5b80633950935114610295578063399080ec146102a85780633b8105b3146102c857806342966c68146102d057600080fd5b806322f4596f116101c357806322f4596f1461025d57806323b872dd14610266578063313ce56714610279578063341e7dcc1461028857600080fd5b806306fdde03146101f5578063095ea7b31461021357806318160ddd146102365780632139096d14610248575b600080fd5b6101fd61049b565b60405161020a9190611d40565b60405180910390f35b610226610221366004611daa565b61052d565b604051901515815260200161020a565b6002545b60405190815260200161020a565b61025b610256366004611ee9565b610544565b005b61023a60065481565b610226610274366004611fe0565b610951565b6040516012815260200161020a565b6008546102269060ff1681565b6102266102a3366004611daa565b6109fb565b6102bb6102b6366004612021565b610a37565b60405161020a919061203e565b61025b610aa3565b61025b6102de366004612082565b610ae1565b6102fe73f3a823bf459b00702904c9ba90bfa19e0478726181565b6040516001600160a01b03909116815260200161020a565b61025b610324366004612021565b610aee565b61025b610337366004612021565b610b3a565b61023a61034a366004612021565b6001600160a01b031660009081526020819052604090205490565b61025b610b86565b61025b61037b366004611daa565b610bbc565b61023a651f9465b8ab8e81565b6005546001600160a01b03166102fe565b6101fd610c42565b6102266103b4366004611daa565b610c51565b6102266103c7366004611daa565b610cea565b61023a6103da366004612021565b610cf7565b61023a653f28cb71571c81565b61023a60075481565b6102fe610403366004612082565b6000908152600960205260409020600101546001600160a01b031690565b61025b610dc1565b61023a61043736600461209b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61023a610470366004612082565b610f8a565b61025b6104833660046120d4565b610ff6565b61025b610496366004612021565b6111ae565b6060600380546104aa90612111565b80601f01602080910402602001604051908101604052809291908181526020018280546104d690612111565b80156105235780601f106104f857610100808354040283529160200191610523565b820191906000526020600020905b81548152906001019060200180831161050657829003601f168201915b5050505050905090565b600061053a338484611246565b5060015b92915050565b60065460025411156105975760405162461bcd60e51b81526020600482015260176024820152764e4f5f4d4f52455f4d494e5441424c455f535550504c5960481b60448201526064015b60405180910390fd5b336000908152600b602052604090205442116105f55760405162461bcd60e51b815260206004820152601e60248201527f43414e4e4f545f5452414e534143545f5448455f53414d455f424c4f434b0000604482015260640161058e565b3233146106445760405162461bcd60e51b815260206004820152601d60248201527f434f4e5452414354535f4e4f545f414c4c4f5745445f544f5f4d494e54000000604482015260640161058e565b60085460ff166106965760405162461bcd60e51b815260206004820152601960248201527f5354414b494e475f49535f4e4f545f5945545f41435449564500000000000000604482015260640161058e565b6040516bffffffffffffffffffffffff193360601b1660208201526001600160c01b031960c086901b166034820152600090603c016040516020818303038152906040528051906020012090506106ed848261136a565b6107395760405162461bcd60e51b815260206004820152601960248201527f434f4e54524143545f4d494e545f4e4f545f414c4c4f57454400000000000000604482015260640161058e565b60005b86518110156109485760008782815181106107595761075961214b565b6020908102919091010151600d546040516331a9108f60e11b81526004810183905291925033916001600160a01b0390911690636352211e90602401602060405180830381865afa1580156107b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d69190612161565b6001600160a01b031614801561080457506000818152600960205260409020600101546001600160a01b0316155b6108455760405162461bcd60e51b8152602060048201526012602482015271544f4b454e5f49535f4e4f545f594f55525360701b604482015260640161058e565b600d546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401600060405180830381600087803b15801561089757600080fd5b505af11580156108ab573d6000803e3d6000fd5b5050336000818152600a602090815260408083208054600181810183559185528385200188905587845260099092529091204281550180546001600160a01b03191690911790555085905084838181106109075761090761214b565b60009384526009602090815260408086209282029490940135600290920191909155338452600b90525090204290558061094081612194565b91505061073c565b50505050505050565b600061095e848484611394565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156109e35760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b606482015260840161058e565b6109f08533858403611246565b506001949350505050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161053a918590610a329086906121ad565b611246565b6001600160a01b0381166000908152600a6020908152604091829020805483518184028101840190945280845260609392830182828015610a9757602002820191906000526020600020905b815481526020019060010190808311610a83575b50505050509050919050565b6005546001600160a01b03163314610acd5760405162461bcd60e51b815260040161058e906121c5565b6008805460ff19811660ff90911615179055565b610aeb3382611564565b50565b6005546001600160a01b03163314610b185760405162461bcd60e51b815260040161058e906121c5565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b03163314610b645760405162461bcd60e51b815260040161058e906121c5565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b03163314610bb05760405162461bcd60e51b815260040161058e906121c5565b610bba60006116b2565b565b6000610bc88333610437565b905081811015610c265760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b606482015260840161058e565b610c338333848403611246565b610c3d8383611564565b505050565b6060600480546104aa90612111565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610cd35760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161058e565b610ce03385858403611246565b5060019392505050565b600061053a338484611394565b6001600160a01b0381166000908152600a60209081526040808320805482518185028101850190935280835284938493929190830182828015610d5957602002820191906000526020600020905b815481526020019060010190808311610d45575b5050505050905060005b8151811015610db8576000828281518110610d8057610d8061214b565b602002602001015190506000610d9582611704565b9050610da181866121ad565b945050508080610db090612194565b915050610d63565b50909392505050565b6006546002541115610e0f5760405162461bcd60e51b81526020600482015260176024820152764e4f5f4d4f52455f4d494e5441424c455f535550504c5960481b604482015260640161058e565b336000908152600a6020526040902054610e5c5760405162461bcd60e51b815260206004820152600e60248201526d4e4f5f5354414b45445f5941474960901b604482015260640161058e565b336000908152600a6020908152604080832080548251818502810185019093528083528493830182828015610eb057602002820191906000526020600020905b815481526020019060010190808311610e9c575b5050505050905060005b8151811015610f7b576000828281518110610ed757610ed761214b565b602090810291909101810151600081815260099092526040909120600101549091506001600160a01b03163314610f3c5760405162461bcd60e51b81526020600482015260096024820152682737ba1027bbb732b960b91b604482015260640161058e565b6000610f4782611704565b60008381526009602052604090204290559050610f6481866121ad565b945050508080610f7390612194565b915050610eba565b50610f863383611937565b5050565b6000818152600960205260408120600101546001600160a01b0316610fe45760405162461bcd60e51b815260206004820152601060248201526f1513d2d15397d393d517d0955492515160821b604482015260640161058e565b6000610fef83611704565b9392505050565b336000908152600a60205260409020546110435760405162461bcd60e51b815260206004820152600e60248201526d4e4f5f5354414b45445f5941474960901b604482015260640161058e565b6000805b82518110156111985760008382815181106110645761106461214b565b602090810291909101810151600081815260099092526040909120600101549091506001600160a01b031633146110c95760405162461bcd60e51b81526020600482015260096024820152682737ba1027bbb732b960b91b604482015260640161058e565b600d546040516323b872dd60e01b8152306004820152336024820152604481018390526001600160a01b03909116906323b872dd90606401600060405180830381600087803b15801561111b57600080fd5b505af115801561112f573d6000803e3d6000fd5b50505050600061113e82611704565b905061114a81856121ad565b336000908152600a602052604090209094506111669083611a16565b50600090815260096020526040902060010180546001600160a01b03191690558061119081612194565b915050611047565b5060065460025411610f8657610f863382611937565b6005546001600160a01b031633146111d85760405162461bcd60e51b815260040161058e906121c5565b6001600160a01b03811661123d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161058e565b610aeb816116b2565b6001600160a01b0383166112a85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161058e565b6001600160a01b0382166113095760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161058e565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600c546000906001600160a01b03166113838385611ad4565b6001600160a01b0316149392505050565b6001600160a01b0383166113f85760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161058e565b6001600160a01b03821661145a5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161058e565b6001600160a01b038316600090815260208190526040902054818110156114d25760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161058e565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906115099084906121ad565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161155591815260200190565b60405180910390a35b50505050565b6001600160a01b0382166115c45760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161058e565b6001600160a01b038216600090815260208190526040902054818110156116385760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161058e565b6001600160a01b03831660009081526020819052604081208383039055600280548492906116679084906121fa565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000818152600960205260408120600201548190819060010361172e5750653f28cb71571c611737565b50651f9465b8ab8e5b600084815260096020526040812054620151809061175590426121fa565b61175f9190612211565b61177190670de0b6b3a7640000612233565b9050600e8111156117f457600085815260096020526040812054839061179790426121fa565b6117a19190612233565b90506000620f42406117b484600e612233565b6117be9190612211565b6117d090670de0b6b3a76400006121ad565b9050670de0b6b3a76400006117e58284612233565b6117ef9190612211565b945050505b601e81111561187557600085815260096020526040812054839061181890426121fa565b6118229190612233565b90506000620f424061183584601c612233565b61183f9190612211565b61185190670de0b6b3a76400006121ad565b9050670de0b6b3a76400006118668284612233565b6118709190612211565b945050505b605a8111156118f657600085815260096020526040812054839061189990426121fa565b6118a39190612233565b90506000620f42406118b6846062612233565b6118c09190612211565b6118d290670de0b6b3a76400006121ad565b9050670de0b6b3a76400006118e78284612233565b6118f19190612211565b945050505b600e811015610db857600085815260096020526040902054829061191a90426121fa565b6119249190612233565b61192e90846121ad565b95945050505050565b6001600160a01b03821661198d5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161058e565b806002600082825461199f91906121ad565b90915550506001600160a01b038216600090815260208190526040812080548392906119cc9084906121ad565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b815460005b8181101561155e5782848281548110611a3657611a3661214b565b906000526020600020015403611ac25781611a5081612252565b92505081811015611a9757838281548110611a6d57611a6d61214b565b9060005260206000200154848281548110611a8a57611a8a61214b565b6000918252602090912001555b83805480611aa757611aa7612269565b6001900381819060005260206000200160009055905561155e565b80611acc81612194565b915050611a1b565b60008151604103611b075760208201516040830151606084015160001a611afd86828585611b76565b935050505061053e565b8151604003611b2e5760208201516040830151611b25858383611d16565b9250505061053e565b60405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161058e565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115611bf35760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161058e565b8360ff16601b1480611c0857508360ff16601c145b611c5f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161058e565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa158015611cb3573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661192e5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161058e565b60006001600160ff1b03821660ff83901c601b01611d3686828785611b76565b9695505050505050565b600060208083528351808285015260005b81811015611d6d57858101830151858201604001528201611d51565b81811115611d7f576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b0381168114610aeb57600080fd5b60008060408385031215611dbd57600080fd5b8235611dc881611d95565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611e1557611e15611dd6565b604052919050565b600082601f830112611e2e57600080fd5b8135602067ffffffffffffffff821115611e4a57611e4a611dd6565b8160051b611e59828201611dec565b9283528481018201928281019087851115611e7357600080fd5b83870192505b84831015611e9257823582529183019190830190611e79565b979650505050505050565b60008083601f840112611eaf57600080fd5b50813567ffffffffffffffff811115611ec757600080fd5b6020830191508360208260051b8501011115611ee257600080fd5b9250929050565b600080600080600060808688031215611f0157600080fd5b853567ffffffffffffffff80821115611f1957600080fd5b611f2589838a01611e1d565b965060209150818801358181168114611f3d57600080fd5b9550604088013581811115611f5157600080fd5b8801601f81018a13611f6257600080fd5b803582811115611f7457611f74611dd6565b611f86601f8201601f19168501611dec565b8181528b85838501011115611f9a57600080fd5b81858401868301376000918101909401525090935060608701359080821115611fc257600080fd5b50611fcf88828901611e9d565b969995985093965092949392505050565b600080600060608486031215611ff557600080fd5b833561200081611d95565b9250602084013561201081611d95565b929592945050506040919091013590565b60006020828403121561203357600080fd5b8135610fef81611d95565b6020808252825182820181905260009190848201906040850190845b818110156120765783518352928401929184019160010161205a565b50909695505050505050565b60006020828403121561209457600080fd5b5035919050565b600080604083850312156120ae57600080fd5b82356120b981611d95565b915060208301356120c981611d95565b809150509250929050565b6000602082840312156120e657600080fd5b813567ffffffffffffffff8111156120fd57600080fd5b61210984828501611e1d565b949350505050565b600181811c9082168061212557607f821691505b60208210810361214557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561217357600080fd5b8151610fef81611d95565b634e487b7160e01b600052601160045260246000fd5b6000600182016121a6576121a661217e565b5060010190565b600082198211156121c0576121c061217e565b500190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008282101561220c5761220c61217e565b500390565b60008261222e57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561224d5761224d61217e565b500290565b6000816122615761226161217e565b506000190190565b634e487b7160e01b600052603160045260246000fdfea264697066735822122065be49728e5b667a52d9bab57864a350dbee921f4c512ce3c75f2a3570b3d3ca64736f6c634300080f0033000000000000000000000000428119b77275cdbcf6ed3d1d76b51d37019caaee000000000000000000000000d3771e1aad236a9ff04b4ecef91ab88f45eabcc4

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101f05760003560e01c8063715018a61161010f578063bdcf604a116100a2578063dd62ed3e11610071578063dd62ed3e14610429578063ddf9a93d14610462578063e449f34114610475578063f2fde38b1461048857600080fd5b8063bdcf604a146103df578063c3b2d337146103ec578063c41a360a146103f5578063d1058e591461042157600080fd5b806395d89b41116100de57806395d89b411461039e578063a457c2d7146103a6578063a9059cbb146103b9578063b9c169d7146103cc57600080fd5b8063715018a61461036557806379cc67901461036d5780638cc62250146103805780638da5cb5b1461038d57600080fd5b806339509351116101875780634bf94070116101565780634bf94070146102e3578063558a496a146103165780636c19e7831461032957806370a082311461033c57600080fd5b80633950935114610295578063399080ec146102a85780633b8105b3146102c857806342966c68146102d057600080fd5b806322f4596f116101c357806322f4596f1461025d57806323b872dd14610266578063313ce56714610279578063341e7dcc1461028857600080fd5b806306fdde03146101f5578063095ea7b31461021357806318160ddd146102365780632139096d14610248575b600080fd5b6101fd61049b565b60405161020a9190611d40565b60405180910390f35b610226610221366004611daa565b61052d565b604051901515815260200161020a565b6002545b60405190815260200161020a565b61025b610256366004611ee9565b610544565b005b61023a60065481565b610226610274366004611fe0565b610951565b6040516012815260200161020a565b6008546102269060ff1681565b6102266102a3366004611daa565b6109fb565b6102bb6102b6366004612021565b610a37565b60405161020a919061203e565b61025b610aa3565b61025b6102de366004612082565b610ae1565b6102fe73f3a823bf459b00702904c9ba90bfa19e0478726181565b6040516001600160a01b03909116815260200161020a565b61025b610324366004612021565b610aee565b61025b610337366004612021565b610b3a565b61023a61034a366004612021565b6001600160a01b031660009081526020819052604090205490565b61025b610b86565b61025b61037b366004611daa565b610bbc565b61023a651f9465b8ab8e81565b6005546001600160a01b03166102fe565b6101fd610c42565b6102266103b4366004611daa565b610c51565b6102266103c7366004611daa565b610cea565b61023a6103da366004612021565b610cf7565b61023a653f28cb71571c81565b61023a60075481565b6102fe610403366004612082565b6000908152600960205260409020600101546001600160a01b031690565b61025b610dc1565b61023a61043736600461209b565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b61023a610470366004612082565b610f8a565b61025b6104833660046120d4565b610ff6565b61025b610496366004612021565b6111ae565b6060600380546104aa90612111565b80601f01602080910402602001604051908101604052809291908181526020018280546104d690612111565b80156105235780601f106104f857610100808354040283529160200191610523565b820191906000526020600020905b81548152906001019060200180831161050657829003601f168201915b5050505050905090565b600061053a338484611246565b5060015b92915050565b60065460025411156105975760405162461bcd60e51b81526020600482015260176024820152764e4f5f4d4f52455f4d494e5441424c455f535550504c5960481b60448201526064015b60405180910390fd5b336000908152600b602052604090205442116105f55760405162461bcd60e51b815260206004820152601e60248201527f43414e4e4f545f5452414e534143545f5448455f53414d455f424c4f434b0000604482015260640161058e565b3233146106445760405162461bcd60e51b815260206004820152601d60248201527f434f4e5452414354535f4e4f545f414c4c4f5745445f544f5f4d494e54000000604482015260640161058e565b60085460ff166106965760405162461bcd60e51b815260206004820152601960248201527f5354414b494e475f49535f4e4f545f5945545f41435449564500000000000000604482015260640161058e565b6040516bffffffffffffffffffffffff193360601b1660208201526001600160c01b031960c086901b166034820152600090603c016040516020818303038152906040528051906020012090506106ed848261136a565b6107395760405162461bcd60e51b815260206004820152601960248201527f434f4e54524143545f4d494e545f4e4f545f414c4c4f57454400000000000000604482015260640161058e565b60005b86518110156109485760008782815181106107595761075961214b565b6020908102919091010151600d546040516331a9108f60e11b81526004810183905291925033916001600160a01b0390911690636352211e90602401602060405180830381865afa1580156107b2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d69190612161565b6001600160a01b031614801561080457506000818152600960205260409020600101546001600160a01b0316155b6108455760405162461bcd60e51b8152602060048201526012602482015271544f4b454e5f49535f4e4f545f594f55525360701b604482015260640161058e565b600d546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401600060405180830381600087803b15801561089757600080fd5b505af11580156108ab573d6000803e3d6000fd5b5050336000818152600a602090815260408083208054600181810183559185528385200188905587845260099092529091204281550180546001600160a01b03191690911790555085905084838181106109075761090761214b565b60009384526009602090815260408086209282029490940135600290920191909155338452600b90525090204290558061094081612194565b91505061073c565b50505050505050565b600061095e848484611394565b6001600160a01b0384166000908152600160209081526040808320338452909152902054828110156109e35760405162461bcd60e51b815260206004820152602860248201527f45524332303a207472616e7366657220616d6f756e74206578636565647320616044820152676c6c6f77616e636560c01b606482015260840161058e565b6109f08533858403611246565b506001949350505050565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909161053a918590610a329086906121ad565b611246565b6001600160a01b0381166000908152600a6020908152604091829020805483518184028101840190945280845260609392830182828015610a9757602002820191906000526020600020905b815481526020019060010190808311610a83575b50505050509050919050565b6005546001600160a01b03163314610acd5760405162461bcd60e51b815260040161058e906121c5565b6008805460ff19811660ff90911615179055565b610aeb3382611564565b50565b6005546001600160a01b03163314610b185760405162461bcd60e51b815260040161058e906121c5565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b03163314610b645760405162461bcd60e51b815260040161058e906121c5565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6005546001600160a01b03163314610bb05760405162461bcd60e51b815260040161058e906121c5565b610bba60006116b2565b565b6000610bc88333610437565b905081811015610c265760405162461bcd60e51b8152602060048201526024808201527f45524332303a206275726e20616d6f756e74206578636565647320616c6c6f77604482015263616e636560e01b606482015260840161058e565b610c338333848403611246565b610c3d8383611564565b505050565b6060600480546104aa90612111565b3360009081526001602090815260408083206001600160a01b038616845290915281205482811015610cd35760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161058e565b610ce03385858403611246565b5060019392505050565b600061053a338484611394565b6001600160a01b0381166000908152600a60209081526040808320805482518185028101850190935280835284938493929190830182828015610d5957602002820191906000526020600020905b815481526020019060010190808311610d45575b5050505050905060005b8151811015610db8576000828281518110610d8057610d8061214b565b602002602001015190506000610d9582611704565b9050610da181866121ad565b945050508080610db090612194565b915050610d63565b50909392505050565b6006546002541115610e0f5760405162461bcd60e51b81526020600482015260176024820152764e4f5f4d4f52455f4d494e5441424c455f535550504c5960481b604482015260640161058e565b336000908152600a6020526040902054610e5c5760405162461bcd60e51b815260206004820152600e60248201526d4e4f5f5354414b45445f5941474960901b604482015260640161058e565b336000908152600a6020908152604080832080548251818502810185019093528083528493830182828015610eb057602002820191906000526020600020905b815481526020019060010190808311610e9c575b5050505050905060005b8151811015610f7b576000828281518110610ed757610ed761214b565b602090810291909101810151600081815260099092526040909120600101549091506001600160a01b03163314610f3c5760405162461bcd60e51b81526020600482015260096024820152682737ba1027bbb732b960b91b604482015260640161058e565b6000610f4782611704565b60008381526009602052604090204290559050610f6481866121ad565b945050508080610f7390612194565b915050610eba565b50610f863383611937565b5050565b6000818152600960205260408120600101546001600160a01b0316610fe45760405162461bcd60e51b815260206004820152601060248201526f1513d2d15397d393d517d0955492515160821b604482015260640161058e565b6000610fef83611704565b9392505050565b336000908152600a60205260409020546110435760405162461bcd60e51b815260206004820152600e60248201526d4e4f5f5354414b45445f5941474960901b604482015260640161058e565b6000805b82518110156111985760008382815181106110645761106461214b565b602090810291909101810151600081815260099092526040909120600101549091506001600160a01b031633146110c95760405162461bcd60e51b81526020600482015260096024820152682737ba1027bbb732b960b91b604482015260640161058e565b600d546040516323b872dd60e01b8152306004820152336024820152604481018390526001600160a01b03909116906323b872dd90606401600060405180830381600087803b15801561111b57600080fd5b505af115801561112f573d6000803e3d6000fd5b50505050600061113e82611704565b905061114a81856121ad565b336000908152600a602052604090209094506111669083611a16565b50600090815260096020526040902060010180546001600160a01b03191690558061119081612194565b915050611047565b5060065460025411610f8657610f863382611937565b6005546001600160a01b031633146111d85760405162461bcd60e51b815260040161058e906121c5565b6001600160a01b03811661123d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161058e565b610aeb816116b2565b6001600160a01b0383166112a85760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161058e565b6001600160a01b0382166113095760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161058e565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600c546000906001600160a01b03166113838385611ad4565b6001600160a01b0316149392505050565b6001600160a01b0383166113f85760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161058e565b6001600160a01b03821661145a5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161058e565b6001600160a01b038316600090815260208190526040902054818110156114d25760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161058e565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906115099084906121ad565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161155591815260200190565b60405180910390a35b50505050565b6001600160a01b0382166115c45760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161058e565b6001600160a01b038216600090815260208190526040902054818110156116385760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161058e565b6001600160a01b03831660009081526020819052604081208383039055600280548492906116679084906121fa565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000818152600960205260408120600201548190819060010361172e5750653f28cb71571c611737565b50651f9465b8ab8e5b600084815260096020526040812054620151809061175590426121fa565b61175f9190612211565b61177190670de0b6b3a7640000612233565b9050600e8111156117f457600085815260096020526040812054839061179790426121fa565b6117a19190612233565b90506000620f42406117b484600e612233565b6117be9190612211565b6117d090670de0b6b3a76400006121ad565b9050670de0b6b3a76400006117e58284612233565b6117ef9190612211565b945050505b601e81111561187557600085815260096020526040812054839061181890426121fa565b6118229190612233565b90506000620f424061183584601c612233565b61183f9190612211565b61185190670de0b6b3a76400006121ad565b9050670de0b6b3a76400006118668284612233565b6118709190612211565b945050505b605a8111156118f657600085815260096020526040812054839061189990426121fa565b6118a39190612233565b90506000620f42406118b6846062612233565b6118c09190612211565b6118d290670de0b6b3a76400006121ad565b9050670de0b6b3a76400006118e78284612233565b6118f19190612211565b945050505b600e811015610db857600085815260096020526040902054829061191a90426121fa565b6119249190612233565b61192e90846121ad565b95945050505050565b6001600160a01b03821661198d5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161058e565b806002600082825461199f91906121ad565b90915550506001600160a01b038216600090815260208190526040812080548392906119cc9084906121ad565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b815460005b8181101561155e5782848281548110611a3657611a3661214b565b906000526020600020015403611ac25781611a5081612252565b92505081811015611a9757838281548110611a6d57611a6d61214b565b9060005260206000200154848281548110611a8a57611a8a61214b565b6000918252602090912001555b83805480611aa757611aa7612269565b6001900381819060005260206000200160009055905561155e565b80611acc81612194565b915050611a1b565b60008151604103611b075760208201516040830151606084015160001a611afd86828585611b76565b935050505061053e565b8151604003611b2e5760208201516040830151611b25858383611d16565b9250505061053e565b60405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161058e565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115611bf35760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161058e565b8360ff16601b1480611c0857508360ff16601c145b611c5f5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161058e565b6040805160008082526020820180845288905260ff871692820192909252606081018590526080810184905260019060a0016020604051602081039080840390855afa158015611cb3573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661192e5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161058e565b60006001600160ff1b03821660ff83901c601b01611d3686828785611b76565b9695505050505050565b600060208083528351808285015260005b81811015611d6d57858101830151858201604001528201611d51565b81811115611d7f576000604083870101525b50601f01601f1916929092016040019392505050565b6001600160a01b0381168114610aeb57600080fd5b60008060408385031215611dbd57600080fd5b8235611dc881611d95565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff81118282101715611e1557611e15611dd6565b604052919050565b600082601f830112611e2e57600080fd5b8135602067ffffffffffffffff821115611e4a57611e4a611dd6565b8160051b611e59828201611dec565b9283528481018201928281019087851115611e7357600080fd5b83870192505b84831015611e9257823582529183019190830190611e79565b979650505050505050565b60008083601f840112611eaf57600080fd5b50813567ffffffffffffffff811115611ec757600080fd5b6020830191508360208260051b8501011115611ee257600080fd5b9250929050565b600080600080600060808688031215611f0157600080fd5b853567ffffffffffffffff80821115611f1957600080fd5b611f2589838a01611e1d565b965060209150818801358181168114611f3d57600080fd5b9550604088013581811115611f5157600080fd5b8801601f81018a13611f6257600080fd5b803582811115611f7457611f74611dd6565b611f86601f8201601f19168501611dec565b8181528b85838501011115611f9a57600080fd5b81858401868301376000918101909401525090935060608701359080821115611fc257600080fd5b50611fcf88828901611e9d565b969995985093965092949392505050565b600080600060608486031215611ff557600080fd5b833561200081611d95565b9250602084013561201081611d95565b929592945050506040919091013590565b60006020828403121561203357600080fd5b8135610fef81611d95565b6020808252825182820181905260009190848201906040850190845b818110156120765783518352928401929184019160010161205a565b50909695505050505050565b60006020828403121561209457600080fd5b5035919050565b600080604083850312156120ae57600080fd5b82356120b981611d95565b915060208301356120c981611d95565b809150509250929050565b6000602082840312156120e657600080fd5b813567ffffffffffffffff8111156120fd57600080fd5b61210984828501611e1d565b949350505050565b600181811c9082168061212557607f821691505b60208210810361214557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b60006020828403121561217357600080fd5b8151610fef81611d95565b634e487b7160e01b600052601160045260246000fd5b6000600182016121a6576121a661217e565b5060010190565b600082198211156121c0576121c061217e565b500190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60008282101561220c5761220c61217e565b500390565b60008261222e57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561224d5761224d61217e565b500290565b6000816122615761226161217e565b506000190190565b634e487b7160e01b600052603160045260246000fdfea264697066735822122065be49728e5b667a52d9bab57864a350dbee921f4c512ce3c75f2a3570b3d3ca64736f6c634300080f0033

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

000000000000000000000000428119b77275cdbcf6ed3d1d76b51d37019caaee000000000000000000000000d3771e1aad236a9ff04b4ecef91ab88f45eabcc4

-----Decoded View---------------
Arg [0] : _signer (address): 0x428119b77275CDBCF6Ed3D1D76b51D37019cAaee
Arg [1] : _yagiContract (address): 0xD3771E1Aad236a9fF04B4EceF91AB88f45EaBCC4

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 000000000000000000000000428119b77275cdbcf6ed3d1d76b51d37019caaee
Arg [1] : 000000000000000000000000d3771e1aad236a9ff04b4ecef91ab88f45eabcc4


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.