ETH Price: $3,205.23 (+1.87%)
Gas: 1.53 Gwei
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Set Approval For...199888772024-05-31 9:19:35243 days ago1717147175IN
0x7a273D91...096829b58
0 ETH0.0006361213.78002064
Set Approval For...166975242023-02-24 10:12:23705 days ago1677233543IN
0x7a273D91...096829b58
0 ETH0.0012789927.70604145
Set Approval For...163800812023-01-11 0:47:35750 days ago1673398055IN
0x7a273D91...096829b58
0 ETH0.0008685918.81577855
Set Approval For...150927002022-07-07 2:15:41938 days ago1657160141IN
0x7a273D91...096829b58
0 ETH0.0008306917.99482023
Set Approval For...150138082022-06-23 16:24:03951 days ago1656001443IN
0x7a273D91...096829b58
0 ETH0.0021479946.53056394
Set Approval For...150017892022-06-21 10:14:14953 days ago1655806454IN
0x7a273D91...096829b58
0 ETH0.0008313218.00842915
Set Approval For...149896182022-06-19 7:39:36955 days ago1655624376IN
0x7a273D91...096829b58
0 ETH0.000852518.46727403
Set Approval For...148696482022-05-30 0:51:32976 days ago1653871892IN
0x7a273D91...096829b58
0 ETH0.0011981325.90733399
Set Approval For...148696462022-05-30 0:51:20976 days ago1653871880IN
0x7a273D91...096829b58
0 ETH0.0012402926.81892413
Set Approval For...148208942022-05-22 2:34:24984 days ago1653186864IN
0x7a273D91...096829b58
0 ETH0.0007733516.72218867
Set Approval For...147620872022-05-12 16:19:35993 days ago1652372375IN
0x7a273D91...096829b58
0 ETH0.00541719117.16662055
Set Approval For...147394602022-05-09 1:15:41997 days ago1652058941IN
0x7a273D91...096829b58
0 ETH0.0008723618.86318478
Set Approval For...147234332022-05-06 12:04:09999 days ago1651838649IN
0x7a273D91...096829b58
0 ETH0.0020717544.7975368
Set Approval For...147200652022-05-05 23:14:331000 days ago1651792473IN
0x7a273D91...096829b58
0 ETH0.0018477239.96367531
Set Approval For...147081052022-05-04 1:37:591002 days ago1651628279IN
0x7a273D91...096829b58
0 ETH0.00190141.1055047
Set Approval For...147055452022-05-03 15:50:541002 days ago1651593054IN
0x7a273D91...096829b58
0 ETH0.00410688.78423148
Set Approval For...146909612022-05-01 8:40:301004 days ago1651394430IN
0x7a273D91...096829b58
0 ETH0.0027497959.45888992
Transfer From146820622022-04-29 23:11:061006 days ago1651273866IN
0x7a273D91...096829b58
0 ETH0.0045380659.94174401
Set Approval For...146676662022-04-27 16:46:211008 days ago1651077981IN
0x7a273D91...096829b58
0 ETH0.0025695555.56161941
Set Approval For...146663352022-04-27 11:59:281008 days ago1651060768IN
0x7a273D91...096829b58
0 ETH0.0018359639.69913262
Safe Transfer Fr...146585282022-04-26 6:10:311010 days ago1650953431IN
0x7a273D91...096829b58
0 ETH0.0020659335.28741543
Transfer From146546952022-04-25 15:54:121010 days ago1650902052IN
0x7a273D91...096829b58
0 ETH0.0062560465.11621568
Transfer From146490912022-04-24 18:43:021011 days ago1650825782IN
0x7a273D91...096829b58
0 ETH0.0029891439.48256836
Transfer From146490692022-04-24 18:38:191011 days ago1650825499IN
0x7a273D91...096829b58
0 ETH0.002862448.83989331
Transfer From146242052022-04-20 20:58:451015 days ago1650488325IN
0x7a273D91...096829b58
0 ETH0.0027581847.07129224
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block
From
To
146049202022-04-17 20:33:221018 days ago1650227602
0x7a273D91...096829b58
12.4 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VaultPass

Compiler Version
v0.8.12+commit.f00d7308

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion
File 1 of 22 : VaultPass.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

import {ERC721OwnershipBasedStaking} from "../token/ERC721/extensions/ERC721OwnershipBasedStaking.sol";
import {ERC721Royalty} from "../token/ERC721/extensions/ERC721Royalty.sol";
import {ERC721} from "../token/ERC721/ERC721.sol";
import {MintGate} from "../token/libraries/MintGate.sol";
import {Withdrawable} from "../utilities/Withdrawable.sol";

contract VaultPass is ERC721OwnershipBasedStaking, ERC721Royalty, Withdrawable {

    uint256 public constant MAX_MINT_PER_WALLET = 100;

    uint256 public constant PRICE_START = 0.2 ether;
    uint256 public constant PRICE_STEP = 0.04 ether;
    uint256 public constant PRICE_STEP_INTERVAL = 100;


    constructor() ERC721OwnershipBasedStaking("Vault Pass", "vault-pass") ERC721Royalty(_msgSender(), 750) {
        setConfig(ERC721OwnershipBasedStaking.Config({
            fusible: true,
            listingFee: 12,
            resetOnTransfer: false,
            rewardsPerWeek: 3,
            // ( Rewards per week ) * ( 4 weeks ) * ( 6 months ) * ( x4 Minter Multiplier )
            upgradeFee: (3 * 4 * 3 * 4)
        }));
        setMultipliers(ERC721OwnershipBasedStaking.Multipliers({
            level: 1000,
            max: 80000,
            minter: 40000,
            // Once 'MINTER_MULTIPLIER' is lost it should take 4 months to regain
            month: 10000
        }));
    }


    function _afterTokenTransfers(address from, address to, uint256 startTokenId, uint256 quantity) internal override(ERC721, ERC721OwnershipBasedStaking) virtual {
        super._afterTokenTransfers(from, to, startTokenId, quantity);
    }

    function getPrice() public view returns (uint256) {
        return PRICE_START + (( totalMinted() / PRICE_STEP_INTERVAL ) * PRICE_STEP);
    }

    function mint(uint256 quantity) external nonReentrant payable {
        address buyer = _msgSender();

        MintGate.price(buyer, getPrice(), quantity, msg.value);
        MintGate.supply(9999, MAX_MINT_PER_WALLET, uint256(_owner(buyer).minted), quantity);
        MintGate.time(0, 0);

        _safeMint(buyer, quantity);
    }

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

    function withdraw() external onlyOwner nonReentrant whenNotPaused {
        _withdraw(owner(), address(this).balance);
    }
}

File 2 of 22 : ERC721OwnershipBasedStaking.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {Admin} from "../../../utilities/Admin.sol";
import {CallerNotOwnerNorApproved, ERC721} from "../ERC721.sol";

error AmountExceedsAccountBalance(string method);
error FeatureIsDisabled();
error ZeroRewards();

abstract contract ERC721OwnershipBasedStaking is Admin, ERC721, ReentrancyGuard {

    event Charged(uint256 indexed tokenId, uint64 amount, address indexed sender);
    event Deposited(uint256 indexed tokenId, uint64 amount, address indexed sender);
    event LevelUpdated(uint256 indexed tokenId, uint64 current, uint64 previous);


    struct Account {
        uint64 balance;
        uint64 claimedAt;
        uint64 level;
    }

    struct Config {
        // If true NFT can be fused with another within the collection
        bool fusible;
        // Fee charged ( in staking rewards ) when creating a token swap for staking rewards
        uint64 listingFee;
        // Reset staking rewards on transfer if true, otherwise false
        bool resetOnTransfer;
        // Staking rewards earned per week
        uint64 rewardsPerWeek;
        // Fee charged to upgrade the level of NFT
        // - Grants access to better perks in the system
        uint64 upgradeFee;
    }

    struct Multipliers {
        // Level staking multiplier ( in Basis Points )
        uint64 level;
        // Max staking multiplier ( in Basis Points )
        uint64 max;
        // Original minter multiplier ( in Basis Points )
        uint64 minter;
        // Multiplier per month owned ( in Basis Points )
        uint64 month;
    }


    mapping(uint256 => Account) private _accounts;

    Config private _config;

    Multipliers private _multipliers;



    constructor(string memory name_, string memory symbol_) ERC721(name_, symbol_) ReentrancyGuard() { }


    function _afterTokenTransfers(address from, address to, uint256 startTokenId, uint256 quantity) internal override(ERC721) virtual {
        super._afterTokenTransfers(from, to, startTokenId, quantity);

        if (!_config.resetOnTransfer) {
            return;
        }

        for (uint256 i = 0; i < quantity; i++) {
            _accounts[startTokenId + i].balance = 0;
        }
    }

    function _charge(uint256 tokenId, uint64 amount, string memory method) private returns (uint256) {
        unchecked {
            Account storage account = _accounts[tokenId];

            if (account.balance < amount) {
                revert AmountExceedsAccountBalance({ method: method });
            }

            account.balance -= amount;

            return uint256(account.balance);
        }
    }

    function calculateStakingRewards(uint256 tokenId) public view returns (uint256) {
        Account memory account = _accounts[tokenId];
        Multipliers memory m = _multipliers;
        Token memory token = _token(tokenId);

        unchecked {
            uint64 claimedAt = account.claimedAt;
            uint64 timestamp = uint64(block.timestamp);

            if (claimedAt < token.updatedAt) {
                claimedAt = token.updatedAt;
            }

            if (timestamp < claimedAt) {
                return 0;
            }

            // Convert level to bonus in Basis Points ( Level 1 * 1000 = 10% bonus )
            uint64 multiplier = 10000 + (account.level * m.level);
            uint64 points = _config.rewardsPerWeek * ((timestamp - claimedAt) / uint64(1 weeks));

            // Apply original minter/owner multiplier
            if (token.state == ERC721.STATE_MINTED) {
                multiplier += m.minter;
            }

            multiplier += m.month * ((timestamp - token.updatedAt) / uint64(4 weeks));

            if (multiplier > m.max) {
                multiplier = m.max;
            }

            return uint256(points + (points * multiplier / 10000));
        }
    }

    function charge(uint256 tokenId, uint64 amount) external nonReentrant returns (uint256) {
        address sender = _msgSender();

        if (!_isAdmin(sender)) {
            revert CallerNotOwnerNorApproved({ method: 'charge' });
        }

        emit Charged(tokenId, amount, sender);

        return _charge(tokenId, amount, 'charge');
    }

    function claimStakingRewards(uint256 tokenId) external nonReentrant returns (uint256) {
        address sender = _msgSender();

        if (!_isApprovedOrOwner(tokenId, sender)) {
            revert CallerNotOwnerNorApproved({ method: 'claimStakingRewards' });
        }

        unchecked {
            uint256 rewards = calculateStakingRewards(tokenId);

            if (rewards == 0) {
                revert ZeroRewards();
            }

            Account storage account = _accounts[tokenId];

            account.balance += uint64(rewards);
            account.claimedAt = uint64(block.timestamp);

            return uint256(account.balance);
        }
    }

    function config() external view returns (bool, uint64, bool, uint64, uint64) {
        return (
            _config.fusible,
            _config.listingFee,
            _config.resetOnTransfer,
            _config.rewardsPerWeek,
            _config.upgradeFee
        );
    }

    function deposit(uint256 tokenId, uint64 amount) private returns (uint64) {
        address sender = _msgSender();

        if (!_isAdmin(sender)) {
            revert CallerNotOwnerNorApproved({ method: 'deposit' });
        }

        emit Deposited(tokenId, amount, sender);

        unchecked {
            Account storage account = _accounts[tokenId];

            account.balance += amount;

            return account.balance;
        }
    }

    function fuse(uint256 a, uint256 b) external nonReentrant virtual {
        if (!_config.fusible) {
            revert FeatureIsDisabled();
        }

        address sender = _msgSender();

        if (!_isAdmin(sender) && (ownerOf(a) != sender || ownerOf(b) != sender)) {
            revert CallerNotOwnerNorApproved({ method: 'fuse' });
        }

        Account storage A = _accounts[a];

        // Balances shouldn't be merged during fusing. Fused passes would become
        // too OP. They would have the ability to stake -> fuse -> continously
        // sweep the vault.
        // - Primary purpose of fusing should be to achieve max multiplier
        //   and access items available to rarer passes.
        // - In order to gain the above perks you will have to sacrifice the
        //   staking rewards in pass b.
        unchecked {
            uint64 previous = A.level;

            A.level += _accounts[b].level + 1;

            emit LevelUpdated(a, A.level, previous);
        }

        _burn(b, false);

        delete _accounts[b];
    }

    function multipliers() external view returns (uint64, uint64, uint64, uint64) {
        return (
            _multipliers.level,
            _multipliers.max,
            _multipliers.minter,
            _multipliers.month
        );
    }

    function rewardsOf(uint256 tokenId) external view returns (uint64) {
        return _accounts[tokenId].balance;
    }

    function rewardsOf(uint256[] memory tokenIds) external view returns (uint64[] memory) {
        uint64[] memory balances;
        uint256 n = tokenIds.length;

        for (uint256 i = 0; i < n; i++) {
            balances[i] = _accounts[tokenIds[i]].balance;
        }

        return balances;
    }

    function setConfig(Config memory data) onlyOwner public {
        _config = data;
    }

    function setMultipliers(Multipliers memory data) onlyOwner public {
        _multipliers = data;
    }

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

    function upgrade(uint256 tokenId) external nonReentrant virtual {
        uint64 fee = _config.upgradeFee;

        if (fee == 0) {
            revert FeatureIsDisabled();
        }

        address sender = _msgSender();

        if (ownerOf(tokenId) != sender) {
            revert CallerNotOwnerNorApproved({ method: 'upgrade' });
        }

        _charge(tokenId, fee, 'upgrade');

        unchecked {
            Account storage account = _accounts[tokenId];
            uint64 previous = account.level;

            account.level += 1;

            emit LevelUpdated(tokenId, account.level, previous);
        }
    }
}

File 3 of 22 : ERC721Royalty.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

import {ERC2981} from "../../ERC2981/ERC2981.sol";
import {ERC721} from "../ERC721.sol";

abstract contract ERC721Royalty is ERC721, ERC2981 {

    constructor(address receiver, uint256 fee) ERC2981(receiver, fee) {}


    function setDefaultRoyaltyInfo(address receiver, uint256 fee) internal onlyOwner {
        _setDefaultRoyaltyInfo(receiver, fee);
    }

    function setRoyaltyInfo(uint256 tokenId, address receiver, uint256 fee) internal onlyOwner {
        _setRoyaltyInfo(tokenId, receiver, fee);
    }

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

File 4 of 22 : ERC721.sol
// SPDX-License-Identifier: MIT
// Fork of ERC721A created by Chiru Labs
pragma solidity ^0.8.12;

import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Pausable} from "@openzeppelin/contracts/security/Pausable.sol";
import {IERC721} from "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import {IERC721Metadata} from "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol";
import {IERC721Receiver} from "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol";
import {ERC165, IERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol";
import {Address} from "@openzeppelin/contracts/utils/Address.sol";
import {Context} from "@openzeppelin/contracts/utils/Context.sol";
import {Strings} from "@openzeppelin/contracts/utils/Strings.sol";

error ApproveToCaller();
error ApprovalToCurrentOwner();
error CallerNotOwnerNorApproved(string method);
error MethodReceivedZeroAddress(string method);
error MintZeroQuantity();
error QueryForNonexistentToken(string method);
error TokenQueryProducedVariant();
error TransferFromIncorrectOwner();
error TransferToNonERC721ReceiverImplementer();

/**
 * 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 tokenId cannot exceed 2**256 - 1 (max value of uint256).
 */
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, Ownable, Pausable {
    using Address for address;
    using Strings for uint256;


    uint32 public constant MINT_BATCH_SIZE = 8;

    uint32 public constant STATE_BURNED = 1;
    uint32 public constant STATE_MINTED = 2;
    uint32 public constant STATE_TRANSFERRED = 3;


    struct Approvals {
        // Owner Address => [Operator Address => Approved if true, otherwise false]
        mapping(address => mapping(address => bool)) operators;

        // Token Id => Approved Address
        mapping(uint256 => address) tokens;
    }

    struct Owner {
        uint64 balance;
        uint64 burned;
        uint64 minted;
        uint64 misc;
    }

    struct Token {
        address owner;
        uint32 state;
        uint64 updatedAt;
    }


    string internal _baseURI;

    uint256 private _burned;

    string internal _name;

    uint256 private _nextId;

    string internal _symbol;


    // Namespaced Approval Data
    Approvals private _approvals;

    // Owner Address => Owner Data
    mapping(address => Owner) private _owners;

    // Token Id => Token Data
    mapping(uint256 => Token) private _tokens;

    mapping(uint256 => string) private _tokenURI;


    constructor(string memory name_, string memory symbol_) Ownable() Pausable() {
        _name = name_;
        _nextId = _startTokenId();
        _symbol = symbol_;
    }


    /**
     * @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 tokenId 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 Approve `to` to operate on `tokenId`
     *
     * Emits a {Approval} event.
     */
    function _approve(address from, address to, uint256 tokenId) private {
        _approvals.tokens[tokenId] = to;

        emit Approval(from, to, tokenId);
    }

    /**
     * @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 tokenId 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 Destroys `tokenId`.
     * The approval is cleared when the token is burned.
     *
     * Requirements:
     *
     * - `tokenId` must exist.
     *
     * Emits a {Transfer} event.
     */
    function _burn(uint256 tokenId, bool verifyApproved) internal virtual whenNotPaused {
        Token memory token = _token(tokenId);

        if (verifyApproved && !_isApprovedOrOwner(tokenId, _msgSender())) {
            revert CallerNotOwnerNorApproved({ method: '_burn' });
        }

        _beforeTokenTransfers(token.owner, address(0), tokenId, 1);

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

        // Update next 'tokenId' if owned by 'from'
        _setDeferredOwnership(tokenId, token);

        // Underflow of the sender's balance is impossible because we check for
        // token above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            Owner storage owner = _owners[token.owner];
            owner.balance -= 1;
            owner.burned += 1;

            _burned += 1;
        }

        // Keep track of last owner
        _tokens[tokenId] = Token({
            owner: token.owner,
            state: STATE_BURNED,
            updatedAt: uint64(block.timestamp)
        });

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

        _afterTokenTransfers(token.owner, address(0), tokenId, 1);
    }

    /**
     * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract.
     *
     * @param from address representing the previous owner of the given token tokenId
     * @param to target address that will receive the tokens
     * @param tokenId uint256 tokenId 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 IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) {
            return retval == IERC721Receiver(to).onERC721Received.selector;
        }
        catch (bytes memory reason) {
            if (reason.length == 0) {
                revert TransferToNonERC721ReceiverImplementer();
            }

            assembly {
                revert(add(32, reason), mload(reason))
            }
        }
    }

    /**
     * @dev Returns whether `tokenId` exists.
     *
     * Tokens start existing when they are minted (`_mint`),
     */
    function _exists(uint256 tokenId) internal view returns (bool) {
        return (tokenId + 1) > _startTokenId() && tokenId < _nextId && _tokens[tokenId].state != STATE_BURNED;
    }

    function _isApprovedOrOwner(uint256 tokenId, address sender) internal view returns (bool) {
        address owner = ownerOf(tokenId);

        return sender == owner || getApproved(tokenId) == sender || isApprovedForAll(owner, sender);
    }

    /**
     * @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, bytes memory data, bool safe) internal whenNotPaused {
        uint256 start = _nextId;

        if (to == address(0)) {
            revert MethodReceivedZeroAddress({ method: '_mint' });
        }

        if (quantity == 0) {
            revert MintZeroQuantity();
        }

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

        // Overflows are incredibly unrealistic.
        // balance or minted overflow if current value of either + quantity > 1.8e19 (2**64) - 1
        // tokenId overflows if _nextId + quantity > 1.2e77 (2**256) - 1
        unchecked {
            Owner storage owner = _owners[to];
            owner.balance += uint64(quantity);
            owner.minted += uint64(quantity);

            uint256 batches = quantity / MINT_BATCH_SIZE;

            if (quantity % MINT_BATCH_SIZE != 0) {
                batches += 1;
            }

            for (uint256 batch = 0; batch < batches; batch++) {
                _tokens[start + (MINT_BATCH_SIZE * batch)] = Token({
                    owner: to,
                    state: STATE_MINTED,
                    updatedAt: uint64(block.timestamp)
                });
            }

            uint256 current = start;
            uint256 last = current + quantity;

            if (safe && to.isContract()) {
                do {
                    emit Transfer(address(0), to, current);

                    if (!_checkContractOnERC721Received(address(0), to, current++, data)) {
                        revert TransferToNonERC721ReceiverImplementer();
                    }
                } while (current != last);

                // Reentrancy protection
                if (_nextId != start) {
                    revert();
                }
            }
            else {
                do {
                    emit Transfer(address(0), to, current++);
                } while (current != last);
            }

            _nextId = current;
        }

        _afterTokenTransfers(address(0), to, start, quantity);
    }

    function _owner(address owner) internal view returns (Owner memory) {
        return _owners[owner];
    }

    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 {
        _mint(to, quantity, data, true);
    }

    /**
     * If the token slot of tokenId+1 is not explicitly set, that means the
     * transfer initiator owns it. Set the slot of tokenId+1 explicitly in
     * storage to maintain correctness for ownerOf(tokenId+1) calls.
     */
    function _setDeferredOwnership(uint256 tokenId, Token memory token) private {
        uint256 next = tokenId + 1;

        if (_exists(next) && _tokens[next].owner == address(0)) {
            _tokens[next] = token;
        }
    }

    function _startTokenId() internal view virtual returns (uint256) {
        return 1;
    }

    /**
     * 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 _token(uint256 tokenId) internal view returns (Token memory) {
        if (!_exists(tokenId)) {
            revert QueryForNonexistentToken({ method: '_token' });
        }

        unchecked {
            uint256 batch = MINT_BATCH_SIZE + 1;
            uint256 n = _startTokenId();

            if (tokenId > batch) {
                n = tokenId - batch;
            }

            for (uint256 i = tokenId; i > n; i--) {
                Token memory token = _tokens[i];

                if (token.owner != address(0)) {
                    return token;
                }
            }
        }

        revert TokenQueryProducedVariant();
    }

    /**
     * @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 whenNotPaused {
        Token memory token = _token(tokenId);

        if (to == address(0)) {
            revert MethodReceivedZeroAddress({ method: '_transfer' });
        }

        if (token.owner != from) {
            revert TransferFromIncorrectOwner();
        }

        if (!_isApprovedOrOwner(tokenId, _msgSender())) {
            revert CallerNotOwnerNorApproved({ method: '_transfer' });
        }

        _beforeTokenTransfers(from, to, tokenId, 1);

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

        // Update next tokenId if owned by 'from'
        _setDeferredOwnership(tokenId, token);

        // Underflow of the sender's balance is impossible because we check for
        // token above and the recipient's balance can't realistically overflow.
        // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256.
        unchecked {
            _owners[from].balance -= 1;
            _owners[to].balance += 1;
        }

        _tokens[tokenId] = Token({
            owner: to,
            state: uint32(STATE_TRANSFERRED),
            updatedAt: uint64(block.timestamp)
        });

        emit Transfer(from, to, tokenId);

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

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

        if (to == owner) {
            revert ApprovalToCurrentOwner();
        }

        if (sender != owner && !isApprovedForAll(owner, sender)) {
            revert CallerNotOwnerNorApproved({ method: 'approve' });
        }

        _approve(owner, to, tokenId);
    }

    /**
     * @dev See {IERC721-balanceOf}
     */
    function balanceOf(address owner) override public view returns (uint256) {
        if (owner == address(0)) {
            revert MethodReceivedZeroAddress({ method: 'balanceOf' });
        }

        return uint256(_owners[owner].balance);
    }

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

        return _approvals.tokens[tokenId];
    }

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

    function name() override(IERC721Metadata) public view virtual returns (string memory) {
        return _name;
    }

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

    function pause() external onlyOwner {
        _pause();
    }

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

    /**
     * @dev See {IERC721-safeTransferFrom}
     */
    function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) override public virtual {
        _transfer(from, to, tokenId);

        if (to.isContract() && !_checkContractOnERC721Received(from, to, tokenId, data)) {
            revert TransferToNonERC721ReceiverImplementer();
        }
    }

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

        if (operator == sender) {
            revert ApproveToCaller();
        }

        _approvals.operators[sender][operator] = approved;

        emit ApprovalForAll(sender, operator, approved);
    }

    function setBaseURI(string memory uri) public onlyOwner virtual {
        _baseURI = uri;
    }


    function setTokenURI(uint256 tokenId, string memory uri) public onlyOwner virtual {
        if (!_exists(tokenId)) {
            revert QueryForNonexistentToken({ method: 'setTokenURI' });
        }

        _tokenURI[tokenId] = uri;
    }

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

    function symbol() override(IERC721Metadata) public view virtual returns (string memory) {
        return _symbol;
    }

    function tokensOf(address owner, uint256 cursor, uint256 size) external view returns (uint256[] memory, uint256) {
        uint256 balance = balanceOf(owner);
        uint256 max = _nextId;

        if (balance == 0) {
            return (new uint256[](0), cursor);
        }

        unchecked {
            if (cursor < _startTokenId()) {
                cursor = _startTokenId();
            }

            uint256 length = size;

            if (length > max - cursor) {
                length = max - cursor;
            }

            uint256[] memory ids = new uint256[](balance);

            // Cursor token may not be 'initialized' due to ERC721A design, use
            // normal token fetching function to find owner of token.
            Token memory token = _token(cursor);
            address current;

            if (token.state != STATE_BURNED) {
                current = token.owner;
            }

            uint256 j;

            for (uint256 i = cursor; i != length && j != balance; i++) {
                token = _tokens[i];

                if (token.owner == address(0) || token.state == STATE_BURNED) {
                    continue;
                }

                current = token.owner;

                if (current == owner) {
                    ids[j++] = i;
                }
            }

            // Downsize the array to fit
            assembly {
                mstore(ids, j)
            }

            return (ids, (cursor + size));
        }
    }

    function tokenURI(uint256 tokenId) override(IERC721Metadata) public view virtual returns (string memory) {
        if (!_exists(tokenId)) {
            revert QueryForNonexistentToken({ method: 'tokenURI' });
        }

        string memory base = _baseURI;
        string memory token = _tokenURI[tokenId];

        if (bytes(token).length == 0) {
            token = tokenId.toString();
        }

        if (bytes(base).length != 0) {
            return string(abi.encodePacked(base, token));
        }

        return token;
    }

    function totalBurned() public view returns (uint256) {
        return _burned;
    }

    function totalMinted() public view returns (uint256) {
        unchecked {
            return _nextId - _startTokenId();
        }
    }

    function totalSupply() public view returns (uint256) {
        unchecked {
            return _nextId - _burned - _startTokenId();
        }
    }

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

    function unpause() external onlyOwner {
        _unpause();
    }
}

File 5 of 22 : MintGate.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

import {MerkleProof} from "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol";

error CannotMintMoreThan(uint256 amount);
error MaxMintPerWalletWouldBeReached(uint256 max);
error NeedToSendMoreETH();
error QuantityWouldExceedMaxSupply();
error SaleHasNotStarted();
error SaleHasEnded();

library MintGate {

    function isWhitelisted(address buyer, bytes32[] calldata proof, bytes32 root) internal pure returns (bool) {
        return MerkleProof.verify(proof, root, keccak256(abi.encodePacked(buyer)));
    }

    function price(address buyer, uint256 cost, uint256 quantity, uint256 received) internal {
        unchecked {
            uint256 total = cost * quantity;

            if (total < received) {
                revert NeedToSendMoreETH();
            }

            // Refund remaining value
            if (received > total) {
                payable(buyer).transfer(received - total);
            }
        }
    }

    function supply(uint256 available, uint256 max, uint256 minted, uint256 quantity) internal pure {
        if (quantity > available) {
            revert QuantityWouldExceedMaxSupply();
        }

        if (max > 0) {
            if (quantity > max) {
                revert CannotMintMoreThan({ amount: max });
            }

            if ((minted + quantity) > max) {
                revert MaxMintPerWalletWouldBeReached({ max: max });
            }
        }
    }

    function time(uint256 end, uint256 start) internal view {
        if (block.timestamp < start) {
            revert SaleHasNotStarted();
        }

        if (end != 0 && block.timestamp > end) {
            revert SaleHasEnded();
        }
    }
}

File 6 of 22 : Withdrawable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

error AlreadyWithdrawnForThisMonth();
error AmountExceedsBalance(string method);
error TransferFailed();
error WithdrawLockupActive();

abstract contract Withdrawable {

    bool private _locked;

    mapping(uint256 => bool) private _months;


    function _withdraw(address receiver, uint256 amount) internal {
        if (address(this).balance < amount) {
            revert AmountExceedsBalance({ method: '_withdraw' });
        }

        (bool success, ) = payable(receiver).call{value: amount}("");

        if (!success) {
            revert TransferFailed();
        }
    }

    // Withdraw x% once per month
    function _withdrawOncePerMonth(address receiver, uint256 bips, uint256 deployedAt) internal {
        unchecked {
            uint256 amount = address(this).balance;
            uint256 month = ((block.timestamp - deployedAt) / 4 weeks) + 1;

            if (_months[month]) {
                revert AlreadyWithdrawnForThisMonth();
            }

            _months[month] = true;

            _withdraw(receiver, (amount * bips) / 10000);
        }
    }

    // Withdraw With x% Lockup
    // - x% available for withdraw on sale
    // - x% held by contract until `timestamp`
    function _withdrawWithLockup(address receiver, uint256 bips, uint256 unlockAt) internal {
        unchecked {
            uint256 amount = address(this).balance;

            if (amount < ((amount * bips) / 10000)) {
                revert AmountExceedsBalance({ method: '_withdrawWithLockup' });
            }

            // x% can be withdrawn to kickstart project; Remaining x% will be
            // held throughout `lockup` period
            if (!_locked) {
                amount = (amount * bips) / 10000;
                _locked = true;
            }
            else if (block.timestamp < unlockAt) {
                revert WithdrawLockupActive();
            }

            _withdraw(receiver, amount);
        }
    }
}

File 7 of 22 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        // On the first call to nonReentrant, _notEntered will be true
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

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

        _;

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

File 8 of 22 : Admin.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

abstract contract Admin {

    mapping(address => bool) private _admin;


    function _isAdmin(address operator) internal view returns (bool) {
        return _admin[operator];
    }

    function _setAdmin(address operator, bool admin) internal {
        _admin[operator] = admin;
    }
}

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 10 of 22 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/Pausable.sol)

pragma solidity ^0.8.0;

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

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

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

    bool private _paused;

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

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

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

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

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

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

File 11 of 22 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

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

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

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

pragma solidity ^0.8.1;

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

        return account.code.length > 0;
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

pragma solidity ^0.8.0;

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

File 19 of 22 : ERC2981.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;

import {IERC2981} from "@openzeppelin/contracts/interfaces/IERC2981.sol";
import {ERC165, IERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.sol";

abstract contract ERC2981 is ERC165, IERC2981 {

    struct RoyaltyInfo {
        // Fee in Basis Points
        uint256 fee;
        address receiver;
    }


    RoyaltyInfo private _default;

    mapping(uint256 => RoyaltyInfo) private _info;


    constructor(address receiver, uint256 fee) {
        _default = RoyaltyInfo({
            fee: fee,
            receiver: receiver
        });
    }


    function _setDefaultRoyaltyInfo(address receiver, uint256 fee) internal {
        _default = RoyaltyInfo({
            fee: fee,
            receiver: receiver
        });
    }

    function _setRoyaltyInfo(uint256 tokenId, address receiver, uint256 fee) internal {
        _info[tokenId] = RoyaltyInfo({
            fee: fee,
            receiver: receiver
        });
    }

    function royaltyInfo(uint256 tokenId, uint256 amount) external view override(IERC2981) returns (address, uint256) {
        uint256 fee = _info[tokenId].fee;
        address receiver = _info[tokenId].receiver;

        if (receiver == address(0) || fee == 0) {
            fee = _default.fee;
            receiver = _default.receiver;
        }

        return (receiver, (amount * fee / 10000));
    }

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

File 20 of 22 : IERC2981.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (interfaces/IERC2981.sol)

pragma solidity ^0.8.0;

import "./IERC165.sol";

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

File 21 of 22 : IERC165.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol)

pragma solidity ^0.8.0;

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

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

pragma solidity ^0.8.0;

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"string","name":"method","type":"string"}],"name":"AmountExceedsAccountBalance","type":"error"},{"inputs":[{"internalType":"string","name":"method","type":"string"}],"name":"AmountExceedsBalance","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[{"internalType":"string","name":"method","type":"string"}],"name":"CallerNotOwnerNorApproved","type":"error"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"CannotMintMoreThan","type":"error"},{"inputs":[],"name":"FeatureIsDisabled","type":"error"},{"inputs":[{"internalType":"uint256","name":"max","type":"uint256"}],"name":"MaxMintPerWalletWouldBeReached","type":"error"},{"inputs":[{"internalType":"string","name":"method","type":"string"}],"name":"MethodReceivedZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"NeedToSendMoreETH","type":"error"},{"inputs":[],"name":"QuantityWouldExceedMaxSupply","type":"error"},{"inputs":[{"internalType":"string","name":"method","type":"string"}],"name":"QueryForNonexistentToken","type":"error"},{"inputs":[],"name":"SaleHasEnded","type":"error"},{"inputs":[],"name":"SaleHasNotStarted","type":"error"},{"inputs":[],"name":"TokenQueryProducedVariant","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"ZeroRewards","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"amount","type":"uint64"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"Charged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"amount","type":"uint64"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"Deposited","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint64","name":"current","type":"uint64"},{"indexed":false,"internalType":"uint64","name":"previous","type":"uint64"}],"name":"LevelUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"MAX_MINT_PER_WALLET","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINT_BATCH_SIZE","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE_START","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE_STEP","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE_STEP_INTERVAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATE_BURNED","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATE_MINTED","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STATE_TRANSFERRED","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"calculateStakingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint64","name":"amount","type":"uint64"}],"name":"charge","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"claimStakingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"config","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint64","name":"","type":"uint64"},{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint64","name":"","type":"uint64"},{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"a","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"}],"name":"fuse","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"multipliers","outputs":[{"internalType":"uint64","name":"","type":"uint64"},{"internalType":"uint64","name":"","type":"uint64"},{"internalType":"uint64","name":"","type":"uint64"},{"internalType":"uint64","name":"","type":"uint64"}],"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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"rewardsOf","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"rewardsOf","outputs":[{"internalType":"uint64[]","name":"","type":"uint64[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"fusible","type":"bool"},{"internalType":"uint64","name":"listingFee","type":"uint64"},{"internalType":"bool","name":"resetOnTransfer","type":"bool"},{"internalType":"uint64","name":"rewardsPerWeek","type":"uint64"},{"internalType":"uint64","name":"upgradeFee","type":"uint64"}],"internalType":"struct ERC721OwnershipBasedStaking.Config","name":"data","type":"tuple"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint64","name":"level","type":"uint64"},{"internalType":"uint64","name":"max","type":"uint64"},{"internalType":"uint64","name":"minter","type":"uint64"},{"internalType":"uint64","name":"month","type":"uint64"}],"internalType":"struct ERC721OwnershipBasedStaking.Multipliers","name":"data","type":"tuple"}],"name":"setMultipliers","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"cursor","type":"uint256"},{"internalType":"uint256","name":"size","type":"uint256"}],"name":"tokensOf","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalBurned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"upgrade","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]

60806040523480156200001157600080fd5b50336102ee81816040518060400160405280600a8152602001695661756c74205061737360b01b8152506040518060400160405280600a8152602001697661756c742d7061737360b01b81525081816200007a620000746200016e60201b60201c565b62000172565b6001805460ff60a01b1916905581516200009c90600490602085019062000384565b5060016005558051620000b790600690602084019062000384565b50506001600c8181556040805180820182528781526001600160a01b039098166020988901819052601097909755601180546001600160a01b031916909717909655855160a0810187529182529581019590955250506000918301919091525060036060820152609060808201526200013392509050620001c4565b604080516080810182526103e88152620138806020820152619c409181019190915261271060608201526200016890620002c5565b62000467565b3390565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001546001600160a01b03163314620002135760405162461bcd60e51b8152602060048201819052602482015260008051602062003f1a83398151915260448201526064015b60405180910390fd5b8051600e80546020840151604085015160608601516080909601516001600160401b03908116600160901b02600160901b600160d01b03199782166a010000000000000000000002600160501b600160901b031993151569010000000000000000000293909316600160481b600160901b03199290941661010002610100600160481b0319971515979097166001600160481b0319909516949094179590951794909416179290921792909216179055565b6001546001600160a01b03163314620003105760405162461bcd60e51b8152602060048201819052602482015260008051602062003f1a83398151915260448201526064016200020a565b8051600f8054602084015160408501516060909501516001600160401b03908116600160c01b026001600160c01b03968216600160801b02969096166001600160801b0392821668010000000000000000026001600160801b03199094169190951617919091171691909117919091179055565b82805462000392906200042a565b90600052602060002090601f016020900481019282620003b6576000855562000401565b82601f10620003d157805160ff191683800117855562000401565b8280016001018555821562000401579182015b8281111562000401578251825591602001919060010190620003e4565b506200040f92915062000413565b5090565b5b808211156200040f576000815560010162000414565b600181811c908216806200043f57607f821691505b602082108114156200046157634e487b7160e01b600052602260045260246000fd5b50919050565b613aa380620004776000396000f3fe6080604052600436106103135760003560e01c806370a082311161019a578063a2309ff8116100e1578063d66da10d1161008a578063e985e9c511610064578063e985e9c51461093b578063f2fde38b14610984578063f68858e4146109a457600080fd5b8063d66da10d146108d9578063d89135cd14610906578063e902d60a1461091b57600080fd5b8063b88d4fde116100bb578063b88d4fde14610884578063b9fcd7da146108a4578063c87b56dd146108b957600080fd5b8063a2309ff814610856578063adceef071461086f578063b19960e61461067457600080fd5b80638fad2627116101435780639d7d66671161011d5780639d7d6667146107cd578063a0712d6814610823578063a22cb4651461083657600080fd5b80638fad26271461078357806395d89b41146107a357806398d5fdca146107b857600080fd5b80637d40ab77116101745780637d40ab77146107345780638456cb59146107505780638da5cb5b1461076557600080fd5b806370a0823114610689578063715018a6146106a957806379502c55146106be57600080fd5b806323185dc91161025e57806342842e0e116102075780635c975abb116101e15780635c975abb146106355780636352211e1461065457806368003c0a1461067457600080fd5b806342842e0e146105d557806345977d03146105f557806355f804b31461061557600080fd5b80633ccfd60b116102385780633ccfd60b1461058b5780633f4ba83a146105a05780634127a399146105b557600080fd5b806323185dc9146104fe57806323b872dd1461052c5780632a55205a1461054c57600080fd5b80630c45c817116102c057806318160ddd1161029a57806318160ddd146104ac5780631ba41e27146104c95780631ca43564146104e957600080fd5b80630c45c817146104435780630ee2bb311461046c578063162094c41461048c57600080fd5b8063095ea7b3116102f1578063095ea7b3146103a75780630a3cefaa146103c95780630bce1284146103f357600080fd5b806301ffc9a71461031857806306fdde031461034d578063081812fc1461036f575b600080fd5b34801561032457600080fd5b5061033861033336600461327e565b6109c4565b60405190151581526020015b60405180910390f35b34801561035957600080fd5b506103626109d5565b60405161034491906132f3565b34801561037b57600080fd5b5061038f61038a366004613306565b610a67565b6040516001600160a01b039091168152602001610344565b3480156103b357600080fd5b506103c76103c236600461333b565b610ae0565b005b3480156103d557600080fd5b506103de600281565b60405163ffffffff9091168152602001610344565b3480156103ff57600080fd5b5061042a61040e366004613306565b6000908152600d602052604090205467ffffffffffffffff1690565b60405167ffffffffffffffff9091168152602001610344565b34801561044f57600080fd5b5061045e668e1bc9bf04000081565b604051908152602001610344565b34801561047857600080fd5b5061045e610487366004613306565b610bc2565b34801561049857600080fd5b506103c76104a7366004613424565b610d74565b3480156104b857600080fd5b50600354600554036000190161045e565b3480156104d557600080fd5b5061045e6104e4366004613483565b610e36565b3480156104f557600080fd5b506103de600381565b34801561050a57600080fd5b5061051e6105193660046134af565b610f59565b6040516103449291906134e2565b34801561053857600080fd5b506103c761054736600461352a565b61110d565b34801561055857600080fd5b5061056c610567366004613566565b611118565b604080516001600160a01b039093168352602083019190915201610344565b34801561059757600080fd5b506103c7611181565b3480156105ac57600080fd5b506103c7611290565b3480156105c157600080fd5b506103c76105d0366004613598565b6112e2565b3480156105e157600080fd5b506103c76105f036600461352a565b611405565b34801561060157600080fd5b506103c7610610366004613306565b611420565b34801561062157600080fd5b506103c7610630366004613626565b6115b1565b34801561064157600080fd5b50600154600160a01b900460ff16610338565b34801561066057600080fd5b5061038f61066f366004613306565b611610565b34801561068057600080fd5b5061045e606481565b34801561069557600080fd5b5061045e6106a436600461365b565b611622565b3480156106b557600080fd5b506103c76116a1565b3480156106ca57600080fd5b50600e546040805160ff8084161515825267ffffffffffffffff610100850481166020840152690100000000000000000085049091161515928201929092526a0100000000000000000000830482166060820152600160901b90920416608082015260a001610344565b34801561074057600080fd5b5061045e6702c68af0bb14000081565b34801561075c57600080fd5b506103c76116f3565b34801561077157600080fd5b506001546001600160a01b031661038f565b34801561078f57600080fd5b5061045e61079e366004613306565b611743565b3480156107af57600080fd5b50610362611875565b3480156107c457600080fd5b5061045e611884565b3480156107d957600080fd5b50600f546040805167ffffffffffffffff8084168252600160401b840481166020830152600160801b8404811692820192909252600160c01b909204166060820152608001610344565b6103c7610831366004613306565b6118c8565b34801561084257600080fd5b506103c7610851366004613676565b6119dd565b34801561086257600080fd5b506005546000190161045e565b34801561087b57600080fd5b506103de600881565b34801561089057600080fd5b506103c761089f3660046136a0565b611a75565b3480156108b057600080fd5b506103de600181565b3480156108c557600080fd5b506103626108d4366004613306565b611ac0565b3480156108e557600080fd5b506108f96108f436600461371c565b611c96565b60405161034491906137c2565b34801561091257600080fd5b5060035461045e565b34801561092757600080fd5b506103c7610936366004613810565b611d32565b34801561094757600080fd5b5061033861095636600461388d565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561099057600080fd5b506103c761099f36600461365b565b611dfc565b3480156109b057600080fd5b506103c76109bf366004613566565b611ecc565b60006109cf826120a1565b92915050565b6060600480546109e4906138b7565b80601f0160208091040260200160405190810160405280929190818152602001828054610a10906138b7565b8015610a5d5780601f10610a3257610100808354040283529160200191610a5d565b820191906000526020600020905b815481529060010190602001808311610a4057829003601f168201915b5050505050905090565b6000610a72826120ac565b610ac457604051636f722ce560e11b815260206004820152600b60248201527f676574417070726f76656400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b506000908152600860205260409020546001600160a01b031690565b6000610aeb82611610565b9050336001600160a01b038481169083161415610b1b5760405163250fdee360e21b815260040160405180910390fd5b816001600160a01b0316816001600160a01b031614158015610b6357506001600160a01b0380831660009081526007602090815260408083209385168352929052205460ff16155b15610bb1576040516335b366b560e21b815260206004820152600760248201527f617070726f7665000000000000000000000000000000000000000000000000006044820152606401610abb565b610bbc8285856120f6565b50505050565b6000818152600d60209081526040808320815160608082018452915467ffffffffffffffff8082168352600160401b808304821684880152600160801b928390048216848701528551608081018752600f548084168252918204831697810197909752918204811694860194909452600160c01b9004909216908301529082610c4a8561215f565b6020840151604082015191925090429067ffffffffffffffff9081169083161015610c7757826040015191505b8167ffffffffffffffff168167ffffffffffffffff161015610ca0575060009695505050505050565b835160408601510261271001600062093a8067ffffffffffffffff8585031604600e600001600a9054906101000a900467ffffffffffffffff16029050600263ffffffff16856020015163ffffffff161415610d00578560400151820191505b60408501516224ea0090840367ffffffffffffffff160486606001510282019150856020015167ffffffffffffffff168267ffffffffffffffff161115610d4957856020015191505b61271067ffffffffffffffff8284021604810167ffffffffffffffff16975050505050505050919050565b6001546001600160a01b03163314610dbc5760405162461bcd60e51b81526020600482018190526024820152600080516020613a4e8339815191526044820152606401610abb565b610dc5826120ac565b610e1257604051636f722ce560e11b815260206004820152600b60248201527f736574546f6b656e5552490000000000000000000000000000000000000000006044820152606401610abb565b6000828152600b602090815260409091208251610e31928401906131cf565b505050565b60006002600c541415610e8b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abb565b6002600c553360008181526020819052604090205460ff16610ed9576040516335b366b560e21b815260206004820152600660248201526563686172676560d01b6044820152606401610abb565b60405167ffffffffffffffff841681526001600160a01b0382169085907f3ef487a00a30e9a6a081fa5b92e4a6df9ccd7c07f55b3b05877b9cc486f9b1cc9060200160405180910390a3610f4c84846040518060400160405280600681526020016563686172676560d01b815250612276565b6001600c55949350505050565b6060600080610f6786611622565b60055490915081610f8d5750506040805160008152602081019091529150839050611105565b6001861015610f9b57600195505b84868203811115610fab57508581035b60008367ffffffffffffffff811115610fc657610fc6613365565b604051908082528060200260200182016040528015610fef578160200160208202803683370190505b5090506000610ffd8961215f565b90506000600163ffffffff16826020015163ffffffff161461101d575080515b60008a5b8581141580156110315750878214155b156110f4576000818152600a6020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820463ffffffff1693830193909352600160c01b900467ffffffffffffffff169281019290925290945015806110a45750602084015163ffffffff166001145b156110ae576110ec565b835192506001600160a01b03808416908e1614156110ec57808583806001019450815181106110df576110df613908565b6020026020010181815250505b600101611021565b508352509095505050858501925050505b935093915050565b610e31838383611405565b600082815260126020526040812080546001909101548291906001600160a01b0316801580611145575081155b1561115c5750506010546011546001600160a01b03165b8061271061116a8488613934565b6111749190613953565b9350935050509250929050565b6001546001600160a01b031633146111c95760405162461bcd60e51b81526020600482018190526024820152600080516020613a4e8339815191526044820152606401610abb565b6002600c54141561121c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abb565b6002600c55600154600160a01b900460ff161561126e5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610abb565b6112896112836001546001600160a01b031690565b476122e1565b6001600c55565b6001546001600160a01b031633146112d85760405162461bcd60e51b81526020600482018190526024820152600080516020613a4e8339815191526044820152606401610abb565b6112e06123a6565b565b6001546001600160a01b0316331461132a5760405162461bcd60e51b81526020600482018190526024820152600080516020613a4e8339815191526044820152606401610abb565b8051600e805460208401516040850151606086015160809096015167ffffffffffffffff908116600160901b027fffffffffffff0000000000000000ffffffffffffffffffffffffffffffffffff9782166a01000000000000000000000271ffffffffffffffff00000000000000000000199315156901000000000000000000029390931671ffffffffffffffffff00000000000000000019929094166101000268ffffffffffffffff00199715159790971668ffffffffffffffffff19909516949094179590951794909416179290921792909216179055565b610e3183838360405180602001604052806000815250611a75565b6002600c5414156114735760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abb565b6002600c55600e54600160901b900467ffffffffffffffff16806114aa576040516327e0d19f60e11b815260040160405180910390fd5b33806114b584611610565b6001600160a01b0316146114f6576040516335b366b560e21b81526020600482015260076024820152667570677261646560c81b6044820152606401610abb565b6115208383604051806040016040528060078152602001667570677261646560c81b815250612276565b506000838152600d6020908152604091829020805467ffffffffffffffff60801b198116600160801b9182900467ffffffffffffffff9081166001810182168402929092178085558651939004168252928101839052909286917f4adad2a0fb0c6b6ed3fc3243fe02729f9c643b4b41e96e0c853635d0f211d04f910160405180910390a250506001600c55505050565b6001546001600160a01b031633146115f95760405162461bcd60e51b81526020600482018190526024820152600080516020613a4e8339815191526044820152606401610abb565b805161160c9060029060208401906131cf565b5050565b600061161b8261215f565b5192915050565b60006001600160a01b03821661167b5760405163227c9e7d60e01b815260206004820152600960248201527f62616c616e63654f6600000000000000000000000000000000000000000000006044820152606401610abb565b506001600160a01b031660009081526009602052604090205467ffffffffffffffff1690565b6001546001600160a01b031633146116e95760405162461bcd60e51b81526020600482018190526024820152600080516020613a4e8339815191526044820152606401610abb565b6112e0600061244c565b6001546001600160a01b0316331461173b5760405162461bcd60e51b81526020600482018190526024820152600080516020613a4e8339815191526044820152606401610abb565b6112e06124ab565b60006002600c5414156117985760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abb565b6002600c55336117a88382612533565b6117f5576040516335b366b560e21b815260206004820152601360248201527f636c61696d5374616b696e6752657761726473000000000000000000000000006044820152606401610abb565b600061180084610bc2565b9050806118205760405163899aaa9d60e01b815260040160405180910390fd5b6000938452600d6020526040909320805467ffffffffffffffff8082169590950185166fffffffffffffffffffffffffffffffff1990911617600160401b4286160217908190556001600c5590921692915050565b6060600680546109e4906138b7565b6000668e1bc9bf040000606461189d6005546000190190565b6118a79190613953565b6118b19190613934565b6118c3906702c68af0bb140000613967565b905090565b6002600c54141561191b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abb565b6002600c55336119348161192d611884565b84346125b2565b60408051608080820183526000808352602080840182905283850182905260609384018290526001600160a01b03861682526009815290849020845192830185525467ffffffffffffffff8082168452600160401b8204811692840192909252600160801b81048216948301859052600160c01b9004169101526119bf9061270f9060649085612620565b6119ca600080612698565b6119d481836126e5565b50506001600c55565b336001600160a01b038316811415611a085760405163b06307db60e01b815260040160405180910390fd5b6001600160a01b03818116600081815260076020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611a808484846126ff565b6001600160a01b0383163b15158015611aa25750611aa08484848461292f565b155b15610bbc576040516368d2bf6b60e11b815260040160405180910390fd5b6060611acb826120ac565b611b1857604051636f722ce560e11b815260206004820152600860248201527f746f6b656e5552490000000000000000000000000000000000000000000000006044820152606401610abb565b600060028054611b27906138b7565b80601f0160208091040260200160405190810160405280929190818152602001828054611b53906138b7565b8015611ba05780601f10611b7557610100808354040283529160200191611ba0565b820191906000526020600020905b815481529060010190602001808311611b8357829003601f168201915b505050505090506000600b60008581526020019081526020016000208054611bc7906138b7565b80601f0160208091040260200160405190810160405280929190818152602001828054611bf3906138b7565b8015611c405780601f10611c1557610100808354040283529160200191611c40565b820191906000526020600020905b815481529060010190602001808311611c2357829003601f168201915b50505050509050805160001415611c5d57611c5a84612a17565b90505b815115611c8f578181604051602001611c7792919061397f565b60405160208183030381529060405292505050919050565b9392505050565b8051606090819060005b81811015611d2957600d6000868381518110611cbe57611cbe613908565b6020026020010151815260200190815260200160002060000160009054906101000a900467ffffffffffffffff16838281518110611cfe57611cfe613908565b67ffffffffffffffff9092166020928302919091019091015280611d21816139ae565b915050611ca0565b50909392505050565b6001546001600160a01b03163314611d7a5760405162461bcd60e51b81526020600482018190526024820152600080516020613a4e8339815191526044820152606401610abb565b8051600f80546020840151604085015160609095015167ffffffffffffffff908116600160c01b026001600160c01b03968216600160801b02969096166fffffffffffffffffffffffffffffffff928216600160401b026fffffffffffffffffffffffffffffffff199094169190951617919091171691909117919091179055565b6001546001600160a01b03163314611e445760405162461bcd60e51b81526020600482018190526024820152600080516020613a4e8339815191526044820152606401610abb565b6001600160a01b038116611ec05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610abb565b611ec98161244c565b50565b6002600c541415611f1f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abb565b6002600c55600e5460ff16611f47576040516327e0d19f60e11b815260040160405180910390fd5b3360008181526020819052604090205460ff16158015611fa55750806001600160a01b0316611f7584611610565b6001600160a01b0316141580611fa55750806001600160a01b0316611f9983611610565b6001600160a01b031614155b15611fdc576040516335b366b560e21b8152600401610abb906020808252600490820152636675736560e01b604082015260600190565b6000838152600d6020908152604080832080548685529382902054600160801b9081900467ffffffffffffffff90811682870482169081016001018216830267ffffffffffffffff60801b19909716969096178084558451929004168152928301849052929186917f4adad2a0fb0c6b6ed3fc3243fe02729f9c643b4b41e96e0c853635d0f211d04f910160405180910390a25061207b836000612b2d565b50506000908152600d6020526040902080546001600160c01b0319169055506001600c55565b60006109cf82612d2e565b600060016120bb836001613967565b1180156120c9575060055482105b80156109cf57506000828152600a6020526040902054600160a01b900463ffffffff166001141592915050565b600081815260086020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6040805160608101825260008082526020820181905291810191909152612185826120ac565b6121d257604051636f722ce560e11b815260206004820152600660248201527f5f746f6b656e00000000000000000000000000000000000000000000000000006044820152606401610abb565b60096001818411156121e357508083035b835b8181111561225a576000818152600a6020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820463ffffffff1693830193909352600160c01b900467ffffffffffffffff1692810192909252156122505795945050505050565b50600019016121e5565b505050604051633ae7416760e01b815260040160405180910390fd5b6000838152600d60205260408120805467ffffffffffffffff808616911610156122b5578260405163fd365fcb60e01b8152600401610abb91906132f3565b805467ffffffffffffffff19811667ffffffffffffffff91821695909503169384179055509092915050565b8047101561233257604051637249410960e01b815260206004820152600960248201527f5f776974686472617700000000000000000000000000000000000000000000006044820152606401610abb565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461237f576040519150601f19603f3d011682016040523d82523d6000602084013e612384565b606091505b5050905080610e31576040516312171d8360e31b815260040160405180910390fd5b600154600160a01b900460ff166123ff5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610abb565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600180546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600154600160a01b900460ff16156124f85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610abb565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861242f3390565b60008061253f84611610565b9050806001600160a01b0316836001600160a01b0316148061257a5750826001600160a01b031661256f85610a67565b6001600160a01b0316145b806125aa57506001600160a01b0380821660009081526007602090815260408083209387168352929052205460ff165b949350505050565b828202818110156125d657604051630486d58d60e01b815260040160405180910390fd5b80821115612619576040516001600160a01b038616908383146108fc0290838503906000818181858888f19350505050158015612617573d6000803e3d6000fd5b505b5050505050565b8381111561264157604051633a78f32b60e01b815260040160405180910390fd5b8215610bbc578281111561266b57604051632f5e4a3760e21b815260048101849052602401610abb565b826126768284613967565b1115610bbc57604051630e25ce9560e41b815260048101849052602401610abb565b804210156126b9576040516374626dc160e11b815260040160405180910390fd5b81158015906126c757508142115b1561160c57604051634298ddab60e11b815260040160405180910390fd5b61160c828260405180602001604052806000815250612d53565b600154600160a01b900460ff161561274c5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610abb565b60006127578261215f565b90506001600160a01b03831661279c5760405163227c9e7d60e01b81526020600482015260096024820152682fba3930b739b332b960b91b6044820152606401610abb565b836001600160a01b031681600001516001600160a01b0316146127d15760405162a1148160e81b815260040160405180910390fd5b6127db8233612533565b612814576040516335b366b560e21b81526020600482015260096024820152682fba3930b739b332b960b91b6044820152606401610abb565b8051612822906000846120f6565b61282c8282612d60565b6001600160a01b038481166000818152600960209081526040808320805467ffffffffffffffff1980821667ffffffffffffffff928316600019018316179092558987168086528386208054938416938316600101831693909317909255825160608101845282815260038186019081524283168286019081528b8852600a909652848720915182549151965199166001600160c01b031990911617600160a01b63ffffffff90961695909502949094176001600160c01b0316600160c01b97909116969096029590951790915551859392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610bbc8484846001612e0d565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906129649033908990889088906004016139c9565b6020604051808303816000875af192505050801561299f575060408051601f3d908101601f1916820190925261299c91810190613a05565b60015b6129fa573d8080156129cd576040519150601f19603f3d011682016040523d82523d6000602084013e6129d2565b606091505b5080516129f2576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606081612a3b5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612a655780612a4f816139ae565b9150612a5e9050600a83613953565b9150612a3f565b60008167ffffffffffffffff811115612a8057612a80613365565b6040519080825280601f01601f191660200182016040528015612aaa576020820181803683370190505b5090505b84156125aa57612abf600183613a22565b9150612acc600a86613a39565b612ad7906030613967565b60f81b818381518110612aec57612aec613908565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612b26600a86613953565b9450612aae565b600154600160a01b900460ff1615612b7a5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610abb565b6000612b858361215f565b9050818015612b9b5750612b998333612533565b155b15612be9576040516335b366b560e21b815260206004820152600560248201527f5f6275726e0000000000000000000000000000000000000000000000000000006044820152606401610abb565b8051612bf7906000856120f6565b612c018382612d60565b80516001600160a01b03908116600090815260096020908152604080832080546fffffffffffffffffffffffffffffffff19811667ffffffffffffffff8083166000190181169182176001600160401b67ffffffffffffffff1990951690931784900482168301821690930292909217909255600380548301905582516060810184528751871681528085019283524282168185019081528a8752600a90955283862090518154935195519088166001600160c01b031990941693909317600160a01b63ffffffff90961695909502949094176001600160c01b0316600160c01b92909116919091021790915583519051869391909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a48051610e31906000856001612e0d565b60006001600160e01b0319821663152a902d60e11b14806109cf57506109cf82612e19565b610e318383836001612e24565b6000612d6d836001613967565b9050612d78816120ac565b8015612d9957506000818152600a60205260409020546001600160a01b0316155b15610e31576000818152600a602090815260409182902084518154928601519386015167ffffffffffffffff16600160c01b026001600160c01b0363ffffffff909516600160a01b026001600160c01b03199094166001600160a01b03909216919091179290921792909216179055505050565b610bbc84848484613107565b60006109cf8261317f565b600154600160a01b900460ff1615612e715760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610abb565b6005546001600160a01b038516612ecb5760405163227c9e7d60e01b815260206004820152600560248201527f5f6d696e740000000000000000000000000000000000000000000000000000006044820152606401610abb565b83612ee95760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03851660009081526009602052604090208054600160801b67ffffffffffffffff19821667ffffffffffffffff8084168901811691821783900481168901169091027fffffffffffffffff0000000000000000ffffffffffffffff000000000000000090921617178155600885046007861615612f6b576001015b60005b8181101561300957604080516060810182526001600160a01b03808b1682526002602080840191825267ffffffffffffffff428116858701908152600888028b016000908152600a909352959091209351845492519551909116600160c01b026001600160c01b0363ffffffff96909616600160a01b026001600160c01b031990931691909316171792909216919091179055600101612f6e565b508286810185801561302457506001600160a01b0389163b15155b156130ad575b60405182906001600160a01b038b16906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461307560008a848060010195508a61292f565b613092576040516368d2bf6b60e11b815260040160405180910390fd5b8082141561302a5784600554146130a857600080fd5b6130f3565b5b6040516001830192906001600160a01b038b16906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808214156130ae575b506005555061261990506000868387612e0d565b600e546901000000000000000000900460ff1661312357610bbc565b60005b81811015612619576000600d8161313d8487613967565b81526020810191909152604001600020805467ffffffffffffffff191667ffffffffffffffff9290921691909117905580613177816139ae565b915050613126565b60006001600160e01b031982166380ac58cd60e01b14806131b057506001600160e01b03198216635b5e139f60e01b145b806109cf57506301ffc9a760e01b6001600160e01b03198316146109cf565b8280546131db906138b7565b90600052602060002090601f0160209004810192826131fd5760008555613243565b82601f1061321657805160ff1916838001178555613243565b82800160010185558215613243579182015b82811115613243578251825591602001919060010190613228565b5061324f929150613253565b5090565b5b8082111561324f5760008155600101613254565b6001600160e01b031981168114611ec957600080fd5b60006020828403121561329057600080fd5b8135611c8f81613268565b60005b838110156132b657818101518382015260200161329e565b83811115610bbc5750506000910152565b600081518084526132df81602086016020860161329b565b601f01601f19169290920160200192915050565b602081526000611c8f60208301846132c7565b60006020828403121561331857600080fd5b5035919050565b80356001600160a01b038116811461333657600080fd5b919050565b6000806040838503121561334e57600080fd5b6133578361331f565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156133a4576133a4613365565b604052919050565b600067ffffffffffffffff8311156133c6576133c6613365565b6133d9601f8401601f191660200161337b565b90508281528383830111156133ed57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261341557600080fd5b611c8f838335602085016133ac565b6000806040838503121561343757600080fd5b82359150602083013567ffffffffffffffff81111561345557600080fd5b61346185828601613404565b9150509250929050565b803567ffffffffffffffff8116811461333657600080fd5b6000806040838503121561349657600080fd5b823591506134a66020840161346b565b90509250929050565b6000806000606084860312156134c457600080fd5b6134cd8461331f565b95602085013595506040909401359392505050565b604080825283519082018190526000906020906060840190828701845b8281101561351b578151845292840192908401906001016134ff565b50505092019290925292915050565b60008060006060848603121561353f57600080fd5b6135488461331f565b92506135566020850161331f565b9150604084013590509250925092565b6000806040838503121561357957600080fd5b50508035926020909101359150565b8035801515811461333657600080fd5b600060a082840312156135aa57600080fd5b60405160a0810181811067ffffffffffffffff821117156135cd576135cd613365565b6040526135d983613588565b81526135e76020840161346b565b60208201526135f860408401613588565b60408201526136096060840161346b565b606082015261361a6080840161346b565b60808201529392505050565b60006020828403121561363857600080fd5b813567ffffffffffffffff81111561364f57600080fd5b6125aa84828501613404565b60006020828403121561366d57600080fd5b611c8f8261331f565b6000806040838503121561368957600080fd5b6136928361331f565b91506134a660208401613588565b600080600080608085870312156136b657600080fd5b6136bf8561331f565b93506136cd6020860161331f565b925060408501359150606085013567ffffffffffffffff8111156136f057600080fd5b8501601f8101871361370157600080fd5b613710878235602084016133ac565b91505092959194509250565b6000602080838503121561372f57600080fd5b823567ffffffffffffffff8082111561374757600080fd5b818501915085601f83011261375b57600080fd5b81358181111561376d5761376d613365565b8060051b915061377e84830161337b565b818152918301840191848101908884111561379857600080fd5b938501935b838510156137b65784358252938501939085019061379d565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561380457835167ffffffffffffffff16835292840192918401916001016137de565b50909695505050505050565b60006080828403121561382257600080fd5b6040516080810181811067ffffffffffffffff8211171561384557613845613365565b6040526138518361346b565b815261385f6020840161346b565b60208201526138706040840161346b565b60408201526138816060840161346b565b60608201529392505050565b600080604083850312156138a057600080fd5b6138a98361331f565b91506134a66020840161331f565b600181811c908216806138cb57607f821691505b602082108114156138ec57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561394e5761394e61391e565b500290565b600082613962576139626138f2565b500490565b6000821982111561397a5761397a61391e565b500190565b6000835161399181846020880161329b565b8351908301906139a581836020880161329b565b01949350505050565b60006000198214156139c2576139c261391e565b5060010190565b60006001600160a01b038087168352808616602084015250836040830152608060608301526139fb60808301846132c7565b9695505050505050565b600060208284031215613a1757600080fd5b8151611c8f81613268565b600082821015613a3457613a3461391e565b500390565b600082613a4857613a486138f2565b50069056fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122093319dea257552757818ab7f261171c9a380e0cd00eb70c39dac4837d88b49ca64736f6c634300080c00334f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572

Deployed Bytecode

0x6080604052600436106103135760003560e01c806370a082311161019a578063a2309ff8116100e1578063d66da10d1161008a578063e985e9c511610064578063e985e9c51461093b578063f2fde38b14610984578063f68858e4146109a457600080fd5b8063d66da10d146108d9578063d89135cd14610906578063e902d60a1461091b57600080fd5b8063b88d4fde116100bb578063b88d4fde14610884578063b9fcd7da146108a4578063c87b56dd146108b957600080fd5b8063a2309ff814610856578063adceef071461086f578063b19960e61461067457600080fd5b80638fad2627116101435780639d7d66671161011d5780639d7d6667146107cd578063a0712d6814610823578063a22cb4651461083657600080fd5b80638fad26271461078357806395d89b41146107a357806398d5fdca146107b857600080fd5b80637d40ab77116101745780637d40ab77146107345780638456cb59146107505780638da5cb5b1461076557600080fd5b806370a0823114610689578063715018a6146106a957806379502c55146106be57600080fd5b806323185dc91161025e57806342842e0e116102075780635c975abb116101e15780635c975abb146106355780636352211e1461065457806368003c0a1461067457600080fd5b806342842e0e146105d557806345977d03146105f557806355f804b31461061557600080fd5b80633ccfd60b116102385780633ccfd60b1461058b5780633f4ba83a146105a05780634127a399146105b557600080fd5b806323185dc9146104fe57806323b872dd1461052c5780632a55205a1461054c57600080fd5b80630c45c817116102c057806318160ddd1161029a57806318160ddd146104ac5780631ba41e27146104c95780631ca43564146104e957600080fd5b80630c45c817146104435780630ee2bb311461046c578063162094c41461048c57600080fd5b8063095ea7b3116102f1578063095ea7b3146103a75780630a3cefaa146103c95780630bce1284146103f357600080fd5b806301ffc9a71461031857806306fdde031461034d578063081812fc1461036f575b600080fd5b34801561032457600080fd5b5061033861033336600461327e565b6109c4565b60405190151581526020015b60405180910390f35b34801561035957600080fd5b506103626109d5565b60405161034491906132f3565b34801561037b57600080fd5b5061038f61038a366004613306565b610a67565b6040516001600160a01b039091168152602001610344565b3480156103b357600080fd5b506103c76103c236600461333b565b610ae0565b005b3480156103d557600080fd5b506103de600281565b60405163ffffffff9091168152602001610344565b3480156103ff57600080fd5b5061042a61040e366004613306565b6000908152600d602052604090205467ffffffffffffffff1690565b60405167ffffffffffffffff9091168152602001610344565b34801561044f57600080fd5b5061045e668e1bc9bf04000081565b604051908152602001610344565b34801561047857600080fd5b5061045e610487366004613306565b610bc2565b34801561049857600080fd5b506103c76104a7366004613424565b610d74565b3480156104b857600080fd5b50600354600554036000190161045e565b3480156104d557600080fd5b5061045e6104e4366004613483565b610e36565b3480156104f557600080fd5b506103de600381565b34801561050a57600080fd5b5061051e6105193660046134af565b610f59565b6040516103449291906134e2565b34801561053857600080fd5b506103c761054736600461352a565b61110d565b34801561055857600080fd5b5061056c610567366004613566565b611118565b604080516001600160a01b039093168352602083019190915201610344565b34801561059757600080fd5b506103c7611181565b3480156105ac57600080fd5b506103c7611290565b3480156105c157600080fd5b506103c76105d0366004613598565b6112e2565b3480156105e157600080fd5b506103c76105f036600461352a565b611405565b34801561060157600080fd5b506103c7610610366004613306565b611420565b34801561062157600080fd5b506103c7610630366004613626565b6115b1565b34801561064157600080fd5b50600154600160a01b900460ff16610338565b34801561066057600080fd5b5061038f61066f366004613306565b611610565b34801561068057600080fd5b5061045e606481565b34801561069557600080fd5b5061045e6106a436600461365b565b611622565b3480156106b557600080fd5b506103c76116a1565b3480156106ca57600080fd5b50600e546040805160ff8084161515825267ffffffffffffffff610100850481166020840152690100000000000000000085049091161515928201929092526a0100000000000000000000830482166060820152600160901b90920416608082015260a001610344565b34801561074057600080fd5b5061045e6702c68af0bb14000081565b34801561075c57600080fd5b506103c76116f3565b34801561077157600080fd5b506001546001600160a01b031661038f565b34801561078f57600080fd5b5061045e61079e366004613306565b611743565b3480156107af57600080fd5b50610362611875565b3480156107c457600080fd5b5061045e611884565b3480156107d957600080fd5b50600f546040805167ffffffffffffffff8084168252600160401b840481166020830152600160801b8404811692820192909252600160c01b909204166060820152608001610344565b6103c7610831366004613306565b6118c8565b34801561084257600080fd5b506103c7610851366004613676565b6119dd565b34801561086257600080fd5b506005546000190161045e565b34801561087b57600080fd5b506103de600881565b34801561089057600080fd5b506103c761089f3660046136a0565b611a75565b3480156108b057600080fd5b506103de600181565b3480156108c557600080fd5b506103626108d4366004613306565b611ac0565b3480156108e557600080fd5b506108f96108f436600461371c565b611c96565b60405161034491906137c2565b34801561091257600080fd5b5060035461045e565b34801561092757600080fd5b506103c7610936366004613810565b611d32565b34801561094757600080fd5b5061033861095636600461388d565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561099057600080fd5b506103c761099f36600461365b565b611dfc565b3480156109b057600080fd5b506103c76109bf366004613566565b611ecc565b60006109cf826120a1565b92915050565b6060600480546109e4906138b7565b80601f0160208091040260200160405190810160405280929190818152602001828054610a10906138b7565b8015610a5d5780601f10610a3257610100808354040283529160200191610a5d565b820191906000526020600020905b815481529060010190602001808311610a4057829003601f168201915b5050505050905090565b6000610a72826120ac565b610ac457604051636f722ce560e11b815260206004820152600b60248201527f676574417070726f76656400000000000000000000000000000000000000000060448201526064015b60405180910390fd5b506000908152600860205260409020546001600160a01b031690565b6000610aeb82611610565b9050336001600160a01b038481169083161415610b1b5760405163250fdee360e21b815260040160405180910390fd5b816001600160a01b0316816001600160a01b031614158015610b6357506001600160a01b0380831660009081526007602090815260408083209385168352929052205460ff16155b15610bb1576040516335b366b560e21b815260206004820152600760248201527f617070726f7665000000000000000000000000000000000000000000000000006044820152606401610abb565b610bbc8285856120f6565b50505050565b6000818152600d60209081526040808320815160608082018452915467ffffffffffffffff8082168352600160401b808304821684880152600160801b928390048216848701528551608081018752600f548084168252918204831697810197909752918204811694860194909452600160c01b9004909216908301529082610c4a8561215f565b6020840151604082015191925090429067ffffffffffffffff9081169083161015610c7757826040015191505b8167ffffffffffffffff168167ffffffffffffffff161015610ca0575060009695505050505050565b835160408601510261271001600062093a8067ffffffffffffffff8585031604600e600001600a9054906101000a900467ffffffffffffffff16029050600263ffffffff16856020015163ffffffff161415610d00578560400151820191505b60408501516224ea0090840367ffffffffffffffff160486606001510282019150856020015167ffffffffffffffff168267ffffffffffffffff161115610d4957856020015191505b61271067ffffffffffffffff8284021604810167ffffffffffffffff16975050505050505050919050565b6001546001600160a01b03163314610dbc5760405162461bcd60e51b81526020600482018190526024820152600080516020613a4e8339815191526044820152606401610abb565b610dc5826120ac565b610e1257604051636f722ce560e11b815260206004820152600b60248201527f736574546f6b656e5552490000000000000000000000000000000000000000006044820152606401610abb565b6000828152600b602090815260409091208251610e31928401906131cf565b505050565b60006002600c541415610e8b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abb565b6002600c553360008181526020819052604090205460ff16610ed9576040516335b366b560e21b815260206004820152600660248201526563686172676560d01b6044820152606401610abb565b60405167ffffffffffffffff841681526001600160a01b0382169085907f3ef487a00a30e9a6a081fa5b92e4a6df9ccd7c07f55b3b05877b9cc486f9b1cc9060200160405180910390a3610f4c84846040518060400160405280600681526020016563686172676560d01b815250612276565b6001600c55949350505050565b6060600080610f6786611622565b60055490915081610f8d5750506040805160008152602081019091529150839050611105565b6001861015610f9b57600195505b84868203811115610fab57508581035b60008367ffffffffffffffff811115610fc657610fc6613365565b604051908082528060200260200182016040528015610fef578160200160208202803683370190505b5090506000610ffd8961215f565b90506000600163ffffffff16826020015163ffffffff161461101d575080515b60008a5b8581141580156110315750878214155b156110f4576000818152600a6020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820463ffffffff1693830193909352600160c01b900467ffffffffffffffff169281019290925290945015806110a45750602084015163ffffffff166001145b156110ae576110ec565b835192506001600160a01b03808416908e1614156110ec57808583806001019450815181106110df576110df613908565b6020026020010181815250505b600101611021565b508352509095505050858501925050505b935093915050565b610e31838383611405565b600082815260126020526040812080546001909101548291906001600160a01b0316801580611145575081155b1561115c5750506010546011546001600160a01b03165b8061271061116a8488613934565b6111749190613953565b9350935050509250929050565b6001546001600160a01b031633146111c95760405162461bcd60e51b81526020600482018190526024820152600080516020613a4e8339815191526044820152606401610abb565b6002600c54141561121c5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abb565b6002600c55600154600160a01b900460ff161561126e5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610abb565b6112896112836001546001600160a01b031690565b476122e1565b6001600c55565b6001546001600160a01b031633146112d85760405162461bcd60e51b81526020600482018190526024820152600080516020613a4e8339815191526044820152606401610abb565b6112e06123a6565b565b6001546001600160a01b0316331461132a5760405162461bcd60e51b81526020600482018190526024820152600080516020613a4e8339815191526044820152606401610abb565b8051600e805460208401516040850151606086015160809096015167ffffffffffffffff908116600160901b027fffffffffffff0000000000000000ffffffffffffffffffffffffffffffffffff9782166a01000000000000000000000271ffffffffffffffff00000000000000000000199315156901000000000000000000029390931671ffffffffffffffffff00000000000000000019929094166101000268ffffffffffffffff00199715159790971668ffffffffffffffffff19909516949094179590951794909416179290921792909216179055565b610e3183838360405180602001604052806000815250611a75565b6002600c5414156114735760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abb565b6002600c55600e54600160901b900467ffffffffffffffff16806114aa576040516327e0d19f60e11b815260040160405180910390fd5b33806114b584611610565b6001600160a01b0316146114f6576040516335b366b560e21b81526020600482015260076024820152667570677261646560c81b6044820152606401610abb565b6115208383604051806040016040528060078152602001667570677261646560c81b815250612276565b506000838152600d6020908152604091829020805467ffffffffffffffff60801b198116600160801b9182900467ffffffffffffffff9081166001810182168402929092178085558651939004168252928101839052909286917f4adad2a0fb0c6b6ed3fc3243fe02729f9c643b4b41e96e0c853635d0f211d04f910160405180910390a250506001600c55505050565b6001546001600160a01b031633146115f95760405162461bcd60e51b81526020600482018190526024820152600080516020613a4e8339815191526044820152606401610abb565b805161160c9060029060208401906131cf565b5050565b600061161b8261215f565b5192915050565b60006001600160a01b03821661167b5760405163227c9e7d60e01b815260206004820152600960248201527f62616c616e63654f6600000000000000000000000000000000000000000000006044820152606401610abb565b506001600160a01b031660009081526009602052604090205467ffffffffffffffff1690565b6001546001600160a01b031633146116e95760405162461bcd60e51b81526020600482018190526024820152600080516020613a4e8339815191526044820152606401610abb565b6112e0600061244c565b6001546001600160a01b0316331461173b5760405162461bcd60e51b81526020600482018190526024820152600080516020613a4e8339815191526044820152606401610abb565b6112e06124ab565b60006002600c5414156117985760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abb565b6002600c55336117a88382612533565b6117f5576040516335b366b560e21b815260206004820152601360248201527f636c61696d5374616b696e6752657761726473000000000000000000000000006044820152606401610abb565b600061180084610bc2565b9050806118205760405163899aaa9d60e01b815260040160405180910390fd5b6000938452600d6020526040909320805467ffffffffffffffff8082169590950185166fffffffffffffffffffffffffffffffff1990911617600160401b4286160217908190556001600c5590921692915050565b6060600680546109e4906138b7565b6000668e1bc9bf040000606461189d6005546000190190565b6118a79190613953565b6118b19190613934565b6118c3906702c68af0bb140000613967565b905090565b6002600c54141561191b5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abb565b6002600c55336119348161192d611884565b84346125b2565b60408051608080820183526000808352602080840182905283850182905260609384018290526001600160a01b03861682526009815290849020845192830185525467ffffffffffffffff8082168452600160401b8204811692840192909252600160801b81048216948301859052600160c01b9004169101526119bf9061270f9060649085612620565b6119ca600080612698565b6119d481836126e5565b50506001600c55565b336001600160a01b038316811415611a085760405163b06307db60e01b815260040160405180910390fd5b6001600160a01b03818116600081815260076020908152604080832094881680845294825291829020805460ff191687151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611a808484846126ff565b6001600160a01b0383163b15158015611aa25750611aa08484848461292f565b155b15610bbc576040516368d2bf6b60e11b815260040160405180910390fd5b6060611acb826120ac565b611b1857604051636f722ce560e11b815260206004820152600860248201527f746f6b656e5552490000000000000000000000000000000000000000000000006044820152606401610abb565b600060028054611b27906138b7565b80601f0160208091040260200160405190810160405280929190818152602001828054611b53906138b7565b8015611ba05780601f10611b7557610100808354040283529160200191611ba0565b820191906000526020600020905b815481529060010190602001808311611b8357829003601f168201915b505050505090506000600b60008581526020019081526020016000208054611bc7906138b7565b80601f0160208091040260200160405190810160405280929190818152602001828054611bf3906138b7565b8015611c405780601f10611c1557610100808354040283529160200191611c40565b820191906000526020600020905b815481529060010190602001808311611c2357829003601f168201915b50505050509050805160001415611c5d57611c5a84612a17565b90505b815115611c8f578181604051602001611c7792919061397f565b60405160208183030381529060405292505050919050565b9392505050565b8051606090819060005b81811015611d2957600d6000868381518110611cbe57611cbe613908565b6020026020010151815260200190815260200160002060000160009054906101000a900467ffffffffffffffff16838281518110611cfe57611cfe613908565b67ffffffffffffffff9092166020928302919091019091015280611d21816139ae565b915050611ca0565b50909392505050565b6001546001600160a01b03163314611d7a5760405162461bcd60e51b81526020600482018190526024820152600080516020613a4e8339815191526044820152606401610abb565b8051600f80546020840151604085015160609095015167ffffffffffffffff908116600160c01b026001600160c01b03968216600160801b02969096166fffffffffffffffffffffffffffffffff928216600160401b026fffffffffffffffffffffffffffffffff199094169190951617919091171691909117919091179055565b6001546001600160a01b03163314611e445760405162461bcd60e51b81526020600482018190526024820152600080516020613a4e8339815191526044820152606401610abb565b6001600160a01b038116611ec05760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610abb565b611ec98161244c565b50565b6002600c541415611f1f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610abb565b6002600c55600e5460ff16611f47576040516327e0d19f60e11b815260040160405180910390fd5b3360008181526020819052604090205460ff16158015611fa55750806001600160a01b0316611f7584611610565b6001600160a01b0316141580611fa55750806001600160a01b0316611f9983611610565b6001600160a01b031614155b15611fdc576040516335b366b560e21b8152600401610abb906020808252600490820152636675736560e01b604082015260600190565b6000838152600d6020908152604080832080548685529382902054600160801b9081900467ffffffffffffffff90811682870482169081016001018216830267ffffffffffffffff60801b19909716969096178084558451929004168152928301849052929186917f4adad2a0fb0c6b6ed3fc3243fe02729f9c643b4b41e96e0c853635d0f211d04f910160405180910390a25061207b836000612b2d565b50506000908152600d6020526040902080546001600160c01b0319169055506001600c55565b60006109cf82612d2e565b600060016120bb836001613967565b1180156120c9575060055482105b80156109cf57506000828152600a6020526040902054600160a01b900463ffffffff166001141592915050565b600081815260086020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b6040805160608101825260008082526020820181905291810191909152612185826120ac565b6121d257604051636f722ce560e11b815260206004820152600660248201527f5f746f6b656e00000000000000000000000000000000000000000000000000006044820152606401610abb565b60096001818411156121e357508083035b835b8181111561225a576000818152600a6020908152604091829020825160608101845290546001600160a01b038116808352600160a01b820463ffffffff1693830193909352600160c01b900467ffffffffffffffff1692810192909252156122505795945050505050565b50600019016121e5565b505050604051633ae7416760e01b815260040160405180910390fd5b6000838152600d60205260408120805467ffffffffffffffff808616911610156122b5578260405163fd365fcb60e01b8152600401610abb91906132f3565b805467ffffffffffffffff19811667ffffffffffffffff91821695909503169384179055509092915050565b8047101561233257604051637249410960e01b815260206004820152600960248201527f5f776974686472617700000000000000000000000000000000000000000000006044820152606401610abb565b6000826001600160a01b03168260405160006040518083038185875af1925050503d806000811461237f576040519150601f19603f3d011682016040523d82523d6000602084013e612384565b606091505b5050905080610e31576040516312171d8360e31b815260040160405180910390fd5b600154600160a01b900460ff166123ff5760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152606401610abb565b6001805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600180546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600154600160a01b900460ff16156124f85760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610abb565b6001805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861242f3390565b60008061253f84611610565b9050806001600160a01b0316836001600160a01b0316148061257a5750826001600160a01b031661256f85610a67565b6001600160a01b0316145b806125aa57506001600160a01b0380821660009081526007602090815260408083209387168352929052205460ff165b949350505050565b828202818110156125d657604051630486d58d60e01b815260040160405180910390fd5b80821115612619576040516001600160a01b038616908383146108fc0290838503906000818181858888f19350505050158015612617573d6000803e3d6000fd5b505b5050505050565b8381111561264157604051633a78f32b60e01b815260040160405180910390fd5b8215610bbc578281111561266b57604051632f5e4a3760e21b815260048101849052602401610abb565b826126768284613967565b1115610bbc57604051630e25ce9560e41b815260048101849052602401610abb565b804210156126b9576040516374626dc160e11b815260040160405180910390fd5b81158015906126c757508142115b1561160c57604051634298ddab60e11b815260040160405180910390fd5b61160c828260405180602001604052806000815250612d53565b600154600160a01b900460ff161561274c5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610abb565b60006127578261215f565b90506001600160a01b03831661279c5760405163227c9e7d60e01b81526020600482015260096024820152682fba3930b739b332b960b91b6044820152606401610abb565b836001600160a01b031681600001516001600160a01b0316146127d15760405162a1148160e81b815260040160405180910390fd5b6127db8233612533565b612814576040516335b366b560e21b81526020600482015260096024820152682fba3930b739b332b960b91b6044820152606401610abb565b8051612822906000846120f6565b61282c8282612d60565b6001600160a01b038481166000818152600960209081526040808320805467ffffffffffffffff1980821667ffffffffffffffff928316600019018316179092558987168086528386208054938416938316600101831693909317909255825160608101845282815260038186019081524283168286019081528b8852600a909652848720915182549151965199166001600160c01b031990911617600160a01b63ffffffff90961695909502949094176001600160c01b0316600160c01b97909116969096029590951790915551859392917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610bbc8484846001612e0d565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a02906129649033908990889088906004016139c9565b6020604051808303816000875af192505050801561299f575060408051601f3d908101601f1916820190925261299c91810190613a05565b60015b6129fa573d8080156129cd576040519150601f19603f3d011682016040523d82523d6000602084013e6129d2565b606091505b5080516129f2576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606081612a3b5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612a655780612a4f816139ae565b9150612a5e9050600a83613953565b9150612a3f565b60008167ffffffffffffffff811115612a8057612a80613365565b6040519080825280601f01601f191660200182016040528015612aaa576020820181803683370190505b5090505b84156125aa57612abf600183613a22565b9150612acc600a86613a39565b612ad7906030613967565b60f81b818381518110612aec57612aec613908565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350612b26600a86613953565b9450612aae565b600154600160a01b900460ff1615612b7a5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610abb565b6000612b858361215f565b9050818015612b9b5750612b998333612533565b155b15612be9576040516335b366b560e21b815260206004820152600560248201527f5f6275726e0000000000000000000000000000000000000000000000000000006044820152606401610abb565b8051612bf7906000856120f6565b612c018382612d60565b80516001600160a01b03908116600090815260096020908152604080832080546fffffffffffffffffffffffffffffffff19811667ffffffffffffffff8083166000190181169182176001600160401b67ffffffffffffffff1990951690931784900482168301821690930292909217909255600380548301905582516060810184528751871681528085019283524282168185019081528a8752600a90955283862090518154935195519088166001600160c01b031990941693909317600160a01b63ffffffff90961695909502949094176001600160c01b0316600160c01b92909116919091021790915583519051869391909116907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a48051610e31906000856001612e0d565b60006001600160e01b0319821663152a902d60e11b14806109cf57506109cf82612e19565b610e318383836001612e24565b6000612d6d836001613967565b9050612d78816120ac565b8015612d9957506000818152600a60205260409020546001600160a01b0316155b15610e31576000818152600a602090815260409182902084518154928601519386015167ffffffffffffffff16600160c01b026001600160c01b0363ffffffff909516600160a01b026001600160c01b03199094166001600160a01b03909216919091179290921792909216179055505050565b610bbc84848484613107565b60006109cf8261317f565b600154600160a01b900460ff1615612e715760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610abb565b6005546001600160a01b038516612ecb5760405163227c9e7d60e01b815260206004820152600560248201527f5f6d696e740000000000000000000000000000000000000000000000000000006044820152606401610abb565b83612ee95760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03851660009081526009602052604090208054600160801b67ffffffffffffffff19821667ffffffffffffffff8084168901811691821783900481168901169091027fffffffffffffffff0000000000000000ffffffffffffffff000000000000000090921617178155600885046007861615612f6b576001015b60005b8181101561300957604080516060810182526001600160a01b03808b1682526002602080840191825267ffffffffffffffff428116858701908152600888028b016000908152600a909352959091209351845492519551909116600160c01b026001600160c01b0363ffffffff96909616600160a01b026001600160c01b031990931691909316171792909216919091179055600101612f6e565b508286810185801561302457506001600160a01b0389163b15155b156130ad575b60405182906001600160a01b038b16906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461307560008a848060010195508a61292f565b613092576040516368d2bf6b60e11b815260040160405180910390fd5b8082141561302a5784600554146130a857600080fd5b6130f3565b5b6040516001830192906001600160a01b038b16906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808214156130ae575b506005555061261990506000868387612e0d565b600e546901000000000000000000900460ff1661312357610bbc565b60005b81811015612619576000600d8161313d8487613967565b81526020810191909152604001600020805467ffffffffffffffff191667ffffffffffffffff9290921691909117905580613177816139ae565b915050613126565b60006001600160e01b031982166380ac58cd60e01b14806131b057506001600160e01b03198216635b5e139f60e01b145b806109cf57506301ffc9a760e01b6001600160e01b03198316146109cf565b8280546131db906138b7565b90600052602060002090601f0160209004810192826131fd5760008555613243565b82601f1061321657805160ff1916838001178555613243565b82800160010185558215613243579182015b82811115613243578251825591602001919060010190613228565b5061324f929150613253565b5090565b5b8082111561324f5760008155600101613254565b6001600160e01b031981168114611ec957600080fd5b60006020828403121561329057600080fd5b8135611c8f81613268565b60005b838110156132b657818101518382015260200161329e565b83811115610bbc5750506000910152565b600081518084526132df81602086016020860161329b565b601f01601f19169290920160200192915050565b602081526000611c8f60208301846132c7565b60006020828403121561331857600080fd5b5035919050565b80356001600160a01b038116811461333657600080fd5b919050565b6000806040838503121561334e57600080fd5b6133578361331f565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156133a4576133a4613365565b604052919050565b600067ffffffffffffffff8311156133c6576133c6613365565b6133d9601f8401601f191660200161337b565b90508281528383830111156133ed57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261341557600080fd5b611c8f838335602085016133ac565b6000806040838503121561343757600080fd5b82359150602083013567ffffffffffffffff81111561345557600080fd5b61346185828601613404565b9150509250929050565b803567ffffffffffffffff8116811461333657600080fd5b6000806040838503121561349657600080fd5b823591506134a66020840161346b565b90509250929050565b6000806000606084860312156134c457600080fd5b6134cd8461331f565b95602085013595506040909401359392505050565b604080825283519082018190526000906020906060840190828701845b8281101561351b578151845292840192908401906001016134ff565b50505092019290925292915050565b60008060006060848603121561353f57600080fd5b6135488461331f565b92506135566020850161331f565b9150604084013590509250925092565b6000806040838503121561357957600080fd5b50508035926020909101359150565b8035801515811461333657600080fd5b600060a082840312156135aa57600080fd5b60405160a0810181811067ffffffffffffffff821117156135cd576135cd613365565b6040526135d983613588565b81526135e76020840161346b565b60208201526135f860408401613588565b60408201526136096060840161346b565b606082015261361a6080840161346b565b60808201529392505050565b60006020828403121561363857600080fd5b813567ffffffffffffffff81111561364f57600080fd5b6125aa84828501613404565b60006020828403121561366d57600080fd5b611c8f8261331f565b6000806040838503121561368957600080fd5b6136928361331f565b91506134a660208401613588565b600080600080608085870312156136b657600080fd5b6136bf8561331f565b93506136cd6020860161331f565b925060408501359150606085013567ffffffffffffffff8111156136f057600080fd5b8501601f8101871361370157600080fd5b613710878235602084016133ac565b91505092959194509250565b6000602080838503121561372f57600080fd5b823567ffffffffffffffff8082111561374757600080fd5b818501915085601f83011261375b57600080fd5b81358181111561376d5761376d613365565b8060051b915061377e84830161337b565b818152918301840191848101908884111561379857600080fd5b938501935b838510156137b65784358252938501939085019061379d565b98975050505050505050565b6020808252825182820181905260009190848201906040850190845b8181101561380457835167ffffffffffffffff16835292840192918401916001016137de565b50909695505050505050565b60006080828403121561382257600080fd5b6040516080810181811067ffffffffffffffff8211171561384557613845613365565b6040526138518361346b565b815261385f6020840161346b565b60208201526138706040840161346b565b60408201526138816060840161346b565b60608201529392505050565b600080604083850312156138a057600080fd5b6138a98361331f565b91506134a66020840161331f565b600181811c908216806138cb57607f821691505b602082108114156138ec57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561394e5761394e61391e565b500290565b600082613962576139626138f2565b500490565b6000821982111561397a5761397a61391e565b500190565b6000835161399181846020880161329b565b8351908301906139a581836020880161329b565b01949350505050565b60006000198214156139c2576139c261391e565b5060010190565b60006001600160a01b038087168352808616602084015250836040830152608060608301526139fb60808301846132c7565b9695505050505050565b600060208284031215613a1757600080fd5b8151611c8f81613268565b600082821015613a3457613a3461391e565b500390565b600082613a4857613a486138f2565b50069056fe4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572a264697066735822122093319dea257552757818ab7f261171c9a380e0cd00eb70c39dac4837d88b49ca64736f6c634300080c0033

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading
[ Download: CSV Export  ]
[ Download: CSV Export  ]

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