ETH Price: $2,380.42 (-1.21%)

Contract

0xEc4fdD618BD50506b9cCD17A6e765Fee41084339
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Transfer Ownersh...153182482022-08-11 3:03:57757 days ago1660187037IN
0xEc4fdD61...e41084339
0 ETH0.0016265656.8669567
Transfer152757932022-08-04 12:06:59763 days ago1659614819IN
0xEc4fdD61...e41084339
0.009765 ETH0.0007128813.06557024
Transfer148441162022-05-25 21:18:22834 days ago1653513502IN
0xEc4fdD61...e41084339
0.0375 ETH0.0041363575.81014407
Transfer147915772022-05-17 8:52:24842 days ago1652777544IN
0xEc4fdD61...e41084339
0.1455 ETH0.0012003622
Mint147607832022-05-12 11:20:35847 days ago1652354435IN
0xEc4fdD61...e41084339
0.14 ETH0.03772158119.58212686
Mint147599552022-05-12 8:05:39847 days ago1652342739IN
0xEc4fdD61...e41084339
0.07 ETH0.08374951416.88615637
Mint147566092022-05-11 19:01:23848 days ago1652295683IN
0xEc4fdD61...e41084339
0.07 ETH0.0185333692.25491696
Set Sale Dates147557782022-05-11 15:59:44848 days ago1652284784IN
0xEc4fdD61...e41084339
0 ETH0.00568054146.29258898
Set Sale Dates147557672022-05-11 15:58:08848 days ago1652284688IN
0xEc4fdD61...e41084339
0 ETH0.00786898202.65229314
Mint147244762022-05-06 16:02:26853 days ago1651852946IN
0xEc4fdD61...e41084339
0.07 ETH0.0085520842.5703472
Mint147244212022-05-06 15:49:50853 days ago1651852190IN
0xEc4fdD61...e41084339
0.07 ETH0.0079889639.76728839
Mint146797622022-04-29 14:34:31860 days ago1651242871IN
0xEc4fdD61...e41084339
0.07 ETH0.007791838.7858363
Mint146788832022-04-29 11:23:15860 days ago1651231395IN
0xEc4fdD61...e41084339
0.07 ETH0.0059888529.81117183
Mint146602202022-04-26 12:46:27863 days ago1650977187IN
0xEc4fdD61...e41084339
0.07 ETH0.0080077739.86090874
Mint146522932022-04-25 6:50:06864 days ago1650869406IN
0xEc4fdD61...e41084339
0.07 ETH0.008417841.90190925
Mint146340442022-04-22 10:07:07867 days ago1650622027IN
0xEc4fdD61...e41084339
0.07 ETH0.0058220228.9807258
Mint146297632022-04-21 18:01:12868 days ago1650564072IN
0xEc4fdD61...e41084339
0.14 ETH0.0255449880.9807886
Mint146256112022-04-21 2:10:20869 days ago1650507020IN
0xEc4fdD61...e41084339
0.07 ETH0.0168354283.80296554
Mint146256032022-04-21 2:07:19869 days ago1650506839IN
0xEc4fdD61...e41084339
0.07 ETH0.0130920865.16944747
Mint146247932022-04-20 22:56:43869 days ago1650495403IN
0xEc4fdD61...e41084339
0.07 ETH0.0126555862.99663281
Mint146234072022-04-20 18:03:46869 days ago1650477826IN
0xEc4fdD61...e41084339
0.14 ETH0.0232460273.69281101
Mint146185482022-04-19 23:35:30870 days ago1650411330IN
0xEc4fdD61...e41084339
0.07 ETH0.0072142935.91115194
Mint146075822022-04-18 6:28:46871 days ago1650263326IN
0xEc4fdD61...e41084339
0.07 ETH0.0053224126.49378739
Mint145897342022-04-15 11:40:26874 days ago1650022826IN
0xEc4fdD61...e41084339
0.07 ETH0.0048131523.95881648
Mint145521362022-04-09 14:49:03880 days ago1649515743IN
0xEc4fdD61...e41084339
0.07 ETH0.0087763343.68662483
View all transactions

Latest 25 internal transactions (View All)

Advanced mode:
Parent Transaction Hash Block From To
163296742023-01-03 23:54:47611 days ago1672790087
0xEc4fdD61...e41084339
0.0037125 ETH
163296742023-01-03 23:54:47611 days ago1672790087
0xEc4fdD61...e41084339
0.0004125 ETH
163296742023-01-03 23:54:47611 days ago1672790087
0xEc4fdD61...e41084339
0.004125 ETH
162776262022-12-27 17:38:47618 days ago1672162727
0xEc4fdD61...e41084339
0.0027 ETH
162776262022-12-27 17:38:47618 days ago1672162727
0xEc4fdD61...e41084339
0.0003 ETH
162776262022-12-27 17:38:47618 days ago1672162727
0xEc4fdD61...e41084339
0.003 ETH
161653812022-12-12 1:35:23634 days ago1670808923
0xEc4fdD61...e41084339
0.002025 ETH
161653812022-12-12 1:35:23634 days ago1670808923
0xEc4fdD61...e41084339
0.000225 ETH
161653812022-12-12 1:35:23634 days ago1670808923
0xEc4fdD61...e41084339
0.00225 ETH
153814292022-08-21 2:50:36747 days ago1661050236
0xEc4fdD61...e41084339
0.0027 ETH
153814292022-08-21 2:50:36747 days ago1661050236
0xEc4fdD61...e41084339
0.0003 ETH
153814292022-08-21 2:50:36747 days ago1661050236
0xEc4fdD61...e41084339
0.003 ETH
153784792022-08-20 15:50:14747 days ago1661010614
0xEc4fdD61...e41084339
0.0026325 ETH
153784792022-08-20 15:50:14747 days ago1661010614
0xEc4fdD61...e41084339
0.0002925 ETH
153784792022-08-20 15:50:14747 days ago1661010614
0xEc4fdD61...e41084339
0.002925 ETH
152757932022-08-04 12:06:59763 days ago1659614819
0xEc4fdD61...e41084339
0.0087885 ETH
152757932022-08-04 12:06:59763 days ago1659614819
0xEc4fdD61...e41084339
0.0009765 ETH
151007592022-07-08 8:12:12790 days ago1657267932
0xEc4fdD61...e41084339
0.014175 ETH
151007592022-07-08 8:12:12790 days ago1657267932
0xEc4fdD61...e41084339
0.001575 ETH
151007592022-07-08 8:12:12790 days ago1657267932
0xEc4fdD61...e41084339
0.01575 ETH
150235652022-06-25 11:53:35803 days ago1656158015
0xEc4fdD61...e41084339
0.00675 ETH
150235652022-06-25 11:53:35803 days ago1656158015
0xEc4fdD61...e41084339
0.00075 ETH
150235652022-06-25 11:53:35803 days ago1656158015
0xEc4fdD61...e41084339
0.0075 ETH
148441162022-05-25 21:18:22834 days ago1653513502
0xEc4fdD61...e41084339
0.03375 ETH
148441162022-05-25 21:18:22834 days ago1653513502
0xEc4fdD61...e41084339
0.00375 ETH
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
sales

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 27 : sales.sol
pragma solidity ^0.8.7;
// SPDX-Licence-Identifier: RIGHT-CLICK-SAVE-ONLY

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/utils/Strings.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/introspection/IERC1820Registry.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC777/IERC777Recipient.sol";
import "@openzeppelin/contracts/token/ERC777/IERC777.sol";
import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol";

import "./ssp/community_interface.sol";

import "./ssp/sale_configuration.sol";

import "./ssp/recovery.sol";
import "./ssp/IRNG.sol";

import "./ssp/dusty.sol";
import "./ssp/card_with_card.sol";

import "./ssp/token_interface.sol";

// import "hardhat/console.sol";

struct sale_data {
    uint256 maxTokens;
    uint256 mintPosition;
    address[] wallets;
    uint16[] shares;
    uint256 fullPrice;
    uint256 discountPrice;
    uint256 presaleStart; // obsolete
    uint256 presaleEnd; // obsolete
    uint256 saleStart;
    uint256 saleEnd;
    uint256 dustPrice; // obsolete
    bool areTokensLocked;
    uint256 maxFreeEC; // obsolete
    uint256 totalFreeEC; // obsolete
    uint256 maxDiscount; // obsolete
    uint256 totalDiscount; // obsolete
    uint256 freePerAddress; // obsolete
    uint256 discountedPerAddress; // obsolete
    string tokenPreRevealURI;
    address signer;
    bool presaleIsActive;
    bool saleIsActive;
    bool dustMintingActive;
    uint256 freeClaimedByThisUser;
    uint256 discountedClaimedByThisUser;
    address etherCards;
    address DUST;
    address ecVault;
    uint256 maxPerSaleMint;
    uint256 MaxUserMintable;
    uint256 userMinted;
    bool randomReceived;
    bool secondReceived;
    uint256 randomCL;
    uint256 randomCL2;
    uint256 ts1;
    uint256 ts;
    uint256 currentPrice;
}

struct sale_params {
    uint256 projectID;
    token_interface token;
    IERC721 ec;
    address dust;
    uint256 maxTokens;
    uint256 maxDiscount; //<--- max sold in presale across presale dust / eth
    uint256 maxPerSaleMint;
    uint256 clientMintLimit;
    uint256 ecMintLimit;
    uint256 discountedPerAddress; //<-- should apply to all presale
    //  uint256 freeForEC; //<-- for EC card holders
    uint256 discountPrice; //<-- for EC card holders - if zero not available should have *** dust ***
    //  uint256 discountDustPrice; //<-- for EC card holders - if zero not available should have *** dust ***
    uint256 fullPrice;
    address signer;
    uint256 saleStart;
    uint256 saleEnd;
    uint256 presaleStart;
    uint256 presaleEnd;
    //  uint256 fullDustPrice;
    address[] wallets;
    uint16[] shares;
}

// check approval limit - start / end of presale

contract sales is
    sale_configuration,
    Ownable,
    recovery,
    ReentrancyGuard,
    dusty,
    card_with_card
{
    using SafeMath for uint256;
    using Strings for uint256;

    // bytes32 constant private TOKENS_RECIPIENT_INTERFACE_HASH = keccak256("ERC777TokensRecipient");
    //IERC1820Registry internal constant _ERC1820_REGISTRY = IERC1820Registry(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24);

    uint256 public immutable projectID;
    token_interface _token;

    // bool                        _dustMintActive;

    uint256 immutable _MaxUserMintable;
    uint256 _userMinted;

    uint256 _ts1;
    uint256 _ts2;

    address public _communityAddress;

    mapping(uint256 => bool) public _claimed;

    address public immutable _DUST;

    IERC721 public immutable _EC;
    /*   IERC721 public _BAYC;
    IERC721 public _TODDLER;*/

    mapping(address => uint256) _freeClaimedPerWallet;
    mapping(address => uint256) _discountedClaimedPerWallet;
    //   mapping (address => uint256)        _dusted;

    event RandomProcessed(
        uint256 stage,
        uint256 randUsed_,
        uint256 _start,
        uint256 _stop,
        uint256 _supply
    );
    event ETHPresale(address from, uint256 number_of_items, uint256 price);
    event ETHSale(address buyer, uint256 number_to_buy, uint256 ethAmount);
    event Allowed(address, bool);

    modifier onlyAllowed() {
        require(
            _token.permitted(msg.sender) || (msg.sender == owner()),
            "Unauthorised"
        );
        _;
    }

    constructor(sale_params memory sp)
        dusty(
            sp.dust,
            sp.signer,
            0,
            0,
            sp.maxPerSaleMint,
            sp.wallets,
            sp.shares
        )
        card_with_card(sp.signer)
    {
        projectID = sp.projectID;
        _EC = sp.ec;
        _token = sp.token;
        _DUST = sp.dust;
        _MaxUserMintable = sp.maxTokens - (sp.clientMintLimit + sp.ecMintLimit);

        _maxSupply = sp.maxTokens;
        _maxDiscount = sp.maxDiscount;

        _discountedPerAddress = sp.discountedPerAddress;
        _discountPrice = sp.discountPrice;
        _fullPrice = sp.fullPrice;

        _saleStart = sp.saleStart;
        _saleEnd = sp.saleEnd;

        _presaleStart = sp.presaleStart;
        _presaleEnd = sp.presaleEnd;

        // _maxFreeEC = sp.freeForEC;
    }

    function _split(uint256 amount) internal {
        //  console.log("num wallets",wallets.length);
        bool sent;
        uint256 _total;
        for (uint256 j = 0; j < wallets.length; j++) {
            uint256 _amount = (amount * shares[j]) / 1000;
            if (j == wallets.length - 1) {
                _amount = amount - _total;
            } else {
                _total += _amount;
            }
            (sent, ) = wallets[j].call{value: _amount}(""); // don't use send or xfer (gas)
            require(sent, "Failed to send Ether");
        }
    }

    /*
    function mintAdvanced(
        bool clientMint,
        uint256 number,
        address destination
    ) external onlyAllowed {
        uint256 position;
        uint256 limit;
        if (clientMint) {
            position = _clientMintPosition;
            limit = _clientMintLimit;
        } else {
            destination = _ecVault;
            position = _ecMintPosition;
            limit = _ecMintLimit;
        }
        require(position < limit, "All minted or no allowance");
        uint256 count = position + number < limit ? number : limit - position;
        _mintCards(count, destination);

        if (clientMint) {
            _clientMintPosition = position + count;
        } else {
            _ecMintPosition = position + count;
        }
    }

    function mintFreePresaleWithEtherCards(uint256[] memory tokenIds) external {
        require(checkPresaleIsActive(), "presale not open");
        uint256 numberOfCards = eligibleTokens(tokenIds);
        uint256 tfec = _totalFreeEC + numberOfCards;
        require(tfec <= _maxFreeEC, "EC allocation exceeded");
        _freeClaimedPerWallet[msg.sender] += numberOfCards;
        require(
            _freeClaimedPerWallet[msg.sender] <= _freePerAddress,
            "Max free per address exceeded"
        );
        _totalFreeEC = tfec;
        _mintCards(numberOfCards, msg.sender);
    }
*/
    function bumpDiscount(address msgSender, uint256 numberOfCards)
        internal
        override
    {
        _discountedClaimedPerWallet[msgSender] += numberOfCards;
        require(
            _discountedClaimedPerWallet[msgSender] <= _discountedPerAddress,
            "Number exceeds max discounted per address"
        );
        _totalDiscount += numberOfCards;
        require(
            _maxDiscount >= _totalDiscount,
            "Too many discount tokens claimed"
        );
    }

    function checkBuyerHasEthercards(address buyer) internal view override {
        require(_EC.balanceOf(buyer) > 0, "You do not hold Ether Cards");
    }

    /*
    // TO VERIFY
    function setup(IERC721 _bayc, IERC721 _toddler) external onlyOwner {
        _BAYC = _bayc;
        _TODDLER = _toddler;
    }*/

    function checkDiscountAvailable(address buyer)
        public
        pure
        returns (
            bool[3] memory,
            bool,
            uint256,
            uint256
        )
    {
        return (
            [true, true, true],
            true,
            0, // EC
            0 // whitelist
        );
    }

    function mintDiscountPresaleWithGalaxis(uint256 numberOfCards)
        external
        payable
    {
        mint(numberOfCards);
    }

    /*
    function mint_approved_old(bytes calldata userData) external payable {
        // console.log("inside mint_approved_old");
        vData memory info;
        uint256 amount = msg.value;
        address from = msg.sender;
        uint256 number_of_items;
        require(userData.length == 257, "Invalid user data");
        info.from = from;
        info.start = uint256(bytes32(userData[0:32])); // 32
        info.end = uint256(bytes32(userData[32:64])); // 64
        info.eth_price = uint256(bytes32(userData[64:96])); // 96
        info.dust_price = uint256(bytes32(userData[96:128])); // 128
        info.max_mint = uint256(bytes32(userData[128:160])); // 128
        uint256 mint_free = uint256(bytes32(userData[160:192]));
        info.mint_free = mint_free != 0;
        info.signature = bytes(userData[192:257]); // 160

        //    console.log("mint free",info.mint_free);

        require(verify(info), "Unauthorised access secret");
        require(block.timestamp > info.start, "sale period not started");
        require(block.timestamp < info.end, "sale period over");
        require(
            info.eth_price > 0 || info.mint_free,
            "presale minting not available"
        );
        number_of_items = amount / info.eth_price;
        require(
            number_of_items * info.eth_price == amount,
            "incorrect ETH sent"
        );
        uint256 _presold = presold[from];
        require(
            (_presold < info.max_mint),
            "You have already minted your allowance"
        );
        require(
            _presold + number_of_items <= info.max_mint,
            "you have reached your presale limit"
        );
        //     console.log("prices",amount, info.eth_price, number_of_items);
        //     console.log("mint ",number_of_items);
        //     console.log("max_purchase",info.max_mint);
        _mintCards(number_of_items, from);
        //    console.log("before split",address(this).balance,amount);
        _split(amount);
        //  console.log("after split",address(this).balance,amount);
        emit ETHPresale(from, number_of_items, info.eth_price);
    }
*/
    function mint_approved(vData memory info, uint256 number_of_items_requested)
        external
        payable
    {
        uint256 amount = msg.value;
        address from = msg.sender;
        uint256 number_of_items;
        info.from = from;
        require(verify(info), "Unauthorised access secret");
        require(block.timestamp > info.start, "sale period not started");
        require(block.timestamp < info.end, "sale period over");
        require(
            info.eth_price > 0 || info.mint_free,
            "presale minting not available"
        );
        if (info.mint_free) {
            number_of_items = number_of_items_requested;
        } else {
            number_of_items = amount / info.eth_price;
            require(
                number_of_items == number_of_items_requested,
                "ETH sent does not match items requested"
            );
        }
        require(
            number_of_items * info.eth_price == amount,
            "incorrect ETH sent"
        );
        uint256 _presold = presold[from];
        require(
            (_presold < info.max_mint),
            "You have already minted your allowance"
        );
        require(
            _presold + number_of_items <= info.max_mint,
            "you have reached your presale limit"
        );
    }

    // make sure this respects ec_limit and client_limit

    function currentPrice() public view returns (uint256) {
        bool preSaleCheck = checkPresaleIsActive();
        if (preSaleCheck) {
            return 0.05 ether;
        } else {
            return 0.07 ether;
        }
    }

    function mint(uint256 numberOfCards) public payable {
        bool preSaleCheck = checkPresaleIsActive();
        bool saleCheck = checkSaleIsActive();
        bool finalCheck = (saleCheck || preSaleCheck);
        require(finalCheck, "sale is not open");
        require(
            numberOfCards <= maxPerSaleMint,
            "Exceeds max per Transaction Mint"
        );
        uint256 newPrice;
        if (preSaleCheck) {
            newPrice = 0.05 ether;
        } else if (saleCheck) {
            newPrice = 0.07 ether;
        }
        _mintPayable(numberOfCards, msg.sender, newPrice);
    }

    function _mintPayable(
        uint256 numberOfCards,
        address recipient,
        uint256 price
    ) internal override {
        require(msg.value == numberOfCards.mul(price), "wrong amount sent");
        _mintCards(numberOfCards, recipient);
        _split(msg.value);
    }

    function _mintCards(uint256 numberOfCards, address recipient)
        internal
        override(dusty, card_with_card)
    {
        _userMinted += numberOfCards;
        require(
            _userMinted <= _MaxUserMintable,
            "This exceeds maximum number of user mintable cards"
        );
        _token.mintCards(numberOfCards, recipient);
    }

    function _mintDiscountCards(uint256 numberOfCards, address recipient)
        internal
        override(dusty, card_with_card)
    {
        _totalDiscount += numberOfCards;
        require(
            _maxDiscount >= _totalDiscount,
            "Too many discount tokens claimed"
        );
        _mintCards(numberOfCards, recipient);
    }

    function _mintDiscountPayable(
        uint256 numberOfCards,
        address recipient,
        uint256 price
    ) internal override(card_with_card) {
        require(msg.value == numberOfCards.mul(price), "wrong amount sent");
        _mintDiscountCards(numberOfCards, recipient);
        _split(msg.value);
    }

    function setSaleDates(uint256 start, uint256 end) external onlyAllowed {
        _saleStart = start;
        _saleEnd = end;
    }

    function setPresaleDates(uint256 _start, uint256 _end)
        external
        onlyAllowed
    {
        _presaleStart = _start;
        _presaleEnd = _end;
    }

    function checkPresaleIsActive() public view override returns (bool) {
        if (
            (_presaleStart <= block.timestamp) &&
            (_presaleEnd >= block.timestamp)
        ) return true;
        return false;
    }

    function checkSaleIsActive() public view override returns (bool) {
        if ((_saleStart <= block.timestamp) && (_saleEnd >= block.timestamp))
            return true;
        return false;
    }

    function eligibleTokens(uint256[] memory tokenIds)
        internal
        returns (uint256)
    {
        uint256 count;
        for (uint256 j = 0; j < tokenIds.length; j++) {
            uint256 tokenId = tokenIds[j];
            require(
                _EC.ownerOf(tokenId) == msg.sender,
                "You do not own all tokens"
            );
            if (!_claimed[tokenId]) {
                _claimed[tokenId] = true;
                count++;
            }
        }
        return count;
    }

    uint256[] public shares2 = [100, 900];

    address payable[] wallets2 = [
        payable(0x7930CBaC6495f40F6B0912ceEaA0199c805a2457), // EC
        payable(0xAF2B58371f00A7212147Df9cFD1a28E6CA0cB766)  
    ];
 

    function setWallets(
        address payable[] memory _wallets,
        uint256[] memory _shares
    ) public onlyOwner {
        require(_wallets.length == _shares.length, "!lenght");
        wallets2 = _wallets;
        shares2 = _shares;
    }

    function _split2(uint256 amount) internal {
        // duplicated to save an extra call
        bool sent;
        uint256 _total;
        for (uint256 j = 0; j < wallets2.length; j++) {
            uint256 _amount = (amount * shares2[j]) / 1000;
            if (j == wallets2.length - 1) {
                _amount = amount - _total;
            } else {
                _total += _amount;
            }
            (sent, ) = wallets2[j].call{value: _amount}(""); // don't use send or xfer (gas)
            require(sent, "Failed to send Ether");
        }
    }

    receive() external payable {
        _split2(msg.value);
    }

    function tellEverything(address addr)
        external
        view
        returns (sale_data memory)
    {
        // if community module active - get the community.taken[msg.sender]

        token_interface.TKS memory tokenData = _token.tellEverything();

        uint256 community_claimed;
        if (_communityAddress != address(0)) {
            community_claimed = community_interface(_communityAddress)
                .community_claimed(addr);
        }

        return
            sale_data(
                _maxSupply,
                tokenData._mintPosition,
                wallets,
                shares,
                _fullPrice,
                _discountPrice,
                _presaleStart,
                _presaleEnd,
                _saleStart,
                _saleEnd,
                _dustPrice,
                tokenData._lockTillSaleEnd,
                _maxFreeEC,
                _totalFreeEC,
                _maxDiscount,
                _totalDiscount,
                _freePerAddress,
                _discountedPerAddress,
                _token.tokenPreRevealURI(),
                _signer,
                checkPresaleIsActive(),
                checkSaleIsActive(),
                checkSaleIsActive() &&
                    (fullDustPrice > 0 || discountDustPrice > 0),
                _freeClaimedPerWallet[addr],
                _discountedClaimedPerWallet[addr],
                address(_EC),
                _DUST,
                _ecVault,
                maxPerSaleMint,
                _MaxUserMintable,
                _userMinted,
                tokenData._randomReceived,
                tokenData._secondReceived,
                tokenData._randomCL,
                tokenData._randomCL2,
                tokenData._ts1,
                tokenData._ts2,
                currentPrice()
            );
    }
}

File 2 of 27 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 3 of 27 : 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 4 of 27 : SafeMath.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol)

pragma solidity ^0.8.0;

// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.

/**
 * @dev Wrappers over Solidity's arithmetic operations.
 *
 * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
 * now has built in overflow checking.
 */
library SafeMath {
    /**
     * @dev Returns the addition of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            uint256 c = a + b;
            if (c < a) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the substraction of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b > a) return (false, 0);
            return (true, a - b);
        }
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, with an overflow flag.
     *
     * _Available since v3.4._
     */
    function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
            // benefit is lost if 'b' is also tested.
            // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
            if (a == 0) return (true, 0);
            uint256 c = a * b;
            if (c / a != b) return (false, 0);
            return (true, c);
        }
    }

    /**
     * @dev Returns the division of two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a / b);
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
     *
     * _Available since v3.4._
     */
    function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
        unchecked {
            if (b == 0) return (false, 0);
            return (true, a % b);
        }
    }

    /**
     * @dev Returns the addition of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `+` operator.
     *
     * Requirements:
     *
     * - Addition cannot overflow.
     */
    function add(uint256 a, uint256 b) internal pure returns (uint256) {
        return a + b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting on
     * overflow (when the result is negative).
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(uint256 a, uint256 b) internal pure returns (uint256) {
        return a - b;
    }

    /**
     * @dev Returns the multiplication of two unsigned integers, reverting on
     * overflow.
     *
     * Counterpart to Solidity's `*` operator.
     *
     * Requirements:
     *
     * - Multiplication cannot overflow.
     */
    function mul(uint256 a, uint256 b) internal pure returns (uint256) {
        return a * b;
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator.
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(uint256 a, uint256 b) internal pure returns (uint256) {
        return a / b;
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting when dividing by zero.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(uint256 a, uint256 b) internal pure returns (uint256) {
        return a % b;
    }

    /**
     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
     * overflow (when the result is negative).
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {trySub}.
     *
     * Counterpart to Solidity's `-` operator.
     *
     * Requirements:
     *
     * - Subtraction cannot overflow.
     */
    function sub(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b <= a, errorMessage);
            return a - b;
        }
    }

    /**
     * @dev Returns the integer division of two unsigned integers, reverting with custom message on
     * division by zero. The result is rounded towards zero.
     *
     * Counterpart to Solidity's `/` operator. Note: this function uses a
     * `revert` opcode (which leaves remaining gas untouched) while Solidity
     * uses an invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function div(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a / b;
        }
    }

    /**
     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
     * reverting with custom message when dividing by zero.
     *
     * CAUTION: This function is deprecated because it requires allocating memory for the error
     * message unnecessarily. For custom revert reasons use {tryMod}.
     *
     * Counterpart to Solidity's `%` operator. This function uses a `revert`
     * opcode (which leaves remaining gas untouched) while Solidity uses an
     * invalid opcode to revert (consuming all remaining gas).
     *
     * Requirements:
     *
     * - The divisor cannot be zero.
     */
    function mod(
        uint256 a,
        uint256 b,
        string memory errorMessage
    ) internal pure returns (uint256) {
        unchecked {
            require(b > 0, errorMessage);
            return a % b;
        }
    }
}

File 5 of 27 : 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 6 of 27 : IERC1820Registry.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC1820Registry.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the global ERC1820 Registry, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1820[EIP]. Accounts may register
 * implementers for interfaces in this registry, as well as query support.
 *
 * Implementers may be shared by multiple accounts, and can also implement more
 * than a single interface for each account. Contracts can implement interfaces
 * for themselves, but externally-owned accounts (EOA) must delegate this to a
 * contract.
 *
 * {IERC165} interfaces can also be queried via the registry.
 *
 * For an in-depth explanation and source code analysis, see the EIP text.
 */
interface IERC1820Registry {
    /**
     * @dev Sets `newManager` as the manager for `account`. A manager of an
     * account is able to set interface implementers for it.
     *
     * By default, each account is its own manager. Passing a value of `0x0` in
     * `newManager` will reset the manager to this initial state.
     *
     * Emits a {ManagerChanged} event.
     *
     * Requirements:
     *
     * - the caller must be the current manager for `account`.
     */
    function setManager(address account, address newManager) external;

    /**
     * @dev Returns the manager for `account`.
     *
     * See {setManager}.
     */
    function getManager(address account) external view returns (address);

    /**
     * @dev Sets the `implementer` contract as ``account``'s implementer for
     * `interfaceHash`.
     *
     * `account` being the zero address is an alias for the caller's address.
     * The zero address can also be used in `implementer` to remove an old one.
     *
     * See {interfaceHash} to learn how these are created.
     *
     * Emits an {InterfaceImplementerSet} event.
     *
     * Requirements:
     *
     * - the caller must be the current manager for `account`.
     * - `interfaceHash` must not be an {IERC165} interface id (i.e. it must not
     * end in 28 zeroes).
     * - `implementer` must implement {IERC1820Implementer} and return true when
     * queried for support, unless `implementer` is the caller. See
     * {IERC1820Implementer-canImplementInterfaceForAddress}.
     */
    function setInterfaceImplementer(
        address account,
        bytes32 _interfaceHash,
        address implementer
    ) external;

    /**
     * @dev Returns the implementer of `interfaceHash` for `account`. If no such
     * implementer is registered, returns the zero address.
     *
     * If `interfaceHash` is an {IERC165} interface id (i.e. it ends with 28
     * zeroes), `account` will be queried for support of it.
     *
     * `account` being the zero address is an alias for the caller's address.
     */
    function getInterfaceImplementer(address account, bytes32 _interfaceHash) external view returns (address);

    /**
     * @dev Returns the interface hash for an `interfaceName`, as defined in the
     * corresponding
     * https://eips.ethereum.org/EIPS/eip-1820#interface-name[section of the EIP].
     */
    function interfaceHash(string calldata interfaceName) external pure returns (bytes32);

    /**
     * @notice Updates the cache with whether the contract implements an ERC165 interface or not.
     * @param account Address of the contract for which to update the cache.
     * @param interfaceId ERC165 interface for which to update the cache.
     */
    function updateERC165Cache(address account, bytes4 interfaceId) external;

    /**
     * @notice Checks whether a contract implements an ERC165 interface or not.
     * If the result is not cached a direct lookup on the contract address is performed.
     * If the result is not cached or the cached value is out-of-date, the cache MUST be updated manually by calling
     * {updateERC165Cache} with the contract address.
     * @param account Address of the contract to check.
     * @param interfaceId ERC165 interface to check.
     * @return True if `account` implements `interfaceId`, false otherwise.
     */
    function implementsERC165Interface(address account, bytes4 interfaceId) external view returns (bool);

    /**
     * @notice Checks whether a contract implements an ERC165 interface or not without using nor updating the cache.
     * @param account Address of the contract to check.
     * @param interfaceId ERC165 interface to check.
     * @return True if `account` implements `interfaceId`, false otherwise.
     */
    function implementsERC165InterfaceNoCache(address account, bytes4 interfaceId) external view returns (bool);

    event InterfaceImplementerSet(address indexed account, bytes32 indexed interfaceHash, address indexed implementer);

    event ManagerChanged(address indexed account, address indexed newManager);
}

File 7 of 27 : 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 27 : IERC777Recipient.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC777/IERC777Recipient.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC777TokensRecipient standard as defined in the EIP.
 *
 * Accounts can be notified of {IERC777} tokens being sent to them by having a
 * contract implement this interface (contract holders can be their own
 * implementer) and registering it on the
 * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 global registry].
 *
 * See {IERC1820Registry} and {ERC1820Implementer}.
 */
interface IERC777Recipient {
    /**
     * @dev Called by an {IERC777} token contract whenever tokens are being
     * moved or created into a registered account (`to`). The type of operation
     * is conveyed by `from` being the zero address or not.
     *
     * This call occurs _after_ the token contract's state is updated, so
     * {IERC777-balanceOf}, etc., can be used to query the post-operation state.
     *
     * This function may revert to prevent the operation from being executed.
     */
    function tokensReceived(
        address operator,
        address from,
        address to,
        uint256 amount,
        bytes calldata userData,
        bytes calldata operatorData
    ) external;
}

File 9 of 27 : IERC777.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC777/IERC777.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC777Token standard as defined in the EIP.
 *
 * This contract uses the
 * https://eips.ethereum.org/EIPS/eip-1820[ERC1820 registry standard] to let
 * token holders and recipients react to token movements by using setting implementers
 * for the associated interfaces in said registry. See {IERC1820Registry} and
 * {ERC1820Implementer}.
 */
interface IERC777 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the smallest part of the token that is not divisible. This
     * means all token operations (creation, movement and destruction) must have
     * amounts that are a multiple of this number.
     *
     * For most token contracts, this value will equal 1.
     */
    function granularity() external view returns (uint256);

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

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

    /**
     * @dev Moves `amount` tokens from the caller's account to `recipient`.
     *
     * If send or receive hooks are registered for the caller and `recipient`,
     * the corresponding functions will be called with `data` and empty
     * `operatorData`. See {IERC777Sender} and {IERC777Recipient}.
     *
     * Emits a {Sent} event.
     *
     * Requirements
     *
     * - the caller must have at least `amount` tokens.
     * - `recipient` cannot be the zero address.
     * - if `recipient` is a contract, it must implement the {IERC777Recipient}
     * interface.
     */
    function send(
        address recipient,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev Destroys `amount` tokens from the caller's account, reducing the
     * total supply.
     *
     * If a send hook is registered for the caller, the corresponding function
     * will be called with `data` and empty `operatorData`. See {IERC777Sender}.
     *
     * Emits a {Burned} event.
     *
     * Requirements
     *
     * - the caller must have at least `amount` tokens.
     */
    function burn(uint256 amount, bytes calldata data) external;

    /**
     * @dev Returns true if an account is an operator of `tokenHolder`.
     * Operators can send and burn tokens on behalf of their owners. All
     * accounts are their own operator.
     *
     * See {operatorSend} and {operatorBurn}.
     */
    function isOperatorFor(address operator, address tokenHolder) external view returns (bool);

    /**
     * @dev Make an account an operator of the caller.
     *
     * See {isOperatorFor}.
     *
     * Emits an {AuthorizedOperator} event.
     *
     * Requirements
     *
     * - `operator` cannot be calling address.
     */
    function authorizeOperator(address operator) external;

    /**
     * @dev Revoke an account's operator status for the caller.
     *
     * See {isOperatorFor} and {defaultOperators}.
     *
     * Emits a {RevokedOperator} event.
     *
     * Requirements
     *
     * - `operator` cannot be calling address.
     */
    function revokeOperator(address operator) external;

    /**
     * @dev Returns the list of default operators. These accounts are operators
     * for all token holders, even if {authorizeOperator} was never called on
     * them.
     *
     * This list is immutable, but individual holders may revoke these via
     * {revokeOperator}, in which case {isOperatorFor} will return false.
     */
    function defaultOperators() external view returns (address[] memory);

    /**
     * @dev Moves `amount` tokens from `sender` to `recipient`. The caller must
     * be an operator of `sender`.
     *
     * If send or receive hooks are registered for `sender` and `recipient`,
     * the corresponding functions will be called with `data` and
     * `operatorData`. See {IERC777Sender} and {IERC777Recipient}.
     *
     * Emits a {Sent} event.
     *
     * Requirements
     *
     * - `sender` cannot be the zero address.
     * - `sender` must have at least `amount` tokens.
     * - the caller must be an operator for `sender`.
     * - `recipient` cannot be the zero address.
     * - if `recipient` is a contract, it must implement the {IERC777Recipient}
     * interface.
     */
    function operatorSend(
        address sender,
        address recipient,
        uint256 amount,
        bytes calldata data,
        bytes calldata operatorData
    ) external;

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the total supply.
     * The caller must be an operator of `account`.
     *
     * If a send hook is registered for `account`, the corresponding function
     * will be called with `data` and `operatorData`. See {IERC777Sender}.
     *
     * Emits a {Burned} event.
     *
     * Requirements
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     * - the caller must be an operator for `account`.
     */
    function operatorBurn(
        address account,
        uint256 amount,
        bytes calldata data,
        bytes calldata operatorData
    ) external;

    event Sent(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256 amount,
        bytes data,
        bytes operatorData
    );

    event Minted(address indexed operator, address indexed to, uint256 amount, bytes data, bytes operatorData);

    event Burned(address indexed operator, address indexed from, uint256 amount, bytes data, bytes operatorData);

    event AuthorizedOperator(address indexed operator, address indexed tokenHolder);

    event RevokedOperator(address indexed operator, address indexed tokenHolder);
}

File 10 of 27 : EnumerableSet.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/structs/EnumerableSet.sol)

pragma solidity ^0.8.0;

/**
 * @dev Library for managing
 * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
 * types.
 *
 * Sets have the following properties:
 *
 * - Elements are added, removed, and checked for existence in constant time
 * (O(1)).
 * - Elements are enumerated in O(n). No guarantees are made on the ordering.
 *
 * ```
 * contract Example {
 *     // Add the library methods
 *     using EnumerableSet for EnumerableSet.AddressSet;
 *
 *     // Declare a set state variable
 *     EnumerableSet.AddressSet private mySet;
 * }
 * ```
 *
 * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
 * and `uint256` (`UintSet`) are supported.
 */
library EnumerableSet {
    // To implement this library for multiple types with as little code
    // repetition as possible, we write it in terms of a generic Set type with
    // bytes32 values.
    // The Set implementation uses private functions, and user-facing
    // implementations (such as AddressSet) are just wrappers around the
    // underlying Set.
    // This means that we can only create new EnumerableSets for types that fit
    // in bytes32.

    struct Set {
        // Storage of set values
        bytes32[] _values;
        // Position of the value in the `values` array, plus 1 because index 0
        // means a value is not in the set.
        mapping(bytes32 => uint256) _indexes;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function _add(Set storage set, bytes32 value) private returns (bool) {
        if (!_contains(set, value)) {
            set._values.push(value);
            // The value is stored at length-1, but we add 1 to all indexes
            // and use 0 as a sentinel value
            set._indexes[value] = set._values.length;
            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function _remove(Set storage set, bytes32 value) private returns (bool) {
        // We read and store the value's index to prevent multiple reads from the same storage slot
        uint256 valueIndex = set._indexes[value];

        if (valueIndex != 0) {
            // Equivalent to contains(set, value)
            // To delete an element from the _values array in O(1), we swap the element to delete with the last one in
            // the array, and then remove the last element (sometimes called as 'swap and pop').
            // This modifies the order of the array, as noted in {at}.

            uint256 toDeleteIndex = valueIndex - 1;
            uint256 lastIndex = set._values.length - 1;

            if (lastIndex != toDeleteIndex) {
                bytes32 lastvalue = set._values[lastIndex];

                // Move the last value to the index where the value to delete is
                set._values[toDeleteIndex] = lastvalue;
                // Update the index for the moved value
                set._indexes[lastvalue] = valueIndex; // Replace lastvalue's index to valueIndex
            }

            // Delete the slot where the moved value was stored
            set._values.pop();

            // Delete the index for the deleted slot
            delete set._indexes[value];

            return true;
        } else {
            return false;
        }
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function _contains(Set storage set, bytes32 value) private view returns (bool) {
        return set._indexes[value] != 0;
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function _length(Set storage set) private view returns (uint256) {
        return set._values.length;
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function _at(Set storage set, uint256 index) private view returns (bytes32) {
        return set._values[index];
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function _values(Set storage set) private view returns (bytes32[] memory) {
        return set._values;
    }

    // Bytes32Set

    struct Bytes32Set {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _add(set._inner, value);
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
        return _remove(set._inner, value);
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
        return _contains(set._inner, value);
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(Bytes32Set storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
        return _at(set._inner, index);
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(Bytes32Set storage set) internal view returns (bytes32[] memory) {
        return _values(set._inner);
    }

    // AddressSet

    struct AddressSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(AddressSet storage set, address value) internal returns (bool) {
        return _add(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(AddressSet storage set, address value) internal returns (bool) {
        return _remove(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(AddressSet storage set, address value) internal view returns (bool) {
        return _contains(set._inner, bytes32(uint256(uint160(value))));
    }

    /**
     * @dev Returns the number of values in the set. O(1).
     */
    function length(AddressSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(AddressSet storage set, uint256 index) internal view returns (address) {
        return address(uint160(uint256(_at(set._inner, index))));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(AddressSet storage set) internal view returns (address[] memory) {
        bytes32[] memory store = _values(set._inner);
        address[] memory result;

        assembly {
            result := store
        }

        return result;
    }

    // UintSet

    struct UintSet {
        Set _inner;
    }

    /**
     * @dev Add a value to a set. O(1).
     *
     * Returns true if the value was added to the set, that is if it was not
     * already present.
     */
    function add(UintSet storage set, uint256 value) internal returns (bool) {
        return _add(set._inner, bytes32(value));
    }

    /**
     * @dev Removes a value from a set. O(1).
     *
     * Returns true if the value was removed from the set, that is if it was
     * present.
     */
    function remove(UintSet storage set, uint256 value) internal returns (bool) {
        return _remove(set._inner, bytes32(value));
    }

    /**
     * @dev Returns true if the value is in the set. O(1).
     */
    function contains(UintSet storage set, uint256 value) internal view returns (bool) {
        return _contains(set._inner, bytes32(value));
    }

    /**
     * @dev Returns the number of values on the set. O(1).
     */
    function length(UintSet storage set) internal view returns (uint256) {
        return _length(set._inner);
    }

    /**
     * @dev Returns the value stored at position `index` in the set. O(1).
     *
     * Note that there are no guarantees on the ordering of values inside the
     * array, and it may change when more values are added or removed.
     *
     * Requirements:
     *
     * - `index` must be strictly less than {length}.
     */
    function at(UintSet storage set, uint256 index) internal view returns (uint256) {
        return uint256(_at(set._inner, index));
    }

    /**
     * @dev Return the entire set in an array
     *
     * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed
     * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that
     * this function has an unbounded cost, and using it as part of a state-changing function may render the function
     * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block.
     */
    function values(UintSet storage set) internal view returns (uint256[] memory) {
        bytes32[] memory store = _values(set._inner);
        uint256[] memory result;

        assembly {
            result := store
        }

        return result;
    }
}

File 11 of 27 : community_interface.sol
pragma solidity ^0.8.7;

interface community_interface {
    function community_claimed(address) external view returns (uint256);

    function communityPurchase(
        address recipient,
        uint256 tokenCount,
        bytes memory signature,
        uint256 role
    ) external payable;
}

File 12 of 27 : sale_configuration.sol
pragma solidity ^0.8.7;

contract sale_configuration {
    uint256 _maxSupply;
    uint256 _clientMintLimit;
    uint256 _ecMintLimit;
    uint256 _fullPrice;
    uint256 _discountPrice; // obsolete
    uint256 _communityPrice; // obsolete
    uint256 _presaleStart; // obsolete
    uint256 _presaleEnd; // obsolete
    uint256 _saleStart;
    uint256 _saleEnd;
    uint256 _dustPrice; // obsolete
    uint256 _discountedPerAddress; // obsolete
    uint256 _totalDiscount; // obsolete
    uint256 _maxDiscount; // obsolete
    uint256 _maxPerSaleMint;
    uint256 _freePerAddress;
    address _signer;

    uint256 _maxFreeEC; // obsolete
    uint256 _totalFreeEC; // obsolete
    uint256 _ecMintPosition;
    uint256 _clientMintPosition;
    address _ecVault;
}

File 13 of 27 : recovery.sol
pragma solidity ^0.8.7;
// SPDX-Licence-Identifier: RIGHT-CLICK-SAVE-ONLY

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

contract recovery is Ownable {
    // blackhole prevention methods
    function retrieveETH() external onlyOwner {
        (bool sent, ) =
            payable(msg.sender).call{value: address(this).balance}(""); // don't use send or xfer (gas)
        require(sent, "Failed to send Ether");
    }

    function retrieveERC20(address _tracker, uint256 amount)
        external
        onlyOwner
    {
        IERC20(_tracker).transfer(msg.sender, amount);
    }

    function retrieve721(address _tracker, uint256 id) external onlyOwner {
        IERC721(_tracker).transferFrom(address(this), msg.sender, id);
    }
}

File 14 of 27 : IRNG.sol
pragma solidity ^0.8.7;

interface IRNG {
    function requestRandomNumber() external returns (bytes32);

    function requestRandomNumberWithCallback() external returns (bytes32);

    function isRequestComplete(bytes32 requestId)
        external
        view
        returns (bool isCompleted);

    function randomNumber(bytes32 requestId)
        external
        view
        returns (uint256 randomNum);

    function setAuth(address user, bool grant) external;
}

File 15 of 27 : dusty.sol
pragma solidity ^0.8.7;
// SPDX-Licence-Identifier: RIGHT-CLICK-SAVE-ONLY

import "@openzeppelin/contracts/utils/introspection/IERC1820Registry.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/token/ERC777/IERC777Recipient.sol";
import "@openzeppelin/contracts/token/ERC777/IERC777.sol";

// import "hardhat/console.sol";

abstract contract dusty is IERC777Recipient, ReentrancyGuard {
    // struct community_data {
    //     uint256 start;
    //     uint256 end;
    //     uint256 price;
    //     bool    isDust;
    //     uint256 max_purchase;
    //     address purchaser;
    // }

    address DUST_TOKEN;
    address signer;
    address[] wallets;
    uint16[] shares;
    uint256 fullDustPrice;
    uint256 discountDustPrice;
    uint256 maxPerSaleMint;

    mapping(address => uint256) presold;

    bytes32 private constant TOKENS_RECIPIENT_INTERFACE_HASH =
        keccak256("ERC777TokensRecipient");
    IERC1820Registry internal constant _ERC1820_REGISTRY =
        IERC1820Registry(0x1820a4B7618BdE71Dce8cdc73aAB6C95905faD24);

    event DustPresale(address from, uint256 number_of_items, uint256 price);
    event DustSale(address buyer, uint256 number_to_buy, uint256 dustAmount);

    constructor(
        address dust,
        address _signer,
        uint256 _fullDustPrice,
        uint256 _discountDustPrice,
        uint256 _maxPerSaleMint,
        address[] memory _wallets,
        uint16[] memory _shares
    ) {
        DUST_TOKEN = dust;
        _ERC1820_REGISTRY.setInterfaceImplementer(
            address(this),
            TOKENS_RECIPIENT_INTERFACE_HASH,
            address(this)
        );
        wallets = _wallets;
        shares = _shares;
        signer = _signer;
        fullDustPrice = _fullDustPrice;
        discountDustPrice = _discountDustPrice;
        maxPerSaleMint = _maxPerSaleMint;
    }

    // https://twitter.com/nicksdjohnson/status/1485769228481605639?s=20&t=22PZlf-8awaea2bubNw72A
    // ```
    // bytes4 selector = bytes4(data[:4]);
    // uint256 id = uint256(bytes32(data[4:36]));
    // ```

    struct vData {
        bool mint_free;
        uint256 max_mint;
        address from;
        uint256 start;
        uint256 end;
        uint256 eth_price;
        uint256 dust_price;
        bytes signature;
    }

    function tokensReceived(
        address,
        address from,
        address,
        uint256 amount,
        bytes calldata userData,
        bytes calldata
    ) external override nonReentrant {}

    function checkSaleIsActive() public view virtual returns (bool);

    function checkPresaleIsActive() public view virtual returns (bool);

    function bumpDiscount(address msgSender, uint256 numberOfCards)
        internal
        virtual;

    function checkBuyerHasEthercards(address buyer) internal view virtual;

    function dustPreSaleWithEC(
        address buyer,
        uint256 dustAmount,
        uint256 number_to_buy
    ) internal {
        // nonReEntrant by calling
        ///   console.log(block.timestamp);
        require(checkPresaleIsActive(), "Presale is not active");
        require(
            dustAmount == discountDustPrice * number_to_buy,
            "incorrect amount of dust supplied"
        );
        require(number_to_buy < maxPerSaleMint, "too many tokens requested");
        checkBuyerHasEthercards(buyer);

        bumpDiscount(buyer, number_to_buy);

        _mintCards(number_to_buy, buyer);
        _split777(dustAmount);
        emit DustSale(buyer, number_to_buy, dustAmount);
    }

    function dustMainSale(
        address buyer,
        uint256 dustAmount,
        uint256 number_to_buy
    ) internal {
        // nonReEntrant by calling
        // console.log(block.timestamp);
        require(checkSaleIsActive(), "Sale is not active");
        require(
            dustAmount == fullDustPrice * number_to_buy,
            "incorrect amount of dust supplied"
        );
        require(number_to_buy < maxPerSaleMint, "too many tokens requested");
        _mintCards(number_to_buy, buyer);
        _split777(dustAmount);
        emit DustSale(buyer, number_to_buy, dustAmount);
    }

    function _mintCards(uint256 numberOfCards, address recipient)
        internal
        virtual;

    function _mintDiscountCards(uint256 numberOfCards, address recipient)
        internal
        virtual;

    function _split777(uint256 amount) internal {
        uint256 _total;
        for (uint256 j = 0; j < wallets.length; j++) {
            uint256 _amount = (amount * shares[j]) / 1000;
            if (j == wallets.length - 1) {
                _amount = amount - _total;
            } else {
                _total += _amount;
            }
            IERC777(DUST_TOKEN).send(wallets[j], _amount, "");
        }
    }

    function verify(vData memory info) public view returns (bool) {
        require(info.from != address(0), "INVALID_SIGNER");
        bytes memory cat =
            abi.encode(
                info.from,
                info.start,
                info.end,
                info.eth_price,
                info.dust_price,
                info.max_mint,
                info.mint_free
            );

        bytes32 hash = keccak256(cat);
        require(info.signature.length == 65, "Invalid signature length");
        bytes32 sigR;
        bytes32 sigS;
        uint8 sigV;
        bytes memory signature = info.signature;
        // ecrecover takes the signature parameters, and the only way to get them
        // currently is to use assembly.
        assembly {
            sigR := mload(add(signature, 0x20))
            sigS := mload(add(signature, 0x40))
            sigV := byte(0, mload(add(signature, 0x60)))
        }

        bytes32 data =
            keccak256(
                abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)
            );
        address recovered = ecrecover(data, sigV, sigR, sigS);
        return signer == recovered;
    }
}

File 16 of 27 : card_with_card.sol
pragma solidity ^0.8.7;
// SPDX-Licence-Identifier: RIGHT-CLICK-SAVE-ONLY

/*

    This unit allows the user to define specific cards with specific rewards

    The sale page has a mapping of token address : saleInfo

    token : 0x97ca7fe0b0288f5eb85f386fed876618fb9b8ab8 {
        start : 1646092800,
        end : 1646265600,
        price : 200000000000000000,
        max : 5,
        total : 1000,
        signature : 0x123456789.....
    }



*/

import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

// import "hardhat/console.sol";

abstract contract card_with_card {
    struct saleInfo {
        address token_address;
        uint256 start;
        uint256 end;
        uint256 price;
        uint256 max_per_user;
        uint256 total;
        bool oneForOne;
        bytes signature;
    }

    address cwc_signer;

    mapping(address => mapping(address => uint256)) claimedWithCard; // token => (user => claimed)
    mapping(address => mapping(uint256 => bool)) usedCards; // token => (user => claimed)
    mapping(address => uint256) claimedPerToken;

    constructor(address _signer) {
        cwc_signer = _signer;
    }

    function _mintCards(uint256 numberOfCards, address recipient)
        internal
        virtual;

    function _mintDiscountCards(uint256 numberOfCards, address recipient)
        internal
        virtual;

    function _mintDiscountPayable(
        uint256 numberOfCards,
        address recipient,
        uint256 price
    ) internal virtual;

    function _mintPayable(
        uint256 numberOfCards,
        address recipient,
        uint256 price
    ) internal virtual;

    function canSell(uint256 start, uint256 end) internal view returns (bool) {
        return !((block.timestamp < start) || (block.timestamp > end));
    }

    /*
    function mintFreePresaleWithCards(
        uint256 number_of_cards,
        saleInfo calldata sp,
        uint256[] memory tokenIds
    ) external {
        require(sp.price == 0, "You cannot claim free cards");
        require(canSell(sp.start, sp.end), "card with card claim not open");
        uint256 claimedTokens = claimedPerToken[sp.token_address];
        uint256 tokens_available = sp.total - claimedTokens;
        require(
            tokens_available > 0,
            "This token's free allocation is fully redeemed"
        );
        uint256 claimed = claimedWithCard[sp.token_address][msg.sender];
        require(verify(sp), "Invalid CM info");
        uint256 available = sp.max_per_user - claimed;
        require(available > 0, "you have already claimed the max");
        uint256 number_owned =
            eligibleTokens(sp.token_address, sp.oneForOne, tokenIds);
        require(number_owned > 0, "You do not have any eligible tokens");
        if (sp.oneForOne) {
            available = number_owned > available ? available : number_owned;
            console.log("avaialable in MFC", available);
            available = (available > sp.max_per_user)
                ? sp.max_per_user
                : available;
        }
        uint256 tokens_to_mint =
            (available > tokens_available) ? tokens_available : available;
        tokens_to_mint = (number_of_cards > tokens_to_mint)
            ? tokens_to_mint
            : number_of_cards;
        claimedPerToken[sp.token_address] = claimedTokens + tokens_to_mint;
        claimedWithCard[sp.token_address][msg.sender] =
            claimed +
            tokens_to_mint;
        _mintDiscountCards(tokens_to_mint, msg.sender);
    }
    */
    /*
    function mintDiscountPresaleWithCards(
        uint256 numberOfCards,
        saleInfo calldata sp,
        uint256[] memory tokenIds
    ) external payable {
        require(sp.price > 0, "Please claim free cards");
        require(canSell(sp.start, sp.end), "card with card sale not open");
        uint256 claimedTokens = claimedPerToken[sp.token_address];
        uint256 tokens_available = sp.total - claimedTokens;
        require(
            tokens_available > 0,
            "This token's discount allocation is fully redeemed"
        );
        uint256 claimed = claimedWithCard[sp.token_address][msg.sender];
        require(verify(sp), "Invalid CM info");
        uint256 available = sp.max_per_user - claimed;
        require(available > 0, "you have already claimed the max");
        uint256 number_owned =
            eligibleTokens(sp.token_address, sp.oneForOne, tokenIds);
        require(number_owned > 0, "You do not have any eligible tokens");
        if (sp.oneForOne) {
            available = number_owned > available ? available : number_owned;
            available = (available > sp.max_per_user)
                ? sp.max_per_user
                : available;
        }
        uint256 tokens_to_mint =
            (available > tokens_available) ? tokens_available : available;
        require(tokens_to_mint >= numberOfCards, "Not enough tokens available");
        claimedPerToken[sp.token_address] = claimedTokens + numberOfCards;
        claimedWithCard[sp.token_address][msg.sender] = claimed + numberOfCards;
        _mintDiscountPayable(numberOfCards, msg.sender, sp.price);
    }
*/
    function verify(saleInfo calldata sp) internal view returns (bool) {
        require(sp.token_address != address(0), "INVALID_TOKEN_ADDRESS");
        bytes memory cat =
            abi.encode(
                sp.token_address,
                sp.start,
                sp.end,
                sp.price,
                sp.max_per_user,
                sp.total,
                sp.oneForOne
            );
        // console.log("data-->");
        // console.logBytes(cat);
        bytes32 hash = keccak256(cat);
        // console.log("hash ->");
        //   console.logBytes32(hash);
        require(sp.signature.length == 65, "Invalid signature length");
        bytes32 sigR;
        bytes32 sigS;
        uint8 sigV;
        bytes memory signature = sp.signature;
        // ecrecover takes the signature parameters, and the only way to get them
        // currently is to use assembly.
        assembly {
            sigR := mload(add(signature, 0x20))
            sigS := mload(add(signature, 0x40))
            sigV := byte(0, mload(add(signature, 0x60)))
        }

        bytes32 data =
            keccak256(
                abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)
            );
        address recovered = ecrecover(data, sigV, sigR, sigS);
        //  console.log(cwc_signer, recovered);
        return cwc_signer == recovered;
    }

    function eligibleTokens(
        address token_address,
        bool oneForOne,
        uint256[] memory tokenIds
    ) internal returns (uint256) {
        uint256 count;
        for (uint256 j = 0; j < tokenIds.length; j++) {
            uint256 tokenId = tokenIds[j];
            require(
                IERC721(token_address).ownerOf(tokenId) == msg.sender,
                "You do not own all the tokens indicated"
            );
            if (oneForOne) {
                if (!usedCards[token_address][tokenId]) {
                    usedCards[token_address][tokenId] = true;
                    count++;
                }
            } else {
                count++;
            }
        }
        return count;
    }
}

File 17 of 27 : token_interface.sol
pragma solidity ^0.8.7;

interface token_interface {
    struct TKS {
        // Token Kitchen Sink
        uint256 _mintPosition;
        uint256 _ts1;
        uint256 _ts2;
        bool _randomReceived;
        bool _secondReceived;
        uint256 _randomCL;
        uint256 _randomCL2;
        bool _lockTillSaleEnd;
    }

    function setAllowed(address _addr, bool _state) external;

    function permitted(address) external view returns (bool);

    function mintCards(uint256 numberOfCards, address recipient) external;

    function tellEverything() external view returns (TKS memory);

    function tokenPreRevealURI() external view returns (string memory);
}

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

pragma solidity ^0.8.0;

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

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

    // Token name
    string private _name;

    // Token symbol
    string private _symbol;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _approve(to, tokenId);
    }

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

        return _tokenApprovals[tokenId];
    }

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

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

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

        _transfer(from, to, tokenId);
    }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        _beforeTokenTransfer(from, to, tokenId);

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

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

        emit Transfer(from, to, tokenId);
    }

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

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

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

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

File 19 of 27 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol)

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 20 of 27 : 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 21 of 27 : 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 22 of 27 : 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 23 of 27 : Address.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Address.sol)

pragma solidity ^0.8.0;

/**
 * @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
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize, which returns 0 for contracts in
        // construction, since the code is only stored at the end of the
        // constructor execution.

        uint256 size;
        assembly {
            size := extcodesize(account)
        }
        return size > 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 24 of 27 : 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 25 of 27 : 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 26 of 27 : 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 27 of 27 : IERC20.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

Contract Security Audit

Contract ABI

[{"inputs":[{"components":[{"internalType":"uint256","name":"projectID","type":"uint256"},{"internalType":"contract token_interface","name":"token","type":"address"},{"internalType":"contract IERC721","name":"ec","type":"address"},{"internalType":"address","name":"dust","type":"address"},{"internalType":"uint256","name":"maxTokens","type":"uint256"},{"internalType":"uint256","name":"maxDiscount","type":"uint256"},{"internalType":"uint256","name":"maxPerSaleMint","type":"uint256"},{"internalType":"uint256","name":"clientMintLimit","type":"uint256"},{"internalType":"uint256","name":"ecMintLimit","type":"uint256"},{"internalType":"uint256","name":"discountedPerAddress","type":"uint256"},{"internalType":"uint256","name":"discountPrice","type":"uint256"},{"internalType":"uint256","name":"fullPrice","type":"uint256"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"uint256","name":"saleStart","type":"uint256"},{"internalType":"uint256","name":"saleEnd","type":"uint256"},{"internalType":"uint256","name":"presaleStart","type":"uint256"},{"internalType":"uint256","name":"presaleEnd","type":"uint256"},{"internalType":"address[]","name":"wallets","type":"address[]"},{"internalType":"uint16[]","name":"shares","type":"uint16[]"}],"internalType":"struct sale_params","name":"sp","type":"tuple"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"","type":"address"},{"indexed":false,"internalType":"bool","name":"","type":"bool"}],"name":"Allowed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"number_of_items","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"DustPresale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"number_to_buy","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"dustAmount","type":"uint256"}],"name":"DustSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"number_of_items","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"ETHPresale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"uint256","name":"number_to_buy","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"ethAmount","type":"uint256"}],"name":"ETHSale","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":"uint256","name":"stage","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"randUsed_","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_start","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_stop","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_supply","type":"uint256"}],"name":"RandomProcessed","type":"event"},{"inputs":[],"name":"_DUST","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_EC","outputs":[{"internalType":"contract IERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"_claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_communityAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"buyer","type":"address"}],"name":"checkDiscountAvailable","outputs":[{"internalType":"bool[3]","name":"","type":"bool[3]"},{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"checkPresaleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"checkSaleIsActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfCards","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"numberOfCards","type":"uint256"}],"name":"mintDiscountPresaleWithGalaxis","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"mint_free","type":"bool"},{"internalType":"uint256","name":"max_mint","type":"uint256"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"},{"internalType":"uint256","name":"eth_price","type":"uint256"},{"internalType":"uint256","name":"dust_price","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct dusty.vData","name":"info","type":"tuple"},{"internalType":"uint256","name":"number_of_items_requested","type":"uint256"}],"name":"mint_approved","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projectID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tracker","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"retrieve721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_tracker","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"retrieveERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"retrieveETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_start","type":"uint256"},{"internalType":"uint256","name":"_end","type":"uint256"}],"name":"setPresaleDates","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"}],"name":"setSaleDates","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable[]","name":"_wallets","type":"address[]"},{"internalType":"uint256[]","name":"_shares","type":"uint256[]"}],"name":"setWallets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"shares2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"tellEverything","outputs":[{"components":[{"internalType":"uint256","name":"maxTokens","type":"uint256"},{"internalType":"uint256","name":"mintPosition","type":"uint256"},{"internalType":"address[]","name":"wallets","type":"address[]"},{"internalType":"uint16[]","name":"shares","type":"uint16[]"},{"internalType":"uint256","name":"fullPrice","type":"uint256"},{"internalType":"uint256","name":"discountPrice","type":"uint256"},{"internalType":"uint256","name":"presaleStart","type":"uint256"},{"internalType":"uint256","name":"presaleEnd","type":"uint256"},{"internalType":"uint256","name":"saleStart","type":"uint256"},{"internalType":"uint256","name":"saleEnd","type":"uint256"},{"internalType":"uint256","name":"dustPrice","type":"uint256"},{"internalType":"bool","name":"areTokensLocked","type":"bool"},{"internalType":"uint256","name":"maxFreeEC","type":"uint256"},{"internalType":"uint256","name":"totalFreeEC","type":"uint256"},{"internalType":"uint256","name":"maxDiscount","type":"uint256"},{"internalType":"uint256","name":"totalDiscount","type":"uint256"},{"internalType":"uint256","name":"freePerAddress","type":"uint256"},{"internalType":"uint256","name":"discountedPerAddress","type":"uint256"},{"internalType":"string","name":"tokenPreRevealURI","type":"string"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"bool","name":"presaleIsActive","type":"bool"},{"internalType":"bool","name":"saleIsActive","type":"bool"},{"internalType":"bool","name":"dustMintingActive","type":"bool"},{"internalType":"uint256","name":"freeClaimedByThisUser","type":"uint256"},{"internalType":"uint256","name":"discountedClaimedByThisUser","type":"uint256"},{"internalType":"address","name":"etherCards","type":"address"},{"internalType":"address","name":"DUST","type":"address"},{"internalType":"address","name":"ecVault","type":"address"},{"internalType":"uint256","name":"maxPerSaleMint","type":"uint256"},{"internalType":"uint256","name":"MaxUserMintable","type":"uint256"},{"internalType":"uint256","name":"userMinted","type":"uint256"},{"internalType":"bool","name":"randomReceived","type":"bool"},{"internalType":"bool","name":"secondReceived","type":"bool"},{"internalType":"uint256","name":"randomCL","type":"uint256"},{"internalType":"uint256","name":"randomCL2","type":"uint256"},{"internalType":"uint256","name":"ts1","type":"uint256"},{"internalType":"uint256","name":"ts","type":"uint256"},{"internalType":"uint256","name":"currentPrice","type":"uint256"}],"internalType":"struct sale_data","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"userData","type":"bytes"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"tokensReceived","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"bool","name":"mint_free","type":"bool"},{"internalType":"uint256","name":"max_mint","type":"uint256"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"end","type":"uint256"},{"internalType":"uint256","name":"eth_price","type":"uint256"},{"internalType":"uint256","name":"dust_price","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"internalType":"struct dusty.vData","name":"info","type":"tuple"}],"name":"verify","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]

6101406040526064610100908152610384610120526200002490602c906002620002fc565b5060408051808201909152737930cbac6495f40f6b0912ceeaa0199c805a2457815273af2b58371f00a7212147df9cfd1a28e6ca0cb76660208201526200007090602d90600262000352565b503480156200007e57600080fd5b506040516200325f3803806200325f833981016040819052620000a19162000584565b610180810151606082015160c083015161022084015161024085015184926000928392620000cf33620002aa565b6001601755601880546001600160a01b0319166001600160a01b0389161790556040516329965a1d60e01b815230600482018190527fb281fc8c12954d22544db45de3159a39272895b169a852b314f9cc762e44c53b60248301526044820152731820a4b7618bde71dce8cdc73aab6c95905fad24906329965a1d90606401600060405180830381600087803b1580156200016957600080fd5b505af11580156200017e573d6000803e3d6000fd5b50508351620001979250601a9150602085019062000352565b508051620001ad90601b906020840190620003aa565b5050601980546001600160a01b03199081166001600160a01b0397881617909155601c9490945550601d91909155601e5560208054821694831694909417845584516080526040850151606090811b6001600160601b031990811660e0908152958701516024805490941694169390931790915580850151901b1660c052506101008201519082015162000242919062000786565b8160800151620002539190620007a1565b60a09081526080820151600055810151600d55610120810151600b556101408101516004556101608101516003556101a08101516008556101c08101516009556101e0810151600655610200015160075562000800565b601680546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b82805482825590600052602060002090810192821562000340579160200282015b8281111562000340578251829061ffff169055916020019190600101906200031d565b506200034e92915062000450565b5090565b82805482825590600052602060002090810192821562000340579160200282015b828111156200034057825182546001600160a01b0319166001600160a01b0390911617825560209092019160019091019062000373565b82805482825590600052602060002090600f01601090048101928215620003405791602002820160005b838211156200041657835183826101000a81548161ffff021916908361ffff1602179055509260200192600201602081600101049283019260010302620003d4565b8015620004465782816101000a81549061ffff021916905560020160208160010104928301926001030262000416565b50506200034e9291505b5b808211156200034e576000815560010162000451565b80516200047481620007e7565b919050565b600082601f8301126200048b57600080fd5b81516020620004a46200049e8362000760565b6200072d565b80838252828201915082860187848660051b8901011115620004c557600080fd5b60005b85811015620004f1578151620004de81620007e7565b84529284019290840190600101620004c8565b5090979650505050505050565b600082601f8301126200051057600080fd5b81516020620005236200049e8362000760565b80838252828201915082860187848660051b89010111156200054457600080fd5b6000805b868110156200057657825161ffff8116811462000563578283fd5b8552938501939185019160010162000548565b509198975050505050505050565b6000602082840312156200059757600080fd5b81516001600160401b0380821115620005af57600080fd5b908301906102608286031215620005c557600080fd5b620005cf62000701565b82518152620005e16020840162000467565b6020820152620005f46040840162000467565b6040820152620006076060840162000467565b60608201526080830151608082015260a083015160a082015260c083015160c082015260e083015160e08201526101008084015181830152506101208084015181830152506101408084015181830152506101608084015181830152506101806200067481850162000467565b908201526101a083810151908201526101c080840151908201526101e0808401519082015261020080840151908201526102208084015183811115620006b957600080fd5b620006c78882870162000479565b8284015250506102408084015183811115620006e257600080fd5b620006f088828701620004fe565b918301919091525095945050505050565b60405161026081016001600160401b0381118282101715620007275762000727620007d1565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620007585762000758620007d1565b604052919050565b60006001600160401b038211156200077c576200077c620007d1565b5060051b60200190565b600082198211156200079c576200079c620007bb565b500190565b600082821015620007b657620007b6620007bb565b500390565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114620007fd57600080fd5b50565b60805160a05160c05160601c60e05160601c612a0a62000855600039600081816102710152610d120152600081816103500152610d3e015260008181610d850152611bc6015260006103840152612a0a6000f3fe6080604052600436106101995760003560e01c80639c30ea51116100e1578063d7b5928a1161008a578063e5fa5f3111610064578063e5fa5f3114610486578063ea6cdcd2146104a6578063f2fde38b146104c6578063f4ddedcf146104e657600080fd5b8063d7b5928a14610426578063d7c48e7a14610446578063dc12abb51461046657600080fd5b8063a5b3abfb116100bb578063a5b3abfb146103dc578063b0c77f35146103fc578063d5b014c31461041157600080fd5b80639c30ea51146103725780639d1b464a146103b4578063a0712d68146103c957600080fd5b80636f219bd6116101435780638da5cb5b1161011d5780638da5cb5b1461030d578063954c1f1b1461032b578063981546e51461033e57600080fd5b80636f219bd6146102c0578063715018a6146102e55780638befe9f7146102fa57600080fd5b80634d78cca2116101745780634d78cca2146102275780635ed1bb901461025f57806367666d741461029357600080fd5b806223de29146101ae57806317fd1e2f146101ce5780634ac52ecd146101ee57600080fd5b366101a9576101a734610516565b005b600080fd5b3480156101ba57600080fd5b506101a76101c93660046120da565b610672565b3480156101da57600080fd5b506101a76101e936600461218b565b6106d4565b3480156101fa57600080fd5b5061020e6102093660046120bd565b6107cc565b60405161021e9493929190612535565b60405180910390f35b34801561023357600080fd5b50602854610247906001600160a01b031681565b6040516001600160a01b03909116815260200161021e565b34801561026b57600080fd5b506102477f000000000000000000000000000000000000000000000000000000000000000081565b34801561029f57600080fd5b506102b36102ae3660046120bd565b6107fa565b60405161021e919061257d565b3480156102cc57600080fd5b506102d5610e07565b604051901515815260200161021e565b3480156102f157600080fd5b506101a7610e2e565b6101a761030836600461243d565b610e94565b34801561031957600080fd5b506016546001600160a01b0316610247565b6101a76103393660046123f8565b610ea0565b34801561034a57600080fd5b506102477f000000000000000000000000000000000000000000000000000000000000000081565b34801561037e57600080fd5b506103a67f000000000000000000000000000000000000000000000000000000000000000081565b60405190815260200161021e565b3480156103c057600080fd5b506103a6611215565b6101a76103d736600461243d565b611248565b3480156103e857600080fd5b506101a76103f736600461218b565b611344565b34801561040857600080fd5b506102d561141a565b34801561041d57600080fd5b506101a7611438565b34801561043257600080fd5b506103a661044136600461243d565b61152a565b34801561045257600080fd5b506101a76104613660046121b7565b61154b565b34801561047257600080fd5b506101a761048136600461246f565b61161d565b34801561049257600080fd5b506101a76104a136600461246f565b6116f2565b3480156104b257600080fd5b506102d56104c13660046123bb565b6117c7565b3480156104d257600080fd5b506101a76104e13660046120bd565b6119f2565b3480156104f257600080fd5b506102d561050136600461243d565b60296020526000908152604090205460ff1681565b60008060005b602d5481101561066c5760006103e8602c838154811061053e5761053e612985565b90600052602060002001548661055491906128f2565b61055e91906128d0565b602d5490915061057090600190612911565b821415610588576105818386612911565b9050610595565b61059281846128b8565b92505b602d82815481106105a8576105a8612985565b60009182526020822001546040516001600160a01b039091169183919081818185875af1925050503d80600081146105fc576040519150601f19603f3d011682016040523d82523d6000602084013e610601565b606091505b505080945050836106595760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064015b60405180910390fd5b508061066481612954565b91505061051c565b50505050565b600260175414156106c55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610650565b50506001601755505050505050565b6016546001600160a01b0316331461072e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b6040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290526001600160a01b0383169063a9059cbb90604401602060405180830381600087803b15801561078f57600080fd5b505af11580156107a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c79190612280565b505050565b6107d4611e12565b505060408051606081018252600180825260208201819052918101829052916000908190565b610944604051806104c0016040528060008152602001600081526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016060815260200160006001600160a01b03168152602001600015158152602001600015158152602001600015158152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160001515815260200160001515815260200160008152602001600081526020016000815260200160008152602001600081525090565b602454604080517f2f151b7600000000000000000000000000000000000000000000000000000000815290516000926001600160a01b031691632f151b7691600480830192610100929190829003018186803b1580156109a357600080fd5b505afa1580156109b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109db9190612314565b6028549091506000906001600160a01b031615610a8b576028546040517fd58378130000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301529091169063d58378139060240160206040518083038186803b158015610a5057600080fd5b505afa158015610a64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a889190612456565b90505b604051806104c00160405280600054815260200183600001518152602001601a805480602002602001604051908101604052809291908181526020018280548015610aff57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ae1575b50505050508152602001601b805480602002602001604051908101604052809291908181526020018280548015610b7d57602002820191906000526020600020906000905b82829054906101000a900461ffff1661ffff1681526020019060020190602082600101049283019260010382029150808411610b445790505b50505050508152602001600354815260200160045481526020016006548152602001600754815260200160085481526020016009548152602001600a5481526020018360e001511515815260200160115481526020016012548152602001600d548152602001600c548152602001600f548152602001600b548152602001602460009054906101000a90046001600160a01b03166001600160a01b031663bcc0f7256040518163ffffffff1660e01b815260040160006040518083038186803b158015610c4957600080fd5b505afa158015610c5d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c85919081019061229d565b81526010546001600160a01b03166020820152604001610ca361141a565b15158152602001610cb2610e07565b15158152602001610cc1610e07565b8015610cdb57506000601c541180610cdb57506000601d54115b151581526001600160a01b038087166000818152602a602090815260408083205482870152928252602b81529082902054828501527f000000000000000000000000000000000000000000000000000000000000000083166060808601919091527f0000000000000000000000000000000000000000000000000000000000000000841660808087019190915260155490941660a080870191909152601e5460c0808801919091527f000000000000000000000000000000000000000000000000000000000000000060e08801526025546101008801529189015115156101208701529388015115156101408601529287015161016085015291860151610180840152908501516101a08301528401516101c08201526101e001610dfd611215565b9052949350505050565b60004260085411158015610e1d57504260095410155b15610e285750600190565b50600090565b6016546001600160a01b03163314610e885760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b610e926000611acd565b565b610e9d81611248565b50565b336040830181905234906000610eb5856117c7565b610f015760405162461bcd60e51b815260206004820152601a60248201527f556e617574686f726973656420616363657373207365637265740000000000006044820152606401610650565b84606001514211610f545760405162461bcd60e51b815260206004820152601760248201527f73616c6520706572696f64206e6f7420737461727465640000000000000000006044820152606401610650565b84608001514210610fa75760405162461bcd60e51b815260206004820152601060248201527f73616c6520706572696f64206f766572000000000000000000000000000000006044820152606401610650565b60008560a001511180610fb8575084515b6110045760405162461bcd60e51b815260206004820152601d60248201527f70726573616c65206d696e74696e67206e6f7420617661696c61626c650000006044820152606401610650565b845115611012575082611098565b60a085015161102190846128d0565b90508381146110985760405162461bcd60e51b815260206004820152602760248201527f4554482073656e7420646f6573206e6f74206d61746368206974656d7320726560448201527f71756573746564000000000000000000000000000000000000000000000000006064820152608401610650565b828560a00151826110a991906128f2565b146110f65760405162461bcd60e51b815260206004820152601260248201527f696e636f7272656374204554482073656e7400000000000000000000000000006044820152606401610650565b6001600160a01b0382166000908152601f602090815260409091205490860151811061118a5760405162461bcd60e51b815260206004820152602660248201527f596f75206861766520616c7265616479206d696e74656420796f757220616c6c60448201527f6f77616e636500000000000000000000000000000000000000000000000000006064820152608401610650565b602086015161119983836128b8565b111561120d5760405162461bcd60e51b815260206004820152602360248201527f796f752068617665207265616368656420796f75722070726573616c65206c6960448201527f6d697400000000000000000000000000000000000000000000000000000000006064820152608401610650565b505050505050565b60008061122061141a565b905080156112365766b1a2bc2ec5000091505090565b66f8b0a10e47000091505090565b5090565b600061125261141a565b9050600061125e610e07565b90506000818061126b5750825b9050806112ba5760405162461bcd60e51b815260206004820152601060248201527f73616c65206973206e6f74206f70656e000000000000000000000000000000006044820152606401610650565b601e5484111561130c5760405162461bcd60e51b815260206004820181905260248201527f45786365656473206d617820706572205472616e73616374696f6e204d696e746044820152606401610650565b60008315611322575066b1a2bc2ec50000611332565b8215611332575066f8b0a10e4700005b61133d853383611b2c565b5050505050565b6016546001600160a01b0316331461139e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152306004820152336024820152604481018290526001600160a01b038316906323b872dd906064015b600060405180830381600087803b15801561140657600080fd5b505af115801561120d573d6000803e3d6000fd5b60004260065411158015610e1d57504260075410610e285750600190565b6016546001600160a01b031633146114925760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b604051600090339047908381818185875af1925050503d80600081146114d4576040519150601f19603f3d011682016040523d82523d6000602084013e6114d9565b606091505b5050905080610e9d5760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e642045746865720000000000000000000000006044820152606401610650565b602c818154811061153a57600080fd5b600091825260209091200154905081565b6016546001600160a01b031633146115a55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b80518251146115f65760405162461bcd60e51b815260206004820152600760248201527f216c656e676874000000000000000000000000000000000000000000000000006044820152606401610650565b815161160990602d906020850190611e30565b5080516107c790602c906020840190611e9e565b60248054604051636cc301e360e01b81523360048201526001600160a01b0390911691636cc301e3910160206040518083038186803b15801561165f57600080fd5b505afa158015611673573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116979190612280565b806116ac57506016546001600160a01b031633145b6116e75760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5cd95960a21b6044820152606401610650565b600691909155600755565b60248054604051636cc301e360e01b81523360048201526001600160a01b0390911691636cc301e3910160206040518083038186803b15801561173457600080fd5b505afa158015611748573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176c9190612280565b8061178157506016546001600160a01b031633145b6117bc5760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5cd95960a21b6044820152606401610650565b600891909155600955565b60408101516000906001600160a01b03166118245760405162461bcd60e51b815260206004820152600e60248201527f494e56414c49445f5349474e45520000000000000000000000000000000000006044820152606401610650565b60008260400151836060015184608001518560a001518660c001518760200151886000015160405160200161189797969594939291906001600160a01b03979097168752602087019590955260408601939093526060850191909152608084015260a0830152151560c082015260e00190565b60408051601f198184030181529190528051602082012060e085015151919250906041146119075760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964207369676e6174757265206c656e67746800000000000000006044820152606401610650565b60e0840151602080820151604080840151606085015191517f19457468657265756d205369676e6564204d6573736167653a0a33320000000094810194909452603c840186905291939192600091821a929190605c0160408051601f198184030181528282528051602091820120600080855291840180845281905260ff87169284019290925260608301889052608083018790529092509060019060a0016020604051602081039080840390855afa1580156119c8573d6000803e3d6000fd5b5050604051601f1901516019546001600160a01b039081169116149b9a5050505050505050505050565b6016546001600160a01b03163314611a4c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b6001600160a01b038116611ac85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610650565b610e9d815b601680546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611b368382611b97565b3414611b845760405162461bcd60e51b815260206004820152601160248201527f77726f6e6720616d6f756e742073656e740000000000000000000000000000006044820152606401610650565b611b8e8383611baa565b6107c734611cad565b6000611ba382846128f2565b9392505050565b8160256000828254611bbc91906128b8565b90915550506025547f00000000000000000000000000000000000000000000000000000000000000001015611c595760405162461bcd60e51b815260206004820152603260248201527f546869732065786365656473206d6178696d756d206e756d626572206f66207560448201527f736572206d696e7461626c6520636172647300000000000000000000000000006064820152608401610650565b602480546040517f134f3337000000000000000000000000000000000000000000000000000000008152600481018590526001600160a01b038481169382019390935291169063134f3337906044016113ec565b60008060005b601a5481101561066c5760006103e8601b8381548110611cd557611cd5612985565b60009182526020909120601082040154611cff91600f166002026101000a900461ffff16876128f2565b611d0991906128d0565b601a54909150611d1b90600190612911565b821415611d3357611d2c8386612911565b9050611d40565b611d3d81846128b8565b92505b601a8281548110611d5357611d53612985565b60009182526020822001546040516001600160a01b039091169183919081818185875af1925050503d8060008114611da7576040519150601f19603f3d011682016040523d82523d6000602084013e611dac565b606091505b50508094505083611dff5760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e642045746865720000000000000000000000006044820152606401610650565b5080611e0a81612954565b915050611cb3565b60405180606001604052806003906020820280368337509192915050565b828054828255906000526020600020908101928215611e92579160200282015b82811115611e92578251825473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909116178255602090920191600190910190611e50565b50611244929150611ed9565b828054828255906000526020600020908101928215611e92579160200282015b82811115611e92578251825591602001919060010190611ebe565b5b808211156112445760008155600101611eda565b8035611ef9816129b1565b919050565b600082601f830112611f0f57600080fd5b81356020611f24611f1f8361286c565b61283b565b80838252828201915082860187848660051b8901011115611f4457600080fd5b60005b85811015611f6357813584529284019290840190600101611f47565b5090979650505050505050565b8035611ef9816129c6565b8051611ef9816129c6565b60008083601f840112611f9857600080fd5b50813567ffffffffffffffff811115611fb057600080fd5b602083019150836020828501011115611fc857600080fd5b9250929050565b600082601f830112611fe057600080fd5b8135611fee611f1f82612890565b81815284602083860101111561200357600080fd5b816020850160208301376000918101602001919091529392505050565b6000610100828403121561203357600080fd5b61203b612811565b905061204682611f70565b81526020820135602082015261205e60408301611eee565b6040820152606082013560608201526080820135608082015260a082013560a082015260c082013560c082015260e082013567ffffffffffffffff8111156120a557600080fd5b6120b184828501611fcf565b60e08301525092915050565b6000602082840312156120cf57600080fd5b8135611ba3816129b1565b60008060008060008060008060c0898b0312156120f657600080fd5b8835612101816129b1565b97506020890135612111816129b1565b96506040890135612121816129b1565b955060608901359450608089013567ffffffffffffffff8082111561214557600080fd5b6121518c838d01611f86565b909650945060a08b013591508082111561216a57600080fd5b506121778b828c01611f86565b999c989b5096995094979396929594505050565b6000806040838503121561219e57600080fd5b82356121a9816129b1565b946020939093013593505050565b600080604083850312156121ca57600080fd5b823567ffffffffffffffff808211156121e257600080fd5b818501915085601f8301126121f657600080fd5b81356020612206611f1f8361286c565b8083825282820191508286018a848660051b890101111561222657600080fd5b600096505b8487101561225257803561223e816129b1565b83526001969096019591830191830161222b565b509650508601359250508082111561226957600080fd5b5061227685828601611efe565b9150509250929050565b60006020828403121561229257600080fd5b8151611ba3816129c6565b6000602082840312156122af57600080fd5b815167ffffffffffffffff8111156122c657600080fd5b8201601f810184136122d757600080fd5b80516122e5611f1f82612890565b8181528560208385010111156122fa57600080fd5b61230b826020830160208601612928565b95945050505050565b600061010080838503121561232857600080fd5b6040519081019067ffffffffffffffff8211818310171561234b5761234b61299b565b8160405283518152602084015160208201526040840151604082015260608401519150612377826129c6565b81606082015261238960808501611f7b565b608082015260a084015160a082015260c084015160c08201526123ae60e08501611f7b565b60e0820152949350505050565b6000602082840312156123cd57600080fd5b813567ffffffffffffffff8111156123e457600080fd5b6123f084828501612020565b949350505050565b6000806040838503121561240b57600080fd5b823567ffffffffffffffff81111561242257600080fd5b61242e85828601612020565b95602094909401359450505050565b60006020828403121561244f57600080fd5b5035919050565b60006020828403121561246857600080fd5b5051919050565b6000806040838503121561248257600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b838110156124ca5781516001600160a01b0316875295820195908201906001016124a5565b509495945050505050565b600081518084526020808501945080840160005b838110156124ca57815161ffff16875295820195908201906001016124e9565b60008151808452612521816020860160208601612928565b601f01601f19169290920160200192915050565b60c08101818660005b600381101561255f578151151583526020928301929091019060010161253e565b5050509315156060820152608081019290925260a090910152919050565b602081528151602082015260208201516040820152600060408301516104c08060608501526125b06104e0850183612491565b91506060850151601f19808685030160808701526125ce84836124d5565b9350608087015160a087015260a087015160c087015260c087015160e087015260e087015191506101008281880152808801519250506101208281880152808801519250506101408281880152808801519250506101608281880152808801519250506101806126418188018415159052565b8701516101a0878101919091528701516101c0808801919091528701516101e0808801919091528701516102008088019190915287015161022080880191909152870151610240808801919091528701518685038201610260808901919091529092506126ae8584612509565b945080880151925050506102806126cf818701836001600160a01b03169052565b86015190506102a06126e48682018315159052565b86015190506102c06126f98682018315159052565b86015190506102e061270e8682018315159052565b86015161030086810191909152860151610320808701919091528601519050610340612744818701836001600160a01b03169052565b8601519050610360612760868201836001600160a01b03169052565b860151905061038061277c868201836001600160a01b03169052565b8601516103a0868101919091528601516103c0808701919091528601516103e08087019190915286015190506104006127b88187018315159052565b86015190506104206127cd8682018315159052565b8601516104408681019190915286015161046080870191909152860151610480808701919091528601516104a0808701919091529095015193019290925250919050565b604051610100810167ffffffffffffffff811182821017156128355761283561299b565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156128645761286461299b565b604052919050565b600067ffffffffffffffff8211156128865761288661299b565b5060051b60200190565b600067ffffffffffffffff8211156128aa576128aa61299b565b50601f01601f191660200190565b600082198211156128cb576128cb61296f565b500190565b6000826128ed57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561290c5761290c61296f565b500290565b6000828210156129235761292361296f565b500390565b60005b8381101561294357818101518382015260200161292b565b8381111561066c5750506000910152565b60006000198214156129685761296861296f565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610e9d57600080fd5b8015158114610e9d57600080fdfea264697066735822122048086b2c86415a3d26ed2f607b3700a4b6b9a805d3898439b37de998caeb5e9464736f6c6343000807003300000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000eaf10ed6e870ab0743a6bfcb9c414ceff63a3f5f00000000000000000000000097ca7fe0b0288f5eb85f386fed876618fb9b8ab800000000000000000000000097ca7fe0b0288f5eb85f386fed876618fb9b8ab80000000000000000000000000000000000000000000000000000000000002b670000000000000000000000000000000000000000000000000000000000002b670000000000000000000000000000000000000000000000000000000000002b67000000000000000000000000000000000000000000000000000000000000012c00000000000000000000000000000000000000000000000000000000000000c80000000000000000000000000000000000000000000000000000000000002b6700000000000000000000000000000000000000000000000000b1a2bc2ec5000000000000000000000000000000000000000000000000000000f8b0a10e47000000000000000000000000000055c36b545afd2a0f39b50e1da81a13e5208fbb86000000000000000000000000000000000000000000000000000000006244626000000000000000000000000000000000000000000000000000000000626d40e000000000000000000000000000000000000000000000000000000000623c6b500000000000000000000000000000000000000000000000000000000062446260000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000000020000000000000000000000007930cbac6495f40f6b0912ceeaa0199c805a2457000000000000000000000000af2b58371f00a7212147df9cfd1a28e6ca0cb766000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000384

Deployed Bytecode

0x6080604052600436106101995760003560e01c80639c30ea51116100e1578063d7b5928a1161008a578063e5fa5f3111610064578063e5fa5f3114610486578063ea6cdcd2146104a6578063f2fde38b146104c6578063f4ddedcf146104e657600080fd5b8063d7b5928a14610426578063d7c48e7a14610446578063dc12abb51461046657600080fd5b8063a5b3abfb116100bb578063a5b3abfb146103dc578063b0c77f35146103fc578063d5b014c31461041157600080fd5b80639c30ea51146103725780639d1b464a146103b4578063a0712d68146103c957600080fd5b80636f219bd6116101435780638da5cb5b1161011d5780638da5cb5b1461030d578063954c1f1b1461032b578063981546e51461033e57600080fd5b80636f219bd6146102c0578063715018a6146102e55780638befe9f7146102fa57600080fd5b80634d78cca2116101745780634d78cca2146102275780635ed1bb901461025f57806367666d741461029357600080fd5b806223de29146101ae57806317fd1e2f146101ce5780634ac52ecd146101ee57600080fd5b366101a9576101a734610516565b005b600080fd5b3480156101ba57600080fd5b506101a76101c93660046120da565b610672565b3480156101da57600080fd5b506101a76101e936600461218b565b6106d4565b3480156101fa57600080fd5b5061020e6102093660046120bd565b6107cc565b60405161021e9493929190612535565b60405180910390f35b34801561023357600080fd5b50602854610247906001600160a01b031681565b6040516001600160a01b03909116815260200161021e565b34801561026b57600080fd5b506102477f00000000000000000000000097ca7fe0b0288f5eb85f386fed876618fb9b8ab881565b34801561029f57600080fd5b506102b36102ae3660046120bd565b6107fa565b60405161021e919061257d565b3480156102cc57600080fd5b506102d5610e07565b604051901515815260200161021e565b3480156102f157600080fd5b506101a7610e2e565b6101a761030836600461243d565b610e94565b34801561031957600080fd5b506016546001600160a01b0316610247565b6101a76103393660046123f8565b610ea0565b34801561034a57600080fd5b506102477f00000000000000000000000097ca7fe0b0288f5eb85f386fed876618fb9b8ab881565b34801561037e57600080fd5b506103a67f000000000000000000000000000000000000000000000000000000000000000181565b60405190815260200161021e565b3480156103c057600080fd5b506103a6611215565b6101a76103d736600461243d565b611248565b3480156103e857600080fd5b506101a76103f736600461218b565b611344565b34801561040857600080fd5b506102d561141a565b34801561041d57600080fd5b506101a7611438565b34801561043257600080fd5b506103a661044136600461243d565b61152a565b34801561045257600080fd5b506101a76104613660046121b7565b61154b565b34801561047257600080fd5b506101a761048136600461246f565b61161d565b34801561049257600080fd5b506101a76104a136600461246f565b6116f2565b3480156104b257600080fd5b506102d56104c13660046123bb565b6117c7565b3480156104d257600080fd5b506101a76104e13660046120bd565b6119f2565b3480156104f257600080fd5b506102d561050136600461243d565b60296020526000908152604090205460ff1681565b60008060005b602d5481101561066c5760006103e8602c838154811061053e5761053e612985565b90600052602060002001548661055491906128f2565b61055e91906128d0565b602d5490915061057090600190612911565b821415610588576105818386612911565b9050610595565b61059281846128b8565b92505b602d82815481106105a8576105a8612985565b60009182526020822001546040516001600160a01b039091169183919081818185875af1925050503d80600081146105fc576040519150601f19603f3d011682016040523d82523d6000602084013e610601565b606091505b505080945050836106595760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e6420457468657200000000000000000000000060448201526064015b60405180910390fd5b508061066481612954565b91505061051c565b50505050565b600260175414156106c55760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610650565b50506001601755505050505050565b6016546001600160a01b0316331461072e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b6040517fa9059cbb000000000000000000000000000000000000000000000000000000008152336004820152602481018290526001600160a01b0383169063a9059cbb90604401602060405180830381600087803b15801561078f57600080fd5b505af11580156107a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107c79190612280565b505050565b6107d4611e12565b505060408051606081018252600180825260208201819052918101829052916000908190565b610944604051806104c0016040528060008152602001600081526020016060815260200160608152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016060815260200160006001600160a01b03168152602001600015158152602001600015158152602001600015158152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160006001600160a01b0316815260200160008152602001600081526020016000815260200160001515815260200160001515815260200160008152602001600081526020016000815260200160008152602001600081525090565b602454604080517f2f151b7600000000000000000000000000000000000000000000000000000000815290516000926001600160a01b031691632f151b7691600480830192610100929190829003018186803b1580156109a357600080fd5b505afa1580156109b7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109db9190612314565b6028549091506000906001600160a01b031615610a8b576028546040517fd58378130000000000000000000000000000000000000000000000000000000081526001600160a01b0386811660048301529091169063d58378139060240160206040518083038186803b158015610a5057600080fd5b505afa158015610a64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a889190612456565b90505b604051806104c00160405280600054815260200183600001518152602001601a805480602002602001604051908101604052809291908181526020018280548015610aff57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610ae1575b50505050508152602001601b805480602002602001604051908101604052809291908181526020018280548015610b7d57602002820191906000526020600020906000905b82829054906101000a900461ffff1661ffff1681526020019060020190602082600101049283019260010382029150808411610b445790505b50505050508152602001600354815260200160045481526020016006548152602001600754815260200160085481526020016009548152602001600a5481526020018360e001511515815260200160115481526020016012548152602001600d548152602001600c548152602001600f548152602001600b548152602001602460009054906101000a90046001600160a01b03166001600160a01b031663bcc0f7256040518163ffffffff1660e01b815260040160006040518083038186803b158015610c4957600080fd5b505afa158015610c5d573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c85919081019061229d565b81526010546001600160a01b03166020820152604001610ca361141a565b15158152602001610cb2610e07565b15158152602001610cc1610e07565b8015610cdb57506000601c541180610cdb57506000601d54115b151581526001600160a01b038087166000818152602a602090815260408083205482870152928252602b81529082902054828501527f00000000000000000000000097ca7fe0b0288f5eb85f386fed876618fb9b8ab883166060808601919091527f00000000000000000000000097ca7fe0b0288f5eb85f386fed876618fb9b8ab8841660808087019190915260155490941660a080870191909152601e5460c0808801919091527f000000000000000000000000000000000000000000000000000000000000297360e08801526025546101008801529189015115156101208701529388015115156101408601529287015161016085015291860151610180840152908501516101a08301528401516101c08201526101e001610dfd611215565b9052949350505050565b60004260085411158015610e1d57504260095410155b15610e285750600190565b50600090565b6016546001600160a01b03163314610e885760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b610e926000611acd565b565b610e9d81611248565b50565b336040830181905234906000610eb5856117c7565b610f015760405162461bcd60e51b815260206004820152601a60248201527f556e617574686f726973656420616363657373207365637265740000000000006044820152606401610650565b84606001514211610f545760405162461bcd60e51b815260206004820152601760248201527f73616c6520706572696f64206e6f7420737461727465640000000000000000006044820152606401610650565b84608001514210610fa75760405162461bcd60e51b815260206004820152601060248201527f73616c6520706572696f64206f766572000000000000000000000000000000006044820152606401610650565b60008560a001511180610fb8575084515b6110045760405162461bcd60e51b815260206004820152601d60248201527f70726573616c65206d696e74696e67206e6f7420617661696c61626c650000006044820152606401610650565b845115611012575082611098565b60a085015161102190846128d0565b90508381146110985760405162461bcd60e51b815260206004820152602760248201527f4554482073656e7420646f6573206e6f74206d61746368206974656d7320726560448201527f71756573746564000000000000000000000000000000000000000000000000006064820152608401610650565b828560a00151826110a991906128f2565b146110f65760405162461bcd60e51b815260206004820152601260248201527f696e636f7272656374204554482073656e7400000000000000000000000000006044820152606401610650565b6001600160a01b0382166000908152601f602090815260409091205490860151811061118a5760405162461bcd60e51b815260206004820152602660248201527f596f75206861766520616c7265616479206d696e74656420796f757220616c6c60448201527f6f77616e636500000000000000000000000000000000000000000000000000006064820152608401610650565b602086015161119983836128b8565b111561120d5760405162461bcd60e51b815260206004820152602360248201527f796f752068617665207265616368656420796f75722070726573616c65206c6960448201527f6d697400000000000000000000000000000000000000000000000000000000006064820152608401610650565b505050505050565b60008061122061141a565b905080156112365766b1a2bc2ec5000091505090565b66f8b0a10e47000091505090565b5090565b600061125261141a565b9050600061125e610e07565b90506000818061126b5750825b9050806112ba5760405162461bcd60e51b815260206004820152601060248201527f73616c65206973206e6f74206f70656e000000000000000000000000000000006044820152606401610650565b601e5484111561130c5760405162461bcd60e51b815260206004820181905260248201527f45786365656473206d617820706572205472616e73616374696f6e204d696e746044820152606401610650565b60008315611322575066b1a2bc2ec50000611332565b8215611332575066f8b0a10e4700005b61133d853383611b2c565b5050505050565b6016546001600160a01b0316331461139e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b6040517f23b872dd000000000000000000000000000000000000000000000000000000008152306004820152336024820152604481018290526001600160a01b038316906323b872dd906064015b600060405180830381600087803b15801561140657600080fd5b505af115801561120d573d6000803e3d6000fd5b60004260065411158015610e1d57504260075410610e285750600190565b6016546001600160a01b031633146114925760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b604051600090339047908381818185875af1925050503d80600081146114d4576040519150601f19603f3d011682016040523d82523d6000602084013e6114d9565b606091505b5050905080610e9d5760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e642045746865720000000000000000000000006044820152606401610650565b602c818154811061153a57600080fd5b600091825260209091200154905081565b6016546001600160a01b031633146115a55760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b80518251146115f65760405162461bcd60e51b815260206004820152600760248201527f216c656e676874000000000000000000000000000000000000000000000000006044820152606401610650565b815161160990602d906020850190611e30565b5080516107c790602c906020840190611e9e565b60248054604051636cc301e360e01b81523360048201526001600160a01b0390911691636cc301e3910160206040518083038186803b15801561165f57600080fd5b505afa158015611673573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116979190612280565b806116ac57506016546001600160a01b031633145b6116e75760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5cd95960a21b6044820152606401610650565b600691909155600755565b60248054604051636cc301e360e01b81523360048201526001600160a01b0390911691636cc301e3910160206040518083038186803b15801561173457600080fd5b505afa158015611748573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061176c9190612280565b8061178157506016546001600160a01b031633145b6117bc5760405162461bcd60e51b815260206004820152600c60248201526b155b985d5d1a1bdc9a5cd95960a21b6044820152606401610650565b600891909155600955565b60408101516000906001600160a01b03166118245760405162461bcd60e51b815260206004820152600e60248201527f494e56414c49445f5349474e45520000000000000000000000000000000000006044820152606401610650565b60008260400151836060015184608001518560a001518660c001518760200151886000015160405160200161189797969594939291906001600160a01b03979097168752602087019590955260408601939093526060850191909152608084015260a0830152151560c082015260e00190565b60408051601f198184030181529190528051602082012060e085015151919250906041146119075760405162461bcd60e51b815260206004820152601860248201527f496e76616c6964207369676e6174757265206c656e67746800000000000000006044820152606401610650565b60e0840151602080820151604080840151606085015191517f19457468657265756d205369676e6564204d6573736167653a0a33320000000094810194909452603c840186905291939192600091821a929190605c0160408051601f198184030181528282528051602091820120600080855291840180845281905260ff87169284019290925260608301889052608083018790529092509060019060a0016020604051602081039080840390855afa1580156119c8573d6000803e3d6000fd5b5050604051601f1901516019546001600160a01b039081169116149b9a5050505050505050505050565b6016546001600160a01b03163314611a4c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610650565b6001600160a01b038116611ac85760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610650565b610e9d815b601680546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611b368382611b97565b3414611b845760405162461bcd60e51b815260206004820152601160248201527f77726f6e6720616d6f756e742073656e740000000000000000000000000000006044820152606401610650565b611b8e8383611baa565b6107c734611cad565b6000611ba382846128f2565b9392505050565b8160256000828254611bbc91906128b8565b90915550506025547f00000000000000000000000000000000000000000000000000000000000029731015611c595760405162461bcd60e51b815260206004820152603260248201527f546869732065786365656473206d6178696d756d206e756d626572206f66207560448201527f736572206d696e7461626c6520636172647300000000000000000000000000006064820152608401610650565b602480546040517f134f3337000000000000000000000000000000000000000000000000000000008152600481018590526001600160a01b038481169382019390935291169063134f3337906044016113ec565b60008060005b601a5481101561066c5760006103e8601b8381548110611cd557611cd5612985565b60009182526020909120601082040154611cff91600f166002026101000a900461ffff16876128f2565b611d0991906128d0565b601a54909150611d1b90600190612911565b821415611d3357611d2c8386612911565b9050611d40565b611d3d81846128b8565b92505b601a8281548110611d5357611d53612985565b60009182526020822001546040516001600160a01b039091169183919081818185875af1925050503d8060008114611da7576040519150601f19603f3d011682016040523d82523d6000602084013e611dac565b606091505b50508094505083611dff5760405162461bcd60e51b815260206004820152601460248201527f4661696c656420746f2073656e642045746865720000000000000000000000006044820152606401610650565b5080611e0a81612954565b915050611cb3565b60405180606001604052806003906020820280368337509192915050565b828054828255906000526020600020908101928215611e92579160200282015b82811115611e92578251825473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03909116178255602090920191600190910190611e50565b50611244929150611ed9565b828054828255906000526020600020908101928215611e92579160200282015b82811115611e92578251825591602001919060010190611ebe565b5b808211156112445760008155600101611eda565b8035611ef9816129b1565b919050565b600082601f830112611f0f57600080fd5b81356020611f24611f1f8361286c565b61283b565b80838252828201915082860187848660051b8901011115611f4457600080fd5b60005b85811015611f6357813584529284019290840190600101611f47565b5090979650505050505050565b8035611ef9816129c6565b8051611ef9816129c6565b60008083601f840112611f9857600080fd5b50813567ffffffffffffffff811115611fb057600080fd5b602083019150836020828501011115611fc857600080fd5b9250929050565b600082601f830112611fe057600080fd5b8135611fee611f1f82612890565b81815284602083860101111561200357600080fd5b816020850160208301376000918101602001919091529392505050565b6000610100828403121561203357600080fd5b61203b612811565b905061204682611f70565b81526020820135602082015261205e60408301611eee565b6040820152606082013560608201526080820135608082015260a082013560a082015260c082013560c082015260e082013567ffffffffffffffff8111156120a557600080fd5b6120b184828501611fcf565b60e08301525092915050565b6000602082840312156120cf57600080fd5b8135611ba3816129b1565b60008060008060008060008060c0898b0312156120f657600080fd5b8835612101816129b1565b97506020890135612111816129b1565b96506040890135612121816129b1565b955060608901359450608089013567ffffffffffffffff8082111561214557600080fd5b6121518c838d01611f86565b909650945060a08b013591508082111561216a57600080fd5b506121778b828c01611f86565b999c989b5096995094979396929594505050565b6000806040838503121561219e57600080fd5b82356121a9816129b1565b946020939093013593505050565b600080604083850312156121ca57600080fd5b823567ffffffffffffffff808211156121e257600080fd5b818501915085601f8301126121f657600080fd5b81356020612206611f1f8361286c565b8083825282820191508286018a848660051b890101111561222657600080fd5b600096505b8487101561225257803561223e816129b1565b83526001969096019591830191830161222b565b509650508601359250508082111561226957600080fd5b5061227685828601611efe565b9150509250929050565b60006020828403121561229257600080fd5b8151611ba3816129c6565b6000602082840312156122af57600080fd5b815167ffffffffffffffff8111156122c657600080fd5b8201601f810184136122d757600080fd5b80516122e5611f1f82612890565b8181528560208385010111156122fa57600080fd5b61230b826020830160208601612928565b95945050505050565b600061010080838503121561232857600080fd5b6040519081019067ffffffffffffffff8211818310171561234b5761234b61299b565b8160405283518152602084015160208201526040840151604082015260608401519150612377826129c6565b81606082015261238960808501611f7b565b608082015260a084015160a082015260c084015160c08201526123ae60e08501611f7b565b60e0820152949350505050565b6000602082840312156123cd57600080fd5b813567ffffffffffffffff8111156123e457600080fd5b6123f084828501612020565b949350505050565b6000806040838503121561240b57600080fd5b823567ffffffffffffffff81111561242257600080fd5b61242e85828601612020565b95602094909401359450505050565b60006020828403121561244f57600080fd5b5035919050565b60006020828403121561246857600080fd5b5051919050565b6000806040838503121561248257600080fd5b50508035926020909101359150565b600081518084526020808501945080840160005b838110156124ca5781516001600160a01b0316875295820195908201906001016124a5565b509495945050505050565b600081518084526020808501945080840160005b838110156124ca57815161ffff16875295820195908201906001016124e9565b60008151808452612521816020860160208601612928565b601f01601f19169290920160200192915050565b60c08101818660005b600381101561255f578151151583526020928301929091019060010161253e565b5050509315156060820152608081019290925260a090910152919050565b602081528151602082015260208201516040820152600060408301516104c08060608501526125b06104e0850183612491565b91506060850151601f19808685030160808701526125ce84836124d5565b9350608087015160a087015260a087015160c087015260c087015160e087015260e087015191506101008281880152808801519250506101208281880152808801519250506101408281880152808801519250506101608281880152808801519250506101806126418188018415159052565b8701516101a0878101919091528701516101c0808801919091528701516101e0808801919091528701516102008088019190915287015161022080880191909152870151610240808801919091528701518685038201610260808901919091529092506126ae8584612509565b945080880151925050506102806126cf818701836001600160a01b03169052565b86015190506102a06126e48682018315159052565b86015190506102c06126f98682018315159052565b86015190506102e061270e8682018315159052565b86015161030086810191909152860151610320808701919091528601519050610340612744818701836001600160a01b03169052565b8601519050610360612760868201836001600160a01b03169052565b860151905061038061277c868201836001600160a01b03169052565b8601516103a0868101919091528601516103c0808701919091528601516103e08087019190915286015190506104006127b88187018315159052565b86015190506104206127cd8682018315159052565b8601516104408681019190915286015161046080870191909152860151610480808701919091528601516104a0808701919091529095015193019290925250919050565b604051610100810167ffffffffffffffff811182821017156128355761283561299b565b60405290565b604051601f8201601f1916810167ffffffffffffffff811182821017156128645761286461299b565b604052919050565b600067ffffffffffffffff8211156128865761288661299b565b5060051b60200190565b600067ffffffffffffffff8211156128aa576128aa61299b565b50601f01601f191660200190565b600082198211156128cb576128cb61296f565b500190565b6000826128ed57634e487b7160e01b600052601260045260246000fd5b500490565b600081600019048311821515161561290c5761290c61296f565b500290565b6000828210156129235761292361296f565b500390565b60005b8381101561294357818101518382015260200161292b565b8381111561066c5750506000910152565b60006000198214156129685761296861296f565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610e9d57600080fd5b8015158114610e9d57600080fdfea264697066735822122048086b2c86415a3d26ed2f607b3700a4b6b9a805d3898439b37de998caeb5e9464736f6c63430008070033

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

00000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000001000000000000000000000000eaf10ed6e870ab0743a6bfcb9c414ceff63a3f5f00000000000000000000000097ca7fe0b0288f5eb85f386fed876618fb9b8ab800000000000000000000000097ca7fe0b0288f5eb85f386fed876618fb9b8ab80000000000000000000000000000000000000000000000000000000000002b670000000000000000000000000000000000000000000000000000000000002b670000000000000000000000000000000000000000000000000000000000002b67000000000000000000000000000000000000000000000000000000000000012c00000000000000000000000000000000000000000000000000000000000000c80000000000000000000000000000000000000000000000000000000000002b6700000000000000000000000000000000000000000000000000b1a2bc2ec5000000000000000000000000000000000000000000000000000000f8b0a10e47000000000000000000000000000055c36b545afd2a0f39b50e1da81a13e5208fbb86000000000000000000000000000000000000000000000000000000006244626000000000000000000000000000000000000000000000000000000000626d40e000000000000000000000000000000000000000000000000000000000623c6b500000000000000000000000000000000000000000000000000000000062446260000000000000000000000000000000000000000000000000000000000000026000000000000000000000000000000000000000000000000000000000000002c000000000000000000000000000000000000000000000000000000000000000020000000000000000000000007930cbac6495f40f6b0912ceeaa0199c805a2457000000000000000000000000af2b58371f00a7212147df9cfd1a28e6ca0cb766000000000000000000000000000000000000000000000000000000000000000200000000000000000000000000000000000000000000000000000000000000640000000000000000000000000000000000000000000000000000000000000384

-----Decoded View---------------
Arg [0] : sp (tuple): System.Collections.Generic.List`1[Nethereum.ABI.FunctionEncoding.ParameterOutput]

-----Encoded View---------------
26 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000020
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000001
Arg [2] : 000000000000000000000000eaf10ed6e870ab0743a6bfcb9c414ceff63a3f5f
Arg [3] : 00000000000000000000000097ca7fe0b0288f5eb85f386fed876618fb9b8ab8
Arg [4] : 00000000000000000000000097ca7fe0b0288f5eb85f386fed876618fb9b8ab8
Arg [5] : 0000000000000000000000000000000000000000000000000000000000002b67
Arg [6] : 0000000000000000000000000000000000000000000000000000000000002b67
Arg [7] : 0000000000000000000000000000000000000000000000000000000000002b67
Arg [8] : 000000000000000000000000000000000000000000000000000000000000012c
Arg [9] : 00000000000000000000000000000000000000000000000000000000000000c8
Arg [10] : 0000000000000000000000000000000000000000000000000000000000002b67
Arg [11] : 00000000000000000000000000000000000000000000000000b1a2bc2ec50000
Arg [12] : 00000000000000000000000000000000000000000000000000f8b0a10e470000
Arg [13] : 00000000000000000000000055c36b545afd2a0f39b50e1da81a13e5208fbb86
Arg [14] : 0000000000000000000000000000000000000000000000000000000062446260
Arg [15] : 00000000000000000000000000000000000000000000000000000000626d40e0
Arg [16] : 00000000000000000000000000000000000000000000000000000000623c6b50
Arg [17] : 0000000000000000000000000000000000000000000000000000000062446260
Arg [18] : 0000000000000000000000000000000000000000000000000000000000000260
Arg [19] : 00000000000000000000000000000000000000000000000000000000000002c0
Arg [20] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [21] : 0000000000000000000000007930cbac6495f40f6b0912ceeaa0199c805a2457
Arg [22] : 000000000000000000000000af2b58371f00a7212147df9cfd1a28e6ca0cb766
Arg [23] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [24] : 0000000000000000000000000000000000000000000000000000000000000064
Arg [25] : 0000000000000000000000000000000000000000000000000000000000000384


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.