ERC-721
NFT
Overview
Max Total Supply
3,406 CHAIN
Holders
784
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 CHAINLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Chains
Compiler Version
v0.8.0+commit.c7dfd78e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./IBallerBars.sol"; import "./ChainsLibrary.sol"; contract Chains is ERC721Enumerable, Ownable { using ChainsLibrary for uint8; using ECDSA for bytes32; struct Trait { string traitName; string traitType; string pixels; uint256 pixelCount; } // Price uint256 public price = 0.05 ether; //Mappings mapping(uint256 => Trait[]) public traitTypes; mapping(string => bool) hashToMinted; mapping(uint256 => string) internal tokenIdToHash; mapping(uint256 => uint256) internal tokenIdToTimestamp; mapping(uint256 => uint256) internal tokenIdToRarityCount; //uint256s uint256 public MAX_SUPPLY = 6000; uint256 public MAX_PER_MINT = 5; uint256 public MAX_MINTS_FOR_ETHER = 2000; uint256 SEED_NONCE = 0; //string arrays string[] LETTERS = [ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" ]; //uint arrays uint16[][8] TIERS; //address address ballerbarsAddress; address _owner; uint256 public privateAmountMinted; bool public saleLive; mapping(string => bool) private _usedNonces; address private _artistAddress = 0x695652942cD5bE0Fe488645974dF15c3782fd552; address private _signerAddress = 0xCBf2a728bDFDb683573a88E1c359FE892f9De049; constructor() ERC721("Chains", "CHAIN") { _owner = msg.sender; //Declare all the rarity tiers //Clairty (1) <= 2 TIERS[0] = [50, 450, 2000, 3000, 4500]; //Gem (2) <= 2 TIERS[1] = [50, 100, 750, 1000, 1100, 1200, 1300, 1400, 1500, 1600]; //Chain Gems (3) <= 3 TIERS[2] = [50, 100, 200, 800, 1100, 1200, 1300, 1450, 1650, 2150]; //Chain (4) rares <= 3 TIERS[3] = [50, 100, 400, 1450, 1700, 1900, 2100, 2300]; //Watermark (5) <= 7 TIERS[4] = [50, 100, 200, 200, 200, 300, 500, 8450]; //Background (6) <= 7 TIERS[5] = [50, 100, 200, 200, 200, 300, 500, 8450]; } /** * @dev Converts a digit from 0 - 10000 into its corresponding rarity based on the given rarity tier. * @param _randinput The input from 0 - 10000 to use for rarity gen. * @param _rarityTier The tier to use. */ function rarityGen(uint256 tokenId, uint256 _randinput, uint8 _rarityTier) internal returns (string memory) { uint16 currentLowerBound = 0; for (uint8 i = 0; i < TIERS[_rarityTier].length; i++) { uint16 thisPercentage = TIERS[_rarityTier][i]; if ( _randinput >= currentLowerBound && _randinput < currentLowerBound + thisPercentage ) { if ( ( _rarityTier == 0 && i <= 2 ) || ( _rarityTier == 1 && i <= 2 ) || ( _rarityTier == 2 && i <= 3 ) || ( _rarityTier == 3 && i <= 3 ) || ( _rarityTier == 4 && i <= 7 ) || ( _rarityTier == 5 && i <= 7 ) ) { tokenIdToRarityCount[tokenId] += 1; } return i.toString(); } currentLowerBound = currentLowerBound + thisPercentage; } revert(); } /** * @dev Generates a 7 digit hash from a tokenId, address, and random number. * @param _t The token id to be used within the hash. * @param _a The address to be used within the hash. * @param _c The custom nonce to be used within the hash. */ function hash( uint256 _t, address _a, uint256 _c ) internal returns (string memory) { require(_c < 10); // This will generate a 7 character string. // The last 6 digits are random, the first is 0, due to the chain is not being burned. string memory currentHash = "0"; for (uint8 i = 0; i < 6; i++) { SEED_NONCE++; uint16 _randinput = uint16( uint256( keccak256( abi.encodePacked( block.timestamp, block.difficulty, _t, _a, _c, SEED_NONCE ) ) ) % 10000 ); currentHash = string( abi.encodePacked(currentHash, rarityGen(_t, _randinput, i)) ); } if (hashToMinted[currentHash]) return hash(_t, _a, _c + 1); return currentHash; } /** * @dev Returns the current baller bar cost of a mint. */ function currentBallerBarsCost() public view returns (uint256) { uint256 _totalSupply = totalSupply(); if (_totalSupply <= 3000) return 4 ether; if (_totalSupply > 3000 && _totalSupply <= 4000) return 8 ether; if (_totalSupply > 4000 && _totalSupply <= 5000) return 16 ether; return 24 ether; } /** * @dev Changes the price */ function changePrice(uint256 _newPrice) public onlyOwner { price = _newPrice; } function hashTransaction(address sender, uint256 qty, string memory nonce) private pure returns(bytes32) { bytes32 signerHash = keccak256(abi.encodePacked(sender, qty, nonce)); return signerHash; } function matchAddresSigner(bytes32 signerHash, bytes memory signature) private view returns(bool) { return _signerAddress == signerHash.toEthSignedMessageHash().recover(signature); } function buy(bytes32 signerHash, bytes memory signature, string memory nonce, uint256 tokenQuantity) external payable { require(saleLive, "SALE_CLOSED"); require(matchAddresSigner(signerHash, signature), "DIRECT_MINT_DISALLOWED"); require(!_usedNonces[nonce], "HASH_USED"); require(hashTransaction(msg.sender, tokenQuantity, nonce) == signerHash, "HASH_FAIL"); require(totalSupply() <= MAX_MINTS_FOR_ETHER, "OUT_OF_STOCK_FOR_ETHER"); require(tokenQuantity <= MAX_PER_MINT, "EXCEED_PER_MINT"); require(price * tokenQuantity <= msg.value, "INSUFFICIENT_ETH"); for(uint256 i = 0; i < tokenQuantity; i++) { mintInternal(); } _usedNonces[nonce] = true; } /** * @dev Mint internal, this is to avoid code duplication. */ function mintInternal() internal { uint256 _totalSupply = totalSupply(); require(_totalSupply < MAX_SUPPLY); require(!ChainsLibrary.isContract(msg.sender)); uint256 thisTokenId = _totalSupply; tokenIdToHash[thisTokenId] = hash(thisTokenId, msg.sender, 0); hashToMinted[tokenIdToHash[thisTokenId]] = true; tokenIdToTimestamp[thisTokenId] = block.timestamp; _mint(msg.sender, thisTokenId); } function mintReserve(uint256 tokenQuantity) onlyOwner external { for (uint256 i = 0; i < tokenQuantity; i++) { require(totalSupply() < 35); // Reserved for teams and giveaways mintInternal(); } } /** * @dev Mint for BallerBars */ function mintChainWithToken(uint256 tokenQuantity) public { //Burn this much baller bars require(totalSupply() >= MAX_MINTS_FOR_ETHER, "minting with BBs is only allowed when the first 2k is minted" ); require(tokenQuantity <= MAX_PER_MINT, "EXCEED_PER_MINT"); for (uint256 i = 0; i < tokenQuantity; i++) { IBallerBars(ballerbarsAddress).burnFrom(msg.sender, currentBallerBarsCost()); mintInternal(); } } /** * @dev Burns and mints new. * @param _tokenId The token to burn. */ function burnForMint(uint256 _tokenId) public { require(totalSupply() >= MAX_MINTS_FOR_ETHER, "Burning is only allowed when the first 2k is minted" ); require(ownerOf(_tokenId) == msg.sender); //Burn token _transfer( msg.sender, 0x000000000000000000000000000000000000dEaD, _tokenId ); mintInternal(); } function withdraw() external onlyOwner { payable(_artistAddress).transfer(address(this).balance / 10); payable(msg.sender).transfer(address(this).balance); } /** * @dev Helper function to reduce pixel size within contract */ function letterToNumber(string memory _inputLetter) internal view returns (uint8) { for (uint8 i = 0; i < LETTERS.length; i++) { if ( keccak256(abi.encodePacked((LETTERS[i]))) == keccak256(abi.encodePacked((_inputLetter))) ) return (i + 1); } revert(); } /** * @dev Hash to SVG function */ function hashToSVG(string memory _hash) public view returns (string memory) { string memory svgString; string memory bgString; string memory bgColor; // bool[24][24] memory placedPixels; uint8 bgIndex = ChainsLibrary.parseInt(ChainsLibrary.substring(_hash, 6, 7)); // BG if ( bgIndex == 0 ) { bgColor = "2596be"; } else if ( bgIndex == 1 ) { bgColor = "10447c"; } else if ( bgIndex == 2 ) { bgColor = "c8fcfc"; } else if ( bgIndex == 3 ) { bgColor = "383434"; } else if ( bgIndex == 4 ) { bgColor = "ffe4bc"; } else if ( bgIndex == 5 ) { bgColor = "d0ccfc"; }else if ( bgIndex == 6 ) { bgColor = "e0dcdc"; } if ( bgIndex < 7 ) { // bg color 7 is none bgString = string( abi.encodePacked( 'style="background-color:#', bgColor, '" ' ) ); } else { bgString = ""; } for (uint8 i = 0; i < 6; i++) { // 7 (we should skip BG here, so 6 will be final) uint8 thisTraitIndex = ChainsLibrary.parseInt( ChainsLibrary.substring(_hash, i, i + 1) ); for ( uint16 j = 0; j < traitTypes[i][thisTraitIndex].pixelCount; // < j++ ) { string memory thisPixel = ChainsLibrary.substring( traitTypes[i][thisTraitIndex].pixels, j * 4, j * 4 + 4 ); uint8 x = letterToNumber( ChainsLibrary.substring(thisPixel, 0, 1) ); uint8 y = letterToNumber( ChainsLibrary.substring(thisPixel, 1, 2) ); if (placedPixels[x][y]) continue; svgString = string( abi.encodePacked( svgString, "<rect class='c", ChainsLibrary.substring(thisPixel, 2, 4), "' x='", x.toString(), "' y='", y.toString(), "'/>" ) ); placedPixels[x][y] = true; } } svgString = string( abi.encodePacked( '<svg id="c" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" viewBox="0 0 26 26" ',bgString,' > ', svgString, "<style>rect{width:1px;height:1px;}#c{shape-rendering: crispedges;}.c00{fill:#d844cf}.c01{fill:#f1f1f1}.c02{fill:#ff4b54}.c03{fill:#ff6b71}.c04{fill:#ff5c64}.c05{fill:#ff132f}.c06{fill:#ff4651}.c07{fill:#ff444f}.c08{fill:#ff3644}.c09{fill:#ff3543}.c10{fill:#ff3845}.c11{fill:#ff4d57}.c12{fill:#c146fb}.c13{fill:#333aff}.c14{fill:#c2defc}.c15{fill:#eaf4ff}.c16{fill:#e3eefa}.c17{fill:#cfe4fa}.c18{fill:#b61ffc}.c19{fill:#bf42fb}.c20{fill:#bc35fb}.c21{fill:#bd36fb}.c22{fill:#fee4bf}.c23{fill:#ff8800}.c24{fill:#ffd300}.c25{fill:#ffc200}.c26{fill:#ff9a00}.c27{fill:#ffb100}.c28{fill:#ffa000}.c29{fill:#f6d900}.c30{fill:#f0ce00}.c31{fill:#eed100}.c32{fill:#00e58b}.c33{fill:#00df71}.c34{fill:#00e280}.c35{fill:#00cb59}.c36{fill:#00d874}.c37{fill:#00d963}.c38{fill:#00d36c}.c39{fill:#00de7c}.c40{fill:#ebb7a5}.c41{fill:#e3aa96}.c42{fill:#094378}.c43{fill:#c1a900}.c44{fill:#dcc000}.c45{fill:#fade11}.c46{fill:#f8dc09}.c47{fill:#00c5e6}.c48{fill:#dcdcdc}.c49{fill:#c1f8f9}.c50{fill:#b2b8b9}.c51{fill:#aab0b1}.c52{fill:#b0b4b5}.c53{fill:#e2a38d}.c54{fill:#eba992}.c55{fill:#e8b2a0}.c56{fill:#ff0043}.c57{fill:#f6767b}.c58{fill:#c74249}.c59{fill:#aa343a}.c60{fill:#4047ff}.c61{fill:#585eff}.c62{fill:#4d54ff}.c63{fill:#222bff}.c64{fill:#3d44ff}.c65{fill:#3b42ff}.c66{fill:#3239ff}.c67{fill:#343bff}.c68{fill:#4249ff}.c69{fill:#333333}.c70{fill:#222222}.c71{fill:#ccccff}</style></svg>" ) ); return svgString; } /** * @dev Hash to metadata function */ function hashToMetadata(string memory _hash, uint256 _tokenId) public view returns (string memory) { string memory metadataString; for (uint8 i = 0; i < 7; i++) { //9 uint8 thisTraitIndex = ChainsLibrary.parseInt( ChainsLibrary.substring(_hash, i, i + 1) ); metadataString = string( abi.encodePacked( metadataString, '{"trait_type":"', traitTypes[i][thisTraitIndex].traitType, '","value":"', traitTypes[i][thisTraitIndex].traitName, '"},' ) ); } metadataString = string(abi.encodePacked(metadataString, '{"display_type": "boost_number", "trait_type": "BB Boost", "value":',ChainsLibrary.toString(tokenIdToRarityCount[_tokenId]),'}')); return string(abi.encodePacked("[", metadataString, "]")); } /** * @dev Returns the SVG and metadata for a token Id * @param _tokenId The tokenId to return the SVG and metadata for. */ function tokenURI(uint256 _tokenId) public view override returns (string memory) { require(_exists(_tokenId)); string memory tokenHash = _tokenIdToHash(_tokenId); return string( abi.encodePacked( "data:application/json;base64,", ChainsLibrary.encode( bytes( string( abi.encodePacked( '{"name": "BlockChain #', ChainsLibrary.toString(_tokenId), '", "description": "The BlockChains collection serves as the first phase of Ben Baller Did The BlockChain.", "image": "data:image/svg+xml;base64,', ChainsLibrary.encode( bytes(hashToSVG(tokenHash)) ), '","attributes":', hashToMetadata(tokenHash, _tokenId), "}" ) ) ) ) ) ); } /** * @dev Returns a hash for a given tokenId * @param _tokenId The tokenId to return the hash for. */ function _tokenIdToHash(uint256 _tokenId) public view returns (string memory) { string memory tokenHash = tokenIdToHash[_tokenId]; //If this is a burned token, override the previous hash if (ownerOf(_tokenId) == 0x000000000000000000000000000000000000dEaD) { tokenHash = string( abi.encodePacked( "1", ChainsLibrary.substring(tokenHash, 1, 9) ) ); } return tokenHash; } /** * @dev Returns the mint timestamp of a tokenId * @param _tokenId The tokenId to return the timestamp for. */ function getTokenTimestamp(uint256 _tokenId) public view returns (uint256) { return tokenIdToTimestamp[_tokenId]; } /** * @dev Returns the number of rare assets of a tokenId * @param _tokenId The tokenId to return the number of rare assets for. */ function getTokenRarityCount(uint256 _tokenId) public view returns (uint256) { return tokenIdToRarityCount[_tokenId]; } /** * @dev Returns the wallet of a given wallet. Mainly for ease for frontend devs. * @param _wallet The wallet to get the tokens of. */ function walletOfOwner(address _wallet) public view returns (uint256[] memory) { uint256 tokenCount = balanceOf(_wallet); uint256[] memory tokensId = new uint256[](tokenCount); for (uint256 i; i < tokenCount; i++) { tokensId[i] = tokenOfOwnerByIndex(_wallet, i); } return tokensId; } function toggleSaleStatus() external onlyOwner { saleLive = !saleLive; } function setSignerAddress(address addr) external onlyOwner { _signerAddress = addr; } /** * @dev Add a trait type * @param _traitTypeIndex The trait type index * @param traits Array of traits to add */ function addTraitType(uint256 _traitTypeIndex, Trait[] memory traits) public onlyOwner { for (uint256 i = 0; i < traits.length; i++) { traitTypes[_traitTypeIndex].push( Trait( traits[i].traitName, traits[i].traitType, traits[i].pixels, traits[i].pixelCount ) ); } return; } /** * @dev Sets the diamonds ERC20 address * @param _ballerbarsAddress The diamonds address */ function setBallerBarsAddress(address _ballerbarsAddress) public onlyOwner { ballerbarsAddress = _ballerbarsAddress; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; interface IBallerBars is IERC20 { function burnFrom(address account, uint256 amount) external; // function getTokensStaked(address staker) external returns (uint256[] memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library ChainsLibrary { string internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; function encode(bytes memory data) internal pure returns (string memory) { if (data.length == 0) return ""; // load the table into memory string memory table = TABLE; // 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) { } { dataPtr := add(dataPtr, 3) // read 3 bytes let input := mload(dataPtr) // write 4 characters mstore( resultPtr, shl(248, mload(add(tablePtr, and(shr(18, input), 0x3F)))) ) resultPtr := add(resultPtr, 1) mstore( resultPtr, shl(248, mload(add(tablePtr, and(shr(12, input), 0x3F)))) ) resultPtr := add(resultPtr, 1) mstore( resultPtr, shl(248, mload(add(tablePtr, and(shr(6, input), 0x3F)))) ) resultPtr := add(resultPtr, 1) mstore( resultPtr, shl(248, 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; } /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { 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); } function parseInt(string memory _a) internal pure returns (uint8 _parsedInt) { bytes memory bresult = bytes(_a); uint8 mint = 0; for (uint8 i = 0; i < bresult.length; i++) { if ( (uint8(uint8(bresult[i])) >= 48) && (uint8(uint8(bresult[i])) <= 57) ) { mint *= 10; mint += uint8(bresult[i]) - 48; } } return mint; } function substring( string memory str, uint256 startIndex, uint256 endIndex ) internal pure returns (string memory) { bytes memory strBytes = bytes(str); bytes memory result = new bytes(endIndex - startIndex); for (uint256 i = startIndex; i < endIndex; i++) { result[i - startIndex] = strBytes[i]; } return string(result); } function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "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"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"MAX_MINTS_FOR_ETHER","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PER_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"_tokenIdToHash","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_traitTypeIndex","type":"uint256"},{"components":[{"internalType":"string","name":"traitName","type":"string"},{"internalType":"string","name":"traitType","type":"string"},{"internalType":"string","name":"pixels","type":"string"},{"internalType":"uint256","name":"pixelCount","type":"uint256"}],"internalType":"struct Chains.Trait[]","name":"traits","type":"tuple[]"}],"name":"addTraitType","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"burnForMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"signerHash","type":"bytes32"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"string","name":"nonce","type":"string"},{"internalType":"uint256","name":"tokenQuantity","type":"uint256"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newPrice","type":"uint256"}],"name":"changePrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentBallerBarsCost","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getTokenRarityCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"getTokenTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_hash","type":"string"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"hashToMetadata","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"_hash","type":"string"}],"name":"hashToSVG","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenQuantity","type":"uint256"}],"name":"mintChainWithToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenQuantity","type":"uint256"}],"name":"mintReserve","outputs":[],"stateMutability":"nonpayable","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":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"privateAmountMinted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleLive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_ballerbarsAddress","type":"address"}],"name":"setBallerBarsAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setSignerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"toggleSaleStatus","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"traitTypes","outputs":[{"internalType":"string","name":"traitName","type":"string"},{"internalType":"string","name":"traitType","type":"string"},{"internalType":"string","name":"pixels","type":"string"},{"internalType":"uint256","name":"pixelCount","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":"_wallet","type":"address"}],"name":"walletOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
66b1a2bc2ec50000600b5561177060115560056012556107d0601355600060145560016103c0818152606160f81b6103e0526080908152610400828152603160f91b6104205260a052610440828152606360f81b6104605260c052610480828152601960fa1b6104a05260e0526104c0828152606560f81b6104e05261010052610500828152603360f91b6105205261012052610540828152606760f81b6105605261014052610580828152600d60fb1b6105a052610160526105c0828152606960f81b6105e05261018052610600828152603560f91b610620526101a052610640828152606b60f81b610660526101c052610680828152601b60fa1b6106a0526101e0526106c0828152606d60f81b6106e05261020052610700828152603760f91b6107205261022052610740828152606f60f81b6107605261024052610780828152600760fc1b6107a052610260526107c0828152607160f81b6107e05261028052610800828152603960f91b610820526102a052610840828152607360f81b610860526102c052610880828152601d60fa1b6108a0526102e0526108c0828152607560f81b6108e05261030052610900828152603b60f91b6109205261032052610940828152607760f81b6109605261034052610980828152600f60fb1b6109a052610360526109c0828152607960f81b6109e05261038052610a40604052610a00918252603d60f91b610a20526103a0919091526200022790601590601a62000585565b50602380546001600160a01b031990811673695652942cd5be0fe488645974df15c3782fd552179091556024805490911673cbf2a728bdfdb683573a88e1c359fe892f9de0491790553480156200027d57600080fd5b506040805180820182526006815265436861696e7360d01b60208083019182528351808501909452600584526421a420a4a760d91b908401528151919291620002c991600091620005e9565b508051620002df906001906020840190620005e9565b505050620002fc620002f66200052f60201b60201c565b62000533565b601f80546001600160a01b031916331790556040805160a081018252603281526101c260208201526107d091810191909152610bb8606082015261119460808201526200034e90601690600562000674565b50604080516101408101825260328152606460208201526102ee918101919091526103e8606082015261044c60808201526104b060a082015261051460c082015261057860e08201526105dc610100820152610640610120820152620003b990601790600a62000674565b506040805161014081018252603281526064602082015260c891810191909152610320606082015261044c60808201526104b060a082015261051460c08201526105aa60e08201526106726101008201526108666101208201526200042390601890600a62000674565b5060408051610100810182526032815260646020820152610190918101919091526105aa60608201526106a4608082015261076c60a082015261083460c08201526108fc60e08201526200047c90601990600862000674565b506040805161010081018252603281526064602082015260c891810182905260608101829052608081019190915261012c60a08201526101f460c082015261210260e0820152620004d290601a90600862000674565b506040805161010081018252603281526064602082015260c891810182905260608101829052608081019190915261012c60a08201526101f460c082015261210260e08201526200052890601b90600862000674565b50620007d9565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054828255906000526020600020908101928215620005d7579160200282015b82811115620005d75782518051620005c6918491602090910190620005e9565b5091602001919060010190620005a6565b50620005e59291506200071f565b5090565b828054620005f7906200079c565b90600052602060002090601f0160209004810192826200061b576000855562000666565b82601f106200063657805160ff191683800117855562000666565b8280016001018555821562000666579182015b828111156200066657825182559160200191906001019062000649565b50620005e592915062000740565b82805482825590600052602060002090600f01601090048101928215620006665791602002820160005b83821115620006e057835183826101000a81548161ffff021916908361ffff16021790555092602001926002016020816001010492830192600103026200069e565b8015620007105782816101000a81549061ffff0219169055600201602081600101049283019260010302620006e0565b5050620005e592915062000740565b80821115620005e557600062000736828262000757565b506001016200071f565b5b80821115620005e5576000815560010162000741565b50805462000765906200079c565b6000825580601f1062000779575062000799565b601f01602090049060005260206000209081019062000799919062000740565b50565b600281046001821680620007b157607f821691505b60208210811415620007d357634e487b7160e01b600052602260045260246000fd5b50919050565b61508080620007e96000396000f3fe60806040526004361061025b5760003560e01c80636352211e11610144578063a31a279b116100b6578063d93dfe881161007a578063d93dfe88146106cb578063e081b781146106eb578063e1f3a61a14610700578063e985e9c514610715578063f2fde38b14610735578063f906751b146107555761025b565b8063a31a279b14610636578063b88d4fde1461064b578063b9e6cfad1461066b578063c4ef71c71461068b578063c87b56dd146106ab5761025b565b80638da5cb5b116101085780638da5cb5b146105a457806395d89b41146105b95780639ec70f19146105ce578063a035b1fe146105e1578063a22cb465146105f6578063a2b40d19146106165761025b565b80636352211e1461050f5780636ade3ace1461052f57806370a082311461054f578063715018a61461056f57806389ce3074146105845761025b565b806321a16b0c116101dd57806334a591f0116101a157806334a591f0146104585780633ccfd60b1461047857806342842e0e1461048d578063438b6300146104ad5780634f6ccce7146104da57806359a12ad5146104fa5761025b565b806321a16b0c146103b357806323b872dd146103d35780632f745c59146103f35780632fb098d21461041357806332cb6b0c146104435761025b565b806306fdde031161022457806306fdde0314610327578063081812fc1461033c578063095ea7b31461036957806309d42b301461038957806318160ddd1461039e5761025b565b80625ea3071461026057806301ffc9a714610296578063046dc166146102c3578063049c5c49146102e557806304a19220146102fa575b600080fd5b34801561026c57600080fd5b5061028061027b366004613678565b610775565b60405161028d91906145b5565b60405180910390f35b3480156102a257600080fd5b506102b66102b13660046135ca565b61086e565b60405161028d919061458c565b3480156102cf57600080fd5b506102e36102de366004613408565b610893565b005b3480156102f157600080fd5b506102e36108fd565b34801561030657600080fd5b5061031a610315366004613678565b610950565b60405161028d9190614d81565b34801561033357600080fd5b50610280610962565b34801561034857600080fd5b5061035c610357366004613678565b6109f5565b60405161028d91906144de565b34801561037557600080fd5b506102e361038436600461352f565b610a38565b34801561039557600080fd5b5061031a610ad0565b3480156103aa57600080fd5b5061031a610ad6565b3480156103bf57600080fd5b5061031a6103ce366004613678565b610adc565b3480156103df57600080fd5b506102e36103ee366004613454565b610aee565b3480156103ff57600080fd5b5061031a61040e36600461352f565b610b26565b34801561041f57600080fd5b5061043361042e3660046137c1565b610b78565b60405161028d94939291906145c8565b34801561044f57600080fd5b5061031a610d5d565b34801561046457600080fd5b506102e3610473366004613408565b610d63565b34801561048457600080fd5b506102e3610dc4565b34801561049957600080fd5b506102e36104a8366004613454565b610e75565b3480156104b957600080fd5b506104cd6104c8366004613408565b610e90565b60405161028d9190614548565b3480156104e657600080fd5b5061031a6104f5366004613678565b610f4e565b34801561050657600080fd5b5061031a610fa9565b34801561051b57600080fd5b5061035c61052a366004613678565b610faf565b34801561053b57600080fd5b506102e361054a366004613678565b610fe4565b34801561055b57600080fd5b5061031a61056a366004613408565b6110c1565b34801561057b57600080fd5b506102e3611105565b34801561059057600080fd5b5061028061059f366004613602565b611150565b3480156105b057600080fd5b5061035c611628565b3480156105c557600080fd5b50610280611637565b6102e36105dc366004613558565b611646565b3480156105ed57600080fd5b5061031a6117cd565b34801561060257600080fd5b506102e36106113660046134f5565b6117d3565b34801561062257600080fd5b506102e3610631366004613678565b6118a1565b34801561064257600080fd5b5061031a6118e5565b34801561065757600080fd5b506102e361066636600461348f565b6118eb565b34801561067757600080fd5b50610280610686366004613635565b61192a565b34801561069757600080fd5b506102e36106a6366004613678565b611a86565b3480156106b757600080fd5b506102806106c6366004613678565b611ae1565b3480156106d757600080fd5b506102e36106e6366004613690565b611b76565b3480156106f757600080fd5b506102b6611d25565b34801561070c57600080fd5b5061031a611d2e565b34801561072157600080fd5b506102b6610730366004613422565b611db7565b34801561074157600080fd5b506102e3610750366004613408565b611de5565b34801561076157600080fd5b506102e3610770366004613678565b611e53565b6000818152600e602052604081208054606092919061079390614f06565b80601f01602080910402602001604051908101604052809291908181526020018280546107bf90614f06565b801561080c5780601f106107e15761010080835404028352916020019161080c565b820191906000526020600020905b8154815290600101906020018083116107ef57829003601f168201915b5050505050905061081c83610faf565b6001600160a01b031661dead6001600160a01b03161415610866576108448160016009611ecb565b6040516020016108549190614429565b60405160208183030381529060405290505b90505b919050565b60006001600160e01b0319821663780e9d6360e01b1480610866575061086682611fc4565b61089b612004565b6001600160a01b03166108ac611628565b6001600160a01b0316146108db5760405162461bcd60e51b81526004016108d290614af8565b60405180910390fd5b602480546001600160a01b0319166001600160a01b0392909216919091179055565b610905612004565b6001600160a01b0316610916611628565b6001600160a01b03161461093c5760405162461bcd60e51b81526004016108d290614af8565b6021805460ff19811660ff90911615179055565b60009081526010602052604090205490565b60606000805461097190614f06565b80601f016020809104026020016040519081016040528092919081815260200182805461099d90614f06565b80156109ea5780601f106109bf576101008083540402835291602001916109ea565b820191906000526020600020905b8154815290600101906020018083116109cd57829003601f168201915b505050505090505b90565b6000610a0082612008565b610a1c5760405162461bcd60e51b81526004016108d290614aac565b506000908152600460205260409020546001600160a01b031690565b6000610a4382610faf565b9050806001600160a01b0316836001600160a01b03161415610a775760405162461bcd60e51b81526004016108d290614bc9565b806001600160a01b0316610a89612004565b6001600160a01b03161480610aa55750610aa581610730612004565b610ac15760405162461bcd60e51b81526004016108d29061491c565b610acb8383612025565b505050565b60125481565b60085490565b6000908152600f602052604090205490565b610aff610af9612004565b82612093565b610b1b5760405162461bcd60e51b81526004016108d290614c2d565b610acb838383612118565b6000610b31836110c1565b8210610b4f5760405162461bcd60e51b81526004016108d2906146b1565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600c6020528160005260406000208181548110610b9457600080fd5b906000526020600020906004020160009150915050806000018054610bb890614f06565b80601f0160208091040260200160405190810160405280929190818152602001828054610be490614f06565b8015610c315780601f10610c0657610100808354040283529160200191610c31565b820191906000526020600020905b815481529060010190602001808311610c1457829003601f168201915b505050505090806001018054610c4690614f06565b80601f0160208091040260200160405190810160405280929190818152602001828054610c7290614f06565b8015610cbf5780601f10610c9457610100808354040283529160200191610cbf565b820191906000526020600020905b815481529060010190602001808311610ca257829003601f168201915b505050505090806002018054610cd490614f06565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0090614f06565b8015610d4d5780601f10610d2257610100808354040283529160200191610d4d565b820191906000526020600020905b815481529060010190602001808311610d3057829003601f168201915b5050505050908060030154905084565b60115481565b610d6b612004565b6001600160a01b0316610d7c611628565b6001600160a01b031614610da25760405162461bcd60e51b81526004016108d290614af8565b601e80546001600160a01b0319166001600160a01b0392909216919091179055565b610dcc612004565b6001600160a01b0316610ddd611628565b6001600160a01b031614610e035760405162461bcd60e51b81526004016108d290614af8565b6023546001600160a01b03166108fc610e1d600a47614e1a565b6040518115909202916000818181858888f19350505050158015610e45573d6000803e3d6000fd5b5060405133904780156108fc02916000818181858888f19350505050158015610e72573d6000803e3d6000fd5b50565b610acb838383604051806020016040528060008152506118eb565b60606000610e9d836110c1565b905060008167ffffffffffffffff811115610ec857634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610ef1578160200160208202803683370190505b50905060005b82811015610f4657610f098582610b26565b828281518110610f2957634e487b7160e01b600052603260045260246000fd5b602090810291909101015280610f3e81614f63565b915050610ef7565b509392505050565b6000610f58610ad6565b8210610f765760405162461bcd60e51b81526004016108d290614cae565b60088281548110610f9757634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b60205481565b6000818152600260205260408120546001600160a01b0316806108665760405162461bcd60e51b81526004016108d2906149c3565b601354610fef610ad6565b101561100d5760405162461bcd60e51b81526004016108d290614cfa565b60125481111561102f5760405162461bcd60e51b81526004016108d290614a0c565b60005b818110156110bd57601e546001600160a01b03166379cc679033611054611d2e565b6040518363ffffffff1660e01b815260040161107192919061452f565b600060405180830381600087803b15801561108b57600080fd5b505af115801561109f573d6000803e3d6000fd5b505050506110ab612245565b806110b581614f63565b915050611032565b5050565b60006001600160a01b0382166110e95760405162461bcd60e51b81526004016108d290614979565b506001600160a01b031660009081526003602052604090205490565b61110d612004565b6001600160a01b031661111e611628565b6001600160a01b0316146111445760405162461bcd60e51b81526004016108d290614af8565b61114e6000612300565b565b60608060608061115e6132a0565b60006111756111708860066007611ecb565b612352565b905060ff81166111a5576040518060400160405280600681526020016532353936626560d01b81525092506112cd565b8060ff16600114156111d7576040518060400160405280600681526020016531303434376360d01b81525092506112cd565b8060ff1660021415611209576040518060400160405280600681526020016563386663666360d01b81525092506112cd565b8060ff166003141561123b57604051806040016040528060068152602001650cce0ccd0ccd60d21b81525092506112cd565b8060ff166004141561126d576040518060400160405280600681526020016566666534626360d01b81525092506112cd565b8060ff166005141561129f576040518060400160405280600681526020016564306363666360d01b81525092506112cd565b8060ff16600614156112cd576040518060400160405280600681526020016565306463646360d01b81525092505b60078160ff16101561130057826040516020016112ea9190614452565b6040516020818303038152906040529350611313565b6040518060200160405280600081525093505b60005b60068160ff1610156115f95760006113426111708a60ff851661133a866001614df5565b60ff16611ecb565b905060005b600c60008460ff1681526020019081526020016000208260ff168154811061137f57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201600301548161ffff1610156115e45760006114a3600c60008660ff1681526020019081526020016000208460ff16815481106113d957634e487b7160e01b600052603260045260246000fd5b906000526020600020906004020160020180546113f590614f06565b80601f016020809104026020016040519081016040528092919081815260200182805461142190614f06565b801561146e5780601f106114435761010080835404028352916020019161146e565b820191906000526020600020905b81548152906001019060200180831161145157829003601f168201915b50505050508360046114809190614e2e565b61ffff1661148f856004614e2e565b61149a906004614dc0565b61ffff16611ecb565b905060006114bc6114b78360006001611ecb565b612432565b905060006114d06114b78460016002611ecb565b9050878260ff16601881106114f557634e487b7160e01b600052603260045260246000fd5b60200201518160ff166018811061151c57634e487b7160e01b600052603260045260246000fd5b60200201511561152e575050506115d2565b8a61153c8460026004611ecb565b6115488460ff166124ef565b6115548460ff166124ef565b6040516020016115679493929190613930565b6040516020818303038152906040529a506001888360ff166018811061159d57634e487b7160e01b600052603260045260246000fd5b60200201518260ff16601881106115c457634e487b7160e01b600052603260045260246000fd5b911515602090920201525050505b806115dc81614f41565b915050611347565b505080806115f190614f7e565b915050611316565b50838560405160200161160d929190613aea565b60408051808303601f19018152919052979650505050505050565b600a546001600160a01b031690565b60606001805461097190614f06565b60215460ff166116685760405162461bcd60e51b81526004016108d290614888565b611672848461260a565b61168e5760405162461bcd60e51b81526004016108d29061464a565b60228260405161169e91906138e5565b9081526040519081900360200190205460ff16156116ce5760405162461bcd60e51b81526004016108d290614c0a565b836116da338385612637565b146116f75760405162461bcd60e51b81526004016108d2906148f9565b601354611702610ad6565b11156117205760405162461bcd60e51b81526004016108d290614c7e565b6012548111156117425760405162461bcd60e51b81526004016108d290614a0c565b3481600b546117519190614e58565b111561176f5760405162461bcd60e51b81526004016108d290614d57565b60005b8181101561179457611782612245565b8061178c81614f63565b915050611772565b5060016022836040516117a791906138e5565b908152604051908190036020019020805491151560ff1990921691909117905550505050565b600b5481565b6117db612004565b6001600160a01b0316826001600160a01b0316141561180c5760405162461bcd60e51b81526004016108d29061480f565b8060056000611819612004565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff19169215159290921790915561185d612004565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611895919061458c565b60405180910390a35050565b6118a9612004565b6001600160a01b03166118ba611628565b6001600160a01b0316146118e05760405162461bcd60e51b81526004016108d290614af8565b600b55565b60135481565b6118fc6118f6612004565b83612093565b6119185760405162461bcd60e51b81526004016108d290614c2d565b61192484848484612670565b50505050565b60608060005b60078160ff161015611a205760006119546111708760ff851661133a866001614df5565b905082600c60008460ff1681526020019081526020016000208260ff168154811061198f57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201600101600c60008560ff1681526020019081526020016000208360ff16815481106119d857634e487b7160e01b600052603260045260246000fd5b90600052602060002090600402016000016040516020016119fb939291906139d7565b6040516020818303038152906040529250508080611a1890614f7e565b915050611930565b506000838152601060205260409020548190611a3b906124ef565b604051602001611a4c929190613a45565b604051602081830303815290604052905080604051602001611a6e91906143b0565b60405160208183030381529060405291505092915050565b601354611a91610ad6565b1015611aaf5760405162461bcd60e51b81526004016108d290614b76565b33611ab982610faf565b6001600160a01b031614611acc57600080fd5b611ad93361dead83612118565b610e72612245565b6060611aec82612008565b611af557600080fd5b6000611b0083610775565b9050611b4f611b0e846124ef565b611b1f611b1a84611150565b6126a3565b611b29848761192a565b604051602001611b3b9392919061426b565b6040516020818303038152906040526126a3565b604051602001611b5f91906143e4565b604051602081830303815290604052915050919050565b611b7e612004565b6001600160a01b0316611b8f611628565b6001600160a01b031614611bb55760405162461bcd60e51b81526004016108d290614af8565b60005b8151811015610acb57600c60008481526020019081526020016000206040518060800160405280848481518110611bff57634e487b7160e01b600052603260045260246000fd5b6020026020010151600001518152602001848481518110611c3057634e487b7160e01b600052603260045260246000fd5b6020026020010151602001518152602001848481518110611c6157634e487b7160e01b600052603260045260246000fd5b6020026020010151604001518152602001848481518110611c9257634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160600151909152825460018101845560009384529281902082518051939460040290910192611cd092849201906132ce565b506020828101518051611ce992600185019201906132ce565b5060408201518051611d059160028401916020909101906132ce565b506060820151816003015550508080611d1d90614f63565b915050611bb8565b60215460ff1681565b600080611d39610ad6565b9050610bb88111611d5557673782dace9d9000009150506109f2565b610bb881118015611d685750610fa08111155b15611d7e57676f05b59d3b2000009150506109f2565b610fa081118015611d9157506113888111155b15611da75767de0b6b3a764000009150506109f2565b68014d1120d7b160000091505090565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b611ded612004565b6001600160a01b0316611dfe611628565b6001600160a01b031614611e245760405162461bcd60e51b81526004016108d290614af8565b6001600160a01b038116611e4a5760405162461bcd60e51b81526004016108d29061474e565b610e7281612300565b611e5b612004565b6001600160a01b0316611e6c611628565b6001600160a01b031614611e925760405162461bcd60e51b81526004016108d290614af8565b60005b818110156110bd576023611ea7610ad6565b10611eb157600080fd5b611eb9612245565b80611ec381614f63565b915050611e95565b6060836000611eda8585614ea0565b67ffffffffffffffff811115611f0057634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611f2a576020820181803683370190505b509050845b84811015611fb857828181518110611f5757634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b03191682611f718884614ea0565b81518110611f8f57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535080611fb081614f63565b915050611f2f565b509150505b9392505050565b60006001600160e01b031982166380ac58cd60e01b1480611ff557506001600160e01b03198216635b5e139f60e01b145b8061086657506108668261281a565b3390565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061205a82610faf565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061209e82612008565b6120ba5760405162461bcd60e51b81526004016108d2906148ad565b60006120c583610faf565b9050806001600160a01b0316846001600160a01b031614806121005750836001600160a01b03166120f5846109f5565b6001600160a01b0316145b8061211057506121108185611db7565b949350505050565b826001600160a01b031661212b82610faf565b6001600160a01b0316146121515760405162461bcd60e51b81526004016108d290614b2d565b6001600160a01b0382166121775760405162461bcd60e51b81526004016108d2906147cb565b612182838383612833565b61218d600082612025565b6001600160a01b03831660009081526003602052604081208054600192906121b6908490614ea0565b90915550506001600160a01b03821660009081526003602052604081208054600192906121e4908490614ddd565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061224f610ad6565b9050601154811061225f57600080fd5b612268336128bc565b1561227257600080fd5b8061227f813360006128c2565b6000828152600e6020908152604090912082516122a293919291909101906132ce565b506001600d600e60008481526020019081526020016000206040516122c79190613ade565b9081526040805160209281900383019020805460ff1916931515939093179092556000838152600f909152204290556110bd33826129e0565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008181805b82518160ff161015610f46576030838260ff168151811061238957634e487b7160e01b600052603260045260246000fd5b016020015160f81c108015906123ca57506039838260ff16815181106123bf57634e487b7160e01b600052603260045260246000fd5b016020015160f81c11155b15612420576123da600a83614e77565b91506030838260ff168151811061240157634e487b7160e01b600052603260045260246000fd5b0160200151612413919060f81c614eb7565b61241d9083614df5565b91505b8061242a81614f7e565b915050612358565b6000805b60155460ff821610156124e9578260405160200161245491906138e5565b6040516020818303038152906040528051906020012060158260ff168154811061248e57634e487b7160e01b600052603260045260246000fd5b906000526020600020016040516020016124a89190613ade565b6040516020818303038152906040528051906020012014156124d7576124cf816001614df5565b915050610869565b806124e181614f7e565b915050612436565b50600080fd5b60608161251457506040805180820190915260018152600360fc1b6020820152610869565b8160005b811561253e578061252881614f63565b91506125379050600a83614e1a565b9150612518565b60008167ffffffffffffffff81111561256757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612591576020820181803683370190505b5090505b8415612110576125a6600183614ea0565b91506125b3600a86614f9e565b6125be906030614ddd565b60f81b8183815181106125e157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612603600a86614e1a565b9450612595565b600061261f8261261985612abf565b90612aef565b6024546001600160a01b039182169116149392505050565b60008084848460405160200161264f939291906138a6565b60408051808303601f19018152919052805160209091012095945050505050565b61267b848484612118565b61268784848484612b0b565b6119245760405162461bcd60e51b81526004016108d2906146fc565b60608151600014156126c45750604080516020810190915260008152610869565b600060405180606001604052806040815260200161500b60409139905060006003845160026126f39190614ddd565b6126fd9190614e1a565b612708906004614e58565b90506000612717826020614ddd565b67ffffffffffffffff81111561273d57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612767576020820181803683370190505b509050818152600183018586518101602084015b818310156127d55760039283018051603f601282901c811687015160f890811b8552600c83901c8216880151811b6001860152600683901c8216880151811b60028601529116860151901b9382019390935260040161277b565b6003895106600181146127ef57600281146128005761280c565b613d3d60f01b60011983015261280c565b603d60f81b6000198301525b509398975050505050505050565b6001600160e01b031981166301ffc9a760e01b14919050565b61283e838383610acb565b6001600160a01b03831661285a5761285581612c26565b61287d565b816001600160a01b0316836001600160a01b03161461287d5761287d8382612c6a565b6001600160a01b0382166128995761289481612d07565b610acb565b826001600160a01b0316826001600160a01b031614610acb57610acb8282612de0565b3b151590565b6060600a82106128d157600080fd5b6040805180820190915260018152600360fc1b602082015260005b60068160ff16101561299a576014805490600061290883614f63565b91905055506000612710424489898960145460405160200161292f969594939291906144a3565b6040516020818303038152906040528051906020012060001c6129529190614f9e565b905082612964888361ffff1685612e24565b604051602001612975929190613901565b604051602081830303815290604052925050808061299290614f7e565b9150506128ec565b50600d816040516129ab91906138e5565b9081526040519081900360200190205460ff1615612110576129d885856129d3866001614ddd565b6128c2565b915050611fbd565b6001600160a01b038216612a065760405162461bcd60e51b81526004016108d290614a77565b612a0f81612008565b15612a2c5760405162461bcd60e51b81526004016108d290614794565b612a3860008383612833565b6001600160a01b0382166000908152600360205260408120805460019290612a61908490614ddd565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600081604051602001612ad2919061423a565b604051602081830303815290604052805190602001209050919050565b6000806000612afe8585612ff4565b91509150610f4681613064565b6000612b1f846001600160a01b03166128bc565b15612c1b57836001600160a01b031663150b7a02612b3b612004565b8786866040518563ffffffff1660e01b8152600401612b5d94939291906144f2565b602060405180830381600087803b158015612b7757600080fd5b505af1925050508015612ba7575060408051601f3d908101601f19168201909252612ba4918101906135e6565b60015b612c01573d808015612bd5576040519150601f19603f3d011682016040523d82523d6000602084013e612bda565b606091505b508051612bf95760405162461bcd60e51b81526004016108d2906146fc565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612110565b506001949350505050565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b60006001612c77846110c1565b612c819190614ea0565b600083815260076020526040902054909150808214612cd4576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612d1990600190614ea0565b60008381526009602052604081205460088054939450909284908110612d4f57634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060088381548110612d7e57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612dc457634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000612deb836110c1565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60606000805b60168460ff1660088110612e4e57634e487b7160e01b600052603260045260246000fd5b015460ff821610156124e957600060168560ff1660088110612e8057634e487b7160e01b600052603260045260246000fd5b018260ff1681548110612ea357634e487b7160e01b600052603260045260246000fd5b90600052602060002090601091828204019190066002029054906101000a900461ffff1690508261ffff168610158015612ee95750612ee28184614dc0565b61ffff1686105b15612fd45760ff8516158015612f03575060028260ff1611155b80612f2057508460ff166001148015612f20575060028260ff1611155b80612f3d57508460ff166002148015612f3d575060038260ff1611155b80612f5a57508460ff166003148015612f5a575060038260ff1611155b80612f7757508460ff166004148015612f77575060078260ff1611155b80612f9457508460ff166005148015612f94575060078260ff1611155b15612fbe576000878152601060205260408120805460019290612fb8908490614ddd565b90915550505b612fca8260ff166124ef565b9350505050611fbd565b612fde8184614dc0565b9250508080612fec90614f7e565b915050612e2a565b60008082516041141561302b5760208301516040840151606085015160001a61301f87828585613191565b9450945050505061305d565b825160401415613055576020830151604084015161304a868383613271565b93509350505061305d565b506000905060025b9250929050565b600081600481111561308657634e487b7160e01b600052602160045260246000fd5b141561309157610e72565b60018160048111156130b357634e487b7160e01b600052602160045260246000fd5b14156130d15760405162461bcd60e51b81526004016108d290614613565b60028160048111156130f357634e487b7160e01b600052602160045260246000fd5b14156131115760405162461bcd60e51b81526004016108d29061467a565b600381600481111561313357634e487b7160e01b600052602160045260246000fd5b14156131515760405162461bcd60e51b81526004016108d290614846565b600481600481111561317357634e487b7160e01b600052602160045260246000fd5b1415610e725760405162461bcd60e51b81526004016108d290614a35565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156131c85750600090506003613268565b8460ff16601b141580156131e057508460ff16601c14155b156131f15750600090506004613268565b6000600187878787604051600081526020016040526040516132169493929190614597565b6020604051602081039080840390855afa158015613238573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661326157600060019250925050613268565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b0161329287828885613191565b935093505050935093915050565b6040518061030001604052806018905b6132b8613352565b8152602001906001900390816132b05790505090565b8280546132da90614f06565b90600052602060002090601f0160209004810192826132fc5760008555613342565b82601f1061331557805160ff1916838001178555613342565b82800160010185558215613342579182015b82811115613342578251825591602001919060010190613327565b5061334e929150613371565b5090565b6040518061030001604052806018906020820280368337509192915050565b5b8082111561334e5760008155600101613372565b80356001600160a01b038116811461086957600080fd5b600082601f8301126133ad578081fd5b813567ffffffffffffffff8111156133c7576133c7614fde565b6133da601f8201601f1916602001614d8a565b8181528460208386010111156133ee578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215613419578081fd5b611fbd82613386565b60008060408385031215613434578081fd5b61343d83613386565b915061344b60208401613386565b90509250929050565b600080600060608486031215613468578081fd5b61347184613386565b925061347f60208501613386565b9150604084013590509250925092565b600080600080608085870312156134a4578081fd5b6134ad85613386565b93506134bb60208601613386565b925060408501359150606085013567ffffffffffffffff8111156134dd578182fd5b6134e98782880161339d565b91505092959194509250565b60008060408385031215613507578182fd5b61351083613386565b915060208301358015158114613524578182fd5b809150509250929050565b60008060408385031215613541578182fd5b61354a83613386565b946020939093013593505050565b6000806000806080858703121561356d578384fd5b84359350602085013567ffffffffffffffff8082111561358b578485fd5b6135978883890161339d565b945060408701359150808211156135ac578384fd5b506135b98782880161339d565b949793965093946060013593505050565b6000602082840312156135db578081fd5b8135611fbd81614ff4565b6000602082840312156135f7578081fd5b8151611fbd81614ff4565b600060208284031215613613578081fd5b813567ffffffffffffffff811115613629578182fd5b6121108482850161339d565b60008060408385031215613647578182fd5b823567ffffffffffffffff81111561365d578283fd5b6136698582860161339d565b95602094909401359450505050565b600060208284031215613689578081fd5b5035919050565b600080604083850312156136a2578182fd5b8235915060208084013567ffffffffffffffff808211156136c1578384fd5b818601915086601f8301126136d4578384fd5b8135818111156136e6576136e6614fde565b6136f38485830201614d8a565b81815284810190848601875b848110156137b057813587016080818e03601f1901121561371e57898afd5b6137286080614d8a565b8982013588811115613738578b8cfd5b6137468f8c8386010161339d565b82525060408201358881111561375a578b8cfd5b6137688f8c8386010161339d565b8b8301525060608201358881111561377e578b8cfd5b61378c8f8c8386010161339d565b604083015250608091909101356060820152845292870192908701906001016136ff565b50979a909950975050505050505050565b600080604083850312156137d3578182fd5b50508035926020909101359150565b600081518084526137fa816020860160208601614eda565b601f01601f19169290920160200192915050565b80546000906002810460018083168061382857607f831692505b602080841082141561384857634e487b7160e01b86526022600452602486fd5b81801561385c576001811461386d5761389a565b60ff1986168952848901965061389a565b61387688614db4565b60005b868110156138925781548b820152908501908301613879565b505084890196505b50505050505092915050565b60006bffffffffffffffffffffffff198560601b16825283601483015282516138d6816034850160208701614eda565b91909101603401949350505050565b600082516138f7818460208701614eda565b9190910192915050565b60008351613913818460208801614eda565b835190830190613927818360208801614eda565b01949350505050565b60008551613942818460208a01614eda565b6d3c7265637420636c6173733d276360901b908301908152855161396d81600e840160208a01614eda565b642720783d2760d81b600e92909101918201528451613993816013840160208901614eda565b642720793d2760d81b6013929091019182015283516139b9816018840160208801614eda565b6213979f60e91b60189290910191820152601b019695505050505050565b600084516139e9818460208901614eda565b6e3d913a3930b4ba2fba3cb832911d1160891b908301908152613a0f600f82018661380e565b6a1116113b30b63ab2911d1160a91b81529050613a2f600b82018561380e565b62089f4b60ea1b81526003019695505050505050565b60008351613a57818460208801614eda565b80830190507f7b22646973706c61795f74797065223a2022626f6f73745f6e756d626572222c81527f202274726169745f74797065223a2022424220426f6f7374222c202276616c7560208201526232911d60e91b60408201528351613ac4816043840160208801614eda565b607d60f81b60439290910191820152604401949350505050565b6000611fbd828461380e565b60007f3c7376672069643d22632220786d6c6e733d22687474703a2f2f7777772e773382527f2e6f72672f323030302f7376672220707265736572766541737065637452617460208301527f696f3d22784d696e594d696e206d656574222076696577426f783d22302030206040830152660191b10191b11160cd1b60608301528351613b7e816067850160208801614eda565b620101f160ed1b6067918401918201528351613ba181606a840160208801614eda565b7f3c7374796c653e726563747b77696474683a3170783b6865696768743a317078606a92909101918201527f3b7d23637b73686170652d72656e646572696e673a2063726973706564676573608a8201527f3b7d2e6330307b66696c6c3a236438343463667d2e6330317b66696c6c3a236660aa8201527f31663166317d2e6330327b66696c6c3a236666346235347d2e6330337b66696c60ca8201527f6c3a236666366237317d2e6330347b66696c6c3a236666356336347d2e63303560ea8201527f7b66696c6c3a236666313332667d2e6330367b66696c6c3a236666343635317d61010a8201527f2e6330377b66696c6c3a236666343434667d2e6330387b66696c6c3a2366663361012a8201527f3634347d2e6330397b66696c6c3a236666333534337d2e6331307b66696c6c3a61014a8201527f236666333834357d2e6331317b66696c6c3a236666346435377d2e6331327b6661016a8201527f696c6c3a236331343666627d2e6331337b66696c6c3a233333336166667d2e6361018a8201527f31347b66696c6c3a236332646566637d2e6331357b66696c6c3a2365616634666101aa8201527f667d2e6331367b66696c6c3a236533656566617d2e6331377b66696c6c3a23636101ca8201527f66653466617d2e6331387b66696c6c3a236236316666637d2e6331397b66696c6101ea8201527f6c3a236266343266627d2e6332307b66696c6c3a236263333566627d2e63323161020a8201527f7b66696c6c3a236264333666627d2e6332327b66696c6c3a236665653462667d61022a8201527f2e6332337b66696c6c3a236666383830307d2e6332347b66696c6c3a2366666461024a8201527f3330307d2e6332357b66696c6c3a236666633230307d2e6332367b66696c6c3a61026a8201527f236666396130307d2e6332377b66696c6c3a236666623130307d2e6332387b6661028a8201527f696c6c3a236666613030307d2e6332397b66696c6c3a236636643930307d2e636102aa8201527f33307b66696c6c3a236630636530307d2e6333317b66696c6c3a2365656431306102ca8201527f307d2e6333327b66696c6c3a233030653538627d2e6333337b66696c6c3a23306102ea8201527f30646637317d2e6333347b66696c6c3a233030653238307d2e6333357b66696c61030a8201527f6c3a233030636235397d2e6333367b66696c6c3a233030643837347d2e63333761032a8201527f7b66696c6c3a233030643936337d2e6333387b66696c6c3a233030643336637d61034a8201527f2e6333397b66696c6c3a233030646537637d2e6334307b66696c6c3a2365626261036a8201527f3761357d2e6334317b66696c6c3a236533616139367d2e6334327b66696c6c3a61038a8201527f233039343337387d2e6334337b66696c6c3a236331613930307d2e6334347b666103aa8201527f696c6c3a236463633030307d2e6334357b66696c6c3a236661646531317d2e636103ca8201527f34367b66696c6c3a236638646330397d2e6334377b66696c6c3a2330306335656103ea8201527f367d2e6334387b66696c6c3a236463646364637d2e6334397b66696c6c3a236361040a8201527f31663866397d2e6335307b66696c6c3a236232623862397d2e6335317b66696c61042a8201527f6c3a236161623062317d2e6335327b66696c6c3a236230623462357d2e63353361044a8201527f7b66696c6c3a236532613338647d2e6335347b66696c6c3a236562613939327d61046a8201527f2e6335357b66696c6c3a236538623261307d2e6335367b66696c6c3a2366663061048a8201527f3034337d2e6335377b66696c6c3a236636373637627d2e6335387b66696c6c3a6104aa8201527f236337343234397d2e6335397b66696c6c3a236161333433617d2e6336307b666104ca8201527f696c6c3a233430343766667d2e6336317b66696c6c3a233538356566667d2e636104ea8201527f36327b66696c6c3a233464353466667d2e6336337b66696c6c3a23323232626661050a8201527f667d2e6336347b66696c6c3a233364343466667d2e6336357b66696c6c3a233361052a8201527f62343266667d2e6336367b66696c6c3a233332333966667d2e6336377b66696c61054a8201527f6c3a233334336266667d2e6336387b66696c6c3a233432343966667d2e63363961056a8201527f7b66696c6c3a233333333333337d2e6337307b66696c6c3a233232323232327d61058a8201527f2e6337317b66696c6c3a236363636366667d3c2f7374796c653e3c2f7376673e6105aa8201526105ca01949350505050565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b757b226e616d65223a2022426c6f636b436861696e202360501b8152835160009061429d816016850160208901614eda565b7f222c20226465736372697074696f6e223a202254686520426c6f636b436861696016918401918201527f6e7320636f6c6c656374696f6e2073657276657320617320746865206669727360368201527f74207068617365206f662042656e2042616c6c6572204469642054686520426c60568201527f6f636b436861696e2e222c2022696d616765223a2022646174613a696d61676560768201526f0bdcdd99cade1b5b0ed8985cd94d8d0b60821b609682015284516143658160a6840160208901614eda565b6e11161130ba3a3934b13aba32b9911d60891b60a6929091019182015283516143958160b5840160208801614eda565b607d60f81b60b5929091019182015260b60195945050505050565b6000605b60f81b825282516143cc816001850160208701614eda565b605d60f81b6001939091019283015250600201919050565b60007f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008252825161441c81601d850160208701614eda565b91909101601d0192915050565b6000603160f81b82528251614445816001850160208701614eda565b9190910160010192915050565b60007f7374796c653d226261636b67726f756e642d636f6c6f723a23000000000000008252825161448a816019850160208701614eda565b61011160f51b6019939091019283015250601b01919050565b95865260208601949094526040850192909252606090811b6bffffffffffffffffffffffff1916908401526074830152609482015260b40190565b6001600160a01b0391909116815260200190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614525908301846137e2565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b8181101561458057835183529284019291840191600101614564565b50909695505050505050565b901515815260200190565b93845260ff9290921660208401526040830152606082015260800190565b600060208252611fbd60208301846137e2565b6000608082526145db60808301876137e2565b82810360208401526145ed81876137e2565b9050828103604084015261460181866137e2565b91505082606083015295945050505050565b60208082526018908201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604082015260600190565b6020808252601690820152751112549150d517d352539517d11254d0531313d5d15160521b604082015260600190565b6020808252601f908201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604082015260600190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604082015261756560f01b606082015260800190565b6020808252600b908201526a14d0531157d0d313d4d15160aa1b604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b602080825260099082015268121054d217d190525360ba1b604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252600f908201526e115610d1515117d4115497d3525395608a1b604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604082015261756560f01b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b60208082526033908201527f4275726e696e67206973206f6e6c7920616c6c6f776564207768656e2074686560408201527208199a5c9cdd080c9ac81a5cc81b5a5b9d1959606a1b606082015260800190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b602080825260099082015268121054d217d554d15160ba1b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526016908201527527aaaa2fa7a32fa9aa27a1a5afa327a92fa2aa2422a960511b604082015260600190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b6020808252603c908201527f6d696e74696e67207769746820424273206973206f6e6c7920616c6c6f77656460408201527f207768656e2074686520666972737420326b206973206d696e74656400000000606082015260800190565b60208082526010908201526f0929ca6aa8c8c9286928a9ca8be8aa8960831b604082015260600190565b90815260200190565b60405181810167ffffffffffffffff81118282101715614dac57614dac614fde565b604052919050565b60009081526020902090565b600061ffff80831681851680830382111561392757613927614fb2565b60008219821115614df057614df0614fb2565b500190565b600060ff821660ff84168060ff03821115614e1257614e12614fb2565b019392505050565b600082614e2957614e29614fc8565b500490565b600061ffff80831681851681830481118215151615614e4f57614e4f614fb2565b02949350505050565b6000816000190483118215151615614e7257614e72614fb2565b500290565b600060ff821660ff84168160ff0481118215151615614e9857614e98614fb2565b029392505050565b600082821015614eb257614eb2614fb2565b500390565b600060ff821660ff841680821015614ed157614ed1614fb2565b90039392505050565b60005b83811015614ef5578181015183820152602001614edd565b838111156119245750506000910152565b600281046001821680614f1a57607f821691505b60208210811415614f3b57634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff80831681811415614f5957614f59614fb2565b6001019392505050565b6000600019821415614f7757614f77614fb2565b5060010190565b600060ff821660ff811415614f9557614f95614fb2565b60010192915050565b600082614fad57614fad614fc8565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114610e7257600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220ed4a35c7f6db068b0a3d75c6902e241716897005974cc607c7895ac2561a0dca64736f6c63430008000033
Deployed Bytecode
0x60806040526004361061025b5760003560e01c80636352211e11610144578063a31a279b116100b6578063d93dfe881161007a578063d93dfe88146106cb578063e081b781146106eb578063e1f3a61a14610700578063e985e9c514610715578063f2fde38b14610735578063f906751b146107555761025b565b8063a31a279b14610636578063b88d4fde1461064b578063b9e6cfad1461066b578063c4ef71c71461068b578063c87b56dd146106ab5761025b565b80638da5cb5b116101085780638da5cb5b146105a457806395d89b41146105b95780639ec70f19146105ce578063a035b1fe146105e1578063a22cb465146105f6578063a2b40d19146106165761025b565b80636352211e1461050f5780636ade3ace1461052f57806370a082311461054f578063715018a61461056f57806389ce3074146105845761025b565b806321a16b0c116101dd57806334a591f0116101a157806334a591f0146104585780633ccfd60b1461047857806342842e0e1461048d578063438b6300146104ad5780634f6ccce7146104da57806359a12ad5146104fa5761025b565b806321a16b0c146103b357806323b872dd146103d35780632f745c59146103f35780632fb098d21461041357806332cb6b0c146104435761025b565b806306fdde031161022457806306fdde0314610327578063081812fc1461033c578063095ea7b31461036957806309d42b301461038957806318160ddd1461039e5761025b565b80625ea3071461026057806301ffc9a714610296578063046dc166146102c3578063049c5c49146102e557806304a19220146102fa575b600080fd5b34801561026c57600080fd5b5061028061027b366004613678565b610775565b60405161028d91906145b5565b60405180910390f35b3480156102a257600080fd5b506102b66102b13660046135ca565b61086e565b60405161028d919061458c565b3480156102cf57600080fd5b506102e36102de366004613408565b610893565b005b3480156102f157600080fd5b506102e36108fd565b34801561030657600080fd5b5061031a610315366004613678565b610950565b60405161028d9190614d81565b34801561033357600080fd5b50610280610962565b34801561034857600080fd5b5061035c610357366004613678565b6109f5565b60405161028d91906144de565b34801561037557600080fd5b506102e361038436600461352f565b610a38565b34801561039557600080fd5b5061031a610ad0565b3480156103aa57600080fd5b5061031a610ad6565b3480156103bf57600080fd5b5061031a6103ce366004613678565b610adc565b3480156103df57600080fd5b506102e36103ee366004613454565b610aee565b3480156103ff57600080fd5b5061031a61040e36600461352f565b610b26565b34801561041f57600080fd5b5061043361042e3660046137c1565b610b78565b60405161028d94939291906145c8565b34801561044f57600080fd5b5061031a610d5d565b34801561046457600080fd5b506102e3610473366004613408565b610d63565b34801561048457600080fd5b506102e3610dc4565b34801561049957600080fd5b506102e36104a8366004613454565b610e75565b3480156104b957600080fd5b506104cd6104c8366004613408565b610e90565b60405161028d9190614548565b3480156104e657600080fd5b5061031a6104f5366004613678565b610f4e565b34801561050657600080fd5b5061031a610fa9565b34801561051b57600080fd5b5061035c61052a366004613678565b610faf565b34801561053b57600080fd5b506102e361054a366004613678565b610fe4565b34801561055b57600080fd5b5061031a61056a366004613408565b6110c1565b34801561057b57600080fd5b506102e3611105565b34801561059057600080fd5b5061028061059f366004613602565b611150565b3480156105b057600080fd5b5061035c611628565b3480156105c557600080fd5b50610280611637565b6102e36105dc366004613558565b611646565b3480156105ed57600080fd5b5061031a6117cd565b34801561060257600080fd5b506102e36106113660046134f5565b6117d3565b34801561062257600080fd5b506102e3610631366004613678565b6118a1565b34801561064257600080fd5b5061031a6118e5565b34801561065757600080fd5b506102e361066636600461348f565b6118eb565b34801561067757600080fd5b50610280610686366004613635565b61192a565b34801561069757600080fd5b506102e36106a6366004613678565b611a86565b3480156106b757600080fd5b506102806106c6366004613678565b611ae1565b3480156106d757600080fd5b506102e36106e6366004613690565b611b76565b3480156106f757600080fd5b506102b6611d25565b34801561070c57600080fd5b5061031a611d2e565b34801561072157600080fd5b506102b6610730366004613422565b611db7565b34801561074157600080fd5b506102e3610750366004613408565b611de5565b34801561076157600080fd5b506102e3610770366004613678565b611e53565b6000818152600e602052604081208054606092919061079390614f06565b80601f01602080910402602001604051908101604052809291908181526020018280546107bf90614f06565b801561080c5780601f106107e15761010080835404028352916020019161080c565b820191906000526020600020905b8154815290600101906020018083116107ef57829003601f168201915b5050505050905061081c83610faf565b6001600160a01b031661dead6001600160a01b03161415610866576108448160016009611ecb565b6040516020016108549190614429565b60405160208183030381529060405290505b90505b919050565b60006001600160e01b0319821663780e9d6360e01b1480610866575061086682611fc4565b61089b612004565b6001600160a01b03166108ac611628565b6001600160a01b0316146108db5760405162461bcd60e51b81526004016108d290614af8565b60405180910390fd5b602480546001600160a01b0319166001600160a01b0392909216919091179055565b610905612004565b6001600160a01b0316610916611628565b6001600160a01b03161461093c5760405162461bcd60e51b81526004016108d290614af8565b6021805460ff19811660ff90911615179055565b60009081526010602052604090205490565b60606000805461097190614f06565b80601f016020809104026020016040519081016040528092919081815260200182805461099d90614f06565b80156109ea5780601f106109bf576101008083540402835291602001916109ea565b820191906000526020600020905b8154815290600101906020018083116109cd57829003601f168201915b505050505090505b90565b6000610a0082612008565b610a1c5760405162461bcd60e51b81526004016108d290614aac565b506000908152600460205260409020546001600160a01b031690565b6000610a4382610faf565b9050806001600160a01b0316836001600160a01b03161415610a775760405162461bcd60e51b81526004016108d290614bc9565b806001600160a01b0316610a89612004565b6001600160a01b03161480610aa55750610aa581610730612004565b610ac15760405162461bcd60e51b81526004016108d29061491c565b610acb8383612025565b505050565b60125481565b60085490565b6000908152600f602052604090205490565b610aff610af9612004565b82612093565b610b1b5760405162461bcd60e51b81526004016108d290614c2d565b610acb838383612118565b6000610b31836110c1565b8210610b4f5760405162461bcd60e51b81526004016108d2906146b1565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b600c6020528160005260406000208181548110610b9457600080fd5b906000526020600020906004020160009150915050806000018054610bb890614f06565b80601f0160208091040260200160405190810160405280929190818152602001828054610be490614f06565b8015610c315780601f10610c0657610100808354040283529160200191610c31565b820191906000526020600020905b815481529060010190602001808311610c1457829003601f168201915b505050505090806001018054610c4690614f06565b80601f0160208091040260200160405190810160405280929190818152602001828054610c7290614f06565b8015610cbf5780601f10610c9457610100808354040283529160200191610cbf565b820191906000526020600020905b815481529060010190602001808311610ca257829003601f168201915b505050505090806002018054610cd490614f06565b80601f0160208091040260200160405190810160405280929190818152602001828054610d0090614f06565b8015610d4d5780601f10610d2257610100808354040283529160200191610d4d565b820191906000526020600020905b815481529060010190602001808311610d3057829003601f168201915b5050505050908060030154905084565b60115481565b610d6b612004565b6001600160a01b0316610d7c611628565b6001600160a01b031614610da25760405162461bcd60e51b81526004016108d290614af8565b601e80546001600160a01b0319166001600160a01b0392909216919091179055565b610dcc612004565b6001600160a01b0316610ddd611628565b6001600160a01b031614610e035760405162461bcd60e51b81526004016108d290614af8565b6023546001600160a01b03166108fc610e1d600a47614e1a565b6040518115909202916000818181858888f19350505050158015610e45573d6000803e3d6000fd5b5060405133904780156108fc02916000818181858888f19350505050158015610e72573d6000803e3d6000fd5b50565b610acb838383604051806020016040528060008152506118eb565b60606000610e9d836110c1565b905060008167ffffffffffffffff811115610ec857634e487b7160e01b600052604160045260246000fd5b604051908082528060200260200182016040528015610ef1578160200160208202803683370190505b50905060005b82811015610f4657610f098582610b26565b828281518110610f2957634e487b7160e01b600052603260045260246000fd5b602090810291909101015280610f3e81614f63565b915050610ef7565b509392505050565b6000610f58610ad6565b8210610f765760405162461bcd60e51b81526004016108d290614cae565b60088281548110610f9757634e487b7160e01b600052603260045260246000fd5b90600052602060002001549050919050565b60205481565b6000818152600260205260408120546001600160a01b0316806108665760405162461bcd60e51b81526004016108d2906149c3565b601354610fef610ad6565b101561100d5760405162461bcd60e51b81526004016108d290614cfa565b60125481111561102f5760405162461bcd60e51b81526004016108d290614a0c565b60005b818110156110bd57601e546001600160a01b03166379cc679033611054611d2e565b6040518363ffffffff1660e01b815260040161107192919061452f565b600060405180830381600087803b15801561108b57600080fd5b505af115801561109f573d6000803e3d6000fd5b505050506110ab612245565b806110b581614f63565b915050611032565b5050565b60006001600160a01b0382166110e95760405162461bcd60e51b81526004016108d290614979565b506001600160a01b031660009081526003602052604090205490565b61110d612004565b6001600160a01b031661111e611628565b6001600160a01b0316146111445760405162461bcd60e51b81526004016108d290614af8565b61114e6000612300565b565b60608060608061115e6132a0565b60006111756111708860066007611ecb565b612352565b905060ff81166111a5576040518060400160405280600681526020016532353936626560d01b81525092506112cd565b8060ff16600114156111d7576040518060400160405280600681526020016531303434376360d01b81525092506112cd565b8060ff1660021415611209576040518060400160405280600681526020016563386663666360d01b81525092506112cd565b8060ff166003141561123b57604051806040016040528060068152602001650cce0ccd0ccd60d21b81525092506112cd565b8060ff166004141561126d576040518060400160405280600681526020016566666534626360d01b81525092506112cd565b8060ff166005141561129f576040518060400160405280600681526020016564306363666360d01b81525092506112cd565b8060ff16600614156112cd576040518060400160405280600681526020016565306463646360d01b81525092505b60078160ff16101561130057826040516020016112ea9190614452565b6040516020818303038152906040529350611313565b6040518060200160405280600081525093505b60005b60068160ff1610156115f95760006113426111708a60ff851661133a866001614df5565b60ff16611ecb565b905060005b600c60008460ff1681526020019081526020016000208260ff168154811061137f57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201600301548161ffff1610156115e45760006114a3600c60008660ff1681526020019081526020016000208460ff16815481106113d957634e487b7160e01b600052603260045260246000fd5b906000526020600020906004020160020180546113f590614f06565b80601f016020809104026020016040519081016040528092919081815260200182805461142190614f06565b801561146e5780601f106114435761010080835404028352916020019161146e565b820191906000526020600020905b81548152906001019060200180831161145157829003601f168201915b50505050508360046114809190614e2e565b61ffff1661148f856004614e2e565b61149a906004614dc0565b61ffff16611ecb565b905060006114bc6114b78360006001611ecb565b612432565b905060006114d06114b78460016002611ecb565b9050878260ff16601881106114f557634e487b7160e01b600052603260045260246000fd5b60200201518160ff166018811061151c57634e487b7160e01b600052603260045260246000fd5b60200201511561152e575050506115d2565b8a61153c8460026004611ecb565b6115488460ff166124ef565b6115548460ff166124ef565b6040516020016115679493929190613930565b6040516020818303038152906040529a506001888360ff166018811061159d57634e487b7160e01b600052603260045260246000fd5b60200201518260ff16601881106115c457634e487b7160e01b600052603260045260246000fd5b911515602090920201525050505b806115dc81614f41565b915050611347565b505080806115f190614f7e565b915050611316565b50838560405160200161160d929190613aea565b60408051808303601f19018152919052979650505050505050565b600a546001600160a01b031690565b60606001805461097190614f06565b60215460ff166116685760405162461bcd60e51b81526004016108d290614888565b611672848461260a565b61168e5760405162461bcd60e51b81526004016108d29061464a565b60228260405161169e91906138e5565b9081526040519081900360200190205460ff16156116ce5760405162461bcd60e51b81526004016108d290614c0a565b836116da338385612637565b146116f75760405162461bcd60e51b81526004016108d2906148f9565b601354611702610ad6565b11156117205760405162461bcd60e51b81526004016108d290614c7e565b6012548111156117425760405162461bcd60e51b81526004016108d290614a0c565b3481600b546117519190614e58565b111561176f5760405162461bcd60e51b81526004016108d290614d57565b60005b8181101561179457611782612245565b8061178c81614f63565b915050611772565b5060016022836040516117a791906138e5565b908152604051908190036020019020805491151560ff1990921691909117905550505050565b600b5481565b6117db612004565b6001600160a01b0316826001600160a01b0316141561180c5760405162461bcd60e51b81526004016108d29061480f565b8060056000611819612004565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff19169215159290921790915561185d612004565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3183604051611895919061458c565b60405180910390a35050565b6118a9612004565b6001600160a01b03166118ba611628565b6001600160a01b0316146118e05760405162461bcd60e51b81526004016108d290614af8565b600b55565b60135481565b6118fc6118f6612004565b83612093565b6119185760405162461bcd60e51b81526004016108d290614c2d565b61192484848484612670565b50505050565b60608060005b60078160ff161015611a205760006119546111708760ff851661133a866001614df5565b905082600c60008460ff1681526020019081526020016000208260ff168154811061198f57634e487b7160e01b600052603260045260246000fd5b9060005260206000209060040201600101600c60008560ff1681526020019081526020016000208360ff16815481106119d857634e487b7160e01b600052603260045260246000fd5b90600052602060002090600402016000016040516020016119fb939291906139d7565b6040516020818303038152906040529250508080611a1890614f7e565b915050611930565b506000838152601060205260409020548190611a3b906124ef565b604051602001611a4c929190613a45565b604051602081830303815290604052905080604051602001611a6e91906143b0565b60405160208183030381529060405291505092915050565b601354611a91610ad6565b1015611aaf5760405162461bcd60e51b81526004016108d290614b76565b33611ab982610faf565b6001600160a01b031614611acc57600080fd5b611ad93361dead83612118565b610e72612245565b6060611aec82612008565b611af557600080fd5b6000611b0083610775565b9050611b4f611b0e846124ef565b611b1f611b1a84611150565b6126a3565b611b29848761192a565b604051602001611b3b9392919061426b565b6040516020818303038152906040526126a3565b604051602001611b5f91906143e4565b604051602081830303815290604052915050919050565b611b7e612004565b6001600160a01b0316611b8f611628565b6001600160a01b031614611bb55760405162461bcd60e51b81526004016108d290614af8565b60005b8151811015610acb57600c60008481526020019081526020016000206040518060800160405280848481518110611bff57634e487b7160e01b600052603260045260246000fd5b6020026020010151600001518152602001848481518110611c3057634e487b7160e01b600052603260045260246000fd5b6020026020010151602001518152602001848481518110611c6157634e487b7160e01b600052603260045260246000fd5b6020026020010151604001518152602001848481518110611c9257634e487b7160e01b600052603260045260246000fd5b60209081029190910181015160600151909152825460018101845560009384529281902082518051939460040290910192611cd092849201906132ce565b506020828101518051611ce992600185019201906132ce565b5060408201518051611d059160028401916020909101906132ce565b506060820151816003015550508080611d1d90614f63565b915050611bb8565b60215460ff1681565b600080611d39610ad6565b9050610bb88111611d5557673782dace9d9000009150506109f2565b610bb881118015611d685750610fa08111155b15611d7e57676f05b59d3b2000009150506109f2565b610fa081118015611d9157506113888111155b15611da75767de0b6b3a764000009150506109f2565b68014d1120d7b160000091505090565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b611ded612004565b6001600160a01b0316611dfe611628565b6001600160a01b031614611e245760405162461bcd60e51b81526004016108d290614af8565b6001600160a01b038116611e4a5760405162461bcd60e51b81526004016108d29061474e565b610e7281612300565b611e5b612004565b6001600160a01b0316611e6c611628565b6001600160a01b031614611e925760405162461bcd60e51b81526004016108d290614af8565b60005b818110156110bd576023611ea7610ad6565b10611eb157600080fd5b611eb9612245565b80611ec381614f63565b915050611e95565b6060836000611eda8585614ea0565b67ffffffffffffffff811115611f0057634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015611f2a576020820181803683370190505b509050845b84811015611fb857828181518110611f5757634e487b7160e01b600052603260045260246000fd5b01602001516001600160f81b03191682611f718884614ea0565b81518110611f8f57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535080611fb081614f63565b915050611f2f565b509150505b9392505050565b60006001600160e01b031982166380ac58cd60e01b1480611ff557506001600160e01b03198216635b5e139f60e01b145b8061086657506108668261281a565b3390565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b038416908117909155819061205a82610faf565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061209e82612008565b6120ba5760405162461bcd60e51b81526004016108d2906148ad565b60006120c583610faf565b9050806001600160a01b0316846001600160a01b031614806121005750836001600160a01b03166120f5846109f5565b6001600160a01b0316145b8061211057506121108185611db7565b949350505050565b826001600160a01b031661212b82610faf565b6001600160a01b0316146121515760405162461bcd60e51b81526004016108d290614b2d565b6001600160a01b0382166121775760405162461bcd60e51b81526004016108d2906147cb565b612182838383612833565b61218d600082612025565b6001600160a01b03831660009081526003602052604081208054600192906121b6908490614ea0565b90915550506001600160a01b03821660009081526003602052604081208054600192906121e4908490614ddd565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600061224f610ad6565b9050601154811061225f57600080fd5b612268336128bc565b1561227257600080fd5b8061227f813360006128c2565b6000828152600e6020908152604090912082516122a293919291909101906132ce565b506001600d600e60008481526020019081526020016000206040516122c79190613ade565b9081526040805160209281900383019020805460ff1916931515939093179092556000838152600f909152204290556110bd33826129e0565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60008181805b82518160ff161015610f46576030838260ff168151811061238957634e487b7160e01b600052603260045260246000fd5b016020015160f81c108015906123ca57506039838260ff16815181106123bf57634e487b7160e01b600052603260045260246000fd5b016020015160f81c11155b15612420576123da600a83614e77565b91506030838260ff168151811061240157634e487b7160e01b600052603260045260246000fd5b0160200151612413919060f81c614eb7565b61241d9083614df5565b91505b8061242a81614f7e565b915050612358565b6000805b60155460ff821610156124e9578260405160200161245491906138e5565b6040516020818303038152906040528051906020012060158260ff168154811061248e57634e487b7160e01b600052603260045260246000fd5b906000526020600020016040516020016124a89190613ade565b6040516020818303038152906040528051906020012014156124d7576124cf816001614df5565b915050610869565b806124e181614f7e565b915050612436565b50600080fd5b60608161251457506040805180820190915260018152600360fc1b6020820152610869565b8160005b811561253e578061252881614f63565b91506125379050600a83614e1a565b9150612518565b60008167ffffffffffffffff81111561256757634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612591576020820181803683370190505b5090505b8415612110576125a6600183614ea0565b91506125b3600a86614f9e565b6125be906030614ddd565b60f81b8183815181106125e157634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a905350612603600a86614e1a565b9450612595565b600061261f8261261985612abf565b90612aef565b6024546001600160a01b039182169116149392505050565b60008084848460405160200161264f939291906138a6565b60408051808303601f19018152919052805160209091012095945050505050565b61267b848484612118565b61268784848484612b0b565b6119245760405162461bcd60e51b81526004016108d2906146fc565b60608151600014156126c45750604080516020810190915260008152610869565b600060405180606001604052806040815260200161500b60409139905060006003845160026126f39190614ddd565b6126fd9190614e1a565b612708906004614e58565b90506000612717826020614ddd565b67ffffffffffffffff81111561273d57634e487b7160e01b600052604160045260246000fd5b6040519080825280601f01601f191660200182016040528015612767576020820181803683370190505b509050818152600183018586518101602084015b818310156127d55760039283018051603f601282901c811687015160f890811b8552600c83901c8216880151811b6001860152600683901c8216880151811b60028601529116860151901b9382019390935260040161277b565b6003895106600181146127ef57600281146128005761280c565b613d3d60f01b60011983015261280c565b603d60f81b6000198301525b509398975050505050505050565b6001600160e01b031981166301ffc9a760e01b14919050565b61283e838383610acb565b6001600160a01b03831661285a5761285581612c26565b61287d565b816001600160a01b0316836001600160a01b03161461287d5761287d8382612c6a565b6001600160a01b0382166128995761289481612d07565b610acb565b826001600160a01b0316826001600160a01b031614610acb57610acb8282612de0565b3b151590565b6060600a82106128d157600080fd5b6040805180820190915260018152600360fc1b602082015260005b60068160ff16101561299a576014805490600061290883614f63565b91905055506000612710424489898960145460405160200161292f969594939291906144a3565b6040516020818303038152906040528051906020012060001c6129529190614f9e565b905082612964888361ffff1685612e24565b604051602001612975929190613901565b604051602081830303815290604052925050808061299290614f7e565b9150506128ec565b50600d816040516129ab91906138e5565b9081526040519081900360200190205460ff1615612110576129d885856129d3866001614ddd565b6128c2565b915050611fbd565b6001600160a01b038216612a065760405162461bcd60e51b81526004016108d290614a77565b612a0f81612008565b15612a2c5760405162461bcd60e51b81526004016108d290614794565b612a3860008383612833565b6001600160a01b0382166000908152600360205260408120805460019290612a61908490614ddd565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600081604051602001612ad2919061423a565b604051602081830303815290604052805190602001209050919050565b6000806000612afe8585612ff4565b91509150610f4681613064565b6000612b1f846001600160a01b03166128bc565b15612c1b57836001600160a01b031663150b7a02612b3b612004565b8786866040518563ffffffff1660e01b8152600401612b5d94939291906144f2565b602060405180830381600087803b158015612b7757600080fd5b505af1925050508015612ba7575060408051601f3d908101601f19168201909252612ba4918101906135e6565b60015b612c01573d808015612bd5576040519150601f19603f3d011682016040523d82523d6000602084013e612bda565b606091505b508051612bf95760405162461bcd60e51b81526004016108d2906146fc565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612110565b506001949350505050565b600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b60006001612c77846110c1565b612c819190614ea0565b600083815260076020526040902054909150808214612cd4576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b600854600090612d1990600190614ea0565b60008381526009602052604081205460088054939450909284908110612d4f57634e487b7160e01b600052603260045260246000fd5b906000526020600020015490508060088381548110612d7e57634e487b7160e01b600052603260045260246000fd5b6000918252602080832090910192909255828152600990915260408082208490558582528120556008805480612dc457634e487b7160e01b600052603160045260246000fd5b6001900381819060005260206000200160009055905550505050565b6000612deb836110c1565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b60606000805b60168460ff1660088110612e4e57634e487b7160e01b600052603260045260246000fd5b015460ff821610156124e957600060168560ff1660088110612e8057634e487b7160e01b600052603260045260246000fd5b018260ff1681548110612ea357634e487b7160e01b600052603260045260246000fd5b90600052602060002090601091828204019190066002029054906101000a900461ffff1690508261ffff168610158015612ee95750612ee28184614dc0565b61ffff1686105b15612fd45760ff8516158015612f03575060028260ff1611155b80612f2057508460ff166001148015612f20575060028260ff1611155b80612f3d57508460ff166002148015612f3d575060038260ff1611155b80612f5a57508460ff166003148015612f5a575060038260ff1611155b80612f7757508460ff166004148015612f77575060078260ff1611155b80612f9457508460ff166005148015612f94575060078260ff1611155b15612fbe576000878152601060205260408120805460019290612fb8908490614ddd565b90915550505b612fca8260ff166124ef565b9350505050611fbd565b612fde8184614dc0565b9250508080612fec90614f7e565b915050612e2a565b60008082516041141561302b5760208301516040840151606085015160001a61301f87828585613191565b9450945050505061305d565b825160401415613055576020830151604084015161304a868383613271565b93509350505061305d565b506000905060025b9250929050565b600081600481111561308657634e487b7160e01b600052602160045260246000fd5b141561309157610e72565b60018160048111156130b357634e487b7160e01b600052602160045260246000fd5b14156130d15760405162461bcd60e51b81526004016108d290614613565b60028160048111156130f357634e487b7160e01b600052602160045260246000fd5b14156131115760405162461bcd60e51b81526004016108d29061467a565b600381600481111561313357634e487b7160e01b600052602160045260246000fd5b14156131515760405162461bcd60e51b81526004016108d290614846565b600481600481111561317357634e487b7160e01b600052602160045260246000fd5b1415610e725760405162461bcd60e51b81526004016108d290614a35565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156131c85750600090506003613268565b8460ff16601b141580156131e057508460ff16601c14155b156131f15750600090506004613268565b6000600187878787604051600081526020016040526040516132169493929190614597565b6020604051602081039080840390855afa158015613238573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661326157600060019250925050613268565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b0161329287828885613191565b935093505050935093915050565b6040518061030001604052806018905b6132b8613352565b8152602001906001900390816132b05790505090565b8280546132da90614f06565b90600052602060002090601f0160209004810192826132fc5760008555613342565b82601f1061331557805160ff1916838001178555613342565b82800160010185558215613342579182015b82811115613342578251825591602001919060010190613327565b5061334e929150613371565b5090565b6040518061030001604052806018906020820280368337509192915050565b5b8082111561334e5760008155600101613372565b80356001600160a01b038116811461086957600080fd5b600082601f8301126133ad578081fd5b813567ffffffffffffffff8111156133c7576133c7614fde565b6133da601f8201601f1916602001614d8a565b8181528460208386010111156133ee578283fd5b816020850160208301379081016020019190915292915050565b600060208284031215613419578081fd5b611fbd82613386565b60008060408385031215613434578081fd5b61343d83613386565b915061344b60208401613386565b90509250929050565b600080600060608486031215613468578081fd5b61347184613386565b925061347f60208501613386565b9150604084013590509250925092565b600080600080608085870312156134a4578081fd5b6134ad85613386565b93506134bb60208601613386565b925060408501359150606085013567ffffffffffffffff8111156134dd578182fd5b6134e98782880161339d565b91505092959194509250565b60008060408385031215613507578182fd5b61351083613386565b915060208301358015158114613524578182fd5b809150509250929050565b60008060408385031215613541578182fd5b61354a83613386565b946020939093013593505050565b6000806000806080858703121561356d578384fd5b84359350602085013567ffffffffffffffff8082111561358b578485fd5b6135978883890161339d565b945060408701359150808211156135ac578384fd5b506135b98782880161339d565b949793965093946060013593505050565b6000602082840312156135db578081fd5b8135611fbd81614ff4565b6000602082840312156135f7578081fd5b8151611fbd81614ff4565b600060208284031215613613578081fd5b813567ffffffffffffffff811115613629578182fd5b6121108482850161339d565b60008060408385031215613647578182fd5b823567ffffffffffffffff81111561365d578283fd5b6136698582860161339d565b95602094909401359450505050565b600060208284031215613689578081fd5b5035919050565b600080604083850312156136a2578182fd5b8235915060208084013567ffffffffffffffff808211156136c1578384fd5b818601915086601f8301126136d4578384fd5b8135818111156136e6576136e6614fde565b6136f38485830201614d8a565b81815284810190848601875b848110156137b057813587016080818e03601f1901121561371e57898afd5b6137286080614d8a565b8982013588811115613738578b8cfd5b6137468f8c8386010161339d565b82525060408201358881111561375a578b8cfd5b6137688f8c8386010161339d565b8b8301525060608201358881111561377e578b8cfd5b61378c8f8c8386010161339d565b604083015250608091909101356060820152845292870192908701906001016136ff565b50979a909950975050505050505050565b600080604083850312156137d3578182fd5b50508035926020909101359150565b600081518084526137fa816020860160208601614eda565b601f01601f19169290920160200192915050565b80546000906002810460018083168061382857607f831692505b602080841082141561384857634e487b7160e01b86526022600452602486fd5b81801561385c576001811461386d5761389a565b60ff1986168952848901965061389a565b61387688614db4565b60005b868110156138925781548b820152908501908301613879565b505084890196505b50505050505092915050565b60006bffffffffffffffffffffffff198560601b16825283601483015282516138d6816034850160208701614eda565b91909101603401949350505050565b600082516138f7818460208701614eda565b9190910192915050565b60008351613913818460208801614eda565b835190830190613927818360208801614eda565b01949350505050565b60008551613942818460208a01614eda565b6d3c7265637420636c6173733d276360901b908301908152855161396d81600e840160208a01614eda565b642720783d2760d81b600e92909101918201528451613993816013840160208901614eda565b642720793d2760d81b6013929091019182015283516139b9816018840160208801614eda565b6213979f60e91b60189290910191820152601b019695505050505050565b600084516139e9818460208901614eda565b6e3d913a3930b4ba2fba3cb832911d1160891b908301908152613a0f600f82018661380e565b6a1116113b30b63ab2911d1160a91b81529050613a2f600b82018561380e565b62089f4b60ea1b81526003019695505050505050565b60008351613a57818460208801614eda565b80830190507f7b22646973706c61795f74797065223a2022626f6f73745f6e756d626572222c81527f202274726169745f74797065223a2022424220426f6f7374222c202276616c7560208201526232911d60e91b60408201528351613ac4816043840160208801614eda565b607d60f81b60439290910191820152604401949350505050565b6000611fbd828461380e565b60007f3c7376672069643d22632220786d6c6e733d22687474703a2f2f7777772e773382527f2e6f72672f323030302f7376672220707265736572766541737065637452617460208301527f696f3d22784d696e594d696e206d656574222076696577426f783d22302030206040830152660191b10191b11160cd1b60608301528351613b7e816067850160208801614eda565b620101f160ed1b6067918401918201528351613ba181606a840160208801614eda565b7f3c7374796c653e726563747b77696474683a3170783b6865696768743a317078606a92909101918201527f3b7d23637b73686170652d72656e646572696e673a2063726973706564676573608a8201527f3b7d2e6330307b66696c6c3a236438343463667d2e6330317b66696c6c3a236660aa8201527f31663166317d2e6330327b66696c6c3a236666346235347d2e6330337b66696c60ca8201527f6c3a236666366237317d2e6330347b66696c6c3a236666356336347d2e63303560ea8201527f7b66696c6c3a236666313332667d2e6330367b66696c6c3a236666343635317d61010a8201527f2e6330377b66696c6c3a236666343434667d2e6330387b66696c6c3a2366663361012a8201527f3634347d2e6330397b66696c6c3a236666333534337d2e6331307b66696c6c3a61014a8201527f236666333834357d2e6331317b66696c6c3a236666346435377d2e6331327b6661016a8201527f696c6c3a236331343666627d2e6331337b66696c6c3a233333336166667d2e6361018a8201527f31347b66696c6c3a236332646566637d2e6331357b66696c6c3a2365616634666101aa8201527f667d2e6331367b66696c6c3a236533656566617d2e6331377b66696c6c3a23636101ca8201527f66653466617d2e6331387b66696c6c3a236236316666637d2e6331397b66696c6101ea8201527f6c3a236266343266627d2e6332307b66696c6c3a236263333566627d2e63323161020a8201527f7b66696c6c3a236264333666627d2e6332327b66696c6c3a236665653462667d61022a8201527f2e6332337b66696c6c3a236666383830307d2e6332347b66696c6c3a2366666461024a8201527f3330307d2e6332357b66696c6c3a236666633230307d2e6332367b66696c6c3a61026a8201527f236666396130307d2e6332377b66696c6c3a236666623130307d2e6332387b6661028a8201527f696c6c3a236666613030307d2e6332397b66696c6c3a236636643930307d2e636102aa8201527f33307b66696c6c3a236630636530307d2e6333317b66696c6c3a2365656431306102ca8201527f307d2e6333327b66696c6c3a233030653538627d2e6333337b66696c6c3a23306102ea8201527f30646637317d2e6333347b66696c6c3a233030653238307d2e6333357b66696c61030a8201527f6c3a233030636235397d2e6333367b66696c6c3a233030643837347d2e63333761032a8201527f7b66696c6c3a233030643936337d2e6333387b66696c6c3a233030643336637d61034a8201527f2e6333397b66696c6c3a233030646537637d2e6334307b66696c6c3a2365626261036a8201527f3761357d2e6334317b66696c6c3a236533616139367d2e6334327b66696c6c3a61038a8201527f233039343337387d2e6334337b66696c6c3a236331613930307d2e6334347b666103aa8201527f696c6c3a236463633030307d2e6334357b66696c6c3a236661646531317d2e636103ca8201527f34367b66696c6c3a236638646330397d2e6334377b66696c6c3a2330306335656103ea8201527f367d2e6334387b66696c6c3a236463646364637d2e6334397b66696c6c3a236361040a8201527f31663866397d2e6335307b66696c6c3a236232623862397d2e6335317b66696c61042a8201527f6c3a236161623062317d2e6335327b66696c6c3a236230623462357d2e63353361044a8201527f7b66696c6c3a236532613338647d2e6335347b66696c6c3a236562613939327d61046a8201527f2e6335357b66696c6c3a236538623261307d2e6335367b66696c6c3a2366663061048a8201527f3034337d2e6335377b66696c6c3a236636373637627d2e6335387b66696c6c3a6104aa8201527f236337343234397d2e6335397b66696c6c3a236161333433617d2e6336307b666104ca8201527f696c6c3a233430343766667d2e6336317b66696c6c3a233538356566667d2e636104ea8201527f36327b66696c6c3a233464353466667d2e6336337b66696c6c3a23323232626661050a8201527f667d2e6336347b66696c6c3a233364343466667d2e6336357b66696c6c3a233361052a8201527f62343266667d2e6336367b66696c6c3a233332333966667d2e6336377b66696c61054a8201527f6c3a233334336266667d2e6336387b66696c6c3a233432343966667d2e63363961056a8201527f7b66696c6c3a233333333333337d2e6337307b66696c6c3a233232323232327d61058a8201527f2e6337317b66696c6c3a236363636366667d3c2f7374796c653e3c2f7376673e6105aa8201526105ca01949350505050565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000008152601c810191909152603c0190565b757b226e616d65223a2022426c6f636b436861696e202360501b8152835160009061429d816016850160208901614eda565b7f222c20226465736372697074696f6e223a202254686520426c6f636b436861696016918401918201527f6e7320636f6c6c656374696f6e2073657276657320617320746865206669727360368201527f74207068617365206f662042656e2042616c6c6572204469642054686520426c60568201527f6f636b436861696e2e222c2022696d616765223a2022646174613a696d61676560768201526f0bdcdd99cade1b5b0ed8985cd94d8d0b60821b609682015284516143658160a6840160208901614eda565b6e11161130ba3a3934b13aba32b9911d60891b60a6929091019182015283516143958160b5840160208801614eda565b607d60f81b60b5929091019182015260b60195945050505050565b6000605b60f81b825282516143cc816001850160208701614eda565b605d60f81b6001939091019283015250600201919050565b60007f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c0000008252825161441c81601d850160208701614eda565b91909101601d0192915050565b6000603160f81b82528251614445816001850160208701614eda565b9190910160010192915050565b60007f7374796c653d226261636b67726f756e642d636f6c6f723a23000000000000008252825161448a816019850160208701614eda565b61011160f51b6019939091019283015250601b01919050565b95865260208601949094526040850192909252606090811b6bffffffffffffffffffffffff1916908401526074830152609482015260b40190565b6001600160a01b0391909116815260200190565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614525908301846137e2565b9695505050505050565b6001600160a01b03929092168252602082015260400190565b6020808252825182820181905260009190848201906040850190845b8181101561458057835183529284019291840191600101614564565b50909695505050505050565b901515815260200190565b93845260ff9290921660208401526040830152606082015260800190565b600060208252611fbd60208301846137e2565b6000608082526145db60808301876137e2565b82810360208401526145ed81876137e2565b9050828103604084015261460181866137e2565b91505082606083015295945050505050565b60208082526018908201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604082015260600190565b6020808252601690820152751112549150d517d352539517d11254d0531313d5d15160521b604082015260600190565b6020808252601f908201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604082015260600190565b6020808252602b908201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560408201526a74206f6620626f756e647360a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b6020808252601c908201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604082015260600190565b60208082526024908201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646040820152637265737360e01b606082015260800190565b60208082526019908201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604082015261756560f01b606082015260800190565b6020808252600b908201526a14d0531157d0d313d4d15160aa1b604082015260600190565b6020808252602c908201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b602080825260099082015268121054d217d190525360ba1b604082015260600190565b60208082526038908201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760408201527f6e6572206e6f7220617070726f76656420666f7220616c6c0000000000000000606082015260800190565b6020808252602a908201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604082015269726f206164647265737360b01b606082015260800190565b60208082526029908201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460408201526832b73a103a37b5b2b760b91b606082015260800190565b6020808252600f908201526e115610d1515117d4115497d3525395608a1b604082015260600190565b60208082526022908201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604082015261756560f01b606082015260800190565b6020808252818101527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604082015260600190565b6020808252602c908201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860408201526b34b9ba32b73a103a37b5b2b760a11b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526029908201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960408201526839903737ba1037bbb760b91b606082015260800190565b60208082526033908201527f4275726e696e67206973206f6e6c7920616c6c6f776564207768656e2074686560408201527208199a5c9cdd080c9ac81a5cc81b5a5b9d1959606a1b606082015260800190565b60208082526021908201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656040820152603960f91b606082015260800190565b602080825260099082015268121054d217d554d15160ba1b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b60208082526016908201527527aaaa2fa7a32fa9aa27a1a5afa327a92fa2aa2422a960511b604082015260600190565b6020808252602c908201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60408201526b7574206f6620626f756e647360a01b606082015260800190565b6020808252603c908201527f6d696e74696e67207769746820424273206973206f6e6c7920616c6c6f77656460408201527f207768656e2074686520666972737420326b206973206d696e74656400000000606082015260800190565b60208082526010908201526f0929ca6aa8c8c9286928a9ca8be8aa8960831b604082015260600190565b90815260200190565b60405181810167ffffffffffffffff81118282101715614dac57614dac614fde565b604052919050565b60009081526020902090565b600061ffff80831681851680830382111561392757613927614fb2565b60008219821115614df057614df0614fb2565b500190565b600060ff821660ff84168060ff03821115614e1257614e12614fb2565b019392505050565b600082614e2957614e29614fc8565b500490565b600061ffff80831681851681830481118215151615614e4f57614e4f614fb2565b02949350505050565b6000816000190483118215151615614e7257614e72614fb2565b500290565b600060ff821660ff84168160ff0481118215151615614e9857614e98614fb2565b029392505050565b600082821015614eb257614eb2614fb2565b500390565b600060ff821660ff841680821015614ed157614ed1614fb2565b90039392505050565b60005b83811015614ef5578181015183820152602001614edd565b838111156119245750506000910152565b600281046001821680614f1a57607f821691505b60208210811415614f3b57634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff80831681811415614f5957614f59614fb2565b6001019392505050565b6000600019821415614f7757614f77614fb2565b5060010190565b600060ff821660ff811415614f9557614f95614fb2565b60010192915050565b600082614fad57614fad614fc8565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114610e7257600080fdfe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa2646970667358221220ed4a35c7f6db068b0a3d75c6902e241716897005974cc607c7895ac2561a0dca64736f6c63430008000033
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.