Contract 0xb62582645dc7ec074C6c06b19f47264DB593b652

 

Contract Overview

Balance:
0 MATIC

MATIC Value:
$0.00

Token:
 
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xff2ac5063d195bc4b52f19cadba1c8a92f9960f90c108558ae0430afc7844767Set Approval For...276208902022-04-27 2:51:52104 days 1 hr ago0x3525e409af2a87f4d85dec8fb0aad77f4c3d8035 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.000065685 2.500000032
0xfae9644b0bd5fb75fbf44948a84886d0bd2e8b7891b61b61161a39fe224ce27aSet Approval For...276200712022-04-27 2:22:48104 days 1 hr ago0x3525e409af2a87f4d85dec8fb0aad77f4c3d8035 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.000065685001 2.50000004
0xbd1e40581647d8021e84601f753866f246a9e3fa5272db956c44ffa9aaddcf76Set Approval For...276200712022-04-27 2:22:48104 days 1 hr ago0x3525e409af2a87f4d85dec8fb0aad77f4c3d8035 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.000065685 2.500000038
0x5d688f6465e3c3f17c5f3cdb5149ff0bb03c151ee9d92cf8b3e0fba652779860Safe Transfer Fr...270829982022-04-13 9:47:01117 days 18 hrs ago0x965fee7f1f013e53c5fdde48d2334c8cf6e8a449 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.000903242659 30.069999999
0x8a8fa0299f2625bc3ddcbd0f0abd5eb8350c20f8d5cea2c64473bccab0cc9f37Safe Transfer Fr...270829982022-04-13 9:47:01117 days 18 hrs ago0x965fee7f1f013e53c5fdde48d2334c8cf6e8a449 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.003504205596 39.199999966
0xa252102b78d85cbfcb1c958d241650bccf77e2394df060d80ac3672ad4590515Safe Transfer Fr...269214872022-04-09 7:53:38121 days 20 hrs ago0x9c04c7d81581de02b40aa3816ed3b72ab85c4d38 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.002864715179 32.04630317
0xd9ea81f5f8cc72bb38b6f26ca2a2f562ec1a99d53a506e0d2649394da2dba17cSet Approval For...268832962022-04-08 8:11:22122 days 19 hrs ago0x3525e409af2a87f4d85dec8fb0aad77f4c3d8035 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.000115435002 2.500000055
0x59523851e3a6a2f4f45d1aa6bc3cc30fbb7dedc0f427b31b2e89db4da3388346Claim Martabak267582542022-04-05 3:31:15126 days 39 mins ago0x3525e409af2a87f4d85dec8fb0aad77f4c3d8035 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.002280678569 31.369800002
0x2a89f831f89d2a4bf3749fc4a384416dd8a5a79ef714820a8bdc21afd0995f68Claim Martabak262705862022-03-23 14:48:50138 days 13 hrs ago0xee6d4d86bcc3c293cb36aa22dd4225f92b78af79 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.002519494036 29.167900032
0x254aafb364bb31e89123d7f673e11aa95839fb5a690ec6cc26f6905eea9b34e8Claim Martabak262705582022-03-23 14:47:52138 days 13 hrs ago0x965fee7f1f013e53c5fdde48d2334c8cf6e8a449 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.001113209459 32.309083143
0xa5a62e234b5aa3a42e1af96f89023baff4a32f714ef007c81982127ca76eddf9Claim Martabak262705582022-03-23 14:47:52138 days 13 hrs ago0x965fee7f1f013e53c5fdde48d2334c8cf6e8a449 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.001738971555 29.468600008
0xbdc77c31536d7452c148ed37b29e8d86bf05ff91472cb0bb4f70fc6d9e0a9442Claim Martabak259043862022-03-13 17:26:57148 days 10 hrs ago0xd44a03e9f749ec8921b759dab139bef65bb5936c IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.002881401683 33.270999998
0xefbca7d51b158e4f1fe03f8e28be2d43ada94eead2311b51e4cf2d374b8562b2Claim Martabak254449922022-03-01 4:32:11160 days 23 hrs ago0x3525e409af2a87f4d85dec8fb0aad77f4c3d8035 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.002186179209 30.069999987
0xced555ca27966b91b444b891eb349537ce6af640041e915ab472f5f640882236Claim Martabak245494662022-02-04 18:04:00185 days 10 hrs ago0xee6d4d86bcc3c293cb36aa22dd4225f92b78af79 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.000129568503 1.500000044
0x46303bd96bd96e2cc7743f26abf2341df3476b27dfcfb1f9b1bb86299320407dClaim Martabak238874072022-01-19 1:08:24202 days 3 hrs ago0x9c04c7d81581de02b40aa3816ed3b72ab85c4d38 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.0061889272684.950890981
0xfb9fc0c871d5ef76d39512749e0be928fff9e5ab61eb2dfb50f023393121465cClaim Martabak235510042022-01-10 8:51:35210 days 19 hrs ago0x9c04c7d81581de02b40aa3816ed3b72ab85c4d38 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.0021855930
0x91a3f2364a643898a96b85fd1ffded4518d3c3ba008c2ff00ebd5ef56926560dSet Approval For...235465982022-01-10 6:04:49210 days 22 hrs ago0x9c04c7d81581de02b40aa3816ed3b72ab85c4d38 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.0013852230.000000001
0x6f77d4e0e0e1800ff37fb35f2c0529f669d50995cce22c6eadfe750ee38899e6Claim Martabak234807182022-01-08 13:14:17212 days 14 hrs ago0x3525e409af2a87f4d85dec8fb0aad77f4c3d8035 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.039477729543
0x47cb89f80d17e1bbaefc2b1b966b1c821df66e7d7fb52f920747ff2ce13c87bfClaim Martabak233408912022-01-04 14:26:12216 days 13 hrs ago0xe5475694dbda631a7d88fff7d1b751a457b76824 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.032568552
0x5ab183cdf2f7e04b715585db3c02638362403e7d056752105dc4ac81579db0faSafe Transfer Fr...229275602021-12-25 1:44:07227 days 2 hrs ago0x965fee7f1f013e53c5fdde48d2334c8cf6e8a449 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.0022946130
0xbdbfeadc6ead82ed48813bfd63445efbb4fc71dc7228b6220c9fcc92f96b67e8Claim Martabak228563372021-12-23 5:33:41228 days 22 hrs ago0xa469490afa01b09b15f90b6c56569a2d4a64b031 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.0017691630
0xa87e8633db37079c0075451a77e6f14c2efbc1587ce13a5ff27ccd6f4cba223bClaim Martabak226660072021-12-18 10:11:09233 days 17 hrs ago0xd44a03e9f749ec8921b759dab139bef65bb5936c IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.0025981230
0x64e6a925d6e62f36d67f87169b24a5b9803059a84326168eb58eeacb2551eafcClaim Martabak226242652021-12-17 8:10:32234 days 19 hrs ago0xce76f64a15c0bd3de7699717557019aab45fc8d5 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.000717330
0x2b6a34609e1a8ac422e73d053f906648aba4c0fe1536df317f02e9e3749ae88fClaim Martabak224822412021-12-13 17:30:45238 days 10 hrs ago0x9c04c7d81581de02b40aa3816ed3b72ab85c4d38 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.00400691555
0x5dc6ae63f492204c78770b5dd9c138406f90604c6283b8374d9fbc2b8c8095eaClaim Martabak223895382021-12-11 8:01:34240 days 20 hrs ago0x3525e409af2a87f4d85dec8fb0aad77f4c3d8035 IN  0xb62582645dc7ec074c6c06b19f47264db593b6520 MATIC0.016067363221
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
MartabakCult

Compiler Version
v0.8.4+commit.c7e474f2

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 19 : MartabakCult.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.2;

import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Burnable.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/utils/Counters.sol";
import "./IMartabakCult.sol";
import "./IMartabak.sol";
import "./Droid.sol";

contract MartabakCult is ERC721Enumerable, Ownable, IMartabakCult {
    event YieldPaid(address indexed user, uint256 amount);

    using Counters for Counters.Counter;
    Counters.Counter private _tokenIdsCounter;

    string private _baseUri;
    bool public saleActive = false;
    bool public presaleActive = false;
    bool public breedActive = false;
    bool public typesFrozen = false;

    string public provenance;

    mapping(uint256 => uint256) private typesMap;
    mapping(uint256 => uint256) private lastClaimTime;
    mapping(uint256 => bool) private boostActivated;
    mapping(address => bool) private whiteList;
    mapping(address => uint256) private whiteListClaimed;

    uint256 private immutable maxMintAtOnce = 3;
    uint256 private immutable mintPrice = 40000000 gwei;
    uint256 private immutable boostPrice = 20000000 gwei;
    uint256 private immutable breedPrice = 1500 ether; // 1500 MTBK
    uint256 private immutable maxBreed = 6000;

    IMartabak public martabakContract;
    IERC20 public wethContract;

    struct CharacterType {
        uint256 id;
        uint256 cType;
    }

    constructor(address _wethContract, uint256 tokensReserved)
        ERC721("Martabak Cult", "MC")
    {
        wethContract = IERC20(_wethContract);
        // We are minting 50 tokens for give away, marketing and so on
        _mintPhase1(tokensReserved, msg.sender, false);
    }

    // Whitelist

    function addToWhiteList(address[] calldata _addresses) external onlyOwner {
        for (uint256 i = 0; i < _addresses.length; i++) {
            whiteList[_addresses[i]] = true;
        }
    }

    function removeFromWhiteList(address[] calldata _addresses)
        external
        onlyOwner
    {
        for (uint256 i = 0; i < _addresses.length; i++) {
            whiteList[_addresses[i]] = false;
        }
    }

    function onWhiteList(address _addr) external view override returns (bool) {
        return whiteList[_addr];
    }

    // Mint

    function mintPhase1(uint256 amount, bool boosted) external override {
        require(saleActive, "Sale inactive");
        require(amount <= maxMintAtOnce, "Max 3 per tx");
        require(
            totalSupply() + amount <= maxSupplyPhase1(),
            "Exceed max available"
        );

        uint256 balance = wethContract.balanceOf(msg.sender);
        uint256 price = mintPrice * amount;

        if (boosted) {
            price = (mintPrice + boostPrice) * amount;
        }
        require(
            wethContract.allowance(msg.sender, address(this)) >= price,
            "Incorrect allowance"
        );
        require(balance >= price, "Insufficient ETH balance");

        require(wethContract.transferFrom(msg.sender, address(this), price), "WETH transfer failed");
        _mintPhase1(amount, msg.sender, boosted);
    }

    function mintPresale(uint256 amount, bool boosted) external override {
        require(presaleActive, "Presale inactive");
        require(whiteList[msg.sender], "Not on the WhiteList");
        require(amount <= maxMintAtOnce, "Max 3 per tx");
        require(
            totalSupply() + amount <= maxSupplyPhase1(),
            "Exceed max available"
        );
        require(
            whiteListClaimed[msg.sender] + amount <= 3,
            "Purchase exceeds max allowed"
        );

        uint256 balance = wethContract.balanceOf(msg.sender);
        uint256 price = mintPrice * amount;

        if (boosted) {
            price = (mintPrice + boostPrice) * amount;
        }
        require(
            wethContract.allowance(msg.sender, address(this)) >= price,
            "Incorrect allowance"
        );
        require(balance >= price, "Insufficient ETH balance");

        whiteListClaimed[msg.sender] += amount;
        require(wethContract.transferFrom(msg.sender, address(this), price), "WETH transfer failed");
        _mintPhase1(amount, msg.sender, boosted);
    }

    function _mintPhase1(
        uint256 amount,
        address to,
        bool boosted
    ) internal {
        for (uint256 i = 0; i < amount; i++) {
            uint256 mintIndex = _tokenIdsCounter.current() + 1;
            if (mintIndex <= maxSupplyPhase1()) {
                _safeMint(to, mintIndex);
                startReward(mintIndex);
                if (boosted) {
                    boostActivated[mintIndex] = true;
                }
                _tokenIdsCounter.increment();
            }
        }
    }

    function breed(
        uint256 amount,
        uint256 firstId,
        uint256 secondId,
        bool boosted
    ) external override {
        require(breedActive, "Breeding inactive");
        require(
            totalSupply() + amount <= maxSupplyPhase1() + maxBreed,
            "Max breeds reached"
        );
        require(
            martabakContract.balanceOf(msg.sender) >= breedPrice * amount,
            "Not enough Martabak"
        );
        require(
            msg.sender == ownerOf(firstId) && msg.sender == ownerOf(secondId),
            "You're not the owner"
        );
        uint256 t1 = typesMap[firstId];
        uint256 t2 = typesMap[secondId];
        require(isBreedCompatible(t1, t2), "Can't breed. Incompatible");

        if (boosted) {
            uint256 balance = wethContract.balanceOf(msg.sender);
            uint256 price = boostPrice * amount;
            require(
                wethContract.allowance(msg.sender, address(this)) >= price,
                "Incorrect allowance"
            );
            require(balance >= price, "Insufficient ETH balance");
            require(wethContract.transferFrom(msg.sender, address(this), price), "WETH transfer failed");
        }
        _breed(amount, boosted);
    }

    function _breed(uint256 amount, bool boosted) internal {
        for (uint256 i = 0; i < amount; i++) {
            uint256 mintIndex = _tokenIdsCounter.current() + 1;
            if (mintIndex <= maxSupplyPhase1() + maxBreed) {
                martabakContract.burn(msg.sender, breedPrice);
                _safeMint(msg.sender, mintIndex);
                if (boosted) {
                    startReward(mintIndex);
                    boostActivated[mintIndex] = true;
                }
                _tokenIdsCounter.increment();
            }
        }
    }

    function maxSupplyPhase1() internal pure returns (uint256) {
        return 3200;
    }

    function isBreedCompatible(uint256 t1, uint256 t2)
        internal
        pure
        returns (bool)
    {
        return
            (isDroidFemale(t1) && isDroidMale(t2)) ||
            (isDroidFemale(t2) && isDroidMale(t1));
    }

    function buyBoost(uint256[] memory tokenIds) external override {
        for (uint256 i = 0; i < tokenIds.length; i++) {
            require(!boostActivated[tokenIds[i]], "Token already boosted");
        }
        uint256 balance = wethContract.balanceOf(msg.sender);
        uint256 price = boostPrice * tokenIds.length;
        require(
            wethContract.allowance(msg.sender, address(this)) >= price,
            "Incorrect allowance"
        );
        require(balance >= price, "Insufficient ETH balance");

        require(wethContract.transferFrom(msg.sender, address(this), price), "WETH transfer failed");
        for (uint256 i = 0; i < tokenIds.length; i++) {
            uint256 id = tokenIds[i];
            if (id > maxSupplyPhase1()) {
                lastClaimTime[id] = block.timestamp;
            }
            boostActivated[tokenIds[i]] = true;
        }
    }

    function storeType(CharacterType[] calldata _items) external onlyOwner {
        require(!typesFrozen, "Types are frozen");
        for (uint256 i = 0; i < _items.length; i++) {
            CharacterType memory t = _items[i];
            typesMap[t.id] = t.cType;
        }
    }

    function freezType() external onlyOwner {
        typesFrozen = true;
    }

    function _balanceByIdOf(address user)
        internal
        view
        returns (Droid[] memory)
    {
        uint256 balance = balanceOf(user);

        Droid[] memory droids = new Droid[](balance);

        for (uint256 i = 0; i < balance; i++) {
            uint256 tokenId = tokenOfOwnerByIndex(user, i);
            uint256 cType = typeFor(tokenId);
            bool boosted = boostActivated[tokenId];
            Droid memory droid = Droid(tokenId, cType, boosted);
            droids[i] = droid;
        }
        return droids;
    }

    function balanceByIdOf(address user)
        external
        view
        override
        returns (Droid[] memory)
    {
        return _balanceByIdOf(user);
    }

    function typeFor(uint256 tokenId) internal view returns (uint256) {
        return typesMap[tokenId];
    }

    function setMartabakContract(address addr) public onlyOwner {
        martabakContract = IMartabak(addr);
    }

    function flipSaleState() external onlyOwner {
        saleActive = !saleActive;
    }

    function flipPreSaleState() external onlyOwner {
        presaleActive = !presaleActive;
    }

    function flipBreedState() external onlyOwner {
        breedActive = !breedActive;
    }

    function isPresaleActive() external view override returns (bool) {
        return presaleActive;
    }

    function isSaleActive() external view override returns (bool) {
        return saleActive;
    }

    function isBreedingActive() external view override returns (bool) {
        return breedActive;
    }

    function setBaseURI(string memory baseURI) external onlyOwner {
        _baseUri = baseURI;
    }

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

    function setProvenanceHash(string memory provenanceHash) public onlyOwner {
        provenance = provenanceHash;
    }

    function currentMinted() external view override returns (uint256) {
        return _tokenIdsCounter.current();
    }

    function withdrawBalance() external onlyOwner {
        uint256 balance = wethContract.balanceOf(address(this));
        wethContract.transfer(msg.sender, balance);
    }

    // YIELD

    function startReward(uint256 tokenId) internal {
        lastClaimTime[tokenId] = block.timestamp;
    }

    function claimMartabak() external override {
        (uint256 toClaim, Droid[] memory tokensIds) = _calculateYieldTotal(
            msg.sender
        );

        if (toClaim > 0) {
            for (uint256 i = 0; i < tokensIds.length; i++) {
                lastClaimTime[tokensIds[i].id] = block.timestamp;
            }

            martabakContract.mint(msg.sender, toClaim);
            emit YieldPaid(msg.sender, toClaim);
        }
    }

    function calculateYieldTime(uint256 tokenId)
        internal
        view
        returns (uint256)
    {
        uint256 end = block.timestamp;
        uint256 totalTime = end - lastClaimTime[tokenId];
        return totalTime;
    }

    // Calculate total yield claimable for an address
    function _calculateYieldTotal(address user)
        internal
        view
        returns (uint256, Droid[] memory)
    {
        Droid[] memory droids = _balanceByIdOf(user);

        uint256 claimable = 0;

        for (uint256 i = 0; i < droids.length; i++) {
            uint256 time = calculateYieldTime(droids[i].id) * 10**18;
            uint256 rate = 86400;
            uint256 timeRate = time / rate;
            uint256 rawYield = (getRatePerType(
                droids[i].cType,
                droids[i].boosted
            ) * timeRate) ;
            claimable += rawYield;
        }
        return (claimable, droids);
    }

    function calculateYieldTotal(address user)
        external
        view
        override
        returns (uint256)
    {
        (uint256 toClaim, Droid[] memory droids) = _calculateYieldTotal(user);
        return toClaim;
    }

    // determine martabak rate per type
    // Shaman get 25 per day
    // Droids get 15 per day
    // Breed get 10 per day if boosted
    function getRatePerType(uint256 tokenType, bool isBoostActivated)
        internal
        pure
        returns (uint256)
    {
        uint256 yield = 0;

        if (isBoostActivated) {
            yield += 10;
        }

        if (isShaman(tokenType)) {
            yield += 25;
        } else if (isDroidMale(tokenType) || isDroidFemale(tokenType)) {
            yield += 15;
        }
        return yield;
    }

    function isShaman(uint256 tokenType) internal pure returns (bool) {
        return tokenType == 1;
    }

    function isDroidMale(uint256 tokenType) internal pure returns (bool) {
        return tokenType == 3;
    }

    function isDroidFemale(uint256 tokenType) internal pure returns (bool) {
        return tokenType == 2;
    }

    function isBreed(uint256 tokenType) internal pure returns (bool) {
        return tokenType == 4;
    }
}

File 2 of 19 : ERC721.sol
// SPDX-License-Identifier: MIT

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 {
        require(operator != _msgSender(), "ERC721: approve to caller");

        _operatorApprovals[_msgSender()][operator] = approved;
        emit ApprovalForAll(_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 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 3 of 19 : IERC20.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

File 4 of 19 : ERC721Enumerable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

File 5 of 19 : ERC721Burnable.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

pragma solidity ^0.8.0;

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

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

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

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

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

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

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

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

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

File 7 of 19 : Address.sol
// SPDX-License-Identifier: MIT

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 8 of 19 : Counters.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

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

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

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

File 9 of 19 : IMartabakCult.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "./Droid.sol";

interface IMartabakCult {
    function onWhiteList(address _addr) external view returns (bool);

    function calculateYieldTotal(address user) external view returns (uint256);

    function mintPhase1(uint256 amount, bool boosted) external;

    function mintPresale(uint256 amount, bool boosted) external;

    function breed(
        uint256 amount,
        uint256 firstId,
        uint256 secondId,
        bool boosted
    ) external;

    function buyBoost(uint256[] memory tokenIds) external;

    function balanceByIdOf(address user) external view returns (Droid[] memory);

    function currentMinted() external view returns (uint256);

    function claimMartabak() external;

    function isSaleActive() external view returns (bool);

    function isPresaleActive() external view returns (bool);

    function isBreedingActive() external view returns (bool);
}

File 10 of 19 : IMartabak.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.2;

import "@openzeppelin/contracts/token/ERC20/IERC20.sol";

interface IMartabak is IERC20 {
    function mint(address to, uint256 amount) external;
    function burn(address _from, uint256 _amount) external;
}

File 11 of 19 : Droid.sol
//SPDX-License-Identifier: Unlicense
pragma solidity ^0.8.2;

struct Droid {
        uint256 id;
        uint256 cType;
        bool boosted;
}

File 12 of 19 : IERC721.sol
// SPDX-License-Identifier: MIT

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 13 of 19 : IERC721Receiver.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 14 of 19 : IERC721Metadata.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

import "../IERC721.sol";

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

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

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

File 15 of 19 : Context.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

File 16 of 19 : Strings.sol
// SPDX-License-Identifier: MIT

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 17 of 19 : ERC165.sol
// SPDX-License-Identifier: MIT

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 18 of 19 : IERC165.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

File 19 of 19 : IERC721Enumerable.sol
// SPDX-License-Identifier: MIT

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);
}

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

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_wethContract","type":"address"},{"internalType":"uint256","name":"tokensReserved","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"YieldPaid","type":"event"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"addToWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"balanceByIdOf","outputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"cType","type":"uint256"},{"internalType":"bool","name":"boosted","type":"bool"}],"internalType":"struct Droid[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"firstId","type":"uint256"},{"internalType":"uint256","name":"secondId","type":"uint256"},{"internalType":"bool","name":"boosted","type":"bool"}],"name":"breed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"breedActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"buyBoost","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"calculateYieldTotal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimMartabak","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"flipBreedState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipPreSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"flipSaleState","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"freezType","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isBreedingActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isPresaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"martabakContract","outputs":[{"internalType":"contract IMartabak","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"boosted","type":"bool"}],"name":"mintPhase1","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bool","name":"boosted","type":"bool"}],"name":"mintPresale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"onWhiteList","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"presaleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"provenance","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"removeFromWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setMartabakContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"provenanceHash","type":"string"}],"name":"setProvenanceHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"cType","type":"uint256"}],"internalType":"struct MartabakCult.CharacterType[]","name":"_items","type":"tuple[]"}],"name":"storeType","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"typesFrozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wethContract","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawBalance","outputs":[],"stateMutability":"nonpayable","type":"function"}]

610120604052600d805463ffffffff191690556003608052668e1bc9bf04000060a05266470de4df82000060c052685150ae84a8cdf0000060e052611770610100523480156200004e57600080fd5b506040516200490738038062004907833981016040819052620000719162000984565b604080518082018252600d81526c13585c9d1858985ac810dd5b1d609a1b6020808301918252835180850190945260028452614d4360f01b908401528151919291620000c091600091620008de565b508051620000d6906001906020840190620008de565b505050620000f3620000ed6200012460201b60201c565b62000128565b601580546001600160a01b0319166001600160a01b0384161790556200011c813360006200017a565b505062000b0e565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60005b83811015620002235760006200019f600b6200022960201b620024c31760201c565b620001ac90600162000a68565b9050610c8081116200020d57620001c484826200022d565b60008181526010602052604090204290558215620001f6576000818152601160205260409020805460ff191660011790555b6200020d600b6200025360201b620024c71760201c565b50806200021a8162000ada565b9150506200017d565b50505050565b5490565b6200024f8282604051806020016040528060008152506200025c60201b60201c565b5050565b80546001019055565b620002688383620002d8565b6200027760008484846200042e565b620002d35760405162461bcd60e51b81526020600482015260326024820152600080516020620048e783398151915260448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084015b60405180910390fd5b505050565b6001600160a01b038216620003305760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401620002ca565b6000818152600260205260409020546001600160a01b031615620003975760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401620002ca565b620003a56000838362000597565b6001600160a01b0382166000908152600360205260408120805460019290620003d090849062000a68565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b60006200044f846001600160a01b03166200067360201b620024d01760201c565b156200058b57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029062000489903390899088908890600401620009ef565b602060405180830381600087803b158015620004a457600080fd5b505af1925050508015620004d7575060408051601f3d908101601f19168201909252620004d491810190620009be565b60015b62000570573d80801562000508576040519150601f19603f3d011682016040523d82523d6000602084013e6200050d565b606091505b508051620005685760405162461bcd60e51b81526020600482015260326024820152600080516020620048e783398151915260448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b6064820152608401620002ca565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506200058f565b5060015b949350505050565b620005af838383620002d360201b620008ed1760201c565b6001600160a01b0383166200060d576200060781600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b62000633565b816001600160a01b0316836001600160a01b031614620006335762000633838262000679565b6001600160a01b0382166200064d57620002d38162000726565b826001600160a01b0316826001600160a01b031614620002d357620002d3828262000804565b3b151590565b6000600162000693846200085560201b620013b31760201c565b6200069f919062000a83565b600083815260076020526040902054909150808214620006f3576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906200073a9060019062000a83565b600083815260096020526040812054600880549394509092849081106200077157634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060088381548110620007a157634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480620007e857634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006200081c836200085560201b620013b31760201c565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60006001600160a01b038216620008c25760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401620002ca565b506001600160a01b031660009081526003602052604090205490565b828054620008ec9062000a9d565b90600052602060002090601f0160209004810192826200091057600085556200095b565b82601f106200092b57805160ff19168380011785556200095b565b828001600101855582156200095b579182015b828111156200095b5782518255916020019190600101906200093e565b50620009699291506200096d565b5090565b5b808211156200096957600081556001016200096e565b6000806040838503121562000997578182fd5b82516001600160a01b0381168114620009ae578283fd5b6020939093015192949293505050565b600060208284031215620009d0578081fd5b81516001600160e01b031981168114620009e8578182fd5b9392505050565b600060018060a01b0380871683526020818716818501528560408501526080606085015284519150816080850152825b8281101562000a3d5785810182015185820160a00152810162000a1f565b8281111562000a4f578360a084870101525b5050601f01601f19169190910160a00195945050505050565b6000821982111562000a7e5762000a7e62000af8565b500190565b60008282101562000a985762000a9862000af8565b500390565b600181811c9082168062000ab257607f821691505b6020821081141562000ad457634e487b7160e01b600052602260045260246000fd5b50919050565b600060001982141562000af15762000af162000af8565b5060010190565b634e487b7160e01b600052601160045260246000fd5b60805160a05160c05160e05161010051613d5562000b926000396000818161156b0152612bae0152600081816115ef0152612bf3015260008181610f0c0152818161184f01528181611bec01526121c1015260008181610eda01528181610f2d0152818161218f01526121e2015260008181610d2f01526120500152613d556000f3fe608060405234801561001057600080fd5b50600436106102bb5760003560e01c80635fd8c71011610182578063a22cb465116100e9578063b88d4fde116100a2578063d128a27b1161007c578063d128a27b146105fb578063e985e9c51461060c578063f032554914610648578063f2fde38b1461065057600080fd5b8063b88d4fde146105c2578063c864cf35146105d5578063c87b56dd146105e857600080fd5b8063a22cb46514610542578063a5dde55c14610555578063b11560c514610568578063b15273de1461057b578063b22d0c831461058e578063b83855af146105ba57600080fd5b8063715018a61161013b578063715018a6146104e7578063740d73f3146104ef57806375c0835b1461050257806381ccac95146105155780638da5cb5b1461052957806395d89b411461053a57600080fd5b80635fd8c7101461048957806360d938dc146104915780636352211e146104a157806366830726146104b457806368428a1b146104c757806370a08231146104d457600080fd5b806322ef87ea116102265780634eb5f311116101df5780634eb5f3111461042b5780634f6ccce71461043e57806353135ca01461045157806355f804b314610463578063564566a8146104765780635d77f0af1461048157600080fd5b806322ef87ea146103c457806323b872dd146103d75780632f745c59146103ea57806334918dfd146103fd57806342842e0e146104055780634780eac11461041857600080fd5b8063095ea7b311610278578063095ea7b31461037c5780630f7309e8146103915780631096952314610399578063162a8cf7146103ac5780631764f362146103b457806318160ddd146103bc57600080fd5b806301ffc9a7146102c0578063025324ba146102e8578063068726611461031357806306fdde0314610334578063081812fc14610349578063093e89001461035c575b600080fd5b6102d36102ce36600461379c565b610663565b60405190151581526020015b60405180910390f35b6014546102fb906001600160a01b031681565b6040516001600160a01b0390911681526020016102df565b6103266103213660046134ab565b61068e565b6040519081526020016102df565b61033c6106a5565b6040516102df9190613a13565b6102fb610357366004613868565b610737565b61036f61036a3660046134ab565b6107d1565b6040516102df91906139b8565b61038f61038a3660046135e1565b6107dc565b005b61033c6108f2565b61038f6103a73660046137d4565b610980565b61038f6109c1565b61038f610ad8565b600854610326565b61038f6103d23660046134ab565b610b21565b61038f6103e53660046134f7565b610b6d565b6103266103f83660046135e1565b610b9e565b61038f610c34565b61038f6104133660046134f7565b610c72565b6015546102fb906001600160a01b031681565b61038f610439366004613898565b610c8d565b61032661044c366004613868565b6110f4565b600d546102d390610100900460ff1681565b61038f6104713660046137d4565b611195565b600d5460ff166102d3565b61038f6111d2565b61038f611211565b600d54610100900460ff166102d3565b6102fb6104af366004613868565b61133c565b600d546102d39062010000900460ff1681565b600d546102d39060ff1681565b6103266104e23660046134ab565b6113b3565b61038f61143a565b61038f6104fd36600461360a565b611470565b61038f6105103660046138bc565b61151a565b600d546102d3906301000000900460ff1681565b600a546001600160a01b03166102fb565b61033c6119ee565b61038f6105503660046135ab565b6119fd565b61038f6105633660046136d8565b611ac2565b61038f61057636600461360a565b611e3c565b61038f61058936600461367a565b611ee6565b6102d361059c3660046134ab565b6001600160a01b031660009081526012602052604090205460ff1690565b610326611fca565b61038f6105d0366004613532565b611fda565b61038f6105e3366004613898565b61200c565b61033c6105f6366004613868565b612306565b600d5462010000900460ff166102d3565b6102d361061a3660046134c5565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b61038f6123e1565b61038f61065e3660046134ab565b612428565b60006001600160e01b0319821663780e9d6360e01b14806106885750610688826124d6565b92915050565b600080600061069c84612526565b50949350505050565b6060600080546106b490613c4f565b80601f01602080910402602001604051908101604052809291908181526020018280546106e090613c4f565b801561072d5780601f106107025761010080835404028352916020019161072d565b820191906000526020600020905b81548152906001019060200180831161071057829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166107b55760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60606106888261263c565b60006107e78261133c565b9050806001600160a01b0316836001600160a01b031614156108555760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016107ac565b336001600160a01b03821614806108715750610871813361061a565b6108e35760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016107ac565b6108ed8383612771565b505050565b600e80546108ff90613c4f565b80601f016020809104026020016040519081016040528092919081815260200182805461092b90613c4f565b80156109785780601f1061094d57610100808354040283529160200191610978565b820191906000526020600020905b81548152906001019060200180831161095b57829003601f168201915b505050505081565b600a546001600160a01b031633146109aa5760405162461bcd60e51b81526004016107ac90613aaf565b80516109bd90600e90602084019061339e565b5050565b6000806109cd33612526565b909250905081156109bd5760005b8151811015610a3a574260106000848481518110610a0957634e487b7160e01b600052603260045260246000fd5b6020026020010151600001518152602001908152602001600020819055508080610a3290613c8a565b9150506109db565b506014546040516340c10f1960e01b8152336004820152602481018490526001600160a01b03909116906340c10f1990604401600060405180830381600087803b158015610a8757600080fd5b505af1158015610a9b573d6000803e3d6000fd5b50506040518481523392507fa807f7259252b0772c3cb5955dfd5ae56be3eb6ad783f9580330b1fd740926f6915060200160405180910390a25050565b600a546001600160a01b03163314610b025760405162461bcd60e51b81526004016107ac90613aaf565b600d805462ff0000198116620100009182900460ff1615909102179055565b600a546001600160a01b03163314610b4b5760405162461bcd60e51b81526004016107ac90613aaf565b601480546001600160a01b0319166001600160a01b0392909216919091179055565b610b7733826127df565b610b935760405162461bcd60e51b81526004016107ac90613b12565b6108ed8383836128d6565b6000610ba9836113b3565b8210610c0b5760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016107ac565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600a546001600160a01b03163314610c5e5760405162461bcd60e51b81526004016107ac90613aaf565b600d805460ff19811660ff90911615179055565b6108ed83838360405180602001604052806000815250611fda565b600d54610100900460ff16610cd75760405162461bcd60e51b815260206004820152601060248201526f50726573616c6520696e61637469766560801b60448201526064016107ac565b3360009081526012602052604090205460ff16610d2d5760405162461bcd60e51b8152602060048201526014602482015273139bdd081bdb881d1a194815da1a5d19531a5cdd60621b60448201526064016107ac565b7f0000000000000000000000000000000000000000000000000000000000000000821115610d8c5760405162461bcd60e51b815260206004820152600c60248201526b09ac2f0406640e0cae440e8f60a31b60448201526064016107ac565b610c8082610d9960085490565b610da39190613bc1565b1115610de85760405162461bcd60e51b8152602060048201526014602482015273457863656564206d617820617661696c61626c6560601b60448201526064016107ac565b33600090815260136020526040902054600390610e06908490613bc1565b1115610e545760405162461bcd60e51b815260206004820152601c60248201527f50757263686173652065786365656473206d617820616c6c6f7765640000000060448201526064016107ac565b6015546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015610e9857600080fd5b505afa158015610eac573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ed09190613880565b90506000610efe847f0000000000000000000000000000000000000000000000000000000000000000613bed565b90508215610f5e5783610f517f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000613bc1565b610f5b9190613bed565b90505b601554604051636eb1769f60e11b815233600482015230602482015282916001600160a01b03169063dd62ed3e9060440160206040518083038186803b158015610fa757600080fd5b505afa158015610fbb573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fdf9190613880565b1015610ffd5760405162461bcd60e51b81526004016107ac90613b63565b8082101561101d5760405162461bcd60e51b81526004016107ac90613a78565b336000908152601360205260408120805486929061103c908490613bc1565b90915550506015546040516323b872dd60e01b81526001600160a01b03909116906323b872dd9061107590339030908690600401613957565b602060405180830381600087803b15801561108f57600080fd5b505af11580156110a3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110c79190613780565b6110e35760405162461bcd60e51b81526004016107ac90613ae4565b6110ee843385612a81565b50505050565b60006110ff60085490565b82106111625760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016107ac565b6008828154811061118357634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600a546001600160a01b031633146111bf5760405162461bcd60e51b81526004016107ac90613aaf565b80516109bd90600c90602084019061339e565b600a546001600160a01b031633146111fc5760405162461bcd60e51b81526004016107ac90613aaf565b600d805463ff00000019166301000000179055565b600a546001600160a01b0316331461123b5760405162461bcd60e51b81526004016107ac90613aaf565b6015546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561127f57600080fd5b505afa158015611293573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112b79190613880565b60155460405163a9059cbb60e01b8152336004820152602481018390529192506001600160a01b03169063a9059cbb90604401602060405180830381600087803b15801561130457600080fd5b505af1158015611318573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109bd9190613780565b6000818152600260205260408120546001600160a01b0316806106885760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016107ac565b60006001600160a01b03821661141e5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016107ac565b506001600160a01b031660009081526003602052604090205490565b600a546001600160a01b031633146114645760405162461bcd60e51b81526004016107ac90613aaf565b61146e6000612b09565b565b600a546001600160a01b0316331461149a5760405162461bcd60e51b81526004016107ac90613aaf565b60005b818110156108ed576001601260008585858181106114cb57634e487b7160e01b600052603260045260246000fd5b90506020020160208101906114e091906134ab565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061151281613c8a565b91505061149d565b600d5462010000900460ff166115665760405162461bcd60e51b81526020600482015260116024820152704272656564696e6720696e61637469766560781b60448201526064016107ac565b6115927f0000000000000000000000000000000000000000000000000000000000000000610c80613bc1565b8461159c60085490565b6115a69190613bc1565b11156115e95760405162461bcd60e51b815260206004820152601260248201527113585e08189c9959591cc81c995858da195960721b60448201526064016107ac565b611613847f0000000000000000000000000000000000000000000000000000000000000000613bed565b6014546040516370a0823160e01b81523360048201526001600160a01b03909116906370a082319060240160206040518083038186803b15801561165657600080fd5b505afa15801561166a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061168e9190613880565b10156116d25760405162461bcd60e51b81526020600482015260136024820152724e6f7420656e6f756768204d6172746162616b60681b60448201526064016107ac565b6116db8361133c565b6001600160a01b0316336001600160a01b031614801561171457506116ff8261133c565b6001600160a01b0316336001600160a01b0316145b6117575760405162461bcd60e51b81526020600482015260146024820152732cb7ba93b932903737ba103a34329037bbb732b960611b60448201526064016107ac565b6000838152600f6020526040808220548483529120546117778282612b5b565b6117c35760405162461bcd60e51b815260206004820152601960248201527f43616e27742062726565642e20496e636f6d70617469626c650000000000000060448201526064016107ac565b82156119dc576015546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561180d57600080fd5b505afa158015611821573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118459190613880565b90506000611873887f0000000000000000000000000000000000000000000000000000000000000000613bed565b601554604051636eb1769f60e11b815233600482015230602482015291925082916001600160a01b039091169063dd62ed3e9060440160206040518083038186803b1580156118c157600080fd5b505afa1580156118d5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118f99190613880565b10156119175760405162461bcd60e51b81526004016107ac90613b63565b808210156119375760405162461bcd60e51b81526004016107ac90613a78565b6015546040516323b872dd60e01b81526001600160a01b03909116906323b872dd9061196b90339030908690600401613957565b602060405180830381600087803b15801561198557600080fd5b505af1158015611999573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119bd9190613780565b6119d95760405162461bcd60e51b81526004016107ac90613ae4565b50505b6119e68684612b86565b505050505050565b6060600180546106b490613c4f565b6001600160a01b038216331415611a565760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016107ac565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60005b8151811015611b675760116000838381518110611af257634e487b7160e01b600052603260045260246000fd5b60209081029190910181015182528101919091526040016000205460ff1615611b555760405162461bcd60e51b8152602060048201526015602482015274151bdad95b88185b1c9958591e48189bdbdcdd1959605a1b60448201526064016107ac565b80611b5f81613c8a565b915050611ac5565b506015546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a082319060240160206040518083038186803b158015611bac57600080fd5b505afa158015611bc0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611be49190613880565b9050600082517f0000000000000000000000000000000000000000000000000000000000000000611c159190613bed565b601554604051636eb1769f60e11b815233600482015230602482015291925082916001600160a01b039091169063dd62ed3e9060440160206040518083038186803b158015611c6357600080fd5b505afa158015611c77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c9b9190613880565b1015611cb95760405162461bcd60e51b81526004016107ac90613b63565b80821015611cd95760405162461bcd60e51b81526004016107ac90613a78565b6015546040516323b872dd60e01b81526001600160a01b03909116906323b872dd90611d0d90339030908690600401613957565b602060405180830381600087803b158015611d2757600080fd5b505af1158015611d3b573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d5f9190613780565b611d7b5760405162461bcd60e51b81526004016107ac90613ae4565b60005b83518110156110ee576000848281518110611da957634e487b7160e01b600052603260045260246000fd5b60200260200101519050611dbc610c8090565b811115611dd55760008181526010602052604090204290555b600160116000878581518110611dfb57634e487b7160e01b600052603260045260246000fd5b6020026020010151815260200190815260200160002060006101000a81548160ff021916908315150217905550508080611e3490613c8a565b915050611d7e565b600a546001600160a01b03163314611e665760405162461bcd60e51b81526004016107ac90613aaf565b60005b818110156108ed57600060126000858585818110611e9757634e487b7160e01b600052603260045260246000fd5b9050602002016020810190611eac91906134ab565b6001600160a01b031681526020810191909152604001600020805460ff191691151591909117905580611ede81613c8a565b915050611e69565b600a546001600160a01b03163314611f105760405162461bcd60e51b81526004016107ac90613aaf565b600d546301000000900460ff1615611f5d5760405162461bcd60e51b815260206004820152601060248201526f2a3cb832b99030b93290333937bd32b760811b60448201526064016107ac565b60005b818110156108ed576000838383818110611f8a57634e487b7160e01b600052603260045260246000fd5b905060400201803603810190611fa0919061381a565b60208082015191516000908152600f90915260409020555080611fc281613c8a565b915050611f60565b6000611fd5600b5490565b905090565b611fe433836127df565b6120005760405162461bcd60e51b81526004016107ac90613b12565b6110ee84848484612cba565b600d5460ff1661204e5760405162461bcd60e51b815260206004820152600d60248201526c53616c6520696e61637469766560981b60448201526064016107ac565b7f00000000000000000000000000000000000000000000000000000000000000008211156120ad5760405162461bcd60e51b815260206004820152600c60248201526b09ac2f0406640e0cae440e8f60a31b60448201526064016107ac565b610c80826120ba60085490565b6120c49190613bc1565b11156121095760405162461bcd60e51b8152602060048201526014602482015273457863656564206d617820617661696c61626c6560601b60448201526064016107ac565b6015546040516370a0823160e01b81523360048201526000916001600160a01b0316906370a082319060240160206040518083038186803b15801561214d57600080fd5b505afa158015612161573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121859190613880565b905060006121b3847f0000000000000000000000000000000000000000000000000000000000000000613bed565b9050821561221357836122067f00000000000000000000000000000000000000000000000000000000000000007f0000000000000000000000000000000000000000000000000000000000000000613bc1565b6122109190613bed565b90505b601554604051636eb1769f60e11b815233600482015230602482015282916001600160a01b03169063dd62ed3e9060440160206040518083038186803b15801561225c57600080fd5b505afa158015612270573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122949190613880565b10156122b25760405162461bcd60e51b81526004016107ac90613b63565b808210156122d25760405162461bcd60e51b81526004016107ac90613a78565b6015546040516323b872dd60e01b81526001600160a01b03909116906323b872dd9061107590339030908690600401613957565b6000818152600260205260409020546060906001600160a01b03166123855760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016107ac565b600061238f612ced565b905060008151116123af57604051806020016040528060008152506123da565b806123b984612cfc565b6040516020016123ca929190613928565b6040516020818303038152906040525b9392505050565b600a546001600160a01b0316331461240b5760405162461bcd60e51b81526004016107ac90613aaf565b600d805461ff001981166101009182900460ff1615909102179055565b600a546001600160a01b031633146124525760405162461bcd60e51b81526004016107ac90613aaf565b6001600160a01b0381166124b75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107ac565b6124c081612b09565b50565b5490565b80546001019055565b3b151590565b60006001600160e01b031982166380ac58cd60e01b148061250757506001600160e01b03198216635b5e139f60e01b145b8061068857506301ffc9a760e01b6001600160e01b0319831614610688565b6000606060006125358461263c565b90506000805b825181101561263257600061257a84838151811061256957634e487b7160e01b600052603260045260246000fd5b602002602001015160000151612e16565b61258c90670de0b6b3a7640000613bed565b905062015180600061259e8284613bd9565b90506000816126038887815181106125c657634e487b7160e01b600052603260045260246000fd5b6020026020010151602001518988815181106125f257634e487b7160e01b600052603260045260246000fd5b602002602001015160400151612e33565b61260d9190613bed565b90506126198187613bc1565b955050505050808061262a90613c8a565b91505061253b565b5094909350915050565b60606000612649836113b3565b905060008167ffffffffffffffff81111561267457634e487b7160e01b600052604160045260246000fd5b6040519080825280602002602001820160405280156126cb57816020015b6126b8604051806060016040528060008152602001600081526020016000151581525090565b8152602001906001900390816126925790505b50905060005b828110156127695760006126e58683610b9e565b6000818152600f6020908152604080832054601183529281902054815160608101835285815292830184905260ff168015159183019190915286519394509192819087908790811061274757634e487b7160e01b600052603260045260246000fd5b602002602001018190525050505050808061276190613c8a565b9150506126d1565b509392505050565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906127a68261133c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600260205260408120546001600160a01b03166128585760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016107ac565b60006128638361133c565b9050806001600160a01b0316846001600160a01b0316148061289e5750836001600160a01b031661289384610737565b6001600160a01b0316145b806128ce57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b03166128e98261133c565b6001600160a01b0316146129515760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016107ac565b6001600160a01b0382166129b35760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016107ac565b6129be838383612e84565b6129c9600082612771565b6001600160a01b03831660009081526003602052604081208054600192906129f2908490613c0c565b90915550506001600160a01b0382166000908152600360205260408120805460019290612a20908490613bc1565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b60005b838110156110ee576000612a97600b5490565b612aa2906001613bc1565b9050610c808111612af657612ab78482612f3c565b60008181526010602052604090204290558215612ae8576000818152601160205260409020805460ff191660011790555b612af6600b80546001019055565b5080612b0181613c8a565b915050612a84565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000600283148015612b6d5750600382145b806123da57506002821480156123da5750505060031490565b60005b828110156108ed576000612b9c600b5490565b612ba7906001613bc1565b9050612bd57f0000000000000000000000000000000000000000000000000000000000000000610c80613bc1565b8111612ca757601454604051632770a7eb60e21b81523360048201527f000000000000000000000000000000000000000000000000000000000000000060248201526001600160a01b0390911690639dc29fac90604401600060405180830381600087803b158015612c4657600080fd5b505af1158015612c5a573d6000803e3d6000fd5b50505050612c683382612f3c565b8215612c995760008181526010602052604090204290556000818152601160205260409020805460ff191660011790555b612ca7600b80546001019055565b5080612cb281613c8a565b915050612b89565b612cc58484846128d6565b612cd184848484612f56565b6110ee5760405162461bcd60e51b81526004016107ac90613a26565b6060600c80546106b490613c4f565b606081612d205750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612d4a5780612d3481613c8a565b9150612d439050600a83613bd9565b9150612d24565b60008167ffffffffffffffff811115612d7357634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612d9d576020820181803683370190505b5090505b84156128ce57612db2600183613c0c565b9150612dbf600a86613ca5565b612dca906030613bc1565b60f81b818381518110612ded57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612e0f600a86613bd9565b9450612da1565b600081815260106020526040812054429082906128ce9083613c0c565b6000808215612e4a57612e47600a82613bc1565b90505b6001841415612e6557612e5e601982613bc1565b90506123da565b6003841480612e745750600284145b156123da576128ce600f82613bc1565b6001600160a01b038316612edf57612eda81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612f02565b816001600160a01b0316836001600160a01b031614612f0257612f028382613063565b6001600160a01b038216612f19576108ed81613100565b826001600160a01b0316826001600160a01b0316146108ed576108ed82826131d9565b6109bd82826040518060200160405280600081525061321d565b60006001600160a01b0384163b1561305857604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612f9a90339089908890889060040161397b565b602060405180830381600087803b158015612fb457600080fd5b505af1925050508015612fe4575060408051601f3d908101601f19168201909252612fe1918101906137b8565b60015b61303e573d808015613012576040519150601f19603f3d011682016040523d82523d6000602084013e613017565b606091505b5080516130365760405162461bcd60e51b81526004016107ac90613a26565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506128ce565b506001949350505050565b60006001613070846113b3565b61307a9190613c0c565b6000838152600760205260409020549091508082146130cd576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061311290600190613c0c565b6000838152600960205260408120546008805493945090928490811061314857634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050806008838154811061317757634e487b7160e01b600052603260045260246000fd5b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806131bd57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b60006131e4836113b3565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6132278383613250565b6132346000848484612f56565b6108ed5760405162461bcd60e51b81526004016107ac90613a26565b6001600160a01b0382166132a65760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016107ac565b6000818152600260205260409020546001600160a01b03161561330b5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016107ac565b61331760008383612e84565b6001600160a01b0382166000908152600360205260408120805460019290613340908490613bc1565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546133aa90613c4f565b90600052602060002090601f0160209004810192826133cc5760008555613412565b82601f106133e557805160ff1916838001178555613412565b82800160010185558215613412579182015b828111156134125782518255916020019190600101906133f7565b5061341e929150613422565b5090565b5b8082111561341e5760008155600101613423565b600067ffffffffffffffff83111561345157613451613ce5565b613464601f8401601f1916602001613b90565b905082815283838301111561347857600080fd5b828260208301376000602084830101529392505050565b80356001600160a01b03811681146134a657600080fd5b919050565b6000602082840312156134bc578081fd5b6123da8261348f565b600080604083850312156134d7578081fd5b6134e08361348f565b91506134ee6020840161348f565b90509250929050565b60008060006060848603121561350b578081fd5b6135148461348f565b92506135226020850161348f565b9150604084013590509250925092565b60008060008060808587031215613547578081fd5b6135508561348f565b935061355e6020860161348f565b925060408501359150606085013567ffffffffffffffff811115613580578182fd5b8501601f81018713613590578182fd5b61359f87823560208401613437565b91505092959194509250565b600080604083850312156135bd578182fd5b6135c68361348f565b915060208301356135d681613cfb565b809150509250929050565b600080604083850312156135f3578182fd5b6135fc8361348f565b946020939093013593505050565b6000806020838503121561361c578182fd5b823567ffffffffffffffff80821115613633578384fd5b818501915085601f830112613646578384fd5b813581811115613654578485fd5b8660208260051b8501011115613668578485fd5b60209290920196919550909350505050565b6000806020838503121561368c578182fd5b823567ffffffffffffffff808211156136a3578384fd5b818501915085601f8301126136b6578384fd5b8135818111156136c4578485fd5b8660208260061b8501011115613668578485fd5b600060208083850312156136ea578182fd5b823567ffffffffffffffff80821115613701578384fd5b818501915085601f830112613714578384fd5b81358181111561372657613726613ce5565b8060051b9150613737848301613b90565b8181528481019084860184860187018a1015613751578788fd5b8795505b83861015613773578035835260019590950194918601918601613755565b5098975050505050505050565b600060208284031215613791578081fd5b81516123da81613cfb565b6000602082840312156137ad578081fd5b81356123da81613d09565b6000602082840312156137c9578081fd5b81516123da81613d09565b6000602082840312156137e5578081fd5b813567ffffffffffffffff8111156137fb578182fd5b8201601f8101841361380b578182fd5b6128ce84823560208401613437565b60006040828403121561382b578081fd5b6040516040810181811067ffffffffffffffff8211171561384e5761384e613ce5565b604052823581526020928301359281019290925250919050565b600060208284031215613879578081fd5b5035919050565b600060208284031215613891578081fd5b5051919050565b600080604083850312156138aa578182fd5b8235915060208301356135d681613cfb565b600080600080608085870312156138d1578182fd5b84359350602085013592506040850135915060608501356138f181613cfb565b939692955090935050565b60008151808452613914816020860160208601613c23565b601f01601f19169290920160200192915050565b6000835161393a818460208801613c23565b83519083019061394e818360208801613c23565b01949350505050565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906139ae908301846138fc565b9695505050505050565b602080825282518282018190526000919060409081850190868401855b82811015613a06578151805185528681015187860152850151151585850152606090930192908501906001016139d5565b5091979650505050505050565b6020815260006123da60208301846138fc565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526018908201527f496e73756666696369656e74204554482062616c616e63650000000000000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526014908201527315d15512081d1c985b9cd9995c8819985a5b195960621b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b602080825260139082015272496e636f727265637420616c6c6f77616e636560681b604082015260600190565b604051601f8201601f1916810167ffffffffffffffff81118282101715613bb957613bb9613ce5565b604052919050565b60008219821115613bd457613bd4613cb9565b500190565b600082613be857613be8613ccf565b500490565b6000816000190483118215151615613c0757613c07613cb9565b500290565b600082821015613c1e57613c1e613cb9565b500390565b60005b83811015613c3e578181015183820152602001613c26565b838111156110ee5750506000910152565b600181811c90821680613c6357607f821691505b60208210811415613c8457634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415613c9e57613c9e613cb9565b5060010190565b600082613cb457613cb4613ccf565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b80151581146124c057600080fd5b6001600160e01b0319811681146124c057600080fdfea26469706673582212202d18ab1a67c6ffa1857e0657c366cbb8f84050f13de3d763ed536d52b11f2fd464736f6c634300080400334552433732313a207472616e7366657220746f206e6f6e2045524337323152650000000000000000000000007ceb23fd6bc0add59e62ac25578270cff1b9f6190000000000000000000000000000000000000000000000000000000000000032

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

0000000000000000000000007ceb23fd6bc0add59e62ac25578270cff1b9f6190000000000000000000000000000000000000000000000000000000000000032

-----Decoded View---------------
Arg [0] : _wethContract (address): 0x7ceb23fd6bc0add59e62ac25578270cff1b9f619
Arg [1] : tokensReserved (uint256): 50

-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000007ceb23fd6bc0add59e62ac25578270cff1b9f619
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000032


Block Transaction Gas Used Reward
Age Block Fee Address BC Fee Address Voting Power Jailed Incoming
Block Uncle Number Difficulty Gas Used Reward
Loading
Loading
Make sure to use the "Vote Down" button for any spammy posts, and the "Vote Up" for interesting conversations.