Contract 0x71f5C328241fC3e03A8c79eDCD510037802D369c 1

 
  Note: Our ether balance display is temporarily unavailable. Please check back later.
Txn Hash Method
Block
From
To
Value [Txn Fee]
0xd91c19fbccd99bd4506483cdd5fc585ae6f2bb25d90b7e47466d6914202f78d3Mint34742252021-12-01 1:30:272 days 5 hrs ago0x3415187c90ca060591f74565cdb67bd0c931f204 IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0.05 ETH0.001982047485 ETH
0x533981420a1fc97e9ceac3756b4f5853f61701abf79ca49a48577d96ffc8efa7Mint34663962021-11-30 18:10:412 days 12 hrs ago0x6a19891e91a3d4d690cc8f9627290d25bfd34df6 IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0.05 ETH0.00183382747 ETH
0x0d9be6f96a5fce952c712517652ddcf490d5198e4e21b690976d107b76e7eaffMint34349762021-11-29 14:33:193 days 16 hrs ago0x2a0059610c92842dc2ef84af76b244c28687e647 IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0.05 ETH0.001675425619 ETH
0x585e41f7c8d53a8e7e43b79738a9a571911b40dd7db669b884a30d5f12a0c124Mint34349232021-11-29 14:31:023 days 16 hrs ago0x2a0059610c92842dc2ef84af76b244c28687e647 IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0.05 ETH0.001673990307 ETH
0xfb8335405d59f2592b20a2de10bc8353f6da7c355a66f32a65f08bca1a3efc5fSafe Transfer Fr...34315192021-11-29 11:53:323 days 19 hrs ago0x846ff49d72f4e3ca7a3d318820c6c2debe23c68a IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0 ETH0.001169481262 ETH
0xb415c0523080e3de5673270c821ba3e2bf96de3c60631ffdbced4f8f30c9210dOwner Claim34315012021-11-29 11:53:323 days 19 hrs ago0x846ff49d72f4e3ca7a3d318820c6c2debe23c68a IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0 ETH0.001690235174 ETH
0x5ea0452ab7032f4dc9debf7a2ade8d84d7cba86f3911d1ab7966cdd1ed6e031eMint34311112021-11-29 11:34:153 days 19 hrs ago0x77ddf16249d93fdc64d4467463c27972d74400aa IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0.05 ETH0.001690286781 ETH
0xc55c2f0776223a2280abffe5644249bc018c76bd96d2c79039af766af9fe56f3Owner Withdraw34270412021-11-29 8:22:073 days 22 hrs ago0x846ff49d72f4e3ca7a3d318820c6c2debe23c68a IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0 ETH0.000665448175 ETH
0x1861ec4b6c38767729cfdd1313c6a831a6d0415668f91f4e8433438beabe33a3Set Approval For...34227542021-11-29 4:00:534 days 3 hrs ago0x1cf54b443cecda6e802806b675bb5d525cc1c3d3 IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0 ETH0.00096169561 ETH
0xa8fc66437d24cef3379b2ce1f89ba1559580dd21e38f721b3b795f4b265e9838Mint34187922021-11-29 0:10:374 days 6 hrs ago0x11384e12d86078d83c6f3d7457b54d2df5638902 IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0.05 ETH0.001714433418 ETH
0xdff96e0de0c8d264eb4ed094d0c0bcbb8d260143be6428dfd7cb82bbbb762020Mint33717172021-11-27 4:48:066 days 2 hrs ago0x133d93566f9699b3af46fe150daa8a67a9563ed6 IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0.05 ETH0.001833434137 ETH
0xf7b6195822f5adf5c1eacda1564856dba4bc2dea1bf3caa6e3398ff0802963d5Mint33692612021-11-27 1:18:386 days 5 hrs ago0x133d93566f9699b3af46fe150daa8a67a9563ed6 IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0.05 ETH0.001812943778 ETH
0xc987f81ab75fae8fe0e237e75b0c7c880b75054ca624f3f8211db8951e300041Mint33692562021-11-27 1:18:386 days 5 hrs ago0x133d93566f9699b3af46fe150daa8a67a9563ed6 IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0.05 ETH0.00181299376 ETH
0xdfd946a0bf164dadeac99ade3189ab7bc1187d075d893115c75b6d32f8c933ebMint33692512021-11-27 1:18:386 days 5 hrs ago0x133d93566f9699b3af46fe150daa8a67a9563ed6 IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0.05 ETH0.001812985067 ETH
0xfbb37a9c96cd56ad101ddeca6491e7481aca944d2f65273aac7c8873f5e50bffMint33692372021-11-27 1:17:486 days 5 hrs ago0x133d93566f9699b3af46fe150daa8a67a9563ed6 IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0.05 ETH0.0018129905 ETH
0x2eff237fb9bd5c0104c94db2b860e345e3b170961014e7c84f7ee78d7aca64a4Mint33466622021-11-26 8:19:506 days 22 hrs ago0xe26e1d239d27e1fe8c7a150c5c266b347a7a6e7c IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0.05 ETH0.001794639943 ETH
0x52a100ca46544fc443ec3397675d701180a2679325bf011cdd88eda5e6c907c6Set Approval For...33372132021-11-25 23:33:267 days 7 hrs ago0xd93ed3fd9717b22006443de6e1cd60220ddd642a IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0 ETH0.001034844252 ETH
0xf1b89cfdec2d5a822a7f06d810b89e4fa7caee394ef8cf42c02ad16467c0dd90Mint33282582021-11-25 15:35:507 days 15 hrs ago0xbd46cd0e482e7979b37a16e43c831fc9c1bec997 IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0.05 ETH0.001921859997 ETH
0xe72eaa86cae2eba7ca150a54548fa716a30a3c294c4223c7a64920dff0e22d00Owner Withdraw33202102021-11-25 9:47:187 days 21 hrs ago0x846ff49d72f4e3ca7a3d318820c6c2debe23c68a IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0 ETH0.000729127609 ETH
0x870396599a4800aacb729a96aa1e7b9a072003ffcb526d4a669afc680a72f44cMint33126282021-11-25 2:45:108 days 4 hrs ago0x7fbb2005b74398d50790b0e289b01daeb652f6ae IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0.05 ETH0.00194704298 ETH
0x2f6ecadb5064eb575727567233eb7e01d026105e6f3ffc1ee6f2e2990f14afcdMint33124992021-11-25 2:37:338 days 4 hrs ago0x9b973cb2850441ddd656b64fc254608790e299da IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0.05 ETH0.001947610799 ETH
0xc81d5dec27f6a78d6d7eed5c0e3c665a49707ac3906482dcd1ff295a806c914bMint32973562021-11-24 13:13:418 days 17 hrs ago0xaeb6d9c366fa3251c50306c73e4f049152795b7a IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0.05 ETH0.001799128347 ETH
0x63c0597210946ccb1e76f50449989b1a66417d9c3bfe30a00a3b0fe467c04f87Set Approval For...32585892021-11-23 2:23:1010 days 4 hrs ago0xc3db83830ad22985077b1b704f1a203fcc62e0bf IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0 ETH0.00107634452 ETH
0x9835e761a510642a292007b230b58480b05d134f74a7be443e9cfb3564efb792Mint32585772021-11-23 2:23:1010 days 4 hrs ago0xc3db83830ad22985077b1b704f1a203fcc62e0bf IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0.05 ETH0.001984972946 ETH
0x4c49a973602c959f9e0c8117db02d68b93dea0e1c94bd391e751d920dbd8addbSet Approval For...32564672021-11-23 0:44:5710 days 6 hrs ago0x3c1d9efa913591d01da35639e24bb46382e6e017 IN  0x71f5c328241fc3e03a8c79edcd510037802d369c0 ETH0.001094528256 ETH
[ Download CSV Export 
Parent Txn Hash Block From To Value
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
CastlesArbi

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 14 : CastlesArbi.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.4;

import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";

/*

  _______________________________________
 /                                       \
/   _   _   _                 _   _   _   \
|  | |_| |_| |   _   _   _   | |_| |_| |  |
|   \   _   /   | |_| |_| |   \   _   /   |
|    | | | |     \       /     | | | |    |
|    | |_| |______|     |______| |_| |    |
|    |              ___              |    |
|    |  _    _    (     )    _    _  |    |
|    | | |  |_|  (       )  |_|  | | |    |
|    | |_|       |       |       |_| |    |
|   /            |_______|            \   |
|  |___________________________________|  |
\ CASTLESDAO presents: Castles Gen One    /
 \_______________________________________/

*/

contract CastlesArbi is ERC721Enumerable, ReentrancyGuard, Ownable {

    uint256 public price = 100000000000000000; //0.05 ETH

    function setPublicPrice(uint256 newPrice) public onlyOwner {
        price = newPrice;
    }

    function ownerWithdraw() external onlyOwner {
        payable(owner()).transfer(address(this).balance);
    }

    string[] private warriors = [       
        "Champion",
        "Dragon",
        "Frog",
        "Ghost",
        "Golem",
        "King",
        "Witch",
        "Punk Alien",
        "Punk Ape",
        "Skeleton",
        "Wizard",
        "Barbarian",
        "Priest",
        "Cats"
    ];

    string[] private skillTypes = [
        "damage",
        "speed",
        "gold generation",
        "defense",
        "agility",
        "intelligence",
        "charisma",
        "ability power",
        "fear"
    ];

    string[] private protectedNames = [
        "Defended",
        "Protected",
        "Guarded",
        "Shielded",
        "Safeguarded",
        "Fortified",
        "Secured",
        "Hardened",
        "Walled"
    ];

    string[] private races = [
        "Goblin",
        "Human",
        "Dwarf",
        "Elf",
        "Undead",
        "Orc",
        "Imp",
        "Ape",
        "Faerie",
        "Troll",
        "Angel",
        "Djinn",
        "Shade",
        "Shapeshifter",
        "Spirit",
        "Golem",
        "Halfling",
        "Leoning",
        "Triton",
        "Demon",
        "Centaur",
        "Loxodon",
        "Minotaur",
        "Vedalken",
        "Merfolk",
        "Dark-Elf",
        "Balrog",
        "Ent"
    ];

    string[] private backgrounds = [
        "Beggar",
        "Adventurer",
        "Scholar",
        "Gambler",
        "Wizard",
        "Alchemist",
        "Soldier",
        "Merchant",
        "Warrior",
        "Noble",
        "Healer",
        "Cleric",
        "Acolyte",
        "Lord",
        "Charlatan",
        "Crafter",
        "Criminal",
        "Traveler",
        "Gambler",
        "Gladiator",
        "Artisan",
        "Hermit",
        "Marine",
        "Sailor",
        "Assassin",
        "King",
        "Queen"
    ];

    string[] private castleTypes = [
        "Fortress",
        "Tower",
        "Castle",
        "Prison",
        "Guard",
        "Defense",
        "Stronghold",
        "Citadel",
        "Palace",
        "Lair",
        "House",
        "Barracks",
        "Dome",
        "Fort",
        "Alcazar",
        "Acropolis",
        "Garrison",
        "Chateau",
        "Catacombs"
    ];

    string[] private castleTitles = [
        "of Doom",
        "of Sweetness",
        "of Treachery",
        "of Happiness",
        "of Terror",
        "of Ethereum",
        "of the brave",
        "of Gold",
        "of Silver",
        "of Diamonds",
        "of the Divine",
        "of Fire",
        "of Pleasure",
        "of Death",
        "of Life",
        "of Quantum Forces",
        "of Despair",
        "of Magic",
        "of the DAO",
        "of the Seven Lords",
        "of the Emperor",
        "of Blood",
        "of Evil",
        "of Darkness",
        "of Light",
        "of Insanity",
        "of Horror",
        "of Skulls",
        "of Sorrow"
    ];

    

    function random(string memory input) internal pure returns (uint256) {
        return uint256(keccak256(abi.encodePacked(input)));
    }

    function strConcat(string memory _a, string memory _b) internal pure returns (string memory) {
        return string(abi.encodePacked(bytes(_a), bytes(_b)));
    }
   
    function compareStrings(string memory a, string memory b) internal pure returns (bool) {
        return (keccak256(abi.encodePacked((a))) == keccak256(abi.encodePacked((b))));
    }

    // Returns a random item from the list, always the same for the same token ID
    function pluck(uint256 tokenId, string memory keyPrefix, string[] memory sourceArray) internal view returns (string memory) {
        uint256 rand = random(string(abi.encodePacked(keyPrefix, toString(tokenId))));

        return sourceArray[rand % sourceArray.length];
    }



    // 0 - 99 + 10 for warrior
    function getDefense(uint256 tokenId) public view returns (uint256) {
        // Random defense + if has warrior + 15
        uint256 rand = random(string(abi.encodePacked("DEFENSE", toString(tokenId))));
        uint256 numberDefense = rand % 99;

        string memory warrior = getWarrior(tokenId);

        // If not has warrior, return defense
        if (compareStrings(warrior, "none")) {
            return numberDefense;
        }

        // Has warrior, return defense + 15
        return numberDefense  + 15;
    }

    // 0 - 25
    function getGoldGeneration(uint256 tokenId) public view returns (uint256) {
        require(_exists(tokenId), "ERC721Metadata: Non minted NFT");
        uint256 rand = random(string(abi.encodePacked("GOLD_GENERATION", toString(tokenId))));
        return rand % 25;
    }

    // 1-255
    function getCapacity(uint256 tokenId) public view returns (uint256) {
        uint256 rand = random(string(abi.encodePacked("CAPACITY", toString(tokenId))));
        return (rand % 254) + 1;
    }

    // 1 - 25
    function getSkillAmount(uint256 tokenId) public view returns (uint256) {
        uint256 rand = random(string(abi.encodePacked("SKILL_AMOUNT", toString(tokenId))));
        return (rand % 25) + 1;
    }

    // 1-10
    function getRarityNumber(uint256 tokenId) public view returns (uint256) {
        require(_exists(tokenId), "ERC721Metadata: Non minted NFT");
        uint256 goldGeneration = getGoldGeneration(tokenId);
        uint256 defense = getDefense(tokenId);
        uint256 capacity = getDefense(tokenId);
        uint256 skillAmount = getSkillAmount(tokenId);

        uint256 rarity = 0;

        // Good gold generation
        if (goldGeneration > 10) {
            rarity +=1;
            if (goldGeneration >= 15) {
                rarity+=1;
            }
        }
        // if defense 
        if(defense > 70) {
            rarity +=1;
            if (defense > 80) {
                rarity +=1;

                if (defense > 90) {
                    rarity+=1;
                }
            }
        }

        // has capacity
        if (capacity > 150) {
            rarity +=1;

            if (capacity > 220) {
                rarity+=1;
            }
        }

        // has skillz
        if (skillAmount > 10) {
            rarity +=1;

            if (skillAmount >= 15) {
                rarity+=1;
            }
            if (skillAmount >= 20) {
                rarity+=1;
            }
        }

        return rarity;
    }

    function getRarity(uint256 tokenId) public view returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: Non minted NFT");
        uint256 rarity = getRarityNumber(tokenId);

        if (rarity > 6) {
            return "Divine";
        }

        if (rarity > 4) {
            return "Mythic";
        }

        if (rarity > 2) {
            return "Rare";
        }

        return "Common";
    }

    function getSkillType(uint256 tokenId) public view returns (string memory) {
        return pluck(tokenId, "SKILL", skillTypes);
    }

    function getCastleType(uint256 tokenId) public view returns (string memory) {
        return pluck(tokenId, "CASTLE_TYPE", castleTypes);
    }

    // Visible 

    function getWarrior(uint256 tokenId) public view returns (string memory) {
        uint256 rand = random(string(abi.encodePacked("WARRIOR_PROBABILITY", toString(tokenId))));
        if ((rand % 99) < 30 ) {
            return pluck(tokenId, "WARRIOR", warriors);
        } 
        return "none";
    }

    function getWarriorName(uint256 tokenId) public view returns (string memory) {
        string memory warrior = getWarrior(tokenId);
        
        if (compareStrings(warrior, "none")) {
            return "none";
        }

        return string(abi.encodePacked(pluck(tokenId, "WARRIOR_BACKGROUND", backgrounds), " ", warrior));
    }

    function getName(uint256 tokenId) public view returns (string memory) {
        string memory warrior = getWarrior(tokenId);
        string memory castleType = getCastleType(tokenId);
       
        // If does not have warrior
        if (compareStrings(warrior, "none")) {
            // Calculate the castle title
            uint256 rand = random(string(abi.encodePacked("CASTLE_TITLE_PROBABILITY", toString(tokenId))));
            uint256 withOwnerName = rand % 99;
            string memory castleTitle = pluck(tokenId, "CASTLE_TITLE", castleTitles);

           
            if (withOwnerName < 75 ) {
                string memory race = pluck(tokenId, "CASTLE_TITLE_RACE", races);
                string memory background = pluck(tokenId, "CASTLE_TITLE_BACKGROUND", backgrounds);
                if (withOwnerName < 25) {
                    castleTitle = string(abi.encodePacked("of the ", background, " ", race));
                } else if (withOwnerName < 50) {
                    castleTitle = string(abi.encodePacked("of the ", background, "s"));
                }else{
                    castleTitle = string(abi.encodePacked("of the ", race, "s"));
                }
                
            } 

            return string(abi.encodePacked(castleType, " ", castleTitle));
        }

        string memory warriorName = getWarriorName(tokenId);

        return string(abi.encodePacked(pluck(tokenId, "PROTECTED_NAME", protectedNames), " ", castleType, " of the ", warriorName));
    }

    string[] private traitCategories = [
        "Name",
        "CastleType",
        "Defense",
        "SkillType",
        "SkillAmount",
        "GoldGeneration",
        "WarriorName",
        "Warrior",
        "Capacity",
        "RarityNumber",
        "Rarity"
    ];
    
    function traitsOf(uint256 tokenId) public view returns (string memory) {
        require(_exists(tokenId), "ERC721Metadata: Non minted NFT");
        string[11] memory traitValues = [
            getName(tokenId),
            getCastleType(tokenId),
            toString(getDefense(tokenId)),
            getSkillType(tokenId),
            toString(getSkillAmount(tokenId)),
            toString(getGoldGeneration(tokenId)),
            getWarriorName(tokenId),
            getWarrior(tokenId),
            toString(getCapacity(tokenId)),
            toString(getRarityNumber(tokenId)),
            getRarity(tokenId)
        ];

        string memory resultString = "[";
        for (uint8 j = 0; j < traitCategories.length; j++) {
        if (j > 0) {
            resultString = strConcat(resultString, ", ");
        }
        resultString = strConcat(resultString, '{"trait_type": "');
        resultString = strConcat(resultString, traitCategories[j]);
        resultString = strConcat(resultString, '", "value": "');
        resultString = strConcat(resultString, traitValues[j]);
        resultString = strConcat(resultString, '"}');
        }
        return strConcat(resultString, "]");
    }


    /**
     * @dev Base URI for computing {tokenURI}. Empty by default, can be overriden
     * in child contracts.
     */
    string private baseURI = "https://castles-arbitrum-nft.vercel.app/api/castle/";

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

    function setBaseURI(string memory newBaseURI) public onlyOwner {
        baseURI = newBaseURI;
    }

    function mint(uint256 tokenId) public payable nonReentrant {
        require(tokenId > 0 && tokenId <= 9900, "Token ID invalid");
        require(price <= msg.value, "Ether value sent is not correct");
        _safeMint(_msgSender(), tokenId);
    }
   
    // Allow the DAO to claim in case some item remains unclaimed in the future
    function ownerClaim(uint256 tokenId) public nonReentrant onlyOwner {
        require(tokenId <= 10000, "Token ID invalid");
        _safeMint(owner(), tokenId);
    }

    function toString(uint256 value) internal pure returns (string memory) {
    // Inspired by OraclizeAPI's implementation - MIT license
    // 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);
    }

    constructor() ERC721("CastlesArbiGenOne", "CastlesArbiGenOne") Ownable() {}
}

File 2 of 14 : 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 3 of 14 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.0;

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

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

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

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

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

        _;

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

File 4 of 14 : 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 5 of 14 : 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 6 of 14 : 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);
}

File 7 of 14 : 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 8 of 14 : 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 9 of 14 : 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 10 of 14 : 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 11 of 14 : 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 12 of 14 : 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 13 of 14 : 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 14 of 14 : 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);
}

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

Contract ABI

[{"inputs":[],"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"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getCapacity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getCastleType","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getDefense","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getGoldGeneration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRarity","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRarityNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getSkillAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getSkillType","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getWarrior","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getWarriorName","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownerWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"setPublicPrice","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":"uint256","name":"tokenId","type":"uint256"}],"name":"traitsOf","outputs":[{"internalType":"string","name":"","type":"string"}],"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"}]

67016345785d8a0000600c5560086102408181526721b430b6b834b7b760c11b610260526080908152600661028081815265223930b3b7b760d11b6102a05260a05260046102c08181526346726f6760e01b6102e05260c05260056103008181526411da1bdcdd60da1b6103205260e05261034081815264476f6c656d60d81b6103605261010052610380828152634b696e6760e01b6103a052610120526103c0908152640aed2e8c6d60db1b6103e05261014052600a61040090815269283ab7359020b634b2b760b11b61042052610160526104408481526750756e6b2041706560c01b61046052610180526104809384526729b5b2b632ba37b760c11b6104a0526101a0939093526104c08181526515da5e985c9960d21b6104e0526101c0526009610500908152682130b93130b934b0b760b91b610520526101e05261054090815265141c9a595cdd60d21b61056052610200526105c0604052610580918252634361747360e01b6105a052610220919091526200018590600d90600e6200146d565b506040805161016081018252600661012082019081526564616d61676560d01b61014083015281528151808301835260058152641cdc19595960da1b6020828101919091528083019190915282518084018452600f81526e33b7b6321033b2b732b930ba34b7b760891b818301528284015282518084018452600780825266646566656e736560c81b82840152606084019190915283518085018552908152666167696c69747960c81b81830152608083015282518084018452600c81526b696e74656c6c6967656e636560a01b8183015260a08301528251808401845260088152676368617269736d6160c01b8183015260c083015282518084018452600d81526c30b134b634ba3c903837bbb2b960991b8183015260e0830152825180840190935260048352633332b0b960e11b90830152610100810191909152620002d290600e906009620014d1565b5060408051610160810182526008610120820181815267111959995b99195960c21b610140840152825282518084018452600980825268141c9bdd1958dd195960ba1b602083810191909152808501929092528451808601865260078082526611dd585c99195960ca1b8285015285870191909152855180870187528481526714da1a595b19195960c21b81850152606086015285518087018752600b81526a14d8599959dd585c99195960aa1b8185015260808601528551808701875282815268119bdc9d1a599a595960ba1b8185015260a0860152855180870187529081526614d958dd5c995960ca1b8184015260c0850152845180860186529283526712185c99195b995960c21b8383015260e08401929092528351808501909452600684526515d85b1b195960d21b908401526101008201929092526200041b91600f9190620014d1565b50604080516103c081018252600661038082018181526523b7b13634b760d11b6103a0840152825282518084018452600580825264243ab6b0b760d91b602083810191909152808501929092528451808601865281815264223bb0b93360d91b81840152848601528451808601865260038082526222b63360e91b8285015260608601919091528551808701875284815265155b9919585960d21b81850152608086015285518087018752818152624f726360e81b8185015260a086015285518087018752818152620496d760ec1b8185015260c0860152855180870187528181526241706560e81b8185015260e0860152855180870187528481526546616572696560d01b818501526101008601528551808701875282815264151c9bdb1b60da1b818501526101208601528551808701875282815264105b99d95b60da1b818501526101408601528551808701875282815264223534b73760d91b818501526101608601528551808701875282815264536861646560d81b8185015261018086015285518087018752600c81526b29b430b832b9b434b33a32b960a11b818501526101a0860152855180870187528481526514dc1a5c9a5d60d21b818501526101c08601528551808701875282815264476f6c656d60d81b818501526101e08601528551808701875260088082526748616c666c696e6760c01b82860152610200870191909152865180880188526007808252664c656f6e696e6760c81b8287015261022088019190915287518089018952868152652a3934ba37b760d11b8187015261024088015287518089018952938452642232b6b7b760d91b84860152610260870193909352865180880188528381526621b2b73a30bab960c91b8186015261028087015286518088018852838152662637bc37b237b760c91b818601526102a0870152865180880188528181526726b4b737ba30bab960c11b818601526102c087015286518088018852818152672b32b230b635b2b760c11b818601526102e087015286518088018852928352664d6572666f6c6b60c81b8385015261030086019290925285518087018752918252672230b93596a2b63360c11b82840152610320850191909152845180860186529283526542616c726f6760d01b83830152610340840192909252835180850190945290835262115b9d60ea1b908301526103608101919091526200079990601090601c62001523565b50604080516103a08101825260066103608201818152652132b3b3b0b960d11b610380840152825282518084018452600a81526920b23b32b73a3ab932b960b11b602082810191909152808401919091528351808501855260078082526629b1b437b630b960c91b8284015284860191909152845180860186528181526623b0b6b13632b960c91b8184018190526060860191909152855180870187528481526515da5e985c9960d21b81850152608086015285518087018752600980825268105b18da195b5a5cdd60ba1b8286015260a0870191909152865180880188528381526629b7b63234b2b960c91b8186015260c08701528651808801885260088082526713595c98da185b9d60c21b8287015260e088019190915287518089018952848152662bb0b93934b7b960c91b81870152610100880152875180890189526005808252644e6f626c6560d81b828801526101208901919091528851808a018a52878152652432b0b632b960d11b818801526101408901528851808a018a5287815265436c6572696360d01b818801526101608901528851808a018a528581526641636f6c79746560c81b818801526101808901528851808a018a52600480825263131bdc9960e21b828901526101a08a01919091528951808b018b528481526821b430b93630ba30b760b91b818901526101c08a01528951808b018b528681526621b930b33a32b960c91b818901526101e08a01528951808b018b528381526710dc9a5b5a5b985b60c21b818901526102008a01528951808b018b52838152672a3930bb32b632b960c11b818901526102208a01528951808b018b52868152808801959095526102408901949094528851808a018a529283526823b630b234b0ba37b960b91b83870152610260880192909252875180890189529384526620b93a34b9b0b760c91b84860152610280870193909352865180880188528581526512195c9b5a5d60d21b818601526102a087015286518088018852858152654d6172696e6560d01b818601526102c0870152865180880188529485526529b0b4b637b960d11b858501526102e0860194909452855180870187529182526720b9b9b0b9b9b4b760c11b8284015261030085019190915284518086018652908152634b696e6760e01b8183015261032084015283518085019094529083526428bab2b2b760d91b9083015261034081019190915262000b1d90601190601b62001575565b50604080516102a0810182526008610260820181815267466f72747265737360c01b6102808401528252825180840184526005808252642a37bbb2b960d91b6020838101919091528085019290925284518086018652600680825265436173746c6560d01b82850152858701919091528551808701875281815265283934b9b7b760d11b818501526060860152855180870187528281526411dd585c9960da1b81850152608086015285518087018752600780825266446566656e736560c81b8286015260a087019190915286518088018852600a81526914dd1c9bdb99da1bdb1960b21b8186015260c0870152865180880188528181526610da5d1859195b60ca1b8186015260e0870152865180880188529182526550616c61636560d01b82850152610100860191909152855180870187526004808252632630b4b960e11b828601526101208701919091528651808801885292835264486f75736560d81b8385015261014086019290925285518087018752848152674261727261636b7360c01b818501526101608601528551808701875282815263446f6d6560e01b818501526101808601528551808701875291825263119bdc9d60e21b828401526101a0850191909152845180860186528181526620b631b0bd30b960c91b818401526101c0850152845180860186526009808252684163726f706f6c697360b81b828501526101e0860191909152855180870187529384526723b0b93934b9b7b760c11b8484015261020085019390935284518086018652908152664368617465617560c81b8183015261022084015283518085019094529083526843617461636f6d627360b81b9083015261024081019190915262000da2906012906013620015c7565b50604080516103e08101825260076103a08201818152666f6620446f6f6d60c81b6103c0840152825282518084018452600c8082526b6f662053776565746e65737360a01b60208381019190915280850192909252845180860186528181526b6f662054726561636865727960a01b8184015284860152845180860186528181526b6f662048617070696e65737360a01b8184015260608501528451808601865260098082526837b3102a32b93937b960b91b82850152608086019190915285518087018752600b8082526a6f6620457468657265756d60a81b8286015260a0870191909152865180880188529283526b6f662074686520627261766560a01b8385015260c086019290925285518087018752848152661bd98811dbdb1960ca1b8185015260e0860152855180870187528181526837b31029b4b63b32b960b91b81850152610100860152855180870187528281526a6f66204469616d6f6e647360a81b8185015261012086015285518087018752600d81526c6f662074686520446976696e6560981b8185015261014086015285518087018752848152666f66204669726560c81b81850152610160860152855180870187528281526a6f6620506c65617375726560a81b81850152610180860152855180870187526008808252670decc4088cac2e8d60c31b828601526101a087019190915286518088018852858152666f66204c69666560c81b818601526101c08701528651808801885260118152706f66205175616e74756d20466f7263657360781b818601526101e087015286518088018852600a8082526937b3102232b9b830b4b960b11b8287015261020088019190915287518089018952828152676f66204d6167696360c01b8187015261022088015287518089018952908152696f66207468652044414f60b01b818601526102408701528651808801885260128152716f662074686520536576656e204c6f72647360701b8186015261026087015286518088018852600e81526d37b3103a34329022b6b832b937b960911b8186015261028087015286518088018852818152671bd988109b1bdbd960c21b818601526102a087015286518088018852948552661bd988115d9a5b60ca1b858501526102c0860194909452855180870187528281526a6f66204461726b6e65737360a81b818501526102e086015285518087018752938452671bd988131a59da1d60c21b84840152610300850193909352845180860186529081526a6f6620496e73616e69747960a81b81830152610320840152835180850185528281526837b3102437b93937b960b91b8183015261034084015283518085018552828152686f6620536b756c6c7360b81b818301526103608401528351808501909452908352686f6620536f72726f7760b81b90830152610380810191909152620011c390601390601d62001619565b50604080516101a08101825260046101608201908152634e616d6560e01b610180830152815281518083018352600a815269436173746c655479706560b01b6020828101919091528083019190915282518084018452600780825266446566656e736560c81b8284015283850191909152835180850185526009815268536b696c6c5479706560b81b81840152606084015283518085018552600b8082526a14dada5b1b105b5bdd5b9d60aa1b82850152608085019190915284518086018652600e81526d23b7b63223b2b732b930ba34b7b760911b8185015260a0850152845180860186528181526a57617272696f724e616d6560a81b8185015260c085015284518086018652918252662bb0b93934b7b960c91b8284015260e0840191909152835180850185526008815267436170616369747960c01b8184015261010084015283518085018552600c81526b2930b934ba3ca73ab6b132b960a11b818401526101208401528351808501909452600684526552617269747960d01b918401919091526101408201929092526200136091601491906200166b565b5060405180606001604052806033815260200162004ee86033913980516200139191601591602090910190620016bd565b503480156200139f57600080fd5b50604080518082018252601180825270436173746c65734172626947656e4f6e6560781b602080840182815285518087019096529285528401528151919291620013ec91600091620016bd565b50805162001402906001906020840190620016bd565b50506001600a555062001415336200141b565b620017ff565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054828255906000526020600020908101928215620014bf579160200282015b82811115620014bf5782518051620014ae918491602090910190620016bd565b50916020019190600101906200148e565b50620014cd92915062001748565b5090565b828054828255906000526020600020908101928215620014bf579160200282015b82811115620014bf578251805162001512918491602090910190620016bd565b5091602001919060010190620014f2565b828054828255906000526020600020908101928215620014bf579160200282015b82811115620014bf578251805162001564918491602090910190620016bd565b509160200191906001019062001544565b828054828255906000526020600020908101928215620014bf579160200282015b82811115620014bf5782518051620015b6918491602090910190620016bd565b509160200191906001019062001596565b828054828255906000526020600020908101928215620014bf579160200282015b82811115620014bf578251805162001608918491602090910190620016bd565b5091602001919060010190620015e8565b828054828255906000526020600020908101928215620014bf579160200282015b82811115620014bf57825180516200165a918491602090910190620016bd565b50916020019190600101906200163a565b828054828255906000526020600020908101928215620014bf579160200282015b82811115620014bf5782518051620016ac918491602090910190620016bd565b50916020019190600101906200168c565b828054620016cb90620017c2565b90600052602060002090601f016020900481019282620016ef57600085556200173a565b82601f106200170a57805160ff19168380011785556200173a565b828001600101855582156200173a579182015b828111156200173a5782518255916020019190600101906200171d565b50620014cd92915062001769565b80821115620014cd5760006200175f828262001780565b5060010162001748565b5b80821115620014cd57600081556001016200176a565b5080546200178e90620017c2565b6000825580601f106200179f575050565b601f016020900490600052602060002090810190620017bf919062001769565b50565b600181811c90821680620017d757607f821691505b60208210811415620017f957634e487b7160e01b600052602260045260246000fd5b50919050565b6136d9806200180f6000396000f3fe60806040526004361061021a5760003560e01c80636b8ff57411610123578063b88d4fde116100ab578063d16c3d361161006f578063d16c3d3614610615578063d18350a014610635578063e985e9c514610655578063eb22daa31461069e578063f2fde38b146106be57600080fd5b8063b88d4fde14610575578063bcd5349f14610595578063bdeeaa31146105b5578063c6275255146105d5578063c87b56dd146105f557600080fd5b80638da5cb5b116100f25780638da5cb5b146104f957806395d89b4114610517578063a035b1fe1461052c578063a0712d6814610542578063a22cb4651461055557600080fd5b80636b8ff5741461048457806370a08231146104a4578063715018a6146104c45780637d79bd9c146104d957600080fd5b80634311de8f116101a65780634f6ccce7116101755780634f6ccce7146103e457806355f804b314610404578063598f1c96146104245780635efab6e4146104445780636352211e1461046457600080fd5b80634311de8f1461036f578063434f48c41461038457806348758697146103a4578063494978df146103c457600080fd5b806318160ddd116101ed57806318160ddd146102d057806323b872dd146102ef57806329372ad01461030f5780632f745c591461032f57806342842e0e1461034f57600080fd5b806301ffc9a71461021f57806306fdde0314610254578063081812fc14610276578063095ea7b3146102ae575b600080fd5b34801561022b57600080fd5b5061023f61023a36600461307b565b6106de565b60405190151581526020015b60405180910390f35b34801561026057600080fd5b50610269610709565b60405161024b9190613430565b34801561028257600080fd5b506102966102913660046130f9565b61079b565b6040516001600160a01b03909116815260200161024b565b3480156102ba57600080fd5b506102ce6102c9366004613052565b610828565b005b3480156102dc57600080fd5b506008545b60405190815260200161024b565b3480156102fb57600080fd5b506102ce61030a366004612f64565b61093e565b34801561031b57600080fd5b5061026961032a3660046130f9565b61096f565b34801561033b57600080fd5b506102e161034a366004613052565b610adc565b34801561035b57600080fd5b506102ce61036a366004612f64565b610b72565b34801561037b57600080fd5b506102ce610b8d565b34801561039057600080fd5b506102ce61039f3660046130f9565b610bf3565b3480156103b057600080fd5b506102696103bf3660046130f9565b610cdd565b3480156103d057600080fd5b506102696103df3660046130f9565b610dba565b3480156103f057600080fd5b506102e16103ff3660046130f9565b610eac565b34801561041057600080fd5b506102ce61041f3660046130b3565b610f4d565b34801561043057600080fd5b5061026961043f3660046130f9565b610f8e565b34801561045057600080fd5b5061026961045f3660046130f9565b611110565b34801561047057600080fd5b5061029661047f3660046130f9565b611409565b34801561049057600080fd5b5061026961049f3660046130f9565b611480565b3480156104b057600080fd5b506102e16104bf366004612f18565b6119d9565b3480156104d057600080fd5b506102ce611a60565b3480156104e557600080fd5b506102e16104f43660046130f9565b611a96565b34801561050557600080fd5b50600b546001600160a01b0316610296565b34801561052357600080fd5b50610269611bdb565b34801561053857600080fd5b506102e1600c5481565b6102ce6105503660046130f9565b611bea565b34801561056157600080fd5b506102ce610570366004613018565b611ced565b34801561058157600080fd5b506102ce610590366004612f9f565b611db2565b3480156105a157600080fd5b506102e16105b03660046130f9565b611dea565b3480156105c157600080fd5b506102e16105d03660046130f9565b611e21565b3480156105e157600080fd5b506102ce6105f03660046130f9565b611e4d565b34801561060157600080fd5b506102696106103660046130f9565b611e7c565b34801561062157600080fd5b506102696106303660046130f9565b611f30565b34801561064157600080fd5b506102e16106503660046130f9565b612028565b34801561066157600080fd5b5061023f610670366004612f32565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b3480156106aa57600080fd5b506102e16106b93660046130f9565b61207a565b3480156106ca57600080fd5b506102ce6106d9366004612f18565b6120fe565b60006001600160e01b0319821663780e9d6360e01b1480610703575061070382612196565b92915050565b606060008054610718906135c1565b80601f0160208091040260200160405190810160405280929190818152602001828054610744906135c1565b80156107915780601f1061076657610100808354040283529160200191610791565b820191906000526020600020905b81548152906001019060200180831161077457829003601f168201915b5050505050905090565b60006107a6826121e6565b61080c5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061083382611409565b9050806001600160a01b0316836001600160a01b031614156108a15760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610803565b336001600160a01b03821614806108bd57506108bd8133610670565b61092f5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610803565b6109398383612203565b505050565b6109483382612271565b6109645760405162461bcd60e51b815260040161080390613501565b610939838383612357565b606060006109a361097f84612502565b60405160200161098f919061322a565b60405160208183030381529060405261261c565b9050601e6109b2606383613637565b1015610aba57610ab383604051806040016040528060078152602001662ba0a92924a7a960c91b815250600d805480602002602001604051908101604052809291908181526020016000905b82821015610aaa578382906000526020600020018054610a1d906135c1565b80601f0160208091040260200160405190810160405280929190818152602001828054610a49906135c1565b8015610a965780601f10610a6b57610100808354040283529160200191610a96565b820191906000526020600020905b815481529060010190602001808311610a7957829003601f168201915b5050505050815260200190600101906109fe565b5050505061264d565b9392505050565b50506040805180820190915260048152636e6f6e6560e01b6020820152919050565b6000610ae7836119d9565b8210610b495760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610803565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b61093983838360405180602001604052806000815250611db2565b600b546001600160a01b03163314610bb75760405162461bcd60e51b8152600401610803906134cc565b600b546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610bf0573d6000803e3d6000fd5b50565b6002600a541415610c465760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610803565b6002600a55600b546001600160a01b03163314610c755760405162461bcd60e51b8152600401610803906134cc565b612710811115610cba5760405162461bcd60e51b815260206004820152601060248201526f151bdad95b881251081a5b9d985b1a5960821b6044820152606401610803565b610cd5610ccf600b546001600160a01b031690565b826126af565b506001600a55565b6060610ce8826121e6565b610d045760405162461bcd60e51b815260040161080390613495565b6000610d0f83611a96565b90506006811115610d3e575050604080518082019091526006815265446976696e6560d01b6020820152919050565b6004811115610d6b5750506040805180820190915260068152654d797468696360d01b6020820152919050565b6002811115610d965750506040805180820190915260048152635261726560e01b6020820152919050565b505060408051808201909152600681526521b7b6b6b7b760d11b6020820152919050565b6060610703826040518060400160405280600581526020016414d2d2531360da1b815250600e805480602002602001604051908101604052809291908181526020016000905b82821015610aaa578382906000526020600020018054610e1f906135c1565b80601f0160208091040260200160405190810160405280929190818152602001828054610e4b906135c1565b8015610e985780601f10610e6d57610100808354040283529160200191610e98565b820191906000526020600020905b815481529060010190602001808311610e7b57829003601f168201915b505050505081526020019060010190610e00565b6000610eb760085490565b8210610f1a5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610803565b60088281548110610f3b57634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b600b546001600160a01b03163314610f775760405162461bcd60e51b8152600401610803906134cc565b8051610f8a906015906020840190612ded565b5050565b60606000610f9b8361096f565b9050610fc381604051806040016040528060048152602001636e6f6e6560e01b8152506126c9565b15610fea5750506040805180820190915260048152636e6f6e6560e01b6020820152919050565b6110e7836040518060400160405280601281526020017115d054949253d497d09050d2d1d493d5539160721b8152506011805480602002602001604051908101604052809291908181526020016000905b82821015610aaa57838290600052602060002001805461105a906135c1565b80601f0160208091040260200160405190810160405280929190818152602001828054611086906135c1565b80156110d35780601f106110a8576101008083540402835291602001916110d3565b820191906000526020600020905b8154815290600101906020018083116110b657829003601f168201915b50505050508152602001906001019061103b565b816040516020016110f9929190613188565b604051602081830303815290604052915050919050565b606061111b826121e6565b6111375760405162461bcd60e51b815260040161080390613495565b600060405180610160016040528061114e85611480565b815260200161115c85611f30565b815260200161117261116d8661207a565b612502565b815260200161118085610dba565b815260200161119161116d86611e21565b81526020016111a261116d86612028565b81526020016111b085610f8e565b81526020016111be8561096f565b81526020016111cf61116d86611dea565b81526020016111e061116d86611a96565b81526020016111ee85610cdd565b90526040805180820190915260018152605b60f81b602082015290915060005b60145460ff821610156113dd5760ff81161561124b576112488260405180604001604052806002815260200161016160f51b815250612722565b91505b61127d826040518060400160405280601081526020016f3d913a3930b4ba2fba3cb832911d101160811b815250612722565b915061133f8260148360ff16815481106112a757634e487b7160e01b600052603260045260246000fd5b9060005260206000200180546112bc906135c1565b80601f01602080910402602001604051908101604052809291908181526020018280546112e8906135c1565b80156113355780601f1061130a57610100808354040283529160200191611335565b820191906000526020600020905b81548152906001019060200180831161131857829003601f168201915b5050505050612722565b9150611370826040518060400160405280600d81526020016c111610113b30b63ab2911d101160991b815250612722565b91506113a382848360ff16600b811061139957634e487b7160e01b600052603260045260246000fd5b6020020151612722565b91506113c98260405180604001604052806002815260200161227d60f01b815250612722565b9150806113d581613617565b91505061120e565b5061140181604051806040016040528060018152602001605d60f81b815250612722565b949350505050565b6000818152600260205260408120546001600160a01b0316806107035760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610803565b6060600061148d8361096f565b9050600061149a84611f30565b90506114c282604051806040016040528060048152602001636e6f6e6560e01b8152506126c9565b156118a65760006114e56114d586612502565b60405160200161098f9190613265565b905060006114f4606383613637565b905060006115ef876040518060400160405280600c81526020016b434153544c455f5449544c4560a01b8152506013805480602002602001604051908101604052809291908181526020016000905b82821015610aaa578382906000526020600020018054611562906135c1565b80601f016020809104026020016040519081016040528092919081815260200182805461158e906135c1565b80156115db5780601f106115b0576101008083540402835291602001916115db565b820191906000526020600020905b8154815290600101906020018083116115be57829003601f168201915b505050505081526020019060010190611543565b9050604b8210156118785760006116f88860405180604001604052806011815260200170434153544c455f5449544c455f5241434560781b8152506010805480602002602001604051908101604052809291908181526020016000905b82821015610aaa57838290600052602060002001805461166b906135c1565b80601f0160208091040260200160405190810160405280929190818152602001828054611697906135c1565b80156116e45780601f106116b9576101008083540402835291602001916116e4565b820191906000526020600020905b8154815290600101906020018083116116c757829003601f168201915b50505050508152602001906001019061164c565b90506000611804896040518060400160405280601781526020017f434153544c455f5449544c455f4241434b47524f554e440000000000000000008152506011805480602002602001604051908101604052809291908181526020016000905b82821015610aaa578382906000526020600020018054611777906135c1565b80601f01602080910402602001604051908101604052809291908181526020018280546117a3906135c1565b80156117f05780601f106117c5576101008083540402835291602001916117f0565b820191906000526020600020905b8154815290600101906020018083116117d357829003601f168201915b505050505081526020019060010190611758565b90506019841015611838578082604051602001611822929190613377565b6040516020818303038152906040529250611875565b60328410156118525780604051602001611822919061333d565b81604051602001611863919061333d565b60405160208183030381529060405292505b50505b838160405160200161188b929190613188565b60405160208183030381529060405295505050505050919050565b60006118b185610f8e565b90506119ac856040518060400160405280600e81526020016d50524f5445435445445f4e414d4560901b815250600f805480602002602001604051908101604052809291908181526020016000905b82821015610aaa57838290600052602060002001805461191f906135c1565b80601f016020809104026020016040519081016040528092919081815260200182805461194b906135c1565b80156119985780601f1061196d57610100808354040283529160200191611998565b820191906000526020600020905b81548152906001019060200180831161197b57829003601f168201915b505050505081526020019060010190611900565b82826040516020016119c0939291906131c4565b6040516020818303038152906040529350505050919050565b60006001600160a01b038216611a445760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610803565b506001600160a01b031660009081526003602052604090205490565b600b546001600160a01b03163314611a8a5760405162461bcd60e51b8152600401610803906134cc565b611a94600061274e565b565b6000611aa1826121e6565b611abd5760405162461bcd60e51b815260040161080390613495565b6000611ac883612028565b90506000611ad58461207a565b90506000611ae28561207a565b90506000611aef86611e21565b90506000600a851115611b1f57611b07600182613552565b9050600f8510611b1f57611b1c600182613552565b90505b6046841115611b6257611b33600182613552565b90506050841115611b6257611b49600182613552565b9050605a841115611b6257611b5f600182613552565b90505b6096831115611b8f57611b76600182613552565b905060dc831115611b8f57611b8c600182613552565b90505b600a821115611bd157611ba3600182613552565b9050600f8210611bbb57611bb8600182613552565b90505b60148210611bd157611bce600182613552565b90505b9695505050505050565b606060018054610718906135c1565b6002600a541415611c3d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610803565b6002600a558015801590611c5357506126ac8111155b611c925760405162461bcd60e51b815260206004820152601060248201526f151bdad95b881251081a5b9d985b1a5960821b6044820152606401610803565b34600c541115611ce45760405162461bcd60e51b815260206004820152601f60248201527f45746865722076616c75652073656e74206973206e6f7420636f7272656374006044820152606401610803565b610cd533610ccf565b6001600160a01b038216331415611d465760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610803565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b611dbc3383612271565b611dd85760405162461bcd60e51b815260040161080390613501565b611de4848484846127a0565b50505050565b600080611e09611df984612502565b60405160200161098f91906132aa565b9050611e1660fe82613637565b610ab3906001613552565b600080611e40611e3084612502565b60405160200161098f91906132da565b9050611e16601982613637565b600b546001600160a01b03163314611e775760405162461bcd60e51b8152600401610803906134cc565b600c55565b6060611e87826121e6565b611eeb5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610803565b6000611ef56127d3565b90506000815111611f155760405180602001604052806000815250610ab3565b80611f1f846127e2565b6040516020016110f992919061313d565b6060610703826040518060400160405280600b81526020016a434153544c455f5459504560a81b8152506012805480602002602001604051908101604052809291908181526020016000905b82821015610aaa578382906000526020600020018054611f9b906135c1565b80601f0160208091040260200160405190810160405280929190818152602001828054611fc7906135c1565b80156120145780601f10611fe957610100808354040283529160200191612014565b820191906000526020600020905b815481529060010190602001808311611ff757829003601f168201915b505050505081526020019060010190611f7c565b6000612033826121e6565b61204f5760405162461bcd60e51b815260040161080390613495565b600061206d61205d84612502565b60405160200161098f91906133c6565b9050610ab3601982613637565b60008061209961208984612502565b60405160200161098f919061330e565b905060006120a8606383613637565b905060006120b58561096f565b90506120dd81604051806040016040528060048152602001636e6f6e6560e01b8152506126c9565b156120ea57509392505050565b6120f582600f613552565b95945050505050565b600b546001600160a01b031633146121285760405162461bcd60e51b8152600401610803906134cc565b6001600160a01b03811661218d5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610803565b610bf08161274e565b60006001600160e01b031982166380ac58cd60e01b14806121c757506001600160e01b03198216635b5e139f60e01b145b8061070357506301ffc9a760e01b6001600160e01b0319831614610703565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061223882611409565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061227c826121e6565b6122dd5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610803565b60006122e883611409565b9050806001600160a01b0316846001600160a01b031614806123235750836001600160a01b03166123188461079b565b6001600160a01b0316145b8061140157506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff16611401565b826001600160a01b031661236a82611409565b6001600160a01b0316146123d25760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610803565b6001600160a01b0382166124345760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610803565b61243f8383836128fc565b61244a600082612203565b6001600160a01b038316600090815260036020526040812080546001929061247390849061357e565b90915550506001600160a01b03821660009081526003602052604081208054600192906124a1908490613552565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6060816125265750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612550578061253a816135fc565b91506125499050600a8361356a565b915061252a565b60008167ffffffffffffffff81111561257957634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f1916602001820160405280156125a3576020820181803683370190505b5090505b8415611401576125b860018361357e565b91506125c5600a86613637565b6125d0906030613552565b60f81b8183815181106125f357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612615600a8661356a565b94506125a7565b60008160405160200161262f919061316c565b60408051601f19818403018152919052805160209091012092915050565b6060600061266f8461265e87612502565b60405160200161098f92919061313d565b90508283518261267f9190613637565b8151811061269d57634e487b7160e01b600052603260045260246000fd5b60200260200101519150509392505050565b610f8a8282604051806020016040528060008152506129b4565b6000816040516020016126dc919061316c565b6040516020818303038152906040528051906020012083604051602001612703919061316c565b6040516020818303038152906040528051906020012014905092915050565b6060828260405160200161273792919061313d565b604051602081830303815290604052905092915050565b600b80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6127ab848484612357565b6127b7848484846129e7565b611de45760405162461bcd60e51b815260040161080390613443565b606060158054610718906135c1565b6060816128065750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612830578061281a816135fc565b91506128299050600a8361356a565b915061280a565b60008167ffffffffffffffff81111561285957634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612883576020820181803683370190505b5090505b84156114015761289860018361357e565b91506128a5600a86613637565b6128b0906030613552565b60f81b8183815181106128d357634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053506128f5600a8661356a565b9450612887565b6001600160a01b0383166129575761295281600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b61297a565b816001600160a01b0316836001600160a01b03161461297a5761297a8382612af4565b6001600160a01b0382166129915761093981612b91565b826001600160a01b0316826001600160a01b031614610939576109398282612c6a565b6129be8383612cae565b6129cb60008484846129e7565b6109395760405162461bcd60e51b815260040161080390613443565b60006001600160a01b0384163b15612ae957604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612a2b9033908990889088906004016133fd565b602060405180830381600087803b158015612a4557600080fd5b505af1925050508015612a75575060408051601f3d908101601f19168201909252612a7291810190613097565b60015b612acf573d808015612aa3576040519150601f19603f3d011682016040523d82523d6000602084013e612aa8565b606091505b508051612ac75760405162461bcd60e51b815260040161080390613443565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611401565b506001949350505050565b60006001612b01846119d9565b612b0b919061357e565b600083815260076020526040902054909150808214612b5e576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612ba39060019061357e565b60008381526009602052604081205460088054939450909284908110612bd957634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060088381548110612c0857634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612c4e57634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000612c75836119d9565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b038216612d045760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610803565b612d0d816121e6565b15612d5a5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610803565b612d66600083836128fc565b6001600160a01b0382166000908152600360205260408120805460019290612d8f908490613552565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054612df9906135c1565b90600052602060002090601f016020900481019282612e1b5760008555612e61565b82601f10612e3457805160ff1916838001178555612e61565b82800160010185558215612e61579182015b82811115612e61578251825591602001919060010190612e46565b50612e6d929150612e71565b5090565b5b80821115612e6d5760008155600101612e72565b600067ffffffffffffffff80841115612ea157612ea1613677565b604051601f8501601f19908116603f01168101908282118183101715612ec957612ec9613677565b81604052809350858152868686011115612ee257600080fd5b858560208301376000602087830101525050509392505050565b80356001600160a01b0381168114612f1357600080fd5b919050565b600060208284031215612f29578081fd5b610ab382612efc565b60008060408385031215612f44578081fd5b612f4d83612efc565b9150612f5b60208401612efc565b90509250929050565b600080600060608486031215612f78578081fd5b612f8184612efc565b9250612f8f60208501612efc565b9150604084013590509250925092565b60008060008060808587031215612fb4578081fd5b612fbd85612efc565b9350612fcb60208601612efc565b925060408501359150606085013567ffffffffffffffff811115612fed578182fd5b8501601f81018713612ffd578182fd5b61300c87823560208401612e86565b91505092959194509250565b6000806040838503121561302a578182fd5b61303383612efc565b915060208301358015158114613047578182fd5b809150509250929050565b60008060408385031215613064578182fd5b61306d83612efc565b946020939093013593505050565b60006020828403121561308c578081fd5b8135610ab38161368d565b6000602082840312156130a8578081fd5b8151610ab38161368d565b6000602082840312156130c4578081fd5b813567ffffffffffffffff8111156130da578182fd5b8201601f810184136130ea578182fd5b61140184823560208401612e86565b60006020828403121561310a578081fd5b5035919050565b60008151808452613129816020860160208601613595565b601f01601f19169290920160200192915050565b6000835161314f818460208801613595565b835190830190613163818360208801613595565b01949350505050565b6000825161317e818460208701613595565b9190910192915050565b6000835161319a818460208801613595565b600160fd1b90830190815283516131b8816001840160208801613595565b01600101949350505050565b600084516131d6818460208901613595565b600160fd1b90830190815284516131f4816001840160208901613595565b6701037b3103a3432960c51b60019290910191820152835161321d816009840160208801613595565b0160090195945050505050565b7257415252494f525f50524f424142494c49545960681b815260008251613258816013850160208701613595565b9190910160130192915050565b7f434153544c455f5449544c455f50524f424142494c495459000000000000000081526000825161329d816018850160208701613595565b9190910160180192915050565b67434150414349545960c01b8152600082516132cd816008850160208701613595565b9190910160080192915050565b6b14d2d2531317d05353d5539560a21b81526000825161330181600c850160208701613595565b91909101600c0192915050565b66444546454e534560c81b815260008251613330816007850160208701613595565b9190910160070192915050565b66037b3103a3432960cd1b81526000825161335f816007850160208701613595565b607360f81b6007939091019283015250600801919050565b66037b3103a3432960cd1b815260008351613399816007850160208801613595565b600160fd1b60079184019182015283516133ba816008840160208801613595565b01600801949350505050565b6e23a7a6222fa3a2a722a920aa24a7a760891b8152600082516133f081600f850160208701613595565b91909101600f0192915050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090611bd190830184613111565b602081526000610ab36020830184613111565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252601e908201527f4552433732314d657461646174613a204e6f6e206d696e746564204e46540000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b600082198211156135655761356561364b565b500190565b60008261357957613579613661565b500490565b6000828210156135905761359061364b565b500390565b60005b838110156135b0578181015183820152602001613598565b83811115611de45750506000910152565b600181811c908216806135d557607f821691505b602082108114156135f657634e487b7160e01b600052602260045260246000fd5b50919050565b60006000198214156136105761361061364b565b5060010190565b600060ff821660ff81141561362e5761362e61364b565b60010192915050565b60008261364657613646613661565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114610bf057600080fdfea26469706673582212201d6f96b98e14735c6821eb99945a85dc688ab8a43b279923af6d9e1c1431299d64736f6c6343000804003368747470733a2f2f636173746c65732d617262697472756d2d6e66742e76657263656c2e6170702f6170692f636173746c652f

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.