ERC-721
Overview
Max Total Supply
4,444 PRBG
Holders
1,660
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 PRBGLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
PixelRoyale
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT // This is no CC0 // www.PixelRoyal.xyz // The Pixel Royale will start after mint out pragma solidity 0.8.15; import "@openzeppelin/contracts/access/Ownable.sol"; import "erc721a/contracts/ERC721A.sol"; import './PixelTag.sol'; contract PixelRoyale is ERC721A, Ownable { //---------- Addies ----------// address public contractCreator; address public lastPlayer; address public mostAttacks; address public randomPlayer; address public randomTag; address public abashoCollective; // ---> Needs to be set address public pixelTagContract; // ---> Interface for Tags //---------- Mint Vars ----------// bool public started; bool public claimed; uint256 public constant MAXPIXELS = 4444; uint256 public constant WALLETLIMIT = 2; uint256 public constant CREATORCLAIMAMOUNT = 3; mapping(address => uint) public addressClaimed; // ---> keeps track of wallet limit // MetadataURI string private baseURI; //---------- PixelRoyale Vars ----------// bool public pixelWarStarted; bool public pixelWarConcluded; uint256 public timeLimit = 1671667200; // Thursday, 22. December 2022 00:00:00 GMT uint constant ITEM_PRICE = 0.005 ether; mapping(address => uint) public walletHighscore; // ---> keeps track of each wallet highscore uint256 public currentHighscore; string private salt; bool public payout; //---------- Mini Jackpot Vars ----------// uint256[] public jackpot; //---------- Player Vars ----------// struct Pixel { int256 health; bool status; } mapping(uint256 => Pixel) public pixelList; // ---> maps ID to a Player Struct //---------- Events ----------// event ItemBought(address from,address currentMA,uint tokenId,int256 amount); event DropOut(address from,uint tokenId); event MiniJackpotWin(address winner, uint256 jackpotAmount); event MiniJackpotAmount(uint256 jackpotAmount); //---------- Construct ERC721A TOKEN ----------// constructor() ERC721A("PixelRoyale BATTLE GAME", "PRBG") { contractCreator = msg.sender; } function _startTokenId() internal view virtual override returns (uint256) { return 1; } //--------------------------------------------------------------------------------------------- //---------- MINT FUNCTIONS ----------// //---------- Start Minting -----------// function startMint() external onlyOwner { require(!started, "mint has already started"); started = true; } //---------- Free Mint Function ----------// function mint(uint256 _amount) external { uint256 total = totalSupply(); if(_msgSender() != contractCreator) { require(started, "Mint did not start yet"); require(addressClaimed[_msgSender()] + _amount <= WALLETLIMIT, "Wallet limit reached, don't be greedy"); } require(_amount > 0, "You need to mint at least 1"); require(total + _amount <= MAXPIXELS, "Not that many NFTs left, try to mint less"); require(total <= MAXPIXELS, "Mint out"); // create structs for minted amount for (uint j; j < _amount; j++) { Pixel memory newPixel = Pixel(0,true); pixelList[total+j+1] = newPixel; } addressClaimed[_msgSender()] += _amount; _safeMint(_msgSender(), _amount); // immediately starts PixelRoyale GAME on mint out if(totalSupply() >= MAXPIXELS){ pixelWarStarted = true; } } //---------- Team Claim ----------// function teamClaim() external onlyOwner { uint256 total = totalSupply(); require(!claimed, "already claimed"); for (uint j; j < CREATORCLAIMAMOUNT; j++) { // struct creation for mint amount Pixel memory newPixel = Pixel(0,true); pixelList[total+j+1] = newPixel; } _safeMint(contractCreator, CREATORCLAIMAMOUNT); claimed = true; } //--------------------------------------------------------------------------------------------- //---------- BATTLE ROYALE GAME ----------// //---------- Manually Start PixelRoyale ----------// function startPixelWar() external onlyOwner { require(!pixelWarStarted, "The war has already been started"); pixelWarStarted = true; } //---------- Calculate Amount Of "Alive" Players ----------// function getPopulation() public view returns(uint256 _population) { for (uint j=1; j <= totalSupply(); j++) { if(isAlive(j)){ _population++; } } } //---------- Returns Last Player ID ----------// function checkLastSurvivor() public view returns(uint256 _winner) { for (uint j; j <= totalSupply(); j++) { if(pixelList[j].health > -1){ _winner = j; } } } //---------- Checks If Specified TokenID Is "Alive" ----------// function isAlive(uint256 _tokenId) public view returns(bool _alive) { pixelList[_tokenId].health < 0 ? _alive = false : _alive = true; } //---------- Returns Random "Alive" TokenID ----------// function returnRandomId() public view returns(uint256 _tokenId) { for (uint256 j = pseudoRandom(totalSupply(),"Q"); j <= totalSupply() + 1; j++) { if(pixelList[j].health > -1) { return j; } if(j == totalSupply()) { j = 0; } } } //---------- Pseudo Random Number Generator From Range ----------// function pseudoRandom(uint256 _number, string memory _specialSalt) public view returns(uint number) { number = uint(keccak256(abi.encodePacked(block.timestamp,block.difficulty,msg.sender,salt,_specialSalt))) % _number; number == 0 ? number++: number; } //---------- Change Salt Value Pseudo Randomness ----------// function changeSalt(string memory _newSalt) public onlyOwner { salt = _newSalt; } //---------- Set HP For Players | Protect/Attack ----------// function setHP(uint256 _tokenId, int256 _amount) external payable { require(!pixelWarConcluded, "PixelRoyale has concluded!"); require(pixelWarStarted, "PixelRoyale hasn't started!"); require(getPopulation() > 1, "We already have a winner!"); require(_amount != 0, "Value needs to be > or < than 0"); require(pixelList[_tokenId].health > -1, "Player already out of the Game"); uint priceMod = 10; // ---> 0% uint256 amount; // turn _amount into a positive amount value _amount < 0 ? amount = uint256(_amount*-1) : amount = uint256(_amount); // bulk pricing: if(amount>6) { priceMod = 8; // ---> 20% if(amount>12) { priceMod = 7; // ---> 30% if(amount>18) { priceMod = 6; // ---> 40% if(amount>24) { priceMod = 5; } // ---> 50% } } } // calculate purchase uint256 currentPrice = ITEM_PRICE / 10 * priceMod * amount; require((currentPrice) <= msg.value, "Not enough ETH"); // checks on attack purchase if(_amount < 0) { require(pixelList[_tokenId].health+_amount>-2,"Try less attacks - warrior overkill"); walletHighscore[_msgSender()] += amount; if(walletHighscore[_msgSender()] > currentHighscore) { currentHighscore = walletHighscore[_msgSender()]; mostAttacks = _msgSender(); } } // change health value in player struct (pixelList[_tokenId].health+_amount) < 0 ? pixelList[_tokenId].health = -1 : pixelList[_tokenId].health = pixelList[_tokenId].health + _amount; //emit event for item buy emit ItemBought(_msgSender(),mostAttacks,_tokenId,_amount); // ---> buyer, current Highscore Leader, Interacted token, amount of protections/attacks // add to mini jackpot array addToPot(msg.value); // try jackpot if(jackpot.length>0){ tryJackpot(); } // check if token is alive | Check if player has dropped out of Game InterfacePixelTags pixelTag = InterfacePixelTags(pixelTagContract); // ---> Interface to Tags NFT if ( !isAlive(_tokenId) ) { pixelTag.mintPixelTag(_msgSender()); // ---> MINT DogTag FROM ERC721A pixelList[_tokenId].status = false; //emit DropOut event emit DropOut(_msgSender(),_tokenId); // ---> Killer, Killed Token } // check if population is smaller than 2 | check if PixelRoyale has concluded if ( getPopulation() < 2 ) { pixelWarConcluded = true; lastPlayer = ownerOf(checkLastSurvivor()); randomPlayer = ownerOf(pseudoRandom(MAXPIXELS,"Warrior")); randomTag = pixelTag.ownerOf(pseudoRandom(MAXPIXELS-1,"Tag")); } } //--------------------------------------------------------------------------------------------- //---------- BATTLE ROYALE GAME ----------// //---------- Add 49% Of Bet To Mini Jackpot ----------// function addToPot(uint256 _amount) internal { jackpot.push(_amount/100*49); } //---------- Calculate Current Mini Jackpot Size ----------// function currentPot() internal view returns(uint256 _result) { for (uint j; j < jackpot.length; j++) { _result += jackpot[j]; } } //---------- Win Mini Jackpot Function ----------// function tryJackpot() internal { if(pseudoRandom(8,"") == 4) { // ---> 12,5% winning chance payable(_msgSender()).transfer(currentPot()); emit MiniJackpotWin(_msgSender(), currentPot()); // ---> emits jackpot amount and winner when hit delete jackpot; // ---> purge mini jackpot array after it has been paid out } else { emit MiniJackpotAmount(currentPot()); // ---> emits jackpot amount when not hit } } //---------- Set PixelTag Contract Address For Interactions/Interface ----------// function setTagContract(address _addr) external onlyOwner { pixelTagContract = _addr; } //--------------------------------------------------------------------------------------------- //---------- WITHDRAW FUNCTIONS ----------// //---------- Distribute Balance if Game Has Not Concluded Prior To Time Limit ----------// function withdraw() public { require(block.timestamp >= timeLimit, "Play fair, wait until the time limit runs out"); require(contractCreator == _msgSender(), "Only Owner can withdraw after time limit runs out"); uint256 balance = address(this).balance; payable(abashoCollective).transfer(balance/100*15); payable(contractCreator).transfer(address(this).balance); } //---------- Distribute Balance if Game Has Concluded Prior To Time Limit ----------// function distributeToWinners() public { require(pixelWarConcluded, "The game has not concluded yet!"); require(!payout, "The prize pool has already been paid out!"); uint256 balance = address(this).balance; // 25% to Last player and most attacks payable(lastPlayer).transfer(balance/100*25); payable(mostAttacks).transfer(balance/100*25); // 15% to random holder of Player and Dog Tag NFTs payable(randomPlayer).transfer(balance/100*10); payable(randomTag).transfer(balance/100*10); // 15% to abasho collective and remainder to Contract Creator payable(abashoCollective).transfer(balance/100*15); payable(contractCreator).transfer(address(this).balance); payout = true; } //--------------------------------------------------------------------------------------------- //----------SET LATE ABASHO COLLECTIVE ADDRESS ---- function setAbashoADDR(address _addr) external onlyOwner { abashoCollective = _addr; } //--------------------------------------------------------------------------------------------- //---------- METADATA & BASEURI ---- function setBaseURI(string memory baseURI_) external onlyOwner { baseURI = baseURI_; } function _baseURI() internal view virtual override returns (string memory) { return baseURI; } function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { require(_exists(_tokenId), "There is no token with that ID"); string memory currentBaseURI = _baseURI(); if(isAlive(_tokenId)) { return bytes(currentBaseURI).length > 0 ? string(abi.encodePacked(currentBaseURI, _toString(_tokenId), '.json')) : ''; } else { return bytes(currentBaseURI).length > 0 ? string(abi.encodePacked(currentBaseURI,'d', _toString(_tokenId), '.json')) : ''; } } }
// SPDX-License-Identifier: MIT // www.PixelRoyale.xyz /* ____ ____ ____ ____ ____ ____ ____ ____ ____ ||P |||i |||x |||e |||l |||T |||a |||g |||s || ||__|||__|||__|||__|||__|||__|||__|||__|||__|| |/__\|/__\|/__\|/__\|/__\|/__\|/__\|/__\|/__\| */ pragma solidity 0.8.15; import "@openzeppelin/contracts/access/Ownable.sol"; import "erc721a/contracts/ERC721A.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import {Base64} from "base64-sol/base64.sol"; import {TraitAssembly} from "./TraitAssembly.sol"; contract PixelTags is ERC721A, Ownable { //---------- Vars ----------// address public contractCreator; address public pixelRoyale; uint256 public constant MAXTAGS = 4443; string private baseURI; //---------- On-Chain Gen Art ----------// uint16 private pixelIndex = 1; mapping(uint256 => uint32) private pixelTags; //---------- Metadata Snippets ----------// string private comb1 = '","description": "4443 On-Chain PixelTags given out for confirmed kills in the PixelRoyale BATTLE GAME. Collect the PixelTags for a chance to win 10% of the PixelRoyale prize pool!","external_url": "https://pixelroyale.xyz/","attributes": [{"trait_type": "Background","value": "'; string private comb2 = '"},{"trait_type": "Base","value": "'; string private comb3 = '"},{"trait_type": "Soul","value": "'; string private comb4 = '"},{"trait_type": "Accessoire","value": "'; string private comb5 = '"},{"trait_type": "Mouth","value": "'; string private comb6 = '"},{"trait_type": "Eyes","value": "'; string private comb7 = '"}],"image": "data:image/svg+xml;base64,'; string private comb8 = '"}'; //---------- Trait Names ----------// string[4] maTrait = ["Ag", "Au", "Pt", "Rn"]; //---------- Construct ERC721A TOKEN ----------// constructor() ERC721A("PixelTags BATTLE GAME", "PTBG") { contractCreator = msg.sender; } function _startTokenId() internal view virtual override returns (uint256) { return 1; } //--------------------------------------------------------------------------------------------- //---------- MINT FUNCTIONS ----------// //---------- Set Origin Contract ----------// function setMintContract(address _addr) external onlyOwner { pixelRoyale = _addr; } //---------- Mint PixelTag ----------// function mintPixelTag(address _receiver) external { require(msg.sender == pixelRoyale, "Only Contract can mint"); uint256 total = totalSupply(); require(total < MAXTAGS, "The GAME has most likely concluded"); // Mint _safeMint(_receiver, 1); pixelTags[pixelIndex] = uint32(bytes4(keccak256(abi.encodePacked(block.timestamp, pixelIndex, msg.sender)))); pixelIndex++; } //--------------------------------------------------------------------------------------------- //---------- METADATA GENERATION ----------// function tokenURI(uint256 _tokenId) public view virtual override returns (string memory) { require(_exists(_tokenId), 'There is no Token with that ID'); //Start JSON and SVG Generation by creating file headers bytes memory json = abi.encodePacked('{"name": "Pixel Tag #',Strings.toString(_tokenId)); // --> JSON HEADER bytes memory img = abi.encodePacked('<svg xmlns="http://www.w3.org/2000/svg" witdh="640" height="640" viewBox="0 0 16 16">'); // --> SVG HEADER uint32 seed = pixelTags[_tokenId]; //Init Trait Strings string memory trait1; string memory trait2; string memory svg2; string memory trait3; string memory svg3; string memory trait4; string memory svg4; //Init Color Strings string memory basePrimeCol; string memory baseSecondCol; string memory backgroundColor = Strings.toString((seed%36)*10); string memory soulColor = Strings.toString((seed%72)*5); // ------ BASE COLOR TRAIT ----- // if(seed%99==0) { //--> 1% trait1 = maTrait[3]; basePrimeCol ="179,24%,61%"; baseSecondCol = "179,100%,86%"; } else if(seed%99>=1 && seed%99<=5) { //--> 5% trait1 = maTrait[2]; basePrimeCol ="180,6%,57%"; baseSecondCol = "178,53%,88%"; } else if(seed%99>=6 && seed%99<=20) { //--> 15% trait1 = maTrait[1]; basePrimeCol ="46,67%,48%"; baseSecondCol = "46,100%,70%"; } else { //--> 79% trait1 = maTrait[0]; basePrimeCol ="180,2%,40%"; baseSecondCol = "180,2%,80%"; } // ------ ACCESSORY TRAIT ----- // if(seed%99>=75) { //--> 24% (svg2,trait2) = ("","None"); } else { //--> 76% (svg2,trait2) = TraitAssembly.choseA(seed); } // ------ MOUTH TRAIT ----- // (svg3,trait3) = TraitAssembly.choseM(seed); // ------ EYE TRAIT ----- // (svg4,trait4) = TraitAssembly.choseE(seed); // ----- JSON ASSEMBLY ------// json = abi.encodePacked(json,comb1,backgroundColor); json = abi.encodePacked(json,comb2,trait1); json = abi.encodePacked(json,comb3,soulColor); json = abi.encodePacked(json,comb4,trait2); json = abi.encodePacked(json,comb5,trait3); json = abi.encodePacked(json,comb6,trait4); // ----- SVG ASSEMBLY ------// //BACKGROUND// img = abi.encodePacked(img, '<rect x="0" y="0" width="16" height="16" fill="hsl(',backgroundColor,',100%,90%)"/>'); //BASE// img = abi.encodePacked(img, '<polygon points="5,1 5,2 4,2 4,3 3,3 3,4 3,13 4,13 4,14 5,14 5,15 11,15 11,14 12,14 12,13 13,13 13,3 12,3 12,2 11,2 11,1" fill="hsl(',basePrimeCol,')"/>'); // --> Outline img = abi.encodePacked(img, '<polygon points="5,2 5,3 4,3 4,3 4,3 4,4 4,13 5,13 5,14 6,14 6,14 11,14 11,13 11,13 12,13 12,3 11,3 11,2 11,2" fill="hsl(',baseSecondCol,')"/>'); //--> Inner //ACCESSORY img = abi.encodePacked(img, svg2); //MOUTH img = abi.encodePacked(img, svg3); //EYES img = abi.encodePacked(img, svg4); // ----- CLOSE OFF SVG AND JSON ASSEMBLY ------// img = abi.encodePacked(img, '</svg>'); json = abi.encodePacked(json,comb7,Base64.encode(img),comb8); // ----- RETURN BASE64 ENCODED METADATA ------// return string(abi.encodePacked('data:application/json;base64,', Base64.encode(json))); } } //--------------------------------------------------------------------------------------------- //---------- LAY OUT INTERFACE ----------// interface InterfacePixelTags { function mintPixelTag(address _receiver) external; function ownerOf(uint256 tokenId) external view returns (address); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.0.0 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev ERC721 token receiver interface. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension. Built to optimize for lower gas during batch mints. * * Assumes serials are sequentially minted starting at _startTokenId() (defaults to 0, e.g. 0, 1, 2, 3..). * * Assumes that an owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * * Assumes that the maximum token id cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Mask of an entry in packed address data. uint256 private constant BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant BITMASK_NEXT_INITIALIZED = 1 << 225; // The tokenId of the next token to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See `_packedOwnershipOf` implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see `_totalMinted`. */ function totalSupply() public view override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { // Counter underflow is impossible as _currentIndex does not decrement, // and it is initialized to `_startTokenId()` unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view returns (uint256) { return _burnCounter; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes of the XOR of // all function selectors in the interface. See: https://eips.ethereum.org/EIPS/eip-165 // e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)` return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> BITPOS_NUMBER_MINTED) & BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> BITPOS_NUMBER_BURNED) & BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxillary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> BITPOS_AUX); } /** * Sets the auxillary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; assembly { // Cast aux without masking. auxCasted := aux } packed = (packed & BITMASK_AUX_COMPLEMENT) | (auxCasted << BITPOS_AUX); _packedAddressData[owner] = packed; } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & BITMASK_BURNED == 0) { // Invariant: // There will always be an ownership that has an address and is not burned // before an ownership that does not have an address and is not burned. // Hence, curr will not underflow. // // We can directly compare the packed value. // If the address is zero, packed is zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> BITPOS_START_TIMESTAMP); ownership.burned = packed & BITMASK_BURNED != 0; } /** * Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around in the collection over time. */ function _ownershipOf(uint256 tokenId) internal view returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } /** * @dev Casts the address to uint256 without masking. */ function _addressToUint256(address value) private pure returns (uint256 result) { assembly { result := value } } /** * @dev Casts the boolean to uint256 without branching. */ function _boolToUint256(bool value) private pure returns (uint256 result) { assembly { result := value } } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public override { address owner = address(uint160(_packedOwnershipOf(tokenId))); if (to == owner) revert ApprovalToCurrentOwner(); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { if (operator == _msgSenderERC721A()) revert ApproveToCaller(); _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { _transfer(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), */ function _exists(uint256 tokenId) internal view returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & BITMASK_BURNED == 0; // and not burned. } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal { _safeMint(to, quantity, ''); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the balance and number minted. _packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _addressToUint256(to) | (block.timestamp << BITPOS_START_TIMESTAMP) | (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; if (to.code.length != 0) { do { emit Transfer(address(0), to, updatedIndex); if (!_checkContractOnERC721Received(address(0), to, updatedIndex++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (updatedIndex < end); // Reentrancy protection if (_currentIndex != startTokenId) revert(); } else { do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex < end); } _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event. */ function _mint(address to, uint256 quantity) internal { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // balance or numberMinted overflow if current value of either + quantity > 1.8e19 (2**64) - 1 // updatedIndex overflows if _currentIndex + quantity > 1.2e77 (2**256) - 1 unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the balance and number minted. _packedAddressData[to] += quantity * ((1 << BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _addressToUint256(to) | (block.timestamp << BITPOS_START_TIMESTAMP) | (_boolToUint256(quantity == 1) << BITPOS_NEXT_INITIALIZED); uint256 updatedIndex = startTokenId; uint256 end = updatedIndex + quantity; do { emit Transfer(address(0), to, updatedIndex++); } while (updatedIndex < end); _currentIndex = updatedIndex; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Transfers `tokenId` from `from` to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) private { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); bool isApprovedOrOwner = (_msgSenderERC721A() == from || isApprovedForAll(from, _msgSenderERC721A()) || getApproved(tokenId) == _msgSenderERC721A()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. delete _tokenApprovals[tokenId]; // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _addressToUint256(to) | (block.timestamp << BITPOS_START_TIMESTAMP) | BITMASK_NEXT_INITIALIZED; // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); if (approvalCheck) { bool isApprovedOrOwner = (_msgSenderERC721A() == from || isApprovedForAll(from, _msgSenderERC721A()) || getApproved(tokenId) == _msgSenderERC721A()); if (!isApprovedOrOwner) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. delete _tokenApprovals[tokenId]; // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as tokenId would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _addressToUint256(from) | (block.timestamp << BITPOS_START_TIMESTAMP) | BITMASK_BURNED | BITMASK_NEXT_INITIALIZED; // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } /** * @dev Hook that is called before a set of serially-ordered token ids are about to be transferred. This includes minting. * And also called before burning one token. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token ids have been transferred. This includes * minting. * And also called after one token has been burned. * * startTokenId - the first token id to be transferred * quantity - the amount to be transferred * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function _toString(uint256 value) internal pure returns (string memory ptr) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), // but we allocate 128 bytes to keep the free memory pointer 32-byte word aliged. // We will need 1 32-byte word to store the length, // and 3 32-byte words to store a maximum of 78 digits. Total: 32 + 3 * 32 = 128. ptr := add(mload(0x40), 128) // Update the free memory pointer to allocate. mstore(0x40, ptr) // Cache the end of the memory to calculate the length later. let end := ptr // We write the string from the rightmost digit to the leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // Costs a bit more than early returning for the zero case, // but cheaper in terms of deployment and overall runtime costs. for { // Initialize and perform the first pass without check. let temp := value // Move the pointer 1 byte leftwards to point to an empty character slot. ptr := sub(ptr, 1) // Write the character to the pointer. 48 is the ASCII index of '0'. mstore8(ptr, add(48, mod(temp, 10))) temp := div(temp, 10) } temp { // Keep dividing `temp` until zero. temp := div(temp, 10) } { // Body of the for loop. ptr := sub(ptr, 1) mstore8(ptr, add(48, mod(temp, 10))) } let length := sub(end, ptr) // Move the pointer 32 bytes leftwards to make room for the length. ptr := sub(ptr, 32) // Store the length. mstore(ptr, length) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.0.0 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of an ERC721A compliant contract. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * The caller cannot approve to their own address. */ error ApproveToCaller(); /** * The caller cannot approve to the current owner. */ error ApprovalToCurrentOwner(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); struct TokenOwnership { // The address of the owner. address addr; // Keeps track of the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; } /** * @dev Returns the total amount of tokens stored by the contract. * * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens. */ function totalSupply() external view returns (uint256); // ============================== // IERC165 // ============================== /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================== // IERC721 // ============================== /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================== // IERC721Metadata // ============================== /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // www.PixelRoyale.xyz pragma solidity ^0.8.15; import "@openzeppelin/contracts/utils/Strings.sol"; library TraitAssembly { //---------- ACCESSORY ASSEMBLY - WITH ACCESSORY SVGs ----------// function choseA(uint32 _seed) public pure returns (string memory _aString, string memory _aJson) { string[13] memory _traitArray = ["Flower Crown", "Night Vision", "Trauma", "Sleek Curl", "Twin Tails", "Red Rag", "Blue Rag", "Snapback", "Crown", "One Peace", "Red Oni", "Blue Oni", "Clown"]; string memory _trait = _traitArray[_seed%12]; string memory soulCol = Strings.toString((_seed%72)*5); string memory inverseCol = Strings.toString((((_seed%72)*5)+180)%360); if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[0]))) { _aString = '<polygon points="3,3 8,3 8,4 9,4 9,3 13,3 13,4 14,4 14,5 13,5 13,6 8,6 8,5 7,5 7,6 3,6 3,5 2,5 2,4 3,4" fill="hsl(102, 75%, 58%)"/><polygon points="5,3 11,3 11,4 12,4 12,5 11,5 11,6 10,6 10,5 9,5 9,4 10,4 10,3 6,3 6,4 7,4 7,5 6,5 6,6 5,6 5,5 4,5 4,4 5,4" fill="hsl(0, 100%, 100%)"/><polygon points="5,4 11,4 11,5 10,5 10,4 6,4 6,5 5,5 5,4" fill="hsl(48, 100%, 57%)"/>'; } else if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[1]))) { _aString = '<polygon points="4,2 6,2 6,3 7,3 7,2 9,2 9,3 10,3 10,2 12,2 12,3 13,3 13,5 14,5 14,6 10,6 10,5 6,5 6,6 2,6 2,5 3,5 3,3 4,3" fill="hsl(0,0%,0%)"/><polygon points="4,3 12,3 12,5 10,5 10,3 9,3 9,4 7,4 7,3 6,3 6,5 4,5" fill="hsl(102, 73%, 64%)"/>'; } else if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[2]))) { _aString = '<polygon points="9,2 11,2 11,5 10,5 10,3 9,3" fill="hsl(352, 100%, 41%)"/>'; } else if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[3]))) { _aString = string(abi.encodePacked('<polygon points="4,1 12,1 12,2 13,2 13,7 12,7 12,6 11,6 11,4 8,4 8,5 9,5 9,6 7,6 7,4 5,4 5,6 4,6 4,7 3,7 3,2 4,2" fill="hsl(',inverseCol,', 80%, 60%)"/>')); } else if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[4]))) { _aString = string(abi.encodePacked('<polygon points="5,1 11,1 11,2 12,2 12,3 13,3 13,4 14,4 14,5 15,5 15,6 16,6 16,10 15,10 15,9 14,9 14,6 13,6 13,7 12,7 12,6 11,6 11,5 10,5 10,6 9,6 9,5 8,5 8,6 6,6 6,5 5,5 5,6 4,6 4,7 3,7 3,6 2,6 2,9 1,9 1,10 0,10 0,6 1,6 1,5 2,5 2,4 3,4 3,3 4,3 4,2 5,2" fill="hsl(',inverseCol,', 80%, 60%)"/><polygon points="2,4 3,4 14,4 14,6 13,6 13,4 3,4 3,6 2,6 " fill="hsl(',soulCol,', 40%, 60%)"/>')); } else if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[5]))) { _aString = '<polygon points="3,2 4,2 4,1 12,1 12,2 13,2 13,5 2,5 2,6 1,6 1,5 2,5 2,4 1,4 1,3 2,3 2,4 3,4" fill="hsl(0, 75%, 50%)"/>'; } else if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[6]))) { _aString = '<polygon points="3,2 4,2 4,1 12,1 12,2 13,2 13,5 2,5 2,6 1,6 1,5 2,5 2,4 1,4 1,3 2,3 2,4 3,4" fill="hsl(225, 75%, 50%)"/>'; } else if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[7]))) { _aString = string(abi.encodePacked('<polygon points="3,4 3,2 4,2 4,1 12,1 12,2 13,2 13,5 2,5 1,5 1,4" fill="hsl(',soulCol,', 75%, 50%)"/><polygon points="7,4 7,3 8,3 8,2 10,2 10,3 11,3 11,4" fill="hsl(',soulCol,', 75%, 25%)"/>')); } else if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[8]))) { _aString = '<polygon points="3,4 4,4 4,3 5,3 5,4 6,4 6,3 7,3 7,2 9,2 9,3 10,3 10,4 11,4 11,3 12,3 12,4 13,4 13,5 3,5 " fill="hsl(45, 100%, 50%)"/>'; } else if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[9]))) { _aString = '<polygon points="1,4 3,4 3,2 4,2 4,1 12,1 12,2 13,2 13,4 15,4 15,5 1,5" fill="hsl(45, 100%, 50%)"/><rect x="3" y="3" width="10" height="1" fill="hsl(0,100%,50%)"/>'; } else if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[10]))) { _aString = '<polygon points="12,5 12,3 13,3 13,2 14,2 14,1 15,1 15,4 14,4 14,5" fill="hsl(0,100%,50%)"/>'; } else if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[11]))) { _aString = '<polygon points="4,5 4,3 3,3 3,2 2,2 2,1 1,1 1,4 2,4 2,5" fill="hsl(225,100%,50%)"/>'; } else if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[12]))) { _aString = string(abi.encodePacked('<polygon points="1,1 2,1 2,2 6,2 6,1 7,1 7,0 9,0 9,1 10,1 10,2 14,2 14,1 15,1 15,4 14,4 14,5 12,5 12,3 11,3 11,2 5,2 5,3 4,3 4,5 2,5 2,4 1,4" fill="hsl(',soulCol,',75%,45%)"/>')); } return(_aString,_aJson = _trait); } //---------- EYES ASSEMBLY - WITH EYE SVGs ----------// function choseE(uint32 _seed) public pure returns (string memory _eString, string memory _eJson) { string[17] memory _traitArray = ["Passive", "Sane", "Wary", "Fine", "Shut", "Glee", "Cool", "Tough", "Archaic", "Sly", "Sharp", "Sad", "Indifferent", "Focused", "Gloomy", "Abnormal", "Gem"]; string memory _trait = _traitArray[_seed%16]; string memory soulCol = Strings.toString((_seed%72)*5); if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[0]))) { _eString = string(abi.encodePacked('<polygon points="5,7 11,7 11,9 9,9 9,7 7,7 7,9 5,9" fill="hsl(180,100%,100%)"/><polygon points="6,7 11,7 11,9 10,9 10,7 7,7 7,9 6,9" fill="hsl(',soulCol,',40%,60%)"/>')); } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[1]))) { _eString = string(abi.encodePacked('<polygon points="5,8 11,8 11,9 9,9 9,8 7,8 7,9 5,9" fill="hsl(180,100%,100%)"/><polygon points="5,8 10,8 10,9 9,9 9,8 6,8 6,9 5,9" fill="hsl(',soulCol,',40%,60%)"/><polygon points="5,6 11,6 11,7 9,7 9,6 7,6 7,7 5,7" fill="hsl(180,0%,0%)"/>')); } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[2]))) { _eString = string(abi.encodePacked('<polygon points="5,8 11,8 11,9 9,9 9,8 7,8 7,9 5,9" fill="hsl(180,100%,100%)"/><polygon points="6,8 11,8 11,9 10,9 10,8 7,8 7,9 6,9" fill="hsl(',soulCol,',40%,60%)"/><polygon points="5,5 6,5 6,6 11,6 11,7 9,7 9,6 7,6 7,7 6,7 6,6 5,6" fill="hsl(180,0%,0%)"/>')); } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[3]))) { _eString = string(abi.encodePacked('<polygon points="4,8 5,8 5,7 11,7 11,8 12,8 12,9 9,9 9,7 7,7 7,9 4,9" fill="hsl(180,0%,0%)"/><polygon points="5,8 11,8 11,9 9,9 9,8 7,8 7,9 5,9" fill="hsl(',soulCol,',40%,60%)"/><polygon points="6,8 11,8 11,9 10,9 10,8 7,8 7,9 6,9" fill="hsl(180,0%,0%)"/>')); } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[4]))) { _eString = '<polygon points="4,7 5,7 5,8 6,8 6,7 10,7 10,8 11,8 11,7 12,7 12,8 11,8 11,9 10,9 10,8 9,8 9,7 7,7 7,8 6,8 6,9 5,9 5,8 4,8" fill="hsl(180,0%,0%)"/>'; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[5]))) { _eString = '<polygon points="4,8 5,8 5,7 6,7 6,8 10,8 10,7 11,7 11,8 12,8 12,9 11,9 11,8 10,8 10,9 9,9 9,8 7,8 7,9 6,9 6,8 5,8 5,9 4,9" fill="hsl(180,0%,0%)"/>'; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[6]))) { _eString = '<polygon points="4,7 12,7 12,8 11,8 11,9 9,9 9,8 7,8 7,9 5,9 5,8 4,8" fill="hsl(180,0%,0%)"/>'; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[7]))) { _eString = string(abi.encodePacked('<rect x="5" y="8" width="2" height="1" fill="hsl(180,100%,100%)"/><rect x="5" y="8" width="1" height="1" fill="hsl(',soulCol,',40%,60%)"/><polygon points="5,3 6,3 6,4 7,4 7,5 8,5 8,6 9,6 9,7 11,7 11,9 12,9 12,10 11,10 11,9 9,9 9,8 5,8 5,7 7,7 7,8 9,8 9,7 8,7 8,6 7,6 7,5 6,5 6,4 5,4" fill="hsl(180,0%,0%)"/>')); } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[8]))) { _eString = string(abi.encodePacked('<polygon points="5,8 11,8 11,9 9,9 9,8 7,8 7,9 5,9" fill="hsl(180,100%,100%)"/><polygon points="5,8 10,8 10,9 9,9 9,8 6,8 6,9 5,9" fill="hsl(',soulCol,',40%,60%)"/><rect x="4" y="7" width="8" height="1" fill="hsl(180,0%,0%)"/>')); } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[9]))) { _eString = string(abi.encodePacked('<rect x="4" y="6" width="8" height="3" fill="hsl(180,0%,0%)"/><polygon points="5,7 11,7 11,8 9,8 9,7 7,7 7,8 5,8" fill="hsl(180,100%,100%)"/><polygon points="6,7 11,7 11,8 10,8 10,7 7,7 7,8 6,8" fill="hsl(',soulCol,',40%,60%)"/>')); } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[10]))) { _eString = string(abi.encodePacked('<polygon points="5,7 5,6 7,6 7,7 9,7 9,6 11,6 11,7 12,7 12,8 11,8 11,9 9,9 9,8 7,8 7,9 5,9 5,8 4,8 4,7" fill="hsl(180,0%,0%)"/><polygon points="5,7 11,7 11,8 9,8 9,7 7,7 7,8 5,8" fill="hsl(',soulCol,',40%,60%)"/>')); } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[11]))) { _eString = '<polygon points="11,8 11,10 10,10 10,8 6,8 6,12 5,12 5,8" fill="hsl(188, 39%, 58%)"/><polygon points="5,7 11,7 11,8 9,8 9,7 7,7 7,8 5,8" fill="hsl(180,0%,0%)"/>'; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[12]))) { _eString = string(abi.encodePacked('<polygon points="5,6 6,6 6,9 10,9 10,6 11,6 11,9 5,9" fill="hsl(180,0%,0%)"/><polygon points="4,7 12,7 12,8 9,8 9,7 7,7 7,8 4,8" fill="hsl(180,100%,100%)"/><polygon points="5,7 6,7 6,8 10,8 10,7 11,7 11,8 5,8" fill="hsl(',soulCol,',40%,60%)"/>')); } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[13]))) { _eString = string(abi.encodePacked('<polygon points="4,7 12,7 12,8 9,8 9,7 7,7 7,8 4,8" fill="hsl(180,0%,0%)"/><polygon points="4,8 12,8 12,9 9,9 9,8 7,8 7,9 4,9" fill="hsl(180,100%,100%)"/><polygon points="5,8 6,8 6,9 10,9 10,8 11,8 11,9 5,9" fill="hsl(',soulCol,',40%,60%)"/>')); } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[14]))) { _eString = string(abi.encodePacked('<polygon points="4,5 5,5 5,6 6,6 6,7 10,7 10,6 11,6 11,5 12,5 12,7 13,7 13,8 12,8 12,10 11,10 11,9 10,9 10,8 9,8 9,7 7,7 7,8 6,8 6,9 5,9 5,10 4,10 4,8 3,8 3,7 4,7 " fill="hsl(180,0%,0%)"/><polygon points="4,7 12,7 12,8 10,8 10,7 6,7 6,8 4,8" fill="hsl(180,100%,100%)"/><polygon points="5,7 6,7 6,8 11,8 11,7 12,7 12,8 5,8" fill="hsl(',soulCol,',40%,60%)"/>')); } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[15]))) { _eString = '<polygon points="5,8 6,8 6,9 10,9 10,7 11,7 11,9 10,9 5,9" fill="hsl(180,0%,0%)"/>'; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[16]))) { _eString = string(abi.encodePacked('<polygon points="5,7 11,7 11,9 9,9 9,7 7,7 7,9 5,9 " fill="hsl(180,100%,100%)"/><polygon points="5,8 6,8 6,7 7,7 7,8 10,8 10,7 11,7 11,8 10,8 10,9 9,9 9,8 6,8 6,9 5,9" fill="hsl(',soulCol,',40%,60%)"/>')); } return(_eString,_eJson = _trait); } //---------- MOUTH ASSEMBLY - WITH MOUTH SVGs ----------// function choseM(uint32 seed) public pure returns (string memory _mString, string memory _mJson) { string[18] memory _traitArray = ["Smile", "Rabbit", "Frown", "Jeez", "Deez", "Grin", "Hungry", "Hillbilly", "Yikes", "Dumber", "Cigarette", "Puke", "Raw", "Tongue", "Surprised", "Stunned", "Chew", "Respirator"]; string memory _trait = _traitArray[seed%17]; if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[0]))) { _mString = '<polygon points="6,11 5,11 5,10 6,10 6,11 10,11 10,10 11,10 11,11 10,11 10,12 6,12" fill="hsl(180,0%,0%)"/>'; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[1]))) { _mString = '<polygon points="6,11 5,11 5,10 6,10 6,11 10,11 10,10 11,10 11,11 10,11 10,12 6,12" fill="hsl(180,0%,0%)"/><polygon points="7,13 7,12 9,12 9,13" fill="hsl(180,100%,100%)"/>'; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[2]))) { _mString = '<polygon points="6,12 5,12 5,11 6,11 6,10 10,10 10,12 11,12 11,11 10,11 10,11 6,11 " fill="hsl(180,0%,0%)"/>'; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[3]))) { _mString = '<rect x="7" y="10" width="2" height="1" fill="hsl(180,0%,0%)"/>'; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[4]))) { _mString = '<rect x="5" y="10" width="6" height="1" fill="hsl(180,0%,0%)"/><rect x="6" y="10" width="1" height="1" fill="hsl(180,100%,100%)"/><rect x="9" y="10" width="1" height="1" fill="hsl(180,100%,100%)"/>'; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[5]))) { _mString = '<polygon points="7,11 6,11 6,10 7,10 7,11 9,11 9,10 10,10 10,11 9,11 9,12 7,12" fill="hsl(180,0%,0%)"/>'; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[6]))) { _mString = '<polygon points="7,11 7,12 6,12 6,10 10,10 10,13 9,13 9,12 8,12 8,11" fill="hsl(188, 39%, 58%)"/><rect x="6" y="10" width="4" height="1" fill="hsl(180,0%,0%)"/>'; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[7]))) { _mString = '<polygon points="7,11 7,12 6,12 6,10 10,10 10,12 9,12 9,11" fill="hsl(180, 100%, 100%)"/><rect x="5" y="10" width="6" height="1" fill="hsl(180,0%,0%)"/>'; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[8]))) { _mString = '<rect x="5" y="10" width="6" height="1" fill="hsl(180,0%,0%)"/><rect x="6" y="10" width="4" height="1" fill="hsl(180,100%,100%)"/> '; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[9]))) { _mString = '<rect x="5" y="10" width="6" height="1" fill="hsl(180,0%,0%)"/><rect x="6" y="10" width="4" height="1" fill="hsl(180,100%,100%)"/><rect x="7" y="10" width="1" height="1" fill="hsl(180,0%,0%)"/>'; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[10]))) { _mString = '<polygon points="6,12 6,11 5,11 5,10 6,10 6,11 10,11 10,12" fill="hsl(180,0%,0%)"/><rect x="9" y="11" width="2" height="1" fill="hsl(180,100%,100%)"/><rect x="11" y="11" width="1" height="1" fill="hsl(358, 100%, 51%)"/><polygon points="13,11 12,11 12,10 13,10 13,7 12,7 12,8 13,8 13,9 14,9 14,10 13,10 " fill="hsl(0, 0%, 90%)"/>'; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[11]))) { _mString = '<polygon points="9,10 11,10 11,14 10,14 10,13 9,13" fill="hsl(119, 100%, 41%)"/><rect x="5" y="10" width="6" height="1" fill="hsl(180,0%,0%)"/>'; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[12]))) { _mString = '<polygon points="7,11 7,12 6,12 6,10 9,10 11,10 11,14 10,14 10,13 9,13 9,11" fill="hsl(352, 100%, 41%)"/><rect x="5" y="10" width="6" height="1" fill="hsl(180,0%,0%)"/>'; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[13]))) { _mString = '<polygon points="5,10 11,10 11,11 10,11 10,13 9,13 9,14 8,14 7,14 7,13 6,13 6,11 5,11," fill="hsl(180, 0%, 0%)"/><rect x="7" y="11" width="2" height="2" fill="hsl(4, 74%, 50%)"/>'; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[14]))) { _mString = '<polygon points=" 7,10 6,10 6,9 10,9 10,10 11,10 11,12 10,12 10,13 6,13 6,12 5,12 5,10" fill="hsl(180, 0%, 0%)"/><rect x="6" y="10" width="4" height="2" fill="hsl(4, 74%, 50%)"/><rect x="9" y="10" width="1" height="1" fill="hsl(180, 100%, 100%)"/>'; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[15]))) { _mString = '<rect x="7" y="10" width="2" height="2" fill="hsl(4, 74%, 50%)"/><rect x="8" y="10" width="1" height="1" fill="hsl(180, 100%, 100%)"/>'; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[16]))) { _mString = '<polygon points="6,10 11,10 11,9 10,9 10,12 11,12 11,11 6,11" fill="hsl(180, 0%, 0%)"/>'; } if (keccak256(abi.encodePacked(_trait)) == keccak256(abi.encodePacked(_traitArray[17]))) { _mString = '<polygon points="3,8 4,8 4,9 5,9 5,10 6,10 6,9 10,9 10,10 11,10 11,9 12,9 12,8 13,8 13,9 12,9 12,10 11,10 11,12 13,12 13,13 3,13 3,12 5,12 5,10 4,10 4,9 3,9 " fill="hsl(0, 0%, 20%)"/><rect x="6" y="10" width="4" height="2" fill="hsl(53, 12%, 85%)"/>'; } return(_mString,_mJson = _trait); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; /// @title Base64 /// @author Brecht Devos - <[email protected]> /// @notice Provides functions for encoding/decoding base64 library Base64 { string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; bytes internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000" hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000" hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000" hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000"; function encode(bytes memory data) internal pure returns (string memory) { if (data.length == 0) return ''; // load the table into memory string memory table = TABLE_ENCODE; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((data.length + 2) / 3); // add some extra buffer at the end required for the writing string memory result = new string(encodedLen + 32); assembly { // set the actual output length mstore(result, encodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 3 bytes at a time for {} lt(dataPtr, endPtr) {} { // read 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // write 4 characters mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and( input, 0x3F)))) resultPtr := add(resultPtr, 1) } // padding with '=' switch mod(mload(data), 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } } return result; } function decode(string memory _data) internal pure returns (bytes memory) { bytes memory data = bytes(_data); if (data.length == 0) return new bytes(0); require(data.length % 4 == 0, "invalid base64 decoder input"); // load the table into memory bytes memory table = TABLE_DECODE; // every 4 characters represent 3 bytes uint256 decodedLen = (data.length / 4) * 3; // add some extra buffer at the end required for the writing bytes memory result = new bytes(decodedLen + 32); assembly { // padding with '=' let lastBytes := mload(add(data, mload(data))) if eq(and(lastBytes, 0xFF), 0x3d) { decodedLen := sub(decodedLen, 1) if eq(and(lastBytes, 0xFFFF), 0x3d3d) { decodedLen := sub(decodedLen, 1) } } // set the actual output length mstore(result, decodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 4 characters at a time for {} lt(dataPtr, endPtr) {} { // read 4 characters dataPtr := add(dataPtr, 4) let input := mload(dataPtr) // write 3 bytes let output := add( add( shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)), shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))), add( shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)), and(mload(add(tablePtr, and( input , 0xFF))), 0xFF) ) ) mstore(resultPtr, shl(232, output)) resultPtr := add(resultPtr, 3) } } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @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); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApprovalToCurrentOwner","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"DropOut","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"address","name":"currentMA","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"int256","name":"amount","type":"int256"}],"name":"ItemBought","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"jackpotAmount","type":"uint256"}],"name":"MiniJackpotAmount","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"winner","type":"address"},{"indexed":false,"internalType":"uint256","name":"jackpotAmount","type":"uint256"}],"name":"MiniJackpotWin","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":[],"name":"CREATORCLAIMAMOUNT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAXPIXELS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WALLETLIMIT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"abashoCollective","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"addressClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_newSalt","type":"string"}],"name":"changeSalt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"checkLastSurvivor","outputs":[{"internalType":"uint256","name":"_winner","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractCreator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentHighscore","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"distributeToWinners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPopulation","outputs":[{"internalType":"uint256","name":"_population","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"isAlive","outputs":[{"internalType":"bool","name":"_alive","type":"bool"}],"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":"","type":"uint256"}],"name":"jackpot","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastPlayer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mostAttacks","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"payout","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"pixelList","outputs":[{"internalType":"int256","name":"health","type":"int256"},{"internalType":"bool","name":"status","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pixelTagContract","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pixelWarConcluded","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pixelWarStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_number","type":"uint256"},{"internalType":"string","name":"_specialSalt","type":"string"}],"name":"pseudoRandom","outputs":[{"internalType":"uint256","name":"number","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randomPlayer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randomTag","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"returnRandomId","outputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setAbashoADDR","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":"baseURI_","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"int256","name":"_amount","type":"int256"}],"name":"setHP","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_addr","type":"address"}],"name":"setTagContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startPixelWar","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"started","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","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":[],"name":"teamClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timeLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"walletHighscore","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526363a39e006013553480156200001957600080fd5b506040518060400160405280601781526020017f506978656c526f79616c6520424154544c452047414d45000000000000000000815250604051806040016040528060048152602001635052424760e01b81525081600290816200007e9190620001af565b5060036200008d8282620001af565b5050600160005550620000a033620000b8565b600980546001600160a01b031916331790556200027b565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200013557607f821691505b6020821081036200015657634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620001aa57600081815260208120601f850160051c81016020861015620001855750805b601f850160051c820191505b81811015620001a65782815560010162000191565b5050505b505050565b81516001600160401b03811115620001cb57620001cb6200010a565b620001e381620001dc845462000120565b846200015c565b602080601f8311600181146200021b5760008415620002025750858301515b600019600386901b1c1916600185901b178555620001a6565b600085815260208120601f198616915b828110156200024c578886015182559484019460019091019084016200022b565b50858210156200026b5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6130f7806200028b6000396000f3fe6080604052600436106103355760003560e01c806363bd1d4a116101ab578063b4efc822116100f7578063e0721fd511610095578063e985e9c51161006f578063e985e9c514610945578063e99a10511461098e578063f2fde38b146109a1578063fc1299a6146109c157600080fd5b8063e0721fd5146108e4578063e3450e1314610904578063e834a8341461092457600080fd5b8063c6d5f193116100d1578063c6d5f19314610864578063c87b56dd14610884578063d6427c24146108a4578063d84b2361146108c457600080fd5b8063b4efc8221461080e578063b88d4fde1461082e578063c08d1fe51461084e57600080fd5b806377f8d49d1161016457806395d89b411161013e57806395d89b411461079f5780639c73ae6c146107b4578063a0712d68146107ce578063a22cb465146107ee57600080fd5b806377f8d49d1461074c5780638da5cb5b14610762578063957905421461078057600080fd5b806363bd1d4a146106a6578063678180ad146106c05780636ae146c2146106d557806370a08231146106ea578063715018a61461070a578063772dc32f1461071f57600080fd5b80632be09561116102855780634e1313d311610223578063585c8487116101fd578063585c84871461062457806360bcd00f14610651578063627fa511146106665780636352211e1461068657600080fd5b80634e1313d3146105c45780635355eb32146105e457806355f804b31461060457600080fd5b80633ccfd60b1161025f5780633ccfd60b14610565578063409b06b51461057a57806342842e0e1461058f5780634a8054a6146105af57600080fd5b80632be09561146104ee5780633a61017b146105035780633a631ff71461051957600080fd5b806318160ddd116102f257806320252b4e116102cc57806320252b4e1461048f57806322d7b81c146104a457806323b872dd146104b95780632b4ae7bd146104d957600080fd5b806318160ddd146104395780631e2f73b11461044e5780631f2698ab1461046e57600080fd5b806301ffc9a71461033a57806306fdde031461036f578063081812fc14610391578063095ea7b3146103c957806312535fb6146103eb57806313e08a5014610419575b600080fd5b34801561034657600080fd5b5061035a610355366004612875565b6109e1565b60405190151581526020015b60405180910390f35b34801561037b57600080fd5b50610384610a33565b60405161036691906128ea565b34801561039d57600080fd5b506103b16103ac3660046128fd565b610ac5565b6040516001600160a01b039091168152602001610366565b3480156103d557600080fd5b506103e96103e436600461292b565b610b09565b005b3480156103f757600080fd5b5061040b610406366004612a03565b610bdb565b604051908152602001610366565b34801561042557600080fd5b50600e546103b1906001600160a01b031681565b34801561044557600080fd5b5061040b610c3d565b34801561045a57600080fd5b506009546103b1906001600160a01b031681565b34801561047a57600080fd5b50600f5461035a90600160a01b900460ff1681565b34801561049b57600080fd5b506103e9610c4b565b3480156104b057600080fd5b5061040b600381565b3480156104c557600080fd5b506103e96104d4366004612a4a565b610ce0565b3480156104e557600080fd5b5061040b610cf0565b3480156104fa57600080fd5b506103e9610d35565b34801561050f57600080fd5b5061040b61115c81565b34801561052557600080fd5b506105506105343660046128fd565b6019602052600090815260409020805460019091015460ff1682565b60408051928352901515602083015201610366565b34801561057157600080fd5b506103e9610dce565b34801561058657600080fd5b5061040b600281565b34801561059b57600080fd5b506103e96105aa366004612a4a565b610f37565b3480156105bb57600080fd5b5061040b610f52565b3480156105d057600080fd5b50600d546103b1906001600160a01b031681565b3480156105f057600080fd5b50600b546103b1906001600160a01b031681565b34801561061057600080fd5b506103e961061f366004612a8b565b610f92565b34801561063057600080fd5b5061040b61063f366004612ac0565b60146020526000908152604090205481565b34801561065d57600080fd5b506103e9610fc8565b34801561067257600080fd5b5061040b6106813660046128fd565b611256565b34801561069257600080fd5b506103b16106a13660046128fd565b611277565b3480156106b257600080fd5b5060175461035a9060ff1681565b3480156106cc57600080fd5b5061040b611282565b3480156106e157600080fd5b506103e961130c565b3480156106f657600080fd5b5061040b610705366004612ac0565b611438565b34801561071657600080fd5b506103e9611487565b34801561072b57600080fd5b5061040b61073a366004612ac0565b60106020526000908152604090205481565b34801561075857600080fd5b5061040b60155481565b34801561076e57600080fd5b506008546001600160a01b03166103b1565b34801561078c57600080fd5b5060125461035a90610100900460ff1681565b3480156107ab57600080fd5b506103846114bd565b3480156107c057600080fd5b5060125461035a9060ff1681565b3480156107da57600080fd5b506103e96107e93660046128fd565b6114cc565b3480156107fa57600080fd5b506103e9610809366004612add565b611785565b34801561081a57600080fd5b506103e9610829366004612a8b565b61181a565b34801561083a57600080fd5b506103e9610849366004612b1b565b611850565b34801561085a57600080fd5b5061040b60135481565b34801561087057600080fd5b506103e961087f366004612ac0565b61189a565b34801561089057600080fd5b5061038461089f3660046128fd565b6118e6565b3480156108b057600080fd5b50600c546103b1906001600160a01b031681565b3480156108d057600080fd5b5061035a6108df3660046128fd565b6119e6565b3480156108f057600080fd5b50600f546103b1906001600160a01b031681565b34801561091057600080fd5b50600a546103b1906001600160a01b031681565b34801561093057600080fd5b50600f5461035a90600160a81b900460ff1681565b34801561095157600080fd5b5061035a610960366004612b9b565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6103e961099c366004612bc9565b611a0c565b3480156109ad57600080fd5b506103e96109bc366004612ac0565b612070565b3480156109cd57600080fd5b506103e96109dc366004612ac0565b61210b565b60006301ffc9a760e01b6001600160e01b031983161480610a1257506380ac58cd60e01b6001600160e01b03198316145b80610a2d5750635b5e139f60e01b6001600160e01b03198316145b92915050565b606060028054610a4290612beb565b80601f0160208091040260200160405190810160405280929190818152602001828054610a6e90612beb565b8015610abb5780601f10610a9057610100808354040283529160200191610abb565b820191906000526020600020905b815481529060010190602001808311610a9e57829003601f168201915b5050505050905090565b6000610ad082612157565b610aed576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610b148261218c565b9050806001600160a01b0316836001600160a01b031603610b485760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614610b7f57610b628133610960565b610b7f576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600082424433601686604051602001610bf8959493929190612c3b565b6040516020818303038152906040528051906020012060001c610c1b9190612d01565b90508015610c295780610c36565b80610c3381612d2b565b91505b5092915050565b600154600054036000190190565b6008546001600160a01b03163314610c7e5760405162461bcd60e51b8152600401610c7590612d44565b60405180910390fd5b60125460ff1615610cd15760405162461bcd60e51b815260206004820181905260248201527f546865207761722068617320616c7265616479206265656e20737461727465646044820152606401610c75565b6012805460ff19166001179055565b610ceb8383836121fb565b505050565b600060015b610cfd610c3d565b8111610d3157610d0c816119e6565b15610d1f5781610d1b81612d2b565b9250505b80610d2981612d2b565b915050610cf5565b5090565b6008546001600160a01b03163314610d5f5760405162461bcd60e51b8152600401610c7590612d44565b600f54600160a01b900460ff1615610db95760405162461bcd60e51b815260206004820152601860248201527f6d696e742068617320616c7265616479207374617274656400000000000000006044820152606401610c75565b600f805460ff60a01b1916600160a01b179055565b601354421015610e365760405162461bcd60e51b815260206004820152602d60248201527f506c617920666169722c207761697420756e74696c207468652074696d65206c60448201526c1a5b5a5d081c9d5b9cc81bdd5d609a1b6064820152608401610c75565b6009546001600160a01b03163314610eaa5760405162461bcd60e51b815260206004820152603160248201527f4f6e6c79204f776e65722063616e2077697468647261772061667465722074696044820152701b59481b1a5b5a5d081c9d5b9cc81bdd5d607a1b6064820152608401610c75565b600e5447906001600160a01b03166108fc610ec6606484612d79565b610ed190600f612d8d565b6040518115909202916000818181858888f19350505050158015610ef9573d6000803e3d6000fd5b506009546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610f33573d6000803e3d6000fd5b5050565b610ceb83838360405180602001604052806000815250611850565b6000805b610f5e610c3d565b8111610d31576000818152601960205260409020546000191215610f80578091505b80610f8a81612d2b565b915050610f56565b6008546001600160a01b03163314610fbc5760405162461bcd60e51b8152600401610c7590612d44565b6011610f338282612df2565b601254610100900460ff1661101f5760405162461bcd60e51b815260206004820152601f60248201527f5468652067616d6520686173206e6f7420636f6e636c756465642079657421006044820152606401610c75565b60175460ff16156110845760405162461bcd60e51b815260206004820152602960248201527f546865207072697a6520706f6f6c2068617320616c7265616479206265656e2060448201526870616964206f75742160b81b6064820152608401610c75565b600a5447906001600160a01b03166108fc6110a0606484612d79565b6110ab906019612d8d565b6040518115909202916000818181858888f193505050501580156110d3573d6000803e3d6000fd5b50600b546001600160a01b03166108fc6110ee606484612d79565b6110f9906019612d8d565b6040518115909202916000818181858888f19350505050158015611121573d6000803e3d6000fd5b50600c546001600160a01b03166108fc61113c606484612d79565b61114790600a612d8d565b6040518115909202916000818181858888f1935050505015801561116f573d6000803e3d6000fd5b50600d546001600160a01b03166108fc61118a606484612d79565b61119590600a612d8d565b6040518115909202916000818181858888f193505050501580156111bd573d6000803e3d6000fd5b50600e546001600160a01b03166108fc6111d8606484612d79565b6111e390600f612d8d565b6040518115909202916000818181858888f1935050505015801561120b573d6000803e3d6000fd5b506009546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015611245573d6000803e3d6000fd5b50506017805460ff19166001179055565b6018818154811061126657600080fd5b600091825260209091200154905081565b6000610a2d8261218c565b6000806112af611290610c3d565b604051806040016040528060018152602001605160f81b815250610bdb565b90505b6112ba610c3d565b6112c5906001612eb2565b8111610d315760008181526019602052604090205460001912156112e857919050565b6112f0610c3d565b81036112fa575060005b8061130481612d2b565b9150506112b2565b6008546001600160a01b031633146113365760405162461bcd60e51b8152600401610c7590612d44565b6000611340610c3d565b600f54909150600160a81b900460ff161561138f5760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e4818db185a5b5959608a1b6044820152606401610c75565b60005b600381101561140a576040805180820190915260008082526001602083015281906019906113c08587612eb2565b6113cb906001612eb2565b8152602080820192909252604001600020825181559101516001909101805460ff1916911515919091179055508061140281612d2b565b915050611392565b50600954611422906001600160a01b031660036123a2565b50600f805460ff60a81b1916600160a81b179055565b60006001600160a01b038216611461576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b031633146114b15760405162461bcd60e51b8152600401610c7590612d44565b6114bb60006123bc565b565b606060038054610a4290612beb565b60006114d6610c3d565b6009549091506001600160a01b0316336001600160a01b0316146115c057600f54600160a01b900460ff166115465760405162461bcd60e51b8152602060048201526016602482015275135a5b9d08191a59081b9bdd081cdd185c9d081e595d60521b6044820152606401610c75565b33600090815260106020526040902054600290611564908490612eb2565b11156115c05760405162461bcd60e51b815260206004820152602560248201527f57616c6c6574206c696d697420726561636865642c20646f6e27742062652067604482015264726565647960d81b6064820152608401610c75565b600082116116105760405162461bcd60e51b815260206004820152601b60248201527f596f75206e65656420746f206d696e74206174206c65617374203100000000006044820152606401610c75565b61115c61161d8383612eb2565b111561167d5760405162461bcd60e51b815260206004820152602960248201527f4e6f742074686174206d616e79204e465473206c6566742c2074727920746f206044820152686d696e74206c65737360b81b6064820152608401610c75565b61115c8111156116ba5760405162461bcd60e51b8152602060048201526008602482015267135a5b9d081bdd5d60c21b6044820152606401610c75565b60005b82811015611734576040805180820190915260008082526001602083015281906019906116ea8587612eb2565b6116f5906001612eb2565b8152602080820192909252604001600020825181559101516001909101805460ff1916911515919091179055508061172c81612d2b565b9150506116bd565b503360009081526010602052604081208054849290611754908490612eb2565b90915550611764905033836123a2565b61115c61176f610c3d565b10610f33576012805460ff191660011790555050565b336001600160a01b038316036117ae5760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6008546001600160a01b031633146118445760405162461bcd60e51b8152600401610c7590612d44565b6016610f338282612df2565b61185b8484846121fb565b6001600160a01b0383163b15611894576118778484848461240e565b611894576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6008546001600160a01b031633146118c45760405162461bcd60e51b8152600401610c7590612d44565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b60606118f182612157565b61193d5760405162461bcd60e51b815260206004820152601e60248201527f5468657265206973206e6f20746f6b656e2077697468207468617420494400006044820152606401610c75565b60006119476124f9565b9050611952836119e6565b156119a757600081511161197557604051806020016040528060008152506119a0565b8061197f84612508565b604051602001611990929190612eca565b6040516020818303038152906040525b9392505050565b60008151116119c557604051806020016040528060008152506119a0565b806119cf84612508565b604051602001611990929190612f09565b50919050565b6000818152601960205260408120548113611a0457506001806119e0565b506000919050565b601254610100900460ff1615611a645760405162461bcd60e51b815260206004820152601a60248201527f506978656c526f79616c652068617320636f6e636c75646564210000000000006044820152606401610c75565b60125460ff16611ab65760405162461bcd60e51b815260206004820152601b60248201527f506978656c526f79616c65206861736e277420737461727465642100000000006044820152606401610c75565b6001611ac0610cf0565b11611b0d5760405162461bcd60e51b815260206004820152601960248201527f576520616c7265616479206861766520612077696e6e657221000000000000006044820152606401610c75565b80600003611b5d5760405162461bcd60e51b815260206004820152601f60248201527f56616c7565206e6565647320746f206265203e206f72203c207468616e2030006044820152606401610c75565b60008281526019602052604090205460001912611bbc5760405162461bcd60e51b815260206004820152601e60248201527f506c6179657220616c7265616479206f7574206f66207468652047616d6500006044820152606401610c75565b600a6000808312611bcf57508180611bdf565b611bdb83600019612f57565b9050805b506006811115611c155760089150600c811115611c1557600791506012811115611c1557600691506018811115611c1557600591505b60008183611c2b600a6611c37937e08000612d79565b611c359190612d8d565b611c3f9190612d8d565b905034811115611c825760405162461bcd60e51b815260206004820152600e60248201526d09cdee840cadcdeeaced0408aa8960931b6044820152606401610c75565b6000841215611d665760008581526019602052604090205460011990611ca9908690612fdc565b13611d025760405162461bcd60e51b815260206004820152602360248201527f547279206c6573732061747461636b73202d2077617272696f72206f7665726b6044820152621a5b1b60ea1b6064820152608401610c75565b3360009081526014602052604081208054849290611d21908490612eb2565b9091555050601554336000908152601460205260409020541115611d665733600081815260146020526040902054601555600b80546001600160a01b03191690911790555b600085815260196020526040812054611d80908690612fdc565b12611db557600085815260196020526040902054611d9f908590612fdc565b6000868152601960205260409020819055611dcb565b6000858152601960205260409020600019908190555b50600b54604080513381526001600160a01b03909216602083015281810187905260608201869052517f839addad4015ebc388eeef379933be23a67469946852fd491900cdacf4e115e69181900360800190a1611e2734612557565b60185415611e3757611e37612588565b600f546001600160a01b0316611e4c866119e6565b611f16576001600160a01b03811663799e575a336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381600087803b158015611ea157600080fd5b505af1158015611eb5573d6000803e3d6000fd5b5050506000878152601960205260409020600101805460ff19169055507f91572ab91eb250a4305c0e93d6cadf30656ea244dddd7b49e1466c647e8f9ea033604080516001600160a01b039092168252602082018990520160405180910390a15b6002611f20610cf0565b1015612068576012805461ff001916610100179055611f406106a1610f52565b600a60006101000a8154816001600160a01b0302191690836001600160a01b03160217905550611f946106a161115c604051806040016040528060078152602001662bb0b93934b7b960c91b815250610bdb565b600c80546001600160a01b0319166001600160a01b039283161790558116636352211e611fe8611fc7600161115c61301d565b6040518060400160405280600381526020016254616760e81b815250610bdb565b6040518263ffffffff1660e01b815260040161200691815260200190565b602060405180830381865afa158015612023573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120479190613034565b600d80546001600160a01b0319166001600160a01b03929092169190911790555b505050505050565b6008546001600160a01b0316331461209a5760405162461bcd60e51b8152600401610c7590612d44565b6001600160a01b0381166120ff5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c75565b612108816123bc565b50565b6008546001600160a01b031633146121355760405162461bcd60e51b8152600401610c7590612d44565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b60008160011115801561216b575060005482105b8015610a2d575050600090815260046020526040902054600160e01b161590565b600081806001116121e2576000548110156121e25760008181526004602052604081205490600160e01b821690036121e0575b806000036119a05750600019016000818152600460205260409020546121bf565b505b604051636f96cda160e11b815260040160405180910390fd5b60006122068261218c565b9050836001600160a01b0316816001600160a01b0316146122395760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b038616148061225757506122578533610960565b8061227257503361226784610ac5565b6001600160a01b0316145b90508061229257604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0384166122b957604051633a954ecd60e21b815260040160405180910390fd5b600083815260066020908152604080832080546001600160a01b03191690556001600160a01b038881168452600583528184208054600019019055871683528083208054600101905585835260049091528120600160e11b4260a01b871781179091558316900361235a576001830160008181526004602052604081205490036123585760005481146123585760008181526004602052604090208390555b505b82846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050505050565b610f33828260405180602001604052806000815250612672565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612443903390899088908890600401613051565b6020604051808303816000875af192505050801561247e575060408051601f3d908101601f1916820190925261247b9181019061308e565b60015b6124dc573d8080156124ac576040519150601f19603f3d011682016040523d82523d6000602084013e6124b1565b606091505b5080516000036124d4576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606060118054610a4290612beb565b604080516080810191829052607f0190826030600a8206018353600a90045b801561254557600183039250600a81066030018353600a9004612527565b50819003601f19909101908152919050565b6018612564606483612d79565b61256f906031612d8d565b8154600181018355600092835260209092209091015550565b6125a2600860405180602001604052806000815250610bdb565b60040361263657336108fc6125b56127e6565b6040518115909202916000818181858888f193505050501580156125dd573d6000803e3d6000fd5b507fe046c7220b7585b547aeeb53022a609f95e11e82fa9beb690b0ecbe602ca3fe0336126086127e6565b604080516001600160a01b03909316835260208301919091520160405180910390a16114bb60186000612831565b7fc3f6b4391a457a4081c871f50ebff62df7b0df3edff62d4bbdd2760080c2ae8861265f6127e6565b60405190815260200160405180910390a1565b6000546001600160a01b03841661269b57604051622e076360e81b815260040160405180910390fd5b826000036126bc5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03841660008181526005602090815260408083208054680100000000000000018902019055848352600490915290204260a01b86176001861460e11b1790558190818501903b15612791575b60405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461275a600087848060010195508761240e565b612777576040516368d2bf6b60e11b815260040160405180910390fd5b80821061270f57826000541461278c57600080fd5b6127d6565b5b6040516001830192906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210612792575b5060009081556118949085838684565b6000805b601854811015610d315760188181548110612807576128076130ab565b90600052602060002001548261281d9190612eb2565b91508061282981612d2b565b9150506127ea565b508054600082559060005260206000209081019061210891905b80821115610d31576000815560010161284b565b6001600160e01b03198116811461210857600080fd5b60006020828403121561288757600080fd5b81356119a08161285f565b60005b838110156128ad578181015183820152602001612895565b838111156118945750506000910152565b600081518084526128d6816020860160208601612892565b601f01601f19169290920160200192915050565b6020815260006119a060208301846128be565b60006020828403121561290f57600080fd5b5035919050565b6001600160a01b038116811461210857600080fd5b6000806040838503121561293e57600080fd5b823561294981612916565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561298857612988612957565b604051601f8501601f19908116603f011681019082821181831017156129b0576129b0612957565b816040528093508581528686860111156129c957600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126129f457600080fd5b6119a08383356020850161296d565b60008060408385031215612a1657600080fd5b82359150602083013567ffffffffffffffff811115612a3457600080fd5b612a40858286016129e3565b9150509250929050565b600080600060608486031215612a5f57600080fd5b8335612a6a81612916565b92506020840135612a7a81612916565b929592945050506040919091013590565b600060208284031215612a9d57600080fd5b813567ffffffffffffffff811115612ab457600080fd5b610c33848285016129e3565b600060208284031215612ad257600080fd5b81356119a081612916565b60008060408385031215612af057600080fd5b8235612afb81612916565b915060208301358015158114612b1057600080fd5b809150509250929050565b60008060008060808587031215612b3157600080fd5b8435612b3c81612916565b93506020850135612b4c81612916565b925060408501359150606085013567ffffffffffffffff811115612b6f57600080fd5b8501601f81018713612b8057600080fd5b612b8f8782356020840161296d565b91505092959194509250565b60008060408385031215612bae57600080fd5b8235612bb981612916565b91506020830135612b1081612916565b60008060408385031215612bdc57600080fd5b50508035926020909101359150565b600181811c90821680612bff57607f821691505b6020821081036119e057634e487b7160e01b600052602260045260246000fd5b60008151612c31818560208601612892565b9290920192915050565b8581526000602086818401526bffffffffffffffffffffffff198660601b166040840152605460008654612c6e81612beb565b60018281168015612c865760018114612c9f57612ccf565b60ff198416898701528215158302890186019450612ccf565b8a6000528660002060005b84811015612cc55781548b8201890152908301908801612caa565b505085838a010194505b50505050612cdd8187612c1f565b9a9950505050505050505050565b634e487b7160e01b600052601260045260246000fd5b600082612d1057612d10612ceb565b500690565b634e487b7160e01b600052601160045260246000fd5b600060018201612d3d57612d3d612d15565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600082612d8857612d88612ceb565b500490565b6000816000190483118215151615612da757612da7612d15565b500290565b601f821115610ceb57600081815260208120601f850160051c81016020861015612dd35750805b601f850160051c820191505b8181101561206857828155600101612ddf565b815167ffffffffffffffff811115612e0c57612e0c612957565b612e2081612e1a8454612beb565b84612dac565b602080601f831160018114612e555760008415612e3d5750858301515b600019600386901b1c1916600185901b178555612068565b600085815260208120601f198616915b82811015612e8457888601518255948401946001909101908401612e65565b5085821015612ea25787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008219821115612ec557612ec5612d15565b500190565b60008351612edc818460208801612892565b835190830190612ef0818360208801612892565b64173539b7b760d91b9101908152600501949350505050565b60008351612f1b818460208801612892565b601960fa1b9083019081528351612f39816001840160208801612892565b64173539b7b760d91b60019290910191820152600601949350505050565b60006001600160ff1b0381841382841380821686840486111615612f7d57612f7d612d15565b600160ff1b6000871282811687830589121615612f9c57612f9c612d15565b60008712925087820587128484161615612fb857612fb8612d15565b87850587128184161615612fce57612fce612d15565b505050929093029392505050565b600080821280156001600160ff1b0384900385131615612ffe57612ffe612d15565b600160ff1b839003841281161561301757613017612d15565b50500190565b60008282101561302f5761302f612d15565b500390565b60006020828403121561304657600080fd5b81516119a081612916565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613084908301846128be565b9695505050505050565b6000602082840312156130a057600080fd5b81516119a08161285f565b634e487b7160e01b600052603260045260246000fdfea26469706673582212200dd0fbefde9d0e3b16cc1515d2786d30cbda2307cd05be8dd59686518aea2ce364736f6c634300080f0033
Deployed Bytecode
0x6080604052600436106103355760003560e01c806363bd1d4a116101ab578063b4efc822116100f7578063e0721fd511610095578063e985e9c51161006f578063e985e9c514610945578063e99a10511461098e578063f2fde38b146109a1578063fc1299a6146109c157600080fd5b8063e0721fd5146108e4578063e3450e1314610904578063e834a8341461092457600080fd5b8063c6d5f193116100d1578063c6d5f19314610864578063c87b56dd14610884578063d6427c24146108a4578063d84b2361146108c457600080fd5b8063b4efc8221461080e578063b88d4fde1461082e578063c08d1fe51461084e57600080fd5b806377f8d49d1161016457806395d89b411161013e57806395d89b411461079f5780639c73ae6c146107b4578063a0712d68146107ce578063a22cb465146107ee57600080fd5b806377f8d49d1461074c5780638da5cb5b14610762578063957905421461078057600080fd5b806363bd1d4a146106a6578063678180ad146106c05780636ae146c2146106d557806370a08231146106ea578063715018a61461070a578063772dc32f1461071f57600080fd5b80632be09561116102855780634e1313d311610223578063585c8487116101fd578063585c84871461062457806360bcd00f14610651578063627fa511146106665780636352211e1461068657600080fd5b80634e1313d3146105c45780635355eb32146105e457806355f804b31461060457600080fd5b80633ccfd60b1161025f5780633ccfd60b14610565578063409b06b51461057a57806342842e0e1461058f5780634a8054a6146105af57600080fd5b80632be09561146104ee5780633a61017b146105035780633a631ff71461051957600080fd5b806318160ddd116102f257806320252b4e116102cc57806320252b4e1461048f57806322d7b81c146104a457806323b872dd146104b95780632b4ae7bd146104d957600080fd5b806318160ddd146104395780631e2f73b11461044e5780631f2698ab1461046e57600080fd5b806301ffc9a71461033a57806306fdde031461036f578063081812fc14610391578063095ea7b3146103c957806312535fb6146103eb57806313e08a5014610419575b600080fd5b34801561034657600080fd5b5061035a610355366004612875565b6109e1565b60405190151581526020015b60405180910390f35b34801561037b57600080fd5b50610384610a33565b60405161036691906128ea565b34801561039d57600080fd5b506103b16103ac3660046128fd565b610ac5565b6040516001600160a01b039091168152602001610366565b3480156103d557600080fd5b506103e96103e436600461292b565b610b09565b005b3480156103f757600080fd5b5061040b610406366004612a03565b610bdb565b604051908152602001610366565b34801561042557600080fd5b50600e546103b1906001600160a01b031681565b34801561044557600080fd5b5061040b610c3d565b34801561045a57600080fd5b506009546103b1906001600160a01b031681565b34801561047a57600080fd5b50600f5461035a90600160a01b900460ff1681565b34801561049b57600080fd5b506103e9610c4b565b3480156104b057600080fd5b5061040b600381565b3480156104c557600080fd5b506103e96104d4366004612a4a565b610ce0565b3480156104e557600080fd5b5061040b610cf0565b3480156104fa57600080fd5b506103e9610d35565b34801561050f57600080fd5b5061040b61115c81565b34801561052557600080fd5b506105506105343660046128fd565b6019602052600090815260409020805460019091015460ff1682565b60408051928352901515602083015201610366565b34801561057157600080fd5b506103e9610dce565b34801561058657600080fd5b5061040b600281565b34801561059b57600080fd5b506103e96105aa366004612a4a565b610f37565b3480156105bb57600080fd5b5061040b610f52565b3480156105d057600080fd5b50600d546103b1906001600160a01b031681565b3480156105f057600080fd5b50600b546103b1906001600160a01b031681565b34801561061057600080fd5b506103e961061f366004612a8b565b610f92565b34801561063057600080fd5b5061040b61063f366004612ac0565b60146020526000908152604090205481565b34801561065d57600080fd5b506103e9610fc8565b34801561067257600080fd5b5061040b6106813660046128fd565b611256565b34801561069257600080fd5b506103b16106a13660046128fd565b611277565b3480156106b257600080fd5b5060175461035a9060ff1681565b3480156106cc57600080fd5b5061040b611282565b3480156106e157600080fd5b506103e961130c565b3480156106f657600080fd5b5061040b610705366004612ac0565b611438565b34801561071657600080fd5b506103e9611487565b34801561072b57600080fd5b5061040b61073a366004612ac0565b60106020526000908152604090205481565b34801561075857600080fd5b5061040b60155481565b34801561076e57600080fd5b506008546001600160a01b03166103b1565b34801561078c57600080fd5b5060125461035a90610100900460ff1681565b3480156107ab57600080fd5b506103846114bd565b3480156107c057600080fd5b5060125461035a9060ff1681565b3480156107da57600080fd5b506103e96107e93660046128fd565b6114cc565b3480156107fa57600080fd5b506103e9610809366004612add565b611785565b34801561081a57600080fd5b506103e9610829366004612a8b565b61181a565b34801561083a57600080fd5b506103e9610849366004612b1b565b611850565b34801561085a57600080fd5b5061040b60135481565b34801561087057600080fd5b506103e961087f366004612ac0565b61189a565b34801561089057600080fd5b5061038461089f3660046128fd565b6118e6565b3480156108b057600080fd5b50600c546103b1906001600160a01b031681565b3480156108d057600080fd5b5061035a6108df3660046128fd565b6119e6565b3480156108f057600080fd5b50600f546103b1906001600160a01b031681565b34801561091057600080fd5b50600a546103b1906001600160a01b031681565b34801561093057600080fd5b50600f5461035a90600160a81b900460ff1681565b34801561095157600080fd5b5061035a610960366004612b9b565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b6103e961099c366004612bc9565b611a0c565b3480156109ad57600080fd5b506103e96109bc366004612ac0565b612070565b3480156109cd57600080fd5b506103e96109dc366004612ac0565b61210b565b60006301ffc9a760e01b6001600160e01b031983161480610a1257506380ac58cd60e01b6001600160e01b03198316145b80610a2d5750635b5e139f60e01b6001600160e01b03198316145b92915050565b606060028054610a4290612beb565b80601f0160208091040260200160405190810160405280929190818152602001828054610a6e90612beb565b8015610abb5780601f10610a9057610100808354040283529160200191610abb565b820191906000526020600020905b815481529060010190602001808311610a9e57829003601f168201915b5050505050905090565b6000610ad082612157565b610aed576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b6000610b148261218c565b9050806001600160a01b0316836001600160a01b031603610b485760405163250fdee360e21b815260040160405180910390fd5b336001600160a01b03821614610b7f57610b628133610960565b610b7f576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600082424433601686604051602001610bf8959493929190612c3b565b6040516020818303038152906040528051906020012060001c610c1b9190612d01565b90508015610c295780610c36565b80610c3381612d2b565b91505b5092915050565b600154600054036000190190565b6008546001600160a01b03163314610c7e5760405162461bcd60e51b8152600401610c7590612d44565b60405180910390fd5b60125460ff1615610cd15760405162461bcd60e51b815260206004820181905260248201527f546865207761722068617320616c7265616479206265656e20737461727465646044820152606401610c75565b6012805460ff19166001179055565b610ceb8383836121fb565b505050565b600060015b610cfd610c3d565b8111610d3157610d0c816119e6565b15610d1f5781610d1b81612d2b565b9250505b80610d2981612d2b565b915050610cf5565b5090565b6008546001600160a01b03163314610d5f5760405162461bcd60e51b8152600401610c7590612d44565b600f54600160a01b900460ff1615610db95760405162461bcd60e51b815260206004820152601860248201527f6d696e742068617320616c7265616479207374617274656400000000000000006044820152606401610c75565b600f805460ff60a01b1916600160a01b179055565b601354421015610e365760405162461bcd60e51b815260206004820152602d60248201527f506c617920666169722c207761697420756e74696c207468652074696d65206c60448201526c1a5b5a5d081c9d5b9cc81bdd5d609a1b6064820152608401610c75565b6009546001600160a01b03163314610eaa5760405162461bcd60e51b815260206004820152603160248201527f4f6e6c79204f776e65722063616e2077697468647261772061667465722074696044820152701b59481b1a5b5a5d081c9d5b9cc81bdd5d607a1b6064820152608401610c75565b600e5447906001600160a01b03166108fc610ec6606484612d79565b610ed190600f612d8d565b6040518115909202916000818181858888f19350505050158015610ef9573d6000803e3d6000fd5b506009546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015610f33573d6000803e3d6000fd5b5050565b610ceb83838360405180602001604052806000815250611850565b6000805b610f5e610c3d565b8111610d31576000818152601960205260409020546000191215610f80578091505b80610f8a81612d2b565b915050610f56565b6008546001600160a01b03163314610fbc5760405162461bcd60e51b8152600401610c7590612d44565b6011610f338282612df2565b601254610100900460ff1661101f5760405162461bcd60e51b815260206004820152601f60248201527f5468652067616d6520686173206e6f7420636f6e636c756465642079657421006044820152606401610c75565b60175460ff16156110845760405162461bcd60e51b815260206004820152602960248201527f546865207072697a6520706f6f6c2068617320616c7265616479206265656e2060448201526870616964206f75742160b81b6064820152608401610c75565b600a5447906001600160a01b03166108fc6110a0606484612d79565b6110ab906019612d8d565b6040518115909202916000818181858888f193505050501580156110d3573d6000803e3d6000fd5b50600b546001600160a01b03166108fc6110ee606484612d79565b6110f9906019612d8d565b6040518115909202916000818181858888f19350505050158015611121573d6000803e3d6000fd5b50600c546001600160a01b03166108fc61113c606484612d79565b61114790600a612d8d565b6040518115909202916000818181858888f1935050505015801561116f573d6000803e3d6000fd5b50600d546001600160a01b03166108fc61118a606484612d79565b61119590600a612d8d565b6040518115909202916000818181858888f193505050501580156111bd573d6000803e3d6000fd5b50600e546001600160a01b03166108fc6111d8606484612d79565b6111e390600f612d8d565b6040518115909202916000818181858888f1935050505015801561120b573d6000803e3d6000fd5b506009546040516001600160a01b03909116904780156108fc02916000818181858888f19350505050158015611245573d6000803e3d6000fd5b50506017805460ff19166001179055565b6018818154811061126657600080fd5b600091825260209091200154905081565b6000610a2d8261218c565b6000806112af611290610c3d565b604051806040016040528060018152602001605160f81b815250610bdb565b90505b6112ba610c3d565b6112c5906001612eb2565b8111610d315760008181526019602052604090205460001912156112e857919050565b6112f0610c3d565b81036112fa575060005b8061130481612d2b565b9150506112b2565b6008546001600160a01b031633146113365760405162461bcd60e51b8152600401610c7590612d44565b6000611340610c3d565b600f54909150600160a81b900460ff161561138f5760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e4818db185a5b5959608a1b6044820152606401610c75565b60005b600381101561140a576040805180820190915260008082526001602083015281906019906113c08587612eb2565b6113cb906001612eb2565b8152602080820192909252604001600020825181559101516001909101805460ff1916911515919091179055508061140281612d2b565b915050611392565b50600954611422906001600160a01b031660036123a2565b50600f805460ff60a81b1916600160a81b179055565b60006001600160a01b038216611461576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b6008546001600160a01b031633146114b15760405162461bcd60e51b8152600401610c7590612d44565b6114bb60006123bc565b565b606060038054610a4290612beb565b60006114d6610c3d565b6009549091506001600160a01b0316336001600160a01b0316146115c057600f54600160a01b900460ff166115465760405162461bcd60e51b8152602060048201526016602482015275135a5b9d08191a59081b9bdd081cdd185c9d081e595d60521b6044820152606401610c75565b33600090815260106020526040902054600290611564908490612eb2565b11156115c05760405162461bcd60e51b815260206004820152602560248201527f57616c6c6574206c696d697420726561636865642c20646f6e27742062652067604482015264726565647960d81b6064820152608401610c75565b600082116116105760405162461bcd60e51b815260206004820152601b60248201527f596f75206e65656420746f206d696e74206174206c65617374203100000000006044820152606401610c75565b61115c61161d8383612eb2565b111561167d5760405162461bcd60e51b815260206004820152602960248201527f4e6f742074686174206d616e79204e465473206c6566742c2074727920746f206044820152686d696e74206c65737360b81b6064820152608401610c75565b61115c8111156116ba5760405162461bcd60e51b8152602060048201526008602482015267135a5b9d081bdd5d60c21b6044820152606401610c75565b60005b82811015611734576040805180820190915260008082526001602083015281906019906116ea8587612eb2565b6116f5906001612eb2565b8152602080820192909252604001600020825181559101516001909101805460ff1916911515919091179055508061172c81612d2b565b9150506116bd565b503360009081526010602052604081208054849290611754908490612eb2565b90915550611764905033836123a2565b61115c61176f610c3d565b10610f33576012805460ff191660011790555050565b336001600160a01b038316036117ae5760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6008546001600160a01b031633146118445760405162461bcd60e51b8152600401610c7590612d44565b6016610f338282612df2565b61185b8484846121fb565b6001600160a01b0383163b15611894576118778484848461240e565b611894576040516368d2bf6b60e11b815260040160405180910390fd5b50505050565b6008546001600160a01b031633146118c45760405162461bcd60e51b8152600401610c7590612d44565b600f80546001600160a01b0319166001600160a01b0392909216919091179055565b60606118f182612157565b61193d5760405162461bcd60e51b815260206004820152601e60248201527f5468657265206973206e6f20746f6b656e2077697468207468617420494400006044820152606401610c75565b60006119476124f9565b9050611952836119e6565b156119a757600081511161197557604051806020016040528060008152506119a0565b8061197f84612508565b604051602001611990929190612eca565b6040516020818303038152906040525b9392505050565b60008151116119c557604051806020016040528060008152506119a0565b806119cf84612508565b604051602001611990929190612f09565b50919050565b6000818152601960205260408120548113611a0457506001806119e0565b506000919050565b601254610100900460ff1615611a645760405162461bcd60e51b815260206004820152601a60248201527f506978656c526f79616c652068617320636f6e636c75646564210000000000006044820152606401610c75565b60125460ff16611ab65760405162461bcd60e51b815260206004820152601b60248201527f506978656c526f79616c65206861736e277420737461727465642100000000006044820152606401610c75565b6001611ac0610cf0565b11611b0d5760405162461bcd60e51b815260206004820152601960248201527f576520616c7265616479206861766520612077696e6e657221000000000000006044820152606401610c75565b80600003611b5d5760405162461bcd60e51b815260206004820152601f60248201527f56616c7565206e6565647320746f206265203e206f72203c207468616e2030006044820152606401610c75565b60008281526019602052604090205460001912611bbc5760405162461bcd60e51b815260206004820152601e60248201527f506c6179657220616c7265616479206f7574206f66207468652047616d6500006044820152606401610c75565b600a6000808312611bcf57508180611bdf565b611bdb83600019612f57565b9050805b506006811115611c155760089150600c811115611c1557600791506012811115611c1557600691506018811115611c1557600591505b60008183611c2b600a6611c37937e08000612d79565b611c359190612d8d565b611c3f9190612d8d565b905034811115611c825760405162461bcd60e51b815260206004820152600e60248201526d09cdee840cadcdeeaced0408aa8960931b6044820152606401610c75565b6000841215611d665760008581526019602052604090205460011990611ca9908690612fdc565b13611d025760405162461bcd60e51b815260206004820152602360248201527f547279206c6573732061747461636b73202d2077617272696f72206f7665726b6044820152621a5b1b60ea1b6064820152608401610c75565b3360009081526014602052604081208054849290611d21908490612eb2565b9091555050601554336000908152601460205260409020541115611d665733600081815260146020526040902054601555600b80546001600160a01b03191690911790555b600085815260196020526040812054611d80908690612fdc565b12611db557600085815260196020526040902054611d9f908590612fdc565b6000868152601960205260409020819055611dcb565b6000858152601960205260409020600019908190555b50600b54604080513381526001600160a01b03909216602083015281810187905260608201869052517f839addad4015ebc388eeef379933be23a67469946852fd491900cdacf4e115e69181900360800190a1611e2734612557565b60185415611e3757611e37612588565b600f546001600160a01b0316611e4c866119e6565b611f16576001600160a01b03811663799e575a336040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381600087803b158015611ea157600080fd5b505af1158015611eb5573d6000803e3d6000fd5b5050506000878152601960205260409020600101805460ff19169055507f91572ab91eb250a4305c0e93d6cadf30656ea244dddd7b49e1466c647e8f9ea033604080516001600160a01b039092168252602082018990520160405180910390a15b6002611f20610cf0565b1015612068576012805461ff001916610100179055611f406106a1610f52565b600a60006101000a8154816001600160a01b0302191690836001600160a01b03160217905550611f946106a161115c604051806040016040528060078152602001662bb0b93934b7b960c91b815250610bdb565b600c80546001600160a01b0319166001600160a01b039283161790558116636352211e611fe8611fc7600161115c61301d565b6040518060400160405280600381526020016254616760e81b815250610bdb565b6040518263ffffffff1660e01b815260040161200691815260200190565b602060405180830381865afa158015612023573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120479190613034565b600d80546001600160a01b0319166001600160a01b03929092169190911790555b505050505050565b6008546001600160a01b0316331461209a5760405162461bcd60e51b8152600401610c7590612d44565b6001600160a01b0381166120ff5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610c75565b612108816123bc565b50565b6008546001600160a01b031633146121355760405162461bcd60e51b8152600401610c7590612d44565b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b60008160011115801561216b575060005482105b8015610a2d575050600090815260046020526040902054600160e01b161590565b600081806001116121e2576000548110156121e25760008181526004602052604081205490600160e01b821690036121e0575b806000036119a05750600019016000818152600460205260409020546121bf565b505b604051636f96cda160e11b815260040160405180910390fd5b60006122068261218c565b9050836001600160a01b0316816001600160a01b0316146122395760405162a1148160e81b815260040160405180910390fd5b6000336001600160a01b038616148061225757506122578533610960565b8061227257503361226784610ac5565b6001600160a01b0316145b90508061229257604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0384166122b957604051633a954ecd60e21b815260040160405180910390fd5b600083815260066020908152604080832080546001600160a01b03191690556001600160a01b038881168452600583528184208054600019019055871683528083208054600101905585835260049091528120600160e11b4260a01b871781179091558316900361235a576001830160008181526004602052604081205490036123585760005481146123585760008181526004602052604090208390555b505b82846001600160a01b0316866001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a45050505050565b610f33828260405180602001604052806000815250612672565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290612443903390899088908890600401613051565b6020604051808303816000875af192505050801561247e575060408051601f3d908101601f1916820190925261247b9181019061308e565b60015b6124dc573d8080156124ac576040519150601f19603f3d011682016040523d82523d6000602084013e6124b1565b606091505b5080516000036124d4576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b606060118054610a4290612beb565b604080516080810191829052607f0190826030600a8206018353600a90045b801561254557600183039250600a81066030018353600a9004612527565b50819003601f19909101908152919050565b6018612564606483612d79565b61256f906031612d8d565b8154600181018355600092835260209092209091015550565b6125a2600860405180602001604052806000815250610bdb565b60040361263657336108fc6125b56127e6565b6040518115909202916000818181858888f193505050501580156125dd573d6000803e3d6000fd5b507fe046c7220b7585b547aeeb53022a609f95e11e82fa9beb690b0ecbe602ca3fe0336126086127e6565b604080516001600160a01b03909316835260208301919091520160405180910390a16114bb60186000612831565b7fc3f6b4391a457a4081c871f50ebff62df7b0df3edff62d4bbdd2760080c2ae8861265f6127e6565b60405190815260200160405180910390a1565b6000546001600160a01b03841661269b57604051622e076360e81b815260040160405180910390fd5b826000036126bc5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03841660008181526005602090815260408083208054680100000000000000018902019055848352600490915290204260a01b86176001861460e11b1790558190818501903b15612791575b60405182906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461275a600087848060010195508761240e565b612777576040516368d2bf6b60e11b815260040160405180910390fd5b80821061270f57826000541461278c57600080fd5b6127d6565b5b6040516001830192906001600160a01b038816906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a4808210612792575b5060009081556118949085838684565b6000805b601854811015610d315760188181548110612807576128076130ab565b90600052602060002001548261281d9190612eb2565b91508061282981612d2b565b9150506127ea565b508054600082559060005260206000209081019061210891905b80821115610d31576000815560010161284b565b6001600160e01b03198116811461210857600080fd5b60006020828403121561288757600080fd5b81356119a08161285f565b60005b838110156128ad578181015183820152602001612895565b838111156118945750506000910152565b600081518084526128d6816020860160208601612892565b601f01601f19169290920160200192915050565b6020815260006119a060208301846128be565b60006020828403121561290f57600080fd5b5035919050565b6001600160a01b038116811461210857600080fd5b6000806040838503121561293e57600080fd5b823561294981612916565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561298857612988612957565b604051601f8501601f19908116603f011681019082821181831017156129b0576129b0612957565b816040528093508581528686860111156129c957600080fd5b858560208301376000602087830101525050509392505050565b600082601f8301126129f457600080fd5b6119a08383356020850161296d565b60008060408385031215612a1657600080fd5b82359150602083013567ffffffffffffffff811115612a3457600080fd5b612a40858286016129e3565b9150509250929050565b600080600060608486031215612a5f57600080fd5b8335612a6a81612916565b92506020840135612a7a81612916565b929592945050506040919091013590565b600060208284031215612a9d57600080fd5b813567ffffffffffffffff811115612ab457600080fd5b610c33848285016129e3565b600060208284031215612ad257600080fd5b81356119a081612916565b60008060408385031215612af057600080fd5b8235612afb81612916565b915060208301358015158114612b1057600080fd5b809150509250929050565b60008060008060808587031215612b3157600080fd5b8435612b3c81612916565b93506020850135612b4c81612916565b925060408501359150606085013567ffffffffffffffff811115612b6f57600080fd5b8501601f81018713612b8057600080fd5b612b8f8782356020840161296d565b91505092959194509250565b60008060408385031215612bae57600080fd5b8235612bb981612916565b91506020830135612b1081612916565b60008060408385031215612bdc57600080fd5b50508035926020909101359150565b600181811c90821680612bff57607f821691505b6020821081036119e057634e487b7160e01b600052602260045260246000fd5b60008151612c31818560208601612892565b9290920192915050565b8581526000602086818401526bffffffffffffffffffffffff198660601b166040840152605460008654612c6e81612beb565b60018281168015612c865760018114612c9f57612ccf565b60ff198416898701528215158302890186019450612ccf565b8a6000528660002060005b84811015612cc55781548b8201890152908301908801612caa565b505085838a010194505b50505050612cdd8187612c1f565b9a9950505050505050505050565b634e487b7160e01b600052601260045260246000fd5b600082612d1057612d10612ceb565b500690565b634e487b7160e01b600052601160045260246000fd5b600060018201612d3d57612d3d612d15565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600082612d8857612d88612ceb565b500490565b6000816000190483118215151615612da757612da7612d15565b500290565b601f821115610ceb57600081815260208120601f850160051c81016020861015612dd35750805b601f850160051c820191505b8181101561206857828155600101612ddf565b815167ffffffffffffffff811115612e0c57612e0c612957565b612e2081612e1a8454612beb565b84612dac565b602080601f831160018114612e555760008415612e3d5750858301515b600019600386901b1c1916600185901b178555612068565b600085815260208120601f198616915b82811015612e8457888601518255948401946001909101908401612e65565b5085821015612ea25787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008219821115612ec557612ec5612d15565b500190565b60008351612edc818460208801612892565b835190830190612ef0818360208801612892565b64173539b7b760d91b9101908152600501949350505050565b60008351612f1b818460208801612892565b601960fa1b9083019081528351612f39816001840160208801612892565b64173539b7b760d91b60019290910191820152600601949350505050565b60006001600160ff1b0381841382841380821686840486111615612f7d57612f7d612d15565b600160ff1b6000871282811687830589121615612f9c57612f9c612d15565b60008712925087820587128484161615612fb857612fb8612d15565b87850587128184161615612fce57612fce612d15565b505050929093029392505050565b600080821280156001600160ff1b0384900385131615612ffe57612ffe612d15565b600160ff1b839003841281161561301757613017612d15565b50500190565b60008282101561302f5761302f612d15565b500390565b60006020828403121561304657600080fd5b81516119a081612916565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613084908301846128be565b9695505050505050565b6000602082840312156130a057600080fd5b81516119a08161285f565b634e487b7160e01b600052603260045260246000fdfea26469706673582212200dd0fbefde9d0e3b16cc1515d2786d30cbda2307cd05be8dd59686518aea2ce364736f6c634300080f0033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.