ERC-721
Overview
Max Total Supply
1,000 OCPC
Holders
724
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 OCPCLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
OnChainProfitCalculator
Compiler Version
v0.8.13+commit.abaa5c0e
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 "erc721a/contracts/ERC721A.sol"; import "./GenZeroProfitCalculator.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/utils/structs/BitMaps.sol"; import "@openzeppelin/contracts/utils/Base64.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; /// @title This NFT is linked to its proper floor price, totally on chain. /// @author anon contract OnChainProfitCalculator is ERC721A, ReentrancyGuard, Ownable, DefaultOperatorFilterer, GenZeroProfitCalculator{ uint256 public COLLECTION_SIZE=1000; /// @dev Profit calculation mapping(address => uint256) internal gasCost; mapping(address => uint256) internal numberSales; mapping(address => uint256) internal profits; mapping(address => uint256) internal cost; address internal lastFrom; address internal lastTo; address internal opensea = 0x1E0049783F008A0085193E00003D00cd54003c71; // opensea approval address internal openseaSale = 0x00000000006c3852cbEf3e08E8dF289169EdE581; // opensea money distributor. Yet another great invention of two contract addresses. mapping(uint256 => address[]) public wallets; uint256 public lastSalePrice; /// @dev art. mapping(uint256 => address) public genArtAddress; mapping(uint256 => uint256) public genArtChoice; mapping(uint256 => uint256) public genArtCount; mapping(uint256 => uint256) public genArtLimit; mapping(uint256 => uint256) public genArtPrice; mapping(uint256 => address) public genArtPayoutAddress; /// @dev modifiers modifier onlyHolder(uint256 tokenId) { require(msg.sender == ownerOf(tokenId), "You need to be the holder of this NFT"); _; } constructor() ERC721A("OnChainProfitCalculator", "OCPC") { genArtPrice[0] = 0.0069 ether; genArtAddress[0] = address(this); genArtLimit[0] = 10 ** 18; // 20 for team reserve. _safeMint(msg.sender, 20); } /// @notice Mint process. function mint() external{ // Free mint, 1 mints per tx, total supply 1000. require(totalSupply() + 1 <= COLLECTION_SIZE, "Reached max supply"); require(_numberMinted(msg.sender) < 1, "Max mint: 1"); _safeMint(msg.sender, 1); gasCost[msg.sender] += tx.gasprice * 99929; } /// @notice Strings useful for properties and drawing. function stringETHint(int256 val) internal pure returns (string memory){ string memory sign = val < 0 ? "-" : ""; val = val < 0 ? -val : val; uint256 ent = uint256(val) / 10 ** 18; uint256 dec = (uint256(val) - 10 ** 18 * ent) / 10 ** 15; if (ent > 0 || dec > 0){ return string(abi.encodePacked( sign, Strings.toString(ent), ".", dec < 100 ? "0" : "", dec < 10 ? "0" : "", Strings.toString(dec) ) ); } else{ return "0"; } } function stringETHuint(uint256 val) internal pure returns (string memory){ uint256 ent = uint256(val) / 10 ** 18; uint256 dec = (uint256(val) - 10 ** 18 * ent) / 10 ** 15; if (ent > 0 || dec > 0){ return string(abi.encodePacked( Strings.toString(ent), ".", dec < 100 ? "0" : "", dec < 10 ? "0" : "", Strings.toString(dec) ) ); } else{ return "0"; } } /// @notice Set wallet addresses if multiple. function setWallets( address[] calldata addresses, uint256 tokenId ) external onlyHolder(tokenId){ wallets[tokenId] = addresses; } /// @notice Get profit profile from tokenId. function getProfitCalculator(uint256 tokenId) public view returns (ProfitCalculator memory){ address[] memory _wallets; if (wallets[tokenId].length > 0){ _wallets = wallets[tokenId]; } else{ _wallets = new address[](1); _wallets[0] = ownerOf(tokenId); } ProfitCalculator memory pc; pc.tokenId = tokenId; pc.holder = Strings.toHexString(uint160(ownerOf(tokenId)), 20); for(uint i=0; i<_wallets.length; i++){ pc.totalNumberSales += numberSales[_wallets[i]]; pc.totalBalance += balanceOf(_wallets[i]); pc.totalGasCost += gasCost[_wallets[i]]; pc.totalCost += cost[_wallets[i]]; pc.totalProfit += profits[_wallets[i]]; } pc.totalCost += pc.totalGasCost; pc.potentialTotalProfit = int(pc.totalProfit) + int(lastSalePrice * pc.totalBalance * 875 / 1000) - int(pc.totalCost); pc.numberBought = Strings.toString(pc.totalNumberSales + pc.totalBalance); pc.numberRemaining = Strings.toString(pc.totalBalance); pc.realizedProfit = stringETHint(int(pc.totalProfit) - int(pc.totalCost)); pc.unrealizedProfit = stringETHint(int(lastSalePrice * pc.totalBalance * 875 / 1000)); pc.stringPotentialTotalProfit = stringETHint(pc.potentialTotalProfit); pc.stringTotalCost = stringETHuint(pc.totalCost); if (pc.totalCost == 0){ pc.returnRate = "0"; } else{ pc.returnRate = stringETHint((int(pc.potentialTotalProfit) * 10 ** 20 / int(pc.totalCost))); } return pc; } /// @notice NFT metadata. function property(ProfitCalculator memory pc) internal view returns (string memory){ string memory _property = ""; _property = string(abi.encodePacked( '{"display_type": "number", "trait_type":"Number Bought","value":', pc.numberBought, '},', '{"display_type": "number", "trait_type":"Number Remaining","value":', pc.numberRemaining, '},' ) ); _property = string(abi.encodePacked( _property, '{"display_type": "number", "trait_type":"Realized Profit","value":', pc.realizedProfit, '},', '{"display_type": "number", "trait_type":"Unrealized Profit","value":', pc.unrealizedProfit, '},' ) ); _property = string(abi.encodePacked( _property, '{"display_type": "number", "trait_type":"Potential Total Profit","value":', pc.stringPotentialTotalProfit, '},', '{"display_type": "number", "trait_type":"Total Cost","value":', pc.stringTotalCost, '},' ) ); _property = string(abi.encodePacked( _property, '{"display_type": "number", "trait_type":"Return Rate","value":', pc.returnRate, '},', '{"display_type": "number", "trait_type":"Art Type","value":', Strings.toString(genArtChoice[pc.tokenId]), '}' ) ); return _property; } /// @notice Next generation art generated from profit profile. function setGenArtAddressArtist(uint256 generation, address _address, uint256 _limit, uint256 _price, address payoutAddress) external{ require(genArtAddress[generation] == address(0), "This generation was set by others"); genArtAddress[generation] = _address; genArtLimit[generation] = _limit; genArtPrice[generation] = _price; genArtPayoutAddress[generation] = payoutAddress; } function getGenArtAddress(uint256 tokenId) internal view returns (address){ return genArtAddress[genArtChoice[tokenId]]; } function setGenArtAddressHolder(uint256 tokenId, uint256 generation) external payable onlyHolder(tokenId){ require(genArtAddress[generation] != address(0), "Not drawn yet"); require(msg.value >= genArtPrice[generation], "Not sufficient funds"); require(genArtCount[generation] < genArtLimit[generation], "Limit reached!"); genArtChoice[tokenId] = generation; genArtCount[generation]++; (bool success, ) = genArtPayoutAddress[generation].call{value: msg.value}(""); // Pay to the author. require(success, "Transfer failed."); } function tryDifferentGeneration(uint256 tokenId, uint256 generation) public view returns (string memory){ string memory _name = string(abi.encodePacked("Profit Calculator #", Strings.toString(tokenId))); string memory _description = "A NFT collection which calculate your profits on its own. The first onchain NFT which tracks its own floor price."; ProfitCalculator memory pc = getProfitCalculator(tokenId); string memory _properties = property(pc); string memory _image = ProfitCalculatorDrawingContract(genArtAddress[generation]).image(pc); return string( abi.encodePacked( "data:application/json;base64,", Base64.encode( bytes( abi.encodePacked( '{"name":"', _name, '", "description": "', _description, '", "attributes": [', _properties, '], "image":"', _image, '"', '}' ) ) ) ) ); } function tokenURI(uint256 tokenId) public view override returns (string memory){ string memory _name = string(abi.encodePacked("Profit Calculator #", Strings.toString(tokenId))); string memory _description = "A NFT collection which calculate your profits on its own. The first onchain NFT which tracks its own floor price."; ProfitCalculator memory pc = getProfitCalculator(tokenId); string memory _properties = property(pc); string memory _image = ProfitCalculatorDrawingContract(getGenArtAddress(tokenId)).image(pc); return string( abi.encodePacked( "data:application/json;base64,", Base64.encode( bytes( abi.encodePacked( '{"name":"', _name, '", "description": "', _description, '", "attributes": [', _properties, '], "image":"', _image, '"', '}' ) ) ) ) ); } function setOpensea(address operator) external onlyOwner{ opensea = operator; // Just in case opensea changes their contract again. } function setOpenseaSale(address operator) external onlyOwner{ openseaSale = operator; } function isApprovedForAll(address owner, address operator) public view override returns (bool) { return (opensea == operator); } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { require(operator == opensea, "This is only tradable on opensea"); super.setApprovalForAll(operator, approved); } function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) { require(operator == opensea, "This is only tradable on opensea"); super.approve(operator, tokenId); } /// @notice Add gas calculation function transferFrom( address from, address to, uint256 tokenId ) public override onlyAllowedOperator(from){ require(tokenId != 0, "Token ID 0 is for advertisement usage!"); if (msg.sender == from){ gasCost[from] += tx.gasprice * 49815; } else{ // sales on secondary. numberSales[from] += 1; // Handling the last sale. Otherwise receive() will lead to execution reverted error on opensea. lastFrom = from; lastTo = to; gasCost[lastTo] += tx.gasprice * 260000; } super.transferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data) public override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } /// @notice Secondary sales fee /// @dev We use last sale price as our floor approximation. This is legit since we don't have rarities. However, there are methods so that rarities won't be an issue. receive() external payable{ // 10% royalty if (msg.sender == openseaSale){ lastSalePrice = msg.value * 10; cost[lastTo] += lastSalePrice; profits[lastFrom] += lastSalePrice * 875 / 1000; // I gave up calculating royalties per market Place. It worked with my proper implementation of transferFrom/isApprovedForAll but fuck you opensea. /* Fun fact: With Opensea contract, (dated 2023/01/04) sales = transferFrom then send ETH Bulk sales = send ETH then transferFrom /// @dev status is used to keep track of only sales. More can be done but more gas is needed, too. (keeping track of the number of NFT transfered in the same tx is not easy. You don't know when is the end and thus more gas to store useless variables.)... /// @dev You are welcome to repeat the last 3 words in line 306. */ } } /// @notice Withdraw functions function withdraw() external onlyOwner { (bool success, ) = msg.sender.call{value: address(this).balance}(""); require(success, "Transfer failed."); } function withdrawERC20(address currency, uint256 quantity) external onlyOwner{ ERC20(currency).transfer(msg.sender, quantity); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import { ProfitCalculatorDrawingContract } from "./IProfitCalculator.sol"; import "@openzeppelin/contracts/utils/Base64.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; contract GenZeroProfitCalculator is ProfitCalculatorDrawingContract{ function addText(string memory text, string memory x, string memory y, string memory class) internal pure returns (string memory){ return string( abi.encodePacked( ' <text x="', x, '" y="', y, '" class="', class, '">', text, '</text> ' ) ); } function addText(string memory text, string memory text2, string memory x, string memory y, string memory class) internal pure returns (string memory){ return string( abi.encodePacked( ' <text x="', x, '" y="', y, '" class="', class, '">', text, text2, '</text> ' ) ); } // TODO prettier positions/fonts function svgTotalProfit(ProfitCalculator memory pc) internal pure returns (string memory){ string memory profitColor; if (pc.potentialTotalProfit < 0) { profitColor = "#F0A8AA"; } else{ profitColor = "#CAF0AA"; } return string( abi.encodePacked( ' <text x="50%" y="15%" dominant-baseline="middle" text-anchor="middle" font-size="13px" fill="#E5E6D9" font-family="helvetica" >', pc.holder, '</text> <text x="50%" y="75%" dominant-baseline="middle" text-anchor="middle" font-size="24px" fill="#E5E6D9" font-family="helvetica" >Potential Total Profit</text> <text x="50%" y="88%" dominant-baseline="middle" text-anchor="end" font-size="18px" fill="#E5E6D9" font-family="helvetica" >', pc.stringPotentialTotalProfit, ' \xCE\x9E</text> <text x="50%" y="88%" dominant-baseline="middle" text-anchor="start" font-size="18px" fill="', profitColor, '" font-family="helvetica" > (', pc.returnRate, ' %)</text> <text x="50%" y="8%" dominant-baseline="middle" text-anchor="middle" font-size="18px" fill="#E5E6D9" font-family="helvetica" >On Chain Profit Calculator</text>' ) ); } function addLine(string memory y) internal pure returns (string memory){ return string(abi.encodePacked(' <line x1="10%" y1="', y, '" x2="90%" y2="', y, '" stroke="#A2CCD6" stroke-width="1px"/>')); } function image(ProfitCalculator memory pc) public pure override returns (string memory){ string memory _image; if (pc.tokenId == 0){ _image = string( abi.encodePacked( '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350"> <style>.Start { fill: #F0A8AA; font-family: helvetica; font-size: 12px; dominant-baseline: bottom; text-anchor: text;} </style> <rect width="100%" height="100%" fill="#2F2D30" />', addText("Don't buy this NFT it is for advertisement usage", "5%", "25%", "Start"), addText("Please set the gas limit to 400000 per NFT.", "5%", "35%", "Start"), addText("Usually it will take 240000 or 320000,", "5%", "45%", "Start"), addText("otherwise there is 80% chance for execution reverted error.", "5%", "55%", "Start"), '</svg>' ) ); _image = string( abi.encodePacked( "data:image/svg+xml;base64,", Base64.encode( bytes( _image ) ) ) ); return _image; } _image = string( abi.encodePacked( '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMinYMin meet" viewBox="0 0 350 350"> <style>.Start { fill: #E5E6D9; font-family: helvetica; font-size: 14px; dominant-baseline: bottom; text-anchor: start;} .End { fill: #E5E6D9; font-family: helvetica; font-size: 16px; dominant-baseline: bottom; text-anchor: end;} </style> <rect width="100%" height="100%" fill="#2F2D30" />', addText("Number bought:", "10%", "25%", "Start"), addText("Number remaining:", "10%", "35%", "Start"), addText("Total cost:", "10%", "45%", "Start"), addText("Realized profit:", "10%", "55%", "Start") ) ); _image = string( abi.encodePacked( _image, addText("Unrealized profit:", "10%", "65%", "Start"), svgTotalProfit(pc), addText(pc.numberBought, "", "90%", "25%", "End"), addText(pc.numberRemaining, "", "90%", "35%", "End"), addText(pc.stringTotalCost, " \xCE\x9E", "90%", "45%", "End"), addText(pc.realizedProfit, " \xCE\x9E", "90%", "55%", "End"), addText(pc.unrealizedProfit, " \xCE\x9E", "90%", "65%", "End") ) ); _image = string( abi.encodePacked( _image, addLine("26%"), addLine("36%"), addLine("46%"), addLine("56%"), addLine("66%"), '</svg>' ) ); _image = string( abi.encodePacked( "data:image/svg+xml;base64,", Base64.encode( bytes( _image ) ) ) ); return _image; } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.2 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Reference type for token approval. struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @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) public virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @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) public virtual override { if (operator == _msgSenderERC721A()) revert ApproveToCaller(); _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @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. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId]`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) public virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @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 memory _data ) public virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), // but we allocate 0x80 bytes to keep the free memory pointer 32-byte word aliged. // We will need 1 32-byte word to store the length, // and 3 32-byte words to store a maximum of 78 digits. Total: 0x20 + 3 * 0x20 = 0x80. str := add(mload(0x40), 0x80) // Update the free memory pointer to allocate. mstore(0x40, str) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Base64.sol) pragma solidity ^0.8.0; /** * @dev Provides a set of functions to operate with Base64 strings. * * _Available since v4.5._ */ library Base64 { /** * @dev Base64 Encoding/Decoding Table */ string internal constant _TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /** * @dev Converts a `bytes` to its Bytes64 `string` representation. */ function encode(bytes memory data) internal pure returns (string memory) { /** * Inspired by Brecht Devos (Brechtpd) implementation - MIT licence * https://github.com/Brechtpd/base64/blob/e78d9fd951e7b0977ddca77d92dc85183770daf4/base64.sol */ if (data.length == 0) return ""; // Loads the table into memory string memory table = _TABLE; // Encoding takes 3 bytes chunks of binary data from `bytes` data parameter // and split into 4 numbers of 6 bits. // The final Base64 length should be `bytes` data length multiplied by 4/3 rounded up // - `data.length + 2` -> Round up // - `/ 3` -> Number of 3-bytes chunks // - `4 *` -> 4 characters for each chunk string memory result = new string(4 * ((data.length + 2) / 3)); /// @solidity memory-safe-assembly assembly { // Prepare the lookup table (skip the first "length" byte) let tablePtr := add(table, 1) // Prepare result pointer, jump over length let resultPtr := add(result, 32) // Run over the input, 3 bytes at a time for { let dataPtr := data let endPtr := add(data, mload(data)) } lt(dataPtr, endPtr) { } { // Advance 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // To write each character, shift the 3 bytes (18 bits) chunk // 4 times in blocks of 6 bits for each character (18, 12, 6, 0) // and apply logical AND with 0x3F which is the number of // the previous character in the ASCII table prior to the Base64 Table // The result is then added to the table to get the character to write, // and finally write it in the result pointer but with a left shift // of 256 (1 byte) - 8 (1 ASCII char) = 248 bits mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(shr(6, input), 0x3F)))) resultPtr := add(resultPtr, 1) // Advance mstore8(resultPtr, mload(add(tablePtr, and(input, 0x3F)))) resultPtr := add(resultPtr, 1) // Advance } // When data `bytes` is not exactly 3 bytes long // it is padded with `=` characters at the end switch mod(mload(data), 3) case 1 { mstore8(sub(resultPtr, 1), 0x3d) mstore8(sub(resultPtr, 2), 0x3d) } case 2 { mstore8(sub(resultPtr, 1), 0x3d) } } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens 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 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/structs/BitMaps.sol) pragma solidity ^0.8.0; /** * @dev Library for managing uint256 to bool mapping in a compact and efficient way, providing the keys are sequential. * Largelly inspired by Uniswap's https://github.com/Uniswap/merkle-distributor/blob/master/contracts/MerkleDistributor.sol[merkle-distributor]. */ library BitMaps { struct BitMap { mapping(uint256 => uint256) _data; } /** * @dev Returns whether the bit at `index` is set. */ function get(BitMap storage bitmap, uint256 index) internal view returns (bool) { uint256 bucket = index >> 8; uint256 mask = 1 << (index & 0xff); return bitmap._data[bucket] & mask != 0; } /** * @dev Sets the bit at `index` to the boolean `value`. */ function setTo( BitMap storage bitmap, uint256 index, bool value ) internal { if (value) { set(bitmap, index); } else { unset(bitmap, index); } } /** * @dev Sets the bit at `index`. */ function set(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = 1 << (index & 0xff); bitmap._data[bucket] |= mask; } /** * @dev Unsets the bit at `index`. */ function unset(BitMap storage bitmap, uint256 index) internal { uint256 bucket = index >> 8; uint256 mask = 1 << (index & 0xff); bitmap._data[bucket] &= ~mask; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract ProfitCalculatorDrawingContract{ struct ProfitCalculator { uint256 totalNumberSales; uint256 totalBalance; uint256 totalGasCost; uint256 totalCost; uint256 totalProfit; int256 potentialTotalProfit; uint256 tokenId; string holder; string numberBought; string numberRemaining; string realizedProfit; string unrealizedProfit; string stringPotentialTotalProfit; string stringTotalCost; string returnRate; } function image(ProfitCalculator memory pc) public virtual view returns (string memory); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.2 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * The caller cannot approve to their own address. */ error ApproveToCaller(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * 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, bytes calldata data ) external; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} * whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token * by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the * zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} * for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) external view returns (bool); // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. */ abstract contract OperatorFilterer { error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } function _checkFilterOperator(address operator) internal view virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function unregister(address addr) external; function updateOperator(address registrant, address operator, bool filtered) external; function updateOperators(address registrant, address[] calldata operators, bool filtered) external; function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"ApproveToCaller","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","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":"COLLECTION_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","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":"","type":"uint256"}],"name":"genArtAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"genArtChoice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"genArtCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"genArtLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"genArtPayoutAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"genArtPrice","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":"getProfitCalculator","outputs":[{"components":[{"internalType":"uint256","name":"totalNumberSales","type":"uint256"},{"internalType":"uint256","name":"totalBalance","type":"uint256"},{"internalType":"uint256","name":"totalGasCost","type":"uint256"},{"internalType":"uint256","name":"totalCost","type":"uint256"},{"internalType":"uint256","name":"totalProfit","type":"uint256"},{"internalType":"int256","name":"potentialTotalProfit","type":"int256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"holder","type":"string"},{"internalType":"string","name":"numberBought","type":"string"},{"internalType":"string","name":"numberRemaining","type":"string"},{"internalType":"string","name":"realizedProfit","type":"string"},{"internalType":"string","name":"unrealizedProfit","type":"string"},{"internalType":"string","name":"stringPotentialTotalProfit","type":"string"},{"internalType":"string","name":"stringTotalCost","type":"string"},{"internalType":"string","name":"returnRate","type":"string"}],"internalType":"struct ProfitCalculatorDrawingContract.ProfitCalculator","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"totalNumberSales","type":"uint256"},{"internalType":"uint256","name":"totalBalance","type":"uint256"},{"internalType":"uint256","name":"totalGasCost","type":"uint256"},{"internalType":"uint256","name":"totalCost","type":"uint256"},{"internalType":"uint256","name":"totalProfit","type":"uint256"},{"internalType":"int256","name":"potentialTotalProfit","type":"int256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"holder","type":"string"},{"internalType":"string","name":"numberBought","type":"string"},{"internalType":"string","name":"numberRemaining","type":"string"},{"internalType":"string","name":"realizedProfit","type":"string"},{"internalType":"string","name":"unrealizedProfit","type":"string"},{"internalType":"string","name":"stringPotentialTotalProfit","type":"string"},{"internalType":"string","name":"stringTotalCost","type":"string"},{"internalType":"string","name":"returnRate","type":"string"}],"internalType":"struct ProfitCalculatorDrawingContract.ProfitCalculator","name":"pc","type":"tuple"}],"name":"image","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastSalePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mint","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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"generation","type":"uint256"},{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_limit","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"},{"internalType":"address","name":"payoutAddress","type":"address"}],"name":"setGenArtAddressArtist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"generation","type":"uint256"}],"name":"setGenArtAddressHolder","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"setOpensea","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"setOpenseaSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"setWallets","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"generation","type":"uint256"}],"name":"tryDifferentGeneration","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"wallets","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"currency","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040526103e8600a55601180546001600160a01b0319908116731e0049783f008a0085193e00003d00cd54003c7117909155601280549091166e6c3852cbef3e08e8df289169ede5811790553480156200005a57600080fd5b50604080518082018252601781527f4f6e436861696e50726f66697443616c63756c61746f720000000000000000006020808301918252835180850190945260048452634f43504360e01b908401528151733cc6cdda760b79bafa08df41ecfa224f810dceb693600193929091620000d591600291620005ae565b508051620000eb906003906020840190620005ae565b5060008055505060016008556200010233620002eb565b6daaeb6d7670e522a718067333cd4e3b15620002475780156200019557604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200017657600080fd5b505af11580156200018b573d6000803e3d6000fd5b5050505062000247565b6001600160a01b03821615620001e65760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af2903906044016200015b565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b1580156200022d57600080fd5b505af115801562000242573d6000803e3d6000fd5b505050505b5050600080526618838370f340007fd2ac945fcc0096878c763e37d6929b78378c1a2defabde8ba7ee5ed1d6e7a5b2557fa31547ce6245cdb9ecea19cf8c7eb9f5974025bb4075011409251ae855b30aed80546001600160a01b031916301790556018602052670de0b6b3a76400007f999d26de3473317ead3eeaf34ca78057f1439db67b6953469c3c96ce9caf6bd755620002e53360146200033d565b6200073e565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6200035f8282604051806020016040528060008152506200036360201b60201c565b5050565b6200036f8383620003da565b6001600160a01b0383163b15620003d5576000548281035b60018101906200039d90600090879086620004ba565b620003bb576040516368d2bf6b60e11b815260040160405180910390fd5b81811062000387578160005414620003d257600080fd5b50505b505050565b6000805490829003620004005760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083906000805160206200573d8339815191528180a4600183015b8181146200048f57808360006000805160206200573d833981519152600080a460010162000466565b5081600003620004b157604051622e076360e81b815260040160405180910390fd5b60005550505050565b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290620004f190339089908890889060040162000654565b6020604051808303816000875af19250505080156200052f575060408051601f3d908101601f191682019092526200052c91810190620006cf565b60015b62000591573d80801562000560576040519150601f19603f3d011682016040523d82523d6000602084013e62000565565b606091505b50805160000362000589576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050949350505050565b828054620005bc9062000702565b90600052602060002090601f016020900481019282620005e057600085556200062b565b82601f10620005fb57805160ff19168380011785556200062b565b828001600101855582156200062b579182015b828111156200062b5782518255916020019190600101906200060e565b50620006399291506200063d565b5090565b5b808211156200063957600081556001016200063e565b600060018060a01b038087168352602081871681850152856040850152608060608501528451915081608085015260005b82811015620006a35785810182015185820160a00152810162000685565b82811115620006b657600060a084870101525b5050601f01601f19169190910160a00195945050505050565b600060208284031215620006e257600080fd5b81516001600160e01b031981168114620006fb57600080fd5b9392505050565b600181811c908216806200071757607f821691505b6020821081036200073857634e487b7160e01b600052602260045260246000fd5b50919050565b614fef806200074e6000396000f3fe6080604052600436106102295760003560e01c8063801059bc11610123578063a22cb465116100ab578063d10fce601161006f578063d10fce6014610739578063d8258d9514610759578063e3e107901461076f578063e985e9c5146107a5578063f2fde38b146107d657600080fd5b8063a22cb46514610699578063a4ce69d9146106b9578063b776c8a6146106d9578063b88d4fde146106f9578063c87b56dd1461071957600080fd5b80638da5cb5b116100f25780638da5cb5b146105fd5780638f8682da1461061b57806391b090481461062e57806395d89b4114610664578063a1db97821461067957600080fd5b8063801059bc1461057a578063833de2b41461059a57806386f5960f146105ba57806387431c20146105d057600080fd5b806341f43434116101b15780636778a0f2116101755780636778a0f2146104cb57806370a08231146104f857806370baf9ca14610518578063710e99a014610538578063715018a61461056557600080fd5b806341f434341461040f57806342842e0e146104315780634e30aaeb14610451578063591df6cd1461047e5780636352211e146104ab57600080fd5b80631249c58b116101f85780631249c58b1461038257806318160ddd1461039757806323b872dd146103ba5780633ccfd60b146103da5780634152e2eb146103ef57600080fd5b806301ffc9a7146102d357806306fdde0314610308578063081812fc1461032a578063095ea7b31461036257600080fd5b366102ce576012546001600160a01b031633036102cc5761024b34600a6132bb565b60148190556010546001600160a01b03166000908152600e60205260408120805490919061027a9084906132da565b90915550506014546103e8906102929061036b6132bb565b61029c9190613308565b600f546001600160a01b03166000908152600d6020526040812080549091906102c69084906132da565b90915550505b005b600080fd5b3480156102df57600080fd5b506102f36102ee366004613332565b6107f6565b60405190151581526020015b60405180910390f35b34801561031457600080fd5b5061031d610848565b6040516102ff91906133a7565b34801561033657600080fd5b5061034a6103453660046133ba565b6108da565b6040516001600160a01b0390911681526020016102ff565b34801561036e57600080fd5b506102cc61037d3660046133ef565b61091e565b34801561038e57600080fd5b506102cc610999565b3480156103a357600080fd5b50600154600054035b6040519081526020016102ff565b3480156103c657600080fd5b506102cc6103d5366004613419565b610a8a565b3480156103e657600080fd5b506102cc610bfe565b3480156103fb57600080fd5b5061034a61040a366004613455565b610c94565b34801561041b57600080fd5b5061034a6daaeb6d7670e522a718067333cd4e81565b34801561043d57600080fd5b506102cc61044c366004613419565b610ccc565b34801561045d57600080fd5b506103ac61046c3660046133ba565b60186020526000908152604090205481565b34801561048a57600080fd5b5061049e6104993660046133ba565b610cf1565b6040516102ff9190613477565b3480156104b757600080fd5b5061034a6104c63660046133ba565b611139565b3480156104d757600080fd5b506103ac6104e63660046133ba565b60166020526000908152604090205481565b34801561050457600080fd5b506103ac6105133660046135c0565b611144565b34801561052457600080fd5b5061031d610533366004613455565b611193565b34801561054457600080fd5b506103ac6105533660046133ba565b60196020526000908152604090205481565b34801561057157600080fd5b506102cc6112d4565b34801561058657600080fd5b5061031d6105953660046136d2565b6112e8565b3480156105a657600080fd5b506102cc6105b5366004613892565b611b3a565b3480156105c657600080fd5b506103ac60145481565b3480156105dc57600080fd5b506103ac6105eb3660046133ba565b60176020526000908152604090205481565b34801561060957600080fd5b506009546001600160a01b031661034a565b6102cc610629366004613455565b611b94565b34801561063a57600080fd5b5061034a6106493660046133ba565b6015602052600090815260409020546001600160a01b031681565b34801561067057600080fd5b5061031d611da0565b34801561068557600080fd5b506102cc6106943660046133ef565b611daf565b3480156106a557600080fd5b506102cc6106b436600461391b565b611e28565b3480156106c557600080fd5b506102cc6106d4366004613952565b611e99565b3480156106e557600080fd5b506102cc6106f43660046135c0565b611f62565b34801561070557600080fd5b506102cc6107143660046139a2565b611f8c565b34801561072557600080fd5b5061031d6107343660046133ba565b611fb2565b34801561074557600080fd5b506102cc6107543660046135c0565b6120f1565b34801561076557600080fd5b506103ac600a5481565b34801561077b57600080fd5b5061034a61078a3660046133ba565b601a602052600090815260409020546001600160a01b031681565b3480156107b157600080fd5b506102f36107c0366004613a1e565b6011546001600160a01b03918216911614919050565b3480156107e257600080fd5b506102cc6107f13660046135c0565b61211b565b60006301ffc9a760e01b6001600160e01b03198316148061082757506380ac58cd60e01b6001600160e01b03198316145b806108425750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606002805461085790613a51565b80601f016020809104026020016040519081016040528092919081815260200182805461088390613a51565b80156108d05780601f106108a5576101008083540402835291602001916108d0565b820191906000526020600020905b8154815290600101906020018083116108b357829003601f168201915b5050505050905090565b60006108e582612191565b610902576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b81610928816121b8565b6011546001600160a01b0384811691161461098a5760405162461bcd60e51b815260206004820181905260248201527f54686973206973206f6e6c79207472616461626c65206f6e206f70656e73656160448201526064015b60405180910390fd5b6109948383612271565b505050565b600a54600154600054036109ae9060016132da565b11156109f15760405162461bcd60e51b815260206004820152601260248201527152656163686564206d617820737570706c7960701b6044820152606401610981565b3360009081526005602052604090819020546001911c67ffffffffffffffff1610610a4c5760405162461bcd60e51b815260206004820152600b60248201526a4d6178206d696e743a203160a81b6044820152606401610981565b610a57336001612311565b610a643a620186596132bb565b336000908152600b602052604081208054909190610a839084906132da565b9091555050565b826001600160a01b0381163314610aa457610aa4336121b8565b81600003610b035760405162461bcd60e51b815260206004820152602660248201527f546f6b656e204944203020697320666f72206164766572746973656d656e742060448201526575736167652160d01b6064820152608401610981565b6001600160a01b0384163303610b5257610b1f3a61c2976132bb565b6001600160a01b0385166000908152600b602052604081208054909190610b479084906132da565b90915550610bed9050565b6001600160a01b0384166000908152600c60205260408120805460019290610b7b9084906132da565b9091555050600f80546001600160a01b038087166001600160a01b0319928316179092556010805492861692909116919091179055610bbd3a6203f7a06132bb565b6010546001600160a01b03166000908152600b602052604081208054909190610be79084906132da565b90915550505b610bf884848461232f565b50505050565b610c066124c7565b604051600090339047908381818185875af1925050503d8060008114610c48576040519150601f19603f3d011682016040523d82523d6000602084013e610c4d565b606091505b5050905080610c915760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b6044820152606401610981565b50565b60136020528160005260406000208181548110610cb057600080fd5b6000918252602090912001546001600160a01b03169150829050565b826001600160a01b0381163314610ce657610ce6336121b8565b610bf8848484612521565b610cf96131b7565b60008281526013602052604090205460609015610d7a5760008381526013602090815260409182902080548351818402810184019094528084529091830182828015610d6e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610d50575b50505050509050610dd7565b6040805160018082528183019092529060208083019080368337019050509050610da383611139565b81600081518110610db657610db6613a8b565b60200260200101906001600160a01b031690816001600160a01b0316815250505b610ddf6131b7565b60c08101849052610e02610df285611139565b6001600160a01b0316601461253c565b60e082015260005b8251811015610fb657600c6000848381518110610e2957610e29613a8b565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000205482600001818151610e6391906132da565b9052508251610e8b90849083908110610e7e57610e7e613a8b565b6020026020010151611144565b82602001818151610e9c91906132da565b91508181525050600b6000848381518110610eb957610eb9613a8b565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000205482604001818151610ef391906132da565b91508181525050600e6000848381518110610f1057610f10613a8b565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000205482606001818151610f4a91906132da565b91508181525050600d6000848381518110610f6757610f67613a8b565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000205482608001818151610fa191906132da565b90525080610fae81613aa1565b915050610e0a565b50806040015181606001818151610fcd91906132da565b905250606081015160208201516014546103e891610fea916132bb565b610ff69061036b6132bb565b6110009190613308565b826080015161100f9190613aba565b6110199190613afb565b60a08201526020810151815161103791611032916132da565b6126d8565b610100820152602081015161104b906126d8565b6101208201526060810151608082015161106d9161106891613afb565b6127e1565b61014082015260208101516014546110a3916103e89161108d91906132bb565b6110999061036b6132bb565b6110689190613308565b61016082015260a08101516110b7906127e1565b61018082015260608101516110cb90612964565b6101a08201526060810151600003611100576040805180820190915260018152600360fc1b60208201526101c0820152611132565b61112b81606001518260a0015168056bc75e2d631000006111219190613b3a565b6110689190613bbf565b6101c08201525b9392505050565b600061084282612a8f565b60006001600160a01b03821661116d576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b606060006111a0846126d8565b6040516020016111b09190613c09565b60408051601f1981840301815260a08301909152607180835290925060009190614f0e6020830139905060006111e586610cf1565b905060006111f282612af6565b600087815260156020526040808220549051632004166f60e21b815292935090916001600160a01b039091169063801059bc90611233908690600401613477565b600060405180830381865afa158015611250573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112789190810190613c44565b90506112a8858584846040516020016112949493929190613cbb565b604051602081830303815290604052612bcc565b6040516020016112b89190613da4565b6040516020818303038152906040529550505050505092915050565b6112dc6124c7565b6112e66000612d1f565b565b6060808260c001516000036115235761136d604051806060016040528060308152602001614e586030913960405180604001604052806002815260200161352560f01b8152506040518060400160405280600381526020016232352560e81b8152506040518060400160405280600581526020016414dd185c9d60da1b815250612d71565b6113e36040518060600160405280602b8152602001614e2d602b913960405180604001604052806002815260200161352560f01b8152506040518060400160405280600381526020016233352560e81b8152506040518060400160405280600581526020016414dd185c9d60da1b815250612d71565b611459604051806060016040528060268152602001614ec86026913960405180604001604052806002815260200161352560f01b8152506040518060400160405280600381526020016234352560e81b8152506040518060400160405280600581526020016414dd185c9d60da1b815250612d71565b6114cf6040518060600160405280603b8152602001614f7f603b913960405180604001604052806002815260200161352560f01b8152506040518060400160405280600381526020016235352560e81b8152506040518060400160405280600581526020016414dd185c9d60da1b815250612d71565b6040516020016114e29493929190613de9565b60405160208183030381529060405290506114fc81612bcc565b60405160200161150c9190613f9b565b60408051601f198184030181529190529392505050565b6115a86040518060400160405280600e81526020016d273ab6b132b9103137bab3b43a1d60911b8152506040518060400160405280600381526020016231302560e81b8152506040518060400160405280600381526020016232352560e81b8152506040518060400160405280600581526020016414dd185c9d60da1b815250612d71565b61163060405180604001604052806011815260200170273ab6b132b9103932b6b0b4b734b7339d60791b8152506040518060400160405280600381526020016231302560e81b8152506040518060400160405280600381526020016233352560e81b8152506040518060400160405280600581526020016414dd185c9d60da1b815250612d71565b6116b26040518060400160405280600b81526020016a2a37ba30b61031b7b9ba1d60a91b8152506040518060400160405280600381526020016231302560e81b8152506040518060400160405280600381526020016234352560e81b8152506040518060400160405280600581526020016414dd185c9d60da1b815250612d71565b6117396040518060400160405280601081526020016f2932b0b634bd32b210383937b334ba1d60811b8152506040518060400160405280600381526020016231302560e81b8152506040518060400160405280600381526020016235352560e81b8152506040518060400160405280600581526020016414dd185c9d60da1b815250612d71565b60405160200161174c9493929190613fe0565b6040516020818303038152906040529050806117e7604051806040016040528060128152602001712ab73932b0b634bd32b210383937b334ba1d60711b8152506040518060400160405280600381526020016231302560e81b8152506040518060400160405280600381526020016236352560e81b8152506040518060400160405280600581526020016414dd185c9d60da1b815250612d71565b6117f085612da3565b611862866101000151604051806020016040528060008152506040518060400160405280600381526020016239302560e81b8152506040518060400160405280600381526020016232352560e81b81525060405180604001604052806003815260200162115b9960ea1b815250612e32565b6118d4876101200151604051806020016040528060008152506040518060400160405280600381526020016239302560e81b8152506040518060400160405280600381526020016233352560e81b81525060405180604001604052806003815260200162115b9960ea1b815250612e32565b611952886101a001516040518060400160405280600381526020016210674f60e91b8152506040518060400160405280600381526020016239302560e81b8152506040518060400160405280600381526020016234352560e81b81525060405180604001604052806003815260200162115b9960ea1b815250612e32565b6119d08961014001516040518060400160405280600381526020016210674f60e91b8152506040518060400160405280600381526020016239302560e81b8152506040518060400160405280600381526020016235352560e81b81525060405180604001604052806003815260200162115b9960ea1b815250612e32565b611a4e8a61016001516040518060400160405280600381526020016210674f60e91b8152506040518060400160405280600381526020016239302560e81b8152506040518060400160405280600381526020016236352560e81b81525060405180604001604052806003815260200162115b9960ea1b815250612e32565b604051602001611a659897969594939291906141db565b60408051601f19818403018152828201909152600382526232362560e81b602083015291508190611a9590612e67565b611ab96040518060400160405280600381526020016233362560e81b815250612e67565b611add6040518060400160405280600381526020016234362560e81b815250612e67565b611b016040518060400160405280600381526020016235362560e81b815250612e67565b611b256040518060400160405280600381526020016236362560e81b815250612e67565b6040516020016114e296959493929190614280565b80611b4481611139565b6001600160a01b0316336001600160a01b031614611b745760405162461bcd60e51b81526004016109819061430d565b6000828152601360205260409020611b8d90858561322d565b5050505050565b81611b9e81611139565b6001600160a01b0316336001600160a01b031614611bce5760405162461bcd60e51b81526004016109819061430d565b6000828152601560205260409020546001600160a01b0316611c225760405162461bcd60e51b815260206004820152600d60248201526c139bdd08191c985ddb881e595d609a1b6044820152606401610981565b600082815260196020526040902054341015611c775760405162461bcd60e51b81526020600482015260146024820152734e6f742073756666696369656e742066756e647360601b6044820152606401610981565b60008281526018602090815260408083205460179092529091205410611cd05760405162461bcd60e51b815260206004820152600e60248201526d4c696d697420726561636865642160901b6044820152606401610981565b600083815260166020908152604080832085905584835260179091528120805491611cfa83613aa1565b90915550506000828152601a60205260408082205490516001600160a01b039091169034908381818185875af1925050503d8060008114611d57576040519150601f19603f3d011682016040523d82523d6000602084013e611d5c565b606091505b5050905080610bf85760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b6044820152606401610981565b60606003805461085790613a51565b611db76124c7565b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af1158015611e04573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109949190614352565b81611e32816121b8565b6011546001600160a01b03848116911614611e8f5760405162461bcd60e51b815260206004820181905260248201527f54686973206973206f6e6c79207472616461626c65206f6e206f70656e7365616044820152606401610981565b6109948383612e92565b6000858152601560205260409020546001600160a01b031615611f085760405162461bcd60e51b815260206004820152602160248201527f546869732067656e65726174696f6e2077617320736574206279206f746865726044820152607360f81b6064820152608401610981565b600094855260156020908152604080872080546001600160a01b039788166001600160a01b03199182161790915560188352818820959095556019825280872093909355601a905293208054939092169216919091179055565b611f6a6124c7565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b836001600160a01b0381163314611fa657611fa6336121b8565b611b8d85858585612f27565b60606000611fbf836126d8565b604051602001611fcf9190613c09565b60408051601f1981840301815260a08301909152607180835290925060009190614f0e60208301399050600061200485610cf1565b9050600061201182612af6565b60008781526016602090815260408083205483526015909152812054919250906001600160a01b03166001600160a01b031663801059bc846040518263ffffffff1660e01b81526004016120659190613477565b600060405180830381865afa158015612082573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526120aa9190810190613c44565b90506120c6858584846040516020016112949493929190613cbb565b6040516020016120d69190613da4565b60405160208183030381529060405295505050505050919050565b6120f96124c7565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b6121236124c7565b6001600160a01b0381166121885760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610981565b610c9181612d1f565b6000805482108015610842575050600090815260046020526040902054600160e01b161590565b6daaeb6d7670e522a718067333cd4e3b15610c9157604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612225573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122499190614352565b610c9157604051633b79c77360e21b81526001600160a01b0382166004820152602401610981565b600061227c82611139565b9050336001600160a01b038216146122b55761229881336107c0565b6122b5576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b61232b828260405180602001604052806000815250612f6b565b5050565b600061233a82612a8f565b9050836001600160a01b0316816001600160a01b03161461236d5760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b038816909114176123ba5761239d86336107c0565b6123ba57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166123e157604051633a954ecd60e21b815260040160405180910390fd5b80156123ec57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b8416900361247e5760018401600081815260046020526040812054900361247c57600054811461247c5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b6009546001600160a01b031633146112e65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610981565b61099483838360405180602001604052806000815250611f8c565b6060600061254b8360026132bb565b6125569060026132da565b67ffffffffffffffff81111561256e5761256e6135db565b6040519080825280601f01601f191660200182016040528015612598576020820181803683370190505b509050600360fc1b816000815181106125b3576125b3613a8b565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106125e2576125e2613a8b565b60200101906001600160f81b031916908160001a90535060006126068460026132bb565b6126119060016132da565b90505b6001811115612689576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061264557612645613a8b565b1a60f81b82828151811061265b5761265b613a8b565b60200101906001600160f81b031916908160001a90535060049490941c936126828161436f565b9050612614565b5083156111325760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610981565b6060816000036126ff5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612729578061271381613aa1565b91506127229050600a83613308565b9150612703565b60008167ffffffffffffffff811115612744576127446135db565b6040519080825280601f01601f19166020018201604052801561276e576020820181803683370190505b5090505b84156127d957612783600183614386565b9150612790600a8661439d565b61279b9060306132da565b60f81b8183815181106127b0576127b0613a8b565b60200101906001600160f81b031916908160001a9053506127d2600a86613308565b9450612772565b949350505050565b60606000808312612801576040518060200160405280600081525061281c565b604051806040016040528060018152602001602d60f81b8152505b90506000831261282c5782612835565b612835836143b1565b9250600061284b670de0b6b3a764000085613308565b9050600066038d7ea4c6800061286983670de0b6b3a76400006132bb565b6128739087614386565b61287d9190613308565b9050600082118061288e5750600081115b15612943578261289d836126d8565b606483106128ba57604051806020016040528060008152506128d5565b604051806040016040528060018152602001600360fc1b8152505b600a84106128f2576040518060200160405280600081525061290d565b604051806040016040528060018152602001600360fc1b8152505b612916856126d8565b60405160200161292a9594939291906143cd565b6040516020818303038152906040529350505050919050565b50506040805180820190915260018152600360fc1b60208201529392505050565b6060600061297a670de0b6b3a764000084613308565b9050600066038d7ea4c6800061299883670de0b6b3a76400006132bb565b6129a29086614386565b6129ac9190613308565b905060008211806129bd5750600081115b15612a6f576129cb826126d8565b606482106129e85760405180602001604052806000815250612a03565b604051806040016040528060018152602001600360fc1b8152505b600a8310612a205760405180602001604052806000815250612a3b565b604051806040016040528060018152602001600360fc1b8152505b612a44846126d8565b604051602001612a57949392919061444b565b60405160208183030381529060405292505050919050565b50506040805180820190915260018152600360fc1b602082015292915050565b600081600054811015612add5760008181526004602052604081205490600160e01b82169003612adb575b80600003611132575060001901600081815260046020526040902054612aba565b505b604051636f96cda160e11b815260040160405180910390fd5b6040805160208082018352600082526101008401516101208501519351606094612b22939091016144b5565b604051602081830303815290604052905080836101400151846101600151604051602001612b5293929190614576565b604051602081830303815290604052905080836101800151846101a00151604051602001612b8293929190614658565b604051602081830303815290604052905080836101c00151612bba601660008760c001518152602001908152602001600020546126d8565b60405160200161150c9392919061471f565b60608151600003612beb57505060408051602081019091526000815290565b6000604051806060016040528060408152602001614e886040913990506000600384516002612c1a91906132da565b612c249190613308565b612c2f9060046132bb565b67ffffffffffffffff811115612c4757612c476135db565b6040519080825280601f01601f191660200182016040528015612c71576020820181803683370190505b509050600182016020820185865187015b80821015612cdd576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250612c82565b5050600386510660018114612cf95760028114612d0c57612d14565b603d6001830353603d6002830353612d14565b603d60018303535b509195945050505050565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606083838387604051602001612d8a94939291906147ea565b6040516020818303038152906040529050949350505050565b60608060008360a001511215612dd757506040805180820190915260078152662346304138414160c81b6020820152612df7565b506040805180820190915260078152662343414630414160c81b60208201525b60e08301516101808401516101c0850151604051612e1b93929185916020016148a9565b604051602081830303815290604052915050919050565b60608383838888604051602001612e4d959493929190614c62565b604051602081830303815290604052905095945050505050565b60608182604051602001612e7c929190614d37565b6040516020818303038152906040529050919050565b336001600160a01b03831603612ebb5760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b612f32848484610a8a565b6001600160a01b0383163b15610bf857612f4e84848484612fd1565b610bf8576040516368d2bf6b60e11b815260040160405180910390fd5b612f7583836130b9565b6001600160a01b0383163b15610994576000548281035b612f9f6000868380600101945086612fd1565b612fbc576040516368d2bf6b60e11b815260040160405180910390fd5b818110612f8c578160005414611b8d57600080fd5b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613006903390899088908890600401614ddc565b6020604051808303816000875af1925050508015613041575060408051601f3d908101601f1916820190925261303e91810190614e0f565b60015b61309f573d80801561306f576040519150601f19603f3d011682016040523d82523d6000602084013e613074565b606091505b508051600003613097576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506127d9565b60008054908290036130de5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461318d57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101613155565b50816000036131ae57604051622e076360e81b815260040160405180910390fd5b60005550505050565b604051806101e001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b828054828255906000526020600020908101928215613280579160200282015b828111156132805781546001600160a01b0319166001600160a01b0384351617825560209092019160019091019061324d565b5061328c929150613290565b5090565b5b8082111561328c5760008155600101613291565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156132d5576132d56132a5565b500290565b600082198211156132ed576132ed6132a5565b500190565b634e487b7160e01b600052601260045260246000fd5b600082613317576133176132f2565b500490565b6001600160e01b031981168114610c9157600080fd5b60006020828403121561334457600080fd5b81356111328161331c565b60005b8381101561336a578181015183820152602001613352565b83811115610bf85750506000910152565b6000815180845261339381602086016020860161334f565b601f01601f19169290920160200192915050565b602081526000611132602083018461337b565b6000602082840312156133cc57600080fd5b5035919050565b80356001600160a01b03811681146133ea57600080fd5b919050565b6000806040838503121561340257600080fd5b61340b836133d3565b946020939093013593505050565b60008060006060848603121561342e57600080fd5b613437846133d3565b9250613445602085016133d3565b9150604084013590509250925092565b6000806040838503121561346857600080fd5b50508035926020909101359150565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c082015260c082015160e0820152600060e08301516101e061010081818601526134de61020086018461337b565b9250808601519050601f196101208187860301818801526134ff858461337b565b94508088015192505061014081878603018188015261351e858461337b565b94508088015192505061016081878603018188015261353d858461337b565b94508088015192505061018081878603018188015261355c858461337b565b9450808801519250506101a081878603018188015261357b858461337b565b9450808801519250506101c081878603018188015261359a858461337b565b9088015187820390920184880152935090506135b6838261337b565b9695505050505050565b6000602082840312156135d257600080fd5b611132826133d3565b634e487b7160e01b600052604160045260246000fd5b6040516101e0810167ffffffffffffffff81118282101715613615576136156135db565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715613644576136446135db565b604052919050565b600067ffffffffffffffff821115613666576136666135db565b50601f01601f191660200190565b60006136876136828461364c565b61361b565b905082815283838301111561369b57600080fd5b828260208301376000602084830101529392505050565b600082601f8301126136c357600080fd5b61113283833560208501613674565b6000602082840312156136e457600080fd5b813567ffffffffffffffff808211156136fc57600080fd5b908301906101e0828603121561371157600080fd5b6137196135f1565b823581526020830135602082015260408301356040820152606083013560608201526080830135608082015260a083013560a082015260c083013560c082015260e08301358281111561376b57600080fd5b613777878286016136b2565b60e083015250610100808401358381111561379157600080fd5b61379d888287016136b2565b82840152505061012080840135838111156137b757600080fd5b6137c3888287016136b2565b82840152505061014080840135838111156137dd57600080fd5b6137e9888287016136b2565b828401525050610160808401358381111561380357600080fd5b61380f888287016136b2565b828401525050610180808401358381111561382957600080fd5b613835888287016136b2565b8284015250506101a0808401358381111561384f57600080fd5b61385b888287016136b2565b8284015250506101c0808401358381111561387557600080fd5b613881888287016136b2565b918301919091525095945050505050565b6000806000604084860312156138a757600080fd5b833567ffffffffffffffff808211156138bf57600080fd5b818601915086601f8301126138d357600080fd5b8135818111156138e257600080fd5b8760208260051b85010111156138f757600080fd5b6020928301989097509590910135949350505050565b8015158114610c9157600080fd5b6000806040838503121561392e57600080fd5b613937836133d3565b915060208301356139478161390d565b809150509250929050565b600080600080600060a0868803121561396a57600080fd5b8535945061397a602087016133d3565b93506040860135925060608601359150613996608087016133d3565b90509295509295909350565b600080600080608085870312156139b857600080fd5b6139c1856133d3565b93506139cf602086016133d3565b925060408501359150606085013567ffffffffffffffff8111156139f257600080fd5b8501601f81018713613a0357600080fd5b613a1287823560208401613674565b91505092959194509250565b60008060408385031215613a3157600080fd5b613a3a836133d3565b9150613a48602084016133d3565b90509250929050565b600181811c90821680613a6557607f821691505b602082108103613a8557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b600060018201613ab357613ab36132a5565b5060010190565b600080821280156001600160ff1b0384900385131615613adc57613adc6132a5565b600160ff1b8390038412811615613af557613af56132a5565b50500190565b60008083128015600160ff1b850184121615613b1957613b196132a5565b6001600160ff1b0384018313811615613b3457613b346132a5565b50500390565b60006001600160ff1b0381841382841380821686840486111615613b6057613b606132a5565b600160ff1b6000871282811687830589121615613b7f57613b7f6132a5565b60008712925087820587128484161615613b9b57613b9b6132a5565b87850587128184161615613bb157613bb16132a5565b505050929093029392505050565b600082613bce57613bce6132f2565b600160ff1b821460001984141615613be857613be86132a5565b500590565b60008151613bff81856020860161334f565b9290920192915050565b7250726f6669742043616c63756c61746f72202360681b815260008251613c3781601385016020870161334f565b9190910160130192915050565b600060208284031215613c5657600080fd5b815167ffffffffffffffff811115613c6d57600080fd5b8201601f81018413613c7e57600080fd5b8051613c8c6136828261364c565b818152856020838501011115613ca157600080fd5b613cb282602083016020860161334f565b95945050505050565b683d913730b6b2911d1160b91b81528451600090613ce0816009850160208a0161334f565b72111610113232b9b1b934b83a34b7b7111d101160691b6009918401918201528551613d1381601c840160208a0161334f565b71222c202261747472696275746573223a205b60701b601c92909101918201528451613d4681602e84016020890161334f565b6009818301019150506b2e96101134b6b0b3b2911d1160a11b60258201528351613d7781603184016020880161334f565b601160f91b91016031810191909152607d60f81b603282015260138101906033015b979650505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251613ddc81601d85016020870161334f565b91909101601d0192915050565b7f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323081527f30302f73766722207072657365727665417370656374526174696f3d22784d6960208201527f6e594d696e206d656574222076696577426f783d22302030203335302033353060408201527f223e203c7374796c653e2e5374617274207b2066696c6c3a202346304138414160608201527f3b20666f6e742d66616d696c793a2068656c7665746963613b20666f6e742d7360808201527f697a653a20313270783b20646f6d696e616e742d626173656c696e653a20626f60a08201527f74746f6d3b20746578742d616e63686f723a20746578743b7d203c2f7374796c60c08201527f653e203c726563742077696474683d223130302522206865696768743d22313060e082015274181291103334b6361e91119923192219981110179f60591b61010082015260006101158651613f4c8183860160208b0161334f565b865190840190613f628184840160208b0161334f565b613f8e613f7c613f7685848601018a613bed565b88613bed565b651e17b9bb339f60d11b815260060190565b9998505050505050505050565b7f646174613a696d6167652f7376672b786d6c3b6261736536342c000000000000815260008251613fd381601a85016020870161334f565b91909101601a0192915050565b7f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323081527f30302f73766722207072657365727665417370656374526174696f3d22784d6960208201527f6e594d696e206d656574222076696577426f783d22302030203335302033353060408201527f223e203c7374796c653e2e5374617274207b2066696c6c3a202345354536443960608201527f3b20666f6e742d66616d696c793a2068656c7665746963613b20666f6e742d7360808201527f697a653a20313470783b20646f6d696e616e742d626173656c696e653a20626f60a08201527f74746f6d3b20746578742d616e63686f723a2073746172743b7d202e456e642060c08201527f7b2066696c6c3a20234535453644393b20666f6e742d66616d696c793a20686560e08201527f6c7665746963613b20666f6e742d73697a653a20313670783b20646f6d696e616101008201527f6e742d626173656c696e653a20626f74746f6d3b20746578742d616e63686f726101208201527f3a20656e643b7d203c2f7374796c653e203c726563742077696474683d2231306101408201527f302522206865696768743d2231303025222066696c6c3d2223324632443330226101608201526210179f60e91b61018082015260006135b66141d56141cf613f7661018386018a613bed565b86613bed565b84613bed565b6000895160206141ee8285838f0161334f565b8a51918401916142018184848f0161334f565b8a519201916142138184848e0161334f565b89519201916142258184848d0161334f565b88519201916142378184848c0161334f565b87519201916142498184848b0161334f565b865192019161425b8184848a0161334f565b855192019161426d818484890161334f565b919091019b9a5050505050505050505050565b6000875160206142938285838d0161334f565b8851918401916142a68184848d0161334f565b88519201916142b88184848c0161334f565b87519201916142ca8184848b0161334f565b86519201916142dc8184848a0161334f565b85519201916142ee818484890161334f565b651e17b9bb339f60d11b92019182525060060198975050505050505050565b60208082526025908201527f596f75206e65656420746f2062652074686520686f6c646572206f66207468696040820152641cc813919560da1b606082015260800190565b60006020828403121561436457600080fd5b81516111328161390d565b60008161437e5761437e6132a5565b506000190190565b600082821015614398576143986132a5565b500390565b6000826143ac576143ac6132f2565b500690565b6000600160ff1b82016143c6576143c66132a5565b5060000390565b600086516143df818460208b0161334f565b8651908301906143f3818360208b0161334f565b601760f91b91019081528551614410816001840160208a0161334f565b855191019061442681600184016020890161334f565b845191019061443c81600184016020880161334f565b01600101979650505050505050565b6000855161445d818460208a0161334f565b601760f91b908301908152855161447b816001840160208a0161334f565b855191019061449181600184016020890161334f565b84519101906144a781600184016020880161334f565b016001019695505050505050565b6000600080516020614eee8339815191528083527f745f74797065223a224e756d62657220426f75676874222c2276616c7565223a6020840152845161450281604086016020890161334f565b611f4b60f21b604091850191820181905260428201929092527f745f74797065223a224e756d6265722052656d61696e696e67222c2276616c7560628201526232911d60e91b608282015284519161456183608584016020890161334f565b91016085810191909152608701949350505050565b6000845161458881846020890161334f565b8083019050600080516020614eee8339815191528082527f745f74797065223a225265616c697a65642050726f666974222c2276616c7565602083015261111d60f11b604083015285516145e3816042850160208a0161334f565b611f4b60f21b92016042810183905260448101919091527f745f74797065223a22556e7265616c697a65642050726f666974222c2276616c6064820152633ab2911d60e11b60848201528451909161464282608885016020890161334f565b60889290910191820152608a0195945050505050565b6000845161466a81846020890161334f565b8083019050600080516020614eee8339815191528082527f745f74797065223a22506f74656e7469616c20546f74616c2050726f6669742260208301526816113b30b63ab2911d60b91b604083015285516146cc816049850160208a0161334f565b808301925050611f4b60f21b80604984015281604b8401527f745f74797065223a22546f74616c20436f7374222c2276616c7565223a000000606b8401528551915061464282608885016020890161334f565b6000845161473181846020890161334f565b8083019050600080516020614eee8339815191528082527f745f74797065223a2252657475726e2052617465222c2276616c7565223a00006020830152855161478181603e850160208a0161334f565b611f4b60f21b603e939091019283015260408201527f745f74797065223a224172742054797065222c2276616c7565223a0000000000606082015283516147cf81607b84016020880161334f565b607d60f81b607b9290910191820152607c0195945050505050565b69101e3a32bc3a103c1e9160b11b8152845160009061481081600a850160208a0161334f565b6411103c9e9160d91b600a91840191820152855161483581600f840160208a0161334f565b68111031b630b9b99e9160b91b600f9290910191820152845161485f81601884016020890161334f565b600a8183010191505061111f60f11b600e820152835161488681601084016020880161334f565b6701e17ba32bc3a1f160c51b601092909101918201526018019695505050505050565b7f203c7465787420783d223530252220793d223135252220646f6d696e616e742d81527f626173656c696e653d226d6964646c652220746578742d616e63686f723d226d60208201527f6964646c652220666f6e742d73697a653d2231337078222066696c6c3d22234560408201527f35453644392220666f6e742d66616d696c793d2268656c76657469636122203e606082015260008551614953816080850160208a0161334f565b7f3c2f746578743e203c7465787420783d223530252220793d223735252220646f6080918401918201527f6d696e616e742d626173656c696e653d226d6964646c652220746578742d616e60a08201527f63686f723d226d6964646c652220666f6e742d73697a653d223234707822206660c08201527f696c6c3d22234535453644392220666f6e742d66616d696c793d2268656c766560e08201527f7469636122203e506f74656e7469616c20546f74616c2050726f6669743c2f746101008201527f6578743e203c7465787420783d223530252220793d223838252220646f6d696e6101208201527f616e742d626173656c696e653d226d6964646c652220746578742d616e63686f6101408201527f723d22656e642220666f6e742d73697a653d2231387078222066696c6c3d22236101608201527f4535453644392220666f6e742d66616d696c793d2268656c7665746963612220610180820152601f60f91b6101a0820152613d99614b8e6141cf614b65614b5f614ada6101a187018c613bed565b7f20ce9e3c2f746578743e203c7465787420783d223530252220793d223838252281527f20646f6d696e616e742d626173656c696e653d226d6964646c6522207465787460208201527f2d616e63686f723d2273746172742220666f6e742d73697a653d223138707822604082015266103334b6361e9160c91b606082015260670190565b89613bed565b7f2220666f6e742d66616d696c793d2268656c76657469636122203e20202800008152601e0190565b7f2025293c2f746578743e203c7465787420783d223530252220793d223825222081527f646f6d696e616e742d626173656c696e653d226d6964646c652220746578742d60208201527f616e63686f723d226d6964646c652220666f6e742d73697a653d22313870782260408201527f2066696c6c3d22234535453644392220666f6e742d66616d696c793d2268656c60608201527f76657469636122203e4f6e20436861696e2050726f6669742043616c63756c616080820152693a37b91e17ba32bc3a1f60b11b60a082015260aa0190565b69101e3a32bc3a103c1e9160b11b81528551600090614c8881600a850160208b0161334f565b6411103c9e9160d91b600a918401918201528651614cad81600f840160208b0161334f565b68111031b630b9b99e9160b91b600f92909101918201528551614cd7816018840160208a0161334f565b600a8183010191505061111f60f11b600e8201528451614cfe81601084016020890161334f565b6005818301019150508351614d1a81600b84016020880161334f565b613f8e600b828401016701e17ba32bc3a1f160c51b815260080190565b73101e3634b732903c189e9118981291103c989e9160611b81528251600090614d6781601485016020880161334f565b6e11103c191e911c981291103c991e9160891b6014918401918201528351614d9681602384016020880161334f565b7f22207374726f6b653d222341324343443622207374726f6b652d77696474683d60239290910191820152661118b83c11179f60c91b6043820152604a01949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906135b69083018461337b565b600060208284031215614e2157600080fd5b81516111328161331c56fe506c65617365207365742074686520676173206c696d697420746f2034303030303020706572204e46542e446f6e2774206275792074686973204e465420697420697320666f72206164766572746973656d656e742075736167654142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f557375616c6c792069742077696c6c2074616b6520323430303030206f72203332303030302c7b22646973706c61795f74797065223a20226e756d626572222c20227472616941204e465420636f6c6c656374696f6e2077686963682063616c63756c61746520796f75722070726f66697473206f6e20697473206f776e2e20546865206669727374206f6e636861696e204e465420776869636820747261636b7320697473206f776e20666c6f6f722070726963652e6f746865727769736520746865726520697320383025206368616e636520666f7220657865637574696f6e207265766572746564206572726f722ea264697066735822122059119d33257fee09aacf047ecd6ce95c5107033f855a9c13ee493f4e886193a264736f6c634300080d0033ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef
Deployed Bytecode
0x6080604052600436106102295760003560e01c8063801059bc11610123578063a22cb465116100ab578063d10fce601161006f578063d10fce6014610739578063d8258d9514610759578063e3e107901461076f578063e985e9c5146107a5578063f2fde38b146107d657600080fd5b8063a22cb46514610699578063a4ce69d9146106b9578063b776c8a6146106d9578063b88d4fde146106f9578063c87b56dd1461071957600080fd5b80638da5cb5b116100f25780638da5cb5b146105fd5780638f8682da1461061b57806391b090481461062e57806395d89b4114610664578063a1db97821461067957600080fd5b8063801059bc1461057a578063833de2b41461059a57806386f5960f146105ba57806387431c20146105d057600080fd5b806341f43434116101b15780636778a0f2116101755780636778a0f2146104cb57806370a08231146104f857806370baf9ca14610518578063710e99a014610538578063715018a61461056557600080fd5b806341f434341461040f57806342842e0e146104315780634e30aaeb14610451578063591df6cd1461047e5780636352211e146104ab57600080fd5b80631249c58b116101f85780631249c58b1461038257806318160ddd1461039757806323b872dd146103ba5780633ccfd60b146103da5780634152e2eb146103ef57600080fd5b806301ffc9a7146102d357806306fdde0314610308578063081812fc1461032a578063095ea7b31461036257600080fd5b366102ce576012546001600160a01b031633036102cc5761024b34600a6132bb565b60148190556010546001600160a01b03166000908152600e60205260408120805490919061027a9084906132da565b90915550506014546103e8906102929061036b6132bb565b61029c9190613308565b600f546001600160a01b03166000908152600d6020526040812080549091906102c69084906132da565b90915550505b005b600080fd5b3480156102df57600080fd5b506102f36102ee366004613332565b6107f6565b60405190151581526020015b60405180910390f35b34801561031457600080fd5b5061031d610848565b6040516102ff91906133a7565b34801561033657600080fd5b5061034a6103453660046133ba565b6108da565b6040516001600160a01b0390911681526020016102ff565b34801561036e57600080fd5b506102cc61037d3660046133ef565b61091e565b34801561038e57600080fd5b506102cc610999565b3480156103a357600080fd5b50600154600054035b6040519081526020016102ff565b3480156103c657600080fd5b506102cc6103d5366004613419565b610a8a565b3480156103e657600080fd5b506102cc610bfe565b3480156103fb57600080fd5b5061034a61040a366004613455565b610c94565b34801561041b57600080fd5b5061034a6daaeb6d7670e522a718067333cd4e81565b34801561043d57600080fd5b506102cc61044c366004613419565b610ccc565b34801561045d57600080fd5b506103ac61046c3660046133ba565b60186020526000908152604090205481565b34801561048a57600080fd5b5061049e6104993660046133ba565b610cf1565b6040516102ff9190613477565b3480156104b757600080fd5b5061034a6104c63660046133ba565b611139565b3480156104d757600080fd5b506103ac6104e63660046133ba565b60166020526000908152604090205481565b34801561050457600080fd5b506103ac6105133660046135c0565b611144565b34801561052457600080fd5b5061031d610533366004613455565b611193565b34801561054457600080fd5b506103ac6105533660046133ba565b60196020526000908152604090205481565b34801561057157600080fd5b506102cc6112d4565b34801561058657600080fd5b5061031d6105953660046136d2565b6112e8565b3480156105a657600080fd5b506102cc6105b5366004613892565b611b3a565b3480156105c657600080fd5b506103ac60145481565b3480156105dc57600080fd5b506103ac6105eb3660046133ba565b60176020526000908152604090205481565b34801561060957600080fd5b506009546001600160a01b031661034a565b6102cc610629366004613455565b611b94565b34801561063a57600080fd5b5061034a6106493660046133ba565b6015602052600090815260409020546001600160a01b031681565b34801561067057600080fd5b5061031d611da0565b34801561068557600080fd5b506102cc6106943660046133ef565b611daf565b3480156106a557600080fd5b506102cc6106b436600461391b565b611e28565b3480156106c557600080fd5b506102cc6106d4366004613952565b611e99565b3480156106e557600080fd5b506102cc6106f43660046135c0565b611f62565b34801561070557600080fd5b506102cc6107143660046139a2565b611f8c565b34801561072557600080fd5b5061031d6107343660046133ba565b611fb2565b34801561074557600080fd5b506102cc6107543660046135c0565b6120f1565b34801561076557600080fd5b506103ac600a5481565b34801561077b57600080fd5b5061034a61078a3660046133ba565b601a602052600090815260409020546001600160a01b031681565b3480156107b157600080fd5b506102f36107c0366004613a1e565b6011546001600160a01b03918216911614919050565b3480156107e257600080fd5b506102cc6107f13660046135c0565b61211b565b60006301ffc9a760e01b6001600160e01b03198316148061082757506380ac58cd60e01b6001600160e01b03198316145b806108425750635b5e139f60e01b6001600160e01b03198316145b92915050565b60606002805461085790613a51565b80601f016020809104026020016040519081016040528092919081815260200182805461088390613a51565b80156108d05780601f106108a5576101008083540402835291602001916108d0565b820191906000526020600020905b8154815290600101906020018083116108b357829003601f168201915b5050505050905090565b60006108e582612191565b610902576040516333d1c03960e21b815260040160405180910390fd5b506000908152600660205260409020546001600160a01b031690565b81610928816121b8565b6011546001600160a01b0384811691161461098a5760405162461bcd60e51b815260206004820181905260248201527f54686973206973206f6e6c79207472616461626c65206f6e206f70656e73656160448201526064015b60405180910390fd5b6109948383612271565b505050565b600a54600154600054036109ae9060016132da565b11156109f15760405162461bcd60e51b815260206004820152601260248201527152656163686564206d617820737570706c7960701b6044820152606401610981565b3360009081526005602052604090819020546001911c67ffffffffffffffff1610610a4c5760405162461bcd60e51b815260206004820152600b60248201526a4d6178206d696e743a203160a81b6044820152606401610981565b610a57336001612311565b610a643a620186596132bb565b336000908152600b602052604081208054909190610a839084906132da565b9091555050565b826001600160a01b0381163314610aa457610aa4336121b8565b81600003610b035760405162461bcd60e51b815260206004820152602660248201527f546f6b656e204944203020697320666f72206164766572746973656d656e742060448201526575736167652160d01b6064820152608401610981565b6001600160a01b0384163303610b5257610b1f3a61c2976132bb565b6001600160a01b0385166000908152600b602052604081208054909190610b479084906132da565b90915550610bed9050565b6001600160a01b0384166000908152600c60205260408120805460019290610b7b9084906132da565b9091555050600f80546001600160a01b038087166001600160a01b0319928316179092556010805492861692909116919091179055610bbd3a6203f7a06132bb565b6010546001600160a01b03166000908152600b602052604081208054909190610be79084906132da565b90915550505b610bf884848461232f565b50505050565b610c066124c7565b604051600090339047908381818185875af1925050503d8060008114610c48576040519150601f19603f3d011682016040523d82523d6000602084013e610c4d565b606091505b5050905080610c915760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b6044820152606401610981565b50565b60136020528160005260406000208181548110610cb057600080fd5b6000918252602090912001546001600160a01b03169150829050565b826001600160a01b0381163314610ce657610ce6336121b8565b610bf8848484612521565b610cf96131b7565b60008281526013602052604090205460609015610d7a5760008381526013602090815260409182902080548351818402810184019094528084529091830182828015610d6e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610d50575b50505050509050610dd7565b6040805160018082528183019092529060208083019080368337019050509050610da383611139565b81600081518110610db657610db6613a8b565b60200260200101906001600160a01b031690816001600160a01b0316815250505b610ddf6131b7565b60c08101849052610e02610df285611139565b6001600160a01b0316601461253c565b60e082015260005b8251811015610fb657600c6000848381518110610e2957610e29613a8b565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000205482600001818151610e6391906132da565b9052508251610e8b90849083908110610e7e57610e7e613a8b565b6020026020010151611144565b82602001818151610e9c91906132da565b91508181525050600b6000848381518110610eb957610eb9613a8b565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000205482604001818151610ef391906132da565b91508181525050600e6000848381518110610f1057610f10613a8b565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000205482606001818151610f4a91906132da565b91508181525050600d6000848381518110610f6757610f67613a8b565b60200260200101516001600160a01b03166001600160a01b031681526020019081526020016000205482608001818151610fa191906132da565b90525080610fae81613aa1565b915050610e0a565b50806040015181606001818151610fcd91906132da565b905250606081015160208201516014546103e891610fea916132bb565b610ff69061036b6132bb565b6110009190613308565b826080015161100f9190613aba565b6110199190613afb565b60a08201526020810151815161103791611032916132da565b6126d8565b610100820152602081015161104b906126d8565b6101208201526060810151608082015161106d9161106891613afb565b6127e1565b61014082015260208101516014546110a3916103e89161108d91906132bb565b6110999061036b6132bb565b6110689190613308565b61016082015260a08101516110b7906127e1565b61018082015260608101516110cb90612964565b6101a08201526060810151600003611100576040805180820190915260018152600360fc1b60208201526101c0820152611132565b61112b81606001518260a0015168056bc75e2d631000006111219190613b3a565b6110689190613bbf565b6101c08201525b9392505050565b600061084282612a8f565b60006001600160a01b03821661116d576040516323d3ad8160e21b815260040160405180910390fd5b506001600160a01b031660009081526005602052604090205467ffffffffffffffff1690565b606060006111a0846126d8565b6040516020016111b09190613c09565b60408051601f1981840301815260a08301909152607180835290925060009190614f0e6020830139905060006111e586610cf1565b905060006111f282612af6565b600087815260156020526040808220549051632004166f60e21b815292935090916001600160a01b039091169063801059bc90611233908690600401613477565b600060405180830381865afa158015611250573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526112789190810190613c44565b90506112a8858584846040516020016112949493929190613cbb565b604051602081830303815290604052612bcc565b6040516020016112b89190613da4565b6040516020818303038152906040529550505050505092915050565b6112dc6124c7565b6112e66000612d1f565b565b6060808260c001516000036115235761136d604051806060016040528060308152602001614e586030913960405180604001604052806002815260200161352560f01b8152506040518060400160405280600381526020016232352560e81b8152506040518060400160405280600581526020016414dd185c9d60da1b815250612d71565b6113e36040518060600160405280602b8152602001614e2d602b913960405180604001604052806002815260200161352560f01b8152506040518060400160405280600381526020016233352560e81b8152506040518060400160405280600581526020016414dd185c9d60da1b815250612d71565b611459604051806060016040528060268152602001614ec86026913960405180604001604052806002815260200161352560f01b8152506040518060400160405280600381526020016234352560e81b8152506040518060400160405280600581526020016414dd185c9d60da1b815250612d71565b6114cf6040518060600160405280603b8152602001614f7f603b913960405180604001604052806002815260200161352560f01b8152506040518060400160405280600381526020016235352560e81b8152506040518060400160405280600581526020016414dd185c9d60da1b815250612d71565b6040516020016114e29493929190613de9565b60405160208183030381529060405290506114fc81612bcc565b60405160200161150c9190613f9b565b60408051601f198184030181529190529392505050565b6115a86040518060400160405280600e81526020016d273ab6b132b9103137bab3b43a1d60911b8152506040518060400160405280600381526020016231302560e81b8152506040518060400160405280600381526020016232352560e81b8152506040518060400160405280600581526020016414dd185c9d60da1b815250612d71565b61163060405180604001604052806011815260200170273ab6b132b9103932b6b0b4b734b7339d60791b8152506040518060400160405280600381526020016231302560e81b8152506040518060400160405280600381526020016233352560e81b8152506040518060400160405280600581526020016414dd185c9d60da1b815250612d71565b6116b26040518060400160405280600b81526020016a2a37ba30b61031b7b9ba1d60a91b8152506040518060400160405280600381526020016231302560e81b8152506040518060400160405280600381526020016234352560e81b8152506040518060400160405280600581526020016414dd185c9d60da1b815250612d71565b6117396040518060400160405280601081526020016f2932b0b634bd32b210383937b334ba1d60811b8152506040518060400160405280600381526020016231302560e81b8152506040518060400160405280600381526020016235352560e81b8152506040518060400160405280600581526020016414dd185c9d60da1b815250612d71565b60405160200161174c9493929190613fe0565b6040516020818303038152906040529050806117e7604051806040016040528060128152602001712ab73932b0b634bd32b210383937b334ba1d60711b8152506040518060400160405280600381526020016231302560e81b8152506040518060400160405280600381526020016236352560e81b8152506040518060400160405280600581526020016414dd185c9d60da1b815250612d71565b6117f085612da3565b611862866101000151604051806020016040528060008152506040518060400160405280600381526020016239302560e81b8152506040518060400160405280600381526020016232352560e81b81525060405180604001604052806003815260200162115b9960ea1b815250612e32565b6118d4876101200151604051806020016040528060008152506040518060400160405280600381526020016239302560e81b8152506040518060400160405280600381526020016233352560e81b81525060405180604001604052806003815260200162115b9960ea1b815250612e32565b611952886101a001516040518060400160405280600381526020016210674f60e91b8152506040518060400160405280600381526020016239302560e81b8152506040518060400160405280600381526020016234352560e81b81525060405180604001604052806003815260200162115b9960ea1b815250612e32565b6119d08961014001516040518060400160405280600381526020016210674f60e91b8152506040518060400160405280600381526020016239302560e81b8152506040518060400160405280600381526020016235352560e81b81525060405180604001604052806003815260200162115b9960ea1b815250612e32565b611a4e8a61016001516040518060400160405280600381526020016210674f60e91b8152506040518060400160405280600381526020016239302560e81b8152506040518060400160405280600381526020016236352560e81b81525060405180604001604052806003815260200162115b9960ea1b815250612e32565b604051602001611a659897969594939291906141db565b60408051601f19818403018152828201909152600382526232362560e81b602083015291508190611a9590612e67565b611ab96040518060400160405280600381526020016233362560e81b815250612e67565b611add6040518060400160405280600381526020016234362560e81b815250612e67565b611b016040518060400160405280600381526020016235362560e81b815250612e67565b611b256040518060400160405280600381526020016236362560e81b815250612e67565b6040516020016114e296959493929190614280565b80611b4481611139565b6001600160a01b0316336001600160a01b031614611b745760405162461bcd60e51b81526004016109819061430d565b6000828152601360205260409020611b8d90858561322d565b5050505050565b81611b9e81611139565b6001600160a01b0316336001600160a01b031614611bce5760405162461bcd60e51b81526004016109819061430d565b6000828152601560205260409020546001600160a01b0316611c225760405162461bcd60e51b815260206004820152600d60248201526c139bdd08191c985ddb881e595d609a1b6044820152606401610981565b600082815260196020526040902054341015611c775760405162461bcd60e51b81526020600482015260146024820152734e6f742073756666696369656e742066756e647360601b6044820152606401610981565b60008281526018602090815260408083205460179092529091205410611cd05760405162461bcd60e51b815260206004820152600e60248201526d4c696d697420726561636865642160901b6044820152606401610981565b600083815260166020908152604080832085905584835260179091528120805491611cfa83613aa1565b90915550506000828152601a60205260408082205490516001600160a01b039091169034908381818185875af1925050503d8060008114611d57576040519150601f19603f3d011682016040523d82523d6000602084013e611d5c565b606091505b5050905080610bf85760405162461bcd60e51b815260206004820152601060248201526f2a3930b739b332b9103330b4b632b21760811b6044820152606401610981565b60606003805461085790613a51565b611db76124c7565b60405163a9059cbb60e01b8152336004820152602481018290526001600160a01b0383169063a9059cbb906044016020604051808303816000875af1158015611e04573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109949190614352565b81611e32816121b8565b6011546001600160a01b03848116911614611e8f5760405162461bcd60e51b815260206004820181905260248201527f54686973206973206f6e6c79207472616461626c65206f6e206f70656e7365616044820152606401610981565b6109948383612e92565b6000858152601560205260409020546001600160a01b031615611f085760405162461bcd60e51b815260206004820152602160248201527f546869732067656e65726174696f6e2077617320736574206279206f746865726044820152607360f81b6064820152608401610981565b600094855260156020908152604080872080546001600160a01b039788166001600160a01b03199182161790915560188352818820959095556019825280872093909355601a905293208054939092169216919091179055565b611f6a6124c7565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b836001600160a01b0381163314611fa657611fa6336121b8565b611b8d85858585612f27565b60606000611fbf836126d8565b604051602001611fcf9190613c09565b60408051601f1981840301815260a08301909152607180835290925060009190614f0e60208301399050600061200485610cf1565b9050600061201182612af6565b60008781526016602090815260408083205483526015909152812054919250906001600160a01b03166001600160a01b031663801059bc846040518263ffffffff1660e01b81526004016120659190613477565b600060405180830381865afa158015612082573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526120aa9190810190613c44565b90506120c6858584846040516020016112949493929190613cbb565b6040516020016120d69190613da4565b60405160208183030381529060405295505050505050919050565b6120f96124c7565b601280546001600160a01b0319166001600160a01b0392909216919091179055565b6121236124c7565b6001600160a01b0381166121885760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610981565b610c9181612d1f565b6000805482108015610842575050600090815260046020526040902054600160e01b161590565b6daaeb6d7670e522a718067333cd4e3b15610c9157604051633185c44d60e21b81523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015612225573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122499190614352565b610c9157604051633b79c77360e21b81526001600160a01b0382166004820152602401610981565b600061227c82611139565b9050336001600160a01b038216146122b55761229881336107c0565b6122b5576040516367d9dca160e11b815260040160405180910390fd5b60008281526006602052604080822080546001600160a01b0319166001600160a01b0387811691821790925591518593918516917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b61232b828260405180602001604052806000815250612f6b565b5050565b600061233a82612a8f565b9050836001600160a01b0316816001600160a01b03161461236d5760405162a1148160e81b815260040160405180910390fd5b60008281526006602052604090208054338082146001600160a01b038816909114176123ba5761239d86336107c0565b6123ba57604051632ce44b5f60e11b815260040160405180910390fd5b6001600160a01b0385166123e157604051633a954ecd60e21b815260040160405180910390fd5b80156123ec57600082555b6001600160a01b038681166000908152600560205260408082208054600019019055918716808252919020805460010190554260a01b17600160e11b17600085815260046020526040812091909155600160e11b8416900361247e5760018401600081815260046020526040812054900361247c57600054811461247c5760008181526004602052604090208490555b505b83856001600160a01b0316876001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050505050565b6009546001600160a01b031633146112e65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610981565b61099483838360405180602001604052806000815250611f8c565b6060600061254b8360026132bb565b6125569060026132da565b67ffffffffffffffff81111561256e5761256e6135db565b6040519080825280601f01601f191660200182016040528015612598576020820181803683370190505b509050600360fc1b816000815181106125b3576125b3613a8b565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106125e2576125e2613a8b565b60200101906001600160f81b031916908160001a90535060006126068460026132bb565b6126119060016132da565b90505b6001811115612689576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061264557612645613a8b565b1a60f81b82828151811061265b5761265b613a8b565b60200101906001600160f81b031916908160001a90535060049490941c936126828161436f565b9050612614565b5083156111325760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610981565b6060816000036126ff5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612729578061271381613aa1565b91506127229050600a83613308565b9150612703565b60008167ffffffffffffffff811115612744576127446135db565b6040519080825280601f01601f19166020018201604052801561276e576020820181803683370190505b5090505b84156127d957612783600183614386565b9150612790600a8661439d565b61279b9060306132da565b60f81b8183815181106127b0576127b0613a8b565b60200101906001600160f81b031916908160001a9053506127d2600a86613308565b9450612772565b949350505050565b60606000808312612801576040518060200160405280600081525061281c565b604051806040016040528060018152602001602d60f81b8152505b90506000831261282c5782612835565b612835836143b1565b9250600061284b670de0b6b3a764000085613308565b9050600066038d7ea4c6800061286983670de0b6b3a76400006132bb565b6128739087614386565b61287d9190613308565b9050600082118061288e5750600081115b15612943578261289d836126d8565b606483106128ba57604051806020016040528060008152506128d5565b604051806040016040528060018152602001600360fc1b8152505b600a84106128f2576040518060200160405280600081525061290d565b604051806040016040528060018152602001600360fc1b8152505b612916856126d8565b60405160200161292a9594939291906143cd565b6040516020818303038152906040529350505050919050565b50506040805180820190915260018152600360fc1b60208201529392505050565b6060600061297a670de0b6b3a764000084613308565b9050600066038d7ea4c6800061299883670de0b6b3a76400006132bb565b6129a29086614386565b6129ac9190613308565b905060008211806129bd5750600081115b15612a6f576129cb826126d8565b606482106129e85760405180602001604052806000815250612a03565b604051806040016040528060018152602001600360fc1b8152505b600a8310612a205760405180602001604052806000815250612a3b565b604051806040016040528060018152602001600360fc1b8152505b612a44846126d8565b604051602001612a57949392919061444b565b60405160208183030381529060405292505050919050565b50506040805180820190915260018152600360fc1b602082015292915050565b600081600054811015612add5760008181526004602052604081205490600160e01b82169003612adb575b80600003611132575060001901600081815260046020526040902054612aba565b505b604051636f96cda160e11b815260040160405180910390fd5b6040805160208082018352600082526101008401516101208501519351606094612b22939091016144b5565b604051602081830303815290604052905080836101400151846101600151604051602001612b5293929190614576565b604051602081830303815290604052905080836101800151846101a00151604051602001612b8293929190614658565b604051602081830303815290604052905080836101c00151612bba601660008760c001518152602001908152602001600020546126d8565b60405160200161150c9392919061471f565b60608151600003612beb57505060408051602081019091526000815290565b6000604051806060016040528060408152602001614e886040913990506000600384516002612c1a91906132da565b612c249190613308565b612c2f9060046132bb565b67ffffffffffffffff811115612c4757612c476135db565b6040519080825280601f01601f191660200182016040528015612c71576020820181803683370190505b509050600182016020820185865187015b80821015612cdd576003820191508151603f8160121c168501518453600184019350603f81600c1c168501518453600184019350603f8160061c168501518453600184019350603f8116850151845350600183019250612c82565b5050600386510660018114612cf95760028114612d0c57612d14565b603d6001830353603d6002830353612d14565b603d60018303535b509195945050505050565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b606083838387604051602001612d8a94939291906147ea565b6040516020818303038152906040529050949350505050565b60608060008360a001511215612dd757506040805180820190915260078152662346304138414160c81b6020820152612df7565b506040805180820190915260078152662343414630414160c81b60208201525b60e08301516101808401516101c0850151604051612e1b93929185916020016148a9565b604051602081830303815290604052915050919050565b60608383838888604051602001612e4d959493929190614c62565b604051602081830303815290604052905095945050505050565b60608182604051602001612e7c929190614d37565b6040516020818303038152906040529050919050565b336001600160a01b03831603612ebb5760405163b06307db60e01b815260040160405180910390fd5b3360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b612f32848484610a8a565b6001600160a01b0383163b15610bf857612f4e84848484612fd1565b610bf8576040516368d2bf6b60e11b815260040160405180910390fd5b612f7583836130b9565b6001600160a01b0383163b15610994576000548281035b612f9f6000868380600101945086612fd1565b612fbc576040516368d2bf6b60e11b815260040160405180910390fd5b818110612f8c578160005414611b8d57600080fd5b604051630a85bd0160e11b81526000906001600160a01b0385169063150b7a0290613006903390899088908890600401614ddc565b6020604051808303816000875af1925050508015613041575060408051601f3d908101601f1916820190925261303e91810190614e0f565b60015b61309f573d80801561306f576040519150601f19603f3d011682016040523d82523d6000602084013e613074565b606091505b508051600003613097576040516368d2bf6b60e11b815260040160405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506127d9565b60008054908290036130de5760405163b562e8dd60e01b815260040160405180910390fd5b6001600160a01b03831660008181526005602090815260408083208054680100000000000000018802019055848352600490915281206001851460e11b4260a01b178317905582840190839083907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4600183015b81811461318d57808360007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4600101613155565b50816000036131ae57604051622e076360e81b815260040160405180910390fd5b60005550505050565b604051806101e001604052806000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160608152602001606081526020016060815260200160608152602001606081526020016060815260200160608152602001606081525090565b828054828255906000526020600020908101928215613280579160200282015b828111156132805781546001600160a01b0319166001600160a01b0384351617825560209092019160019091019061324d565b5061328c929150613290565b5090565b5b8082111561328c5760008155600101613291565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156132d5576132d56132a5565b500290565b600082198211156132ed576132ed6132a5565b500190565b634e487b7160e01b600052601260045260246000fd5b600082613317576133176132f2565b500490565b6001600160e01b031981168114610c9157600080fd5b60006020828403121561334457600080fd5b81356111328161331c565b60005b8381101561336a578181015183820152602001613352565b83811115610bf85750506000910152565b6000815180845261339381602086016020860161334f565b601f01601f19169290920160200192915050565b602081526000611132602083018461337b565b6000602082840312156133cc57600080fd5b5035919050565b80356001600160a01b03811681146133ea57600080fd5b919050565b6000806040838503121561340257600080fd5b61340b836133d3565b946020939093013593505050565b60008060006060848603121561342e57600080fd5b613437846133d3565b9250613445602085016133d3565b9150604084013590509250925092565b6000806040838503121561346857600080fd5b50508035926020909101359150565b6020815281516020820152602082015160408201526040820151606082015260608201516080820152608082015160a082015260a082015160c082015260c082015160e0820152600060e08301516101e061010081818601526134de61020086018461337b565b9250808601519050601f196101208187860301818801526134ff858461337b565b94508088015192505061014081878603018188015261351e858461337b565b94508088015192505061016081878603018188015261353d858461337b565b94508088015192505061018081878603018188015261355c858461337b565b9450808801519250506101a081878603018188015261357b858461337b565b9450808801519250506101c081878603018188015261359a858461337b565b9088015187820390920184880152935090506135b6838261337b565b9695505050505050565b6000602082840312156135d257600080fd5b611132826133d3565b634e487b7160e01b600052604160045260246000fd5b6040516101e0810167ffffffffffffffff81118282101715613615576136156135db565b60405290565b604051601f8201601f1916810167ffffffffffffffff81118282101715613644576136446135db565b604052919050565b600067ffffffffffffffff821115613666576136666135db565b50601f01601f191660200190565b60006136876136828461364c565b61361b565b905082815283838301111561369b57600080fd5b828260208301376000602084830101529392505050565b600082601f8301126136c357600080fd5b61113283833560208501613674565b6000602082840312156136e457600080fd5b813567ffffffffffffffff808211156136fc57600080fd5b908301906101e0828603121561371157600080fd5b6137196135f1565b823581526020830135602082015260408301356040820152606083013560608201526080830135608082015260a083013560a082015260c083013560c082015260e08301358281111561376b57600080fd5b613777878286016136b2565b60e083015250610100808401358381111561379157600080fd5b61379d888287016136b2565b82840152505061012080840135838111156137b757600080fd5b6137c3888287016136b2565b82840152505061014080840135838111156137dd57600080fd5b6137e9888287016136b2565b828401525050610160808401358381111561380357600080fd5b61380f888287016136b2565b828401525050610180808401358381111561382957600080fd5b613835888287016136b2565b8284015250506101a0808401358381111561384f57600080fd5b61385b888287016136b2565b8284015250506101c0808401358381111561387557600080fd5b613881888287016136b2565b918301919091525095945050505050565b6000806000604084860312156138a757600080fd5b833567ffffffffffffffff808211156138bf57600080fd5b818601915086601f8301126138d357600080fd5b8135818111156138e257600080fd5b8760208260051b85010111156138f757600080fd5b6020928301989097509590910135949350505050565b8015158114610c9157600080fd5b6000806040838503121561392e57600080fd5b613937836133d3565b915060208301356139478161390d565b809150509250929050565b600080600080600060a0868803121561396a57600080fd5b8535945061397a602087016133d3565b93506040860135925060608601359150613996608087016133d3565b90509295509295909350565b600080600080608085870312156139b857600080fd5b6139c1856133d3565b93506139cf602086016133d3565b925060408501359150606085013567ffffffffffffffff8111156139f257600080fd5b8501601f81018713613a0357600080fd5b613a1287823560208401613674565b91505092959194509250565b60008060408385031215613a3157600080fd5b613a3a836133d3565b9150613a48602084016133d3565b90509250929050565b600181811c90821680613a6557607f821691505b602082108103613a8557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b600060018201613ab357613ab36132a5565b5060010190565b600080821280156001600160ff1b0384900385131615613adc57613adc6132a5565b600160ff1b8390038412811615613af557613af56132a5565b50500190565b60008083128015600160ff1b850184121615613b1957613b196132a5565b6001600160ff1b0384018313811615613b3457613b346132a5565b50500390565b60006001600160ff1b0381841382841380821686840486111615613b6057613b606132a5565b600160ff1b6000871282811687830589121615613b7f57613b7f6132a5565b60008712925087820587128484161615613b9b57613b9b6132a5565b87850587128184161615613bb157613bb16132a5565b505050929093029392505050565b600082613bce57613bce6132f2565b600160ff1b821460001984141615613be857613be86132a5565b500590565b60008151613bff81856020860161334f565b9290920192915050565b7250726f6669742043616c63756c61746f72202360681b815260008251613c3781601385016020870161334f565b9190910160130192915050565b600060208284031215613c5657600080fd5b815167ffffffffffffffff811115613c6d57600080fd5b8201601f81018413613c7e57600080fd5b8051613c8c6136828261364c565b818152856020838501011115613ca157600080fd5b613cb282602083016020860161334f565b95945050505050565b683d913730b6b2911d1160b91b81528451600090613ce0816009850160208a0161334f565b72111610113232b9b1b934b83a34b7b7111d101160691b6009918401918201528551613d1381601c840160208a0161334f565b71222c202261747472696275746573223a205b60701b601c92909101918201528451613d4681602e84016020890161334f565b6009818301019150506b2e96101134b6b0b3b2911d1160a11b60258201528351613d7781603184016020880161334f565b601160f91b91016031810191909152607d60f81b603282015260138101906033015b979650505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251613ddc81601d85016020870161334f565b91909101601d0192915050565b7f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323081527f30302f73766722207072657365727665417370656374526174696f3d22784d6960208201527f6e594d696e206d656574222076696577426f783d22302030203335302033353060408201527f223e203c7374796c653e2e5374617274207b2066696c6c3a202346304138414160608201527f3b20666f6e742d66616d696c793a2068656c7665746963613b20666f6e742d7360808201527f697a653a20313270783b20646f6d696e616e742d626173656c696e653a20626f60a08201527f74746f6d3b20746578742d616e63686f723a20746578743b7d203c2f7374796c60c08201527f653e203c726563742077696474683d223130302522206865696768743d22313060e082015274181291103334b6361e91119923192219981110179f60591b61010082015260006101158651613f4c8183860160208b0161334f565b865190840190613f628184840160208b0161334f565b613f8e613f7c613f7685848601018a613bed565b88613bed565b651e17b9bb339f60d11b815260060190565b9998505050505050505050565b7f646174613a696d6167652f7376672b786d6c3b6261736536342c000000000000815260008251613fd381601a85016020870161334f565b91909101601a0192915050565b7f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323081527f30302f73766722207072657365727665417370656374526174696f3d22784d6960208201527f6e594d696e206d656574222076696577426f783d22302030203335302033353060408201527f223e203c7374796c653e2e5374617274207b2066696c6c3a202345354536443960608201527f3b20666f6e742d66616d696c793a2068656c7665746963613b20666f6e742d7360808201527f697a653a20313470783b20646f6d696e616e742d626173656c696e653a20626f60a08201527f74746f6d3b20746578742d616e63686f723a2073746172743b7d202e456e642060c08201527f7b2066696c6c3a20234535453644393b20666f6e742d66616d696c793a20686560e08201527f6c7665746963613b20666f6e742d73697a653a20313670783b20646f6d696e616101008201527f6e742d626173656c696e653a20626f74746f6d3b20746578742d616e63686f726101208201527f3a20656e643b7d203c2f7374796c653e203c726563742077696474683d2231306101408201527f302522206865696768743d2231303025222066696c6c3d2223324632443330226101608201526210179f60e91b61018082015260006135b66141d56141cf613f7661018386018a613bed565b86613bed565b84613bed565b6000895160206141ee8285838f0161334f565b8a51918401916142018184848f0161334f565b8a519201916142138184848e0161334f565b89519201916142258184848d0161334f565b88519201916142378184848c0161334f565b87519201916142498184848b0161334f565b865192019161425b8184848a0161334f565b855192019161426d818484890161334f565b919091019b9a5050505050505050505050565b6000875160206142938285838d0161334f565b8851918401916142a68184848d0161334f565b88519201916142b88184848c0161334f565b87519201916142ca8184848b0161334f565b86519201916142dc8184848a0161334f565b85519201916142ee818484890161334f565b651e17b9bb339f60d11b92019182525060060198975050505050505050565b60208082526025908201527f596f75206e65656420746f2062652074686520686f6c646572206f66207468696040820152641cc813919560da1b606082015260800190565b60006020828403121561436457600080fd5b81516111328161390d565b60008161437e5761437e6132a5565b506000190190565b600082821015614398576143986132a5565b500390565b6000826143ac576143ac6132f2565b500690565b6000600160ff1b82016143c6576143c66132a5565b5060000390565b600086516143df818460208b0161334f565b8651908301906143f3818360208b0161334f565b601760f91b91019081528551614410816001840160208a0161334f565b855191019061442681600184016020890161334f565b845191019061443c81600184016020880161334f565b01600101979650505050505050565b6000855161445d818460208a0161334f565b601760f91b908301908152855161447b816001840160208a0161334f565b855191019061449181600184016020890161334f565b84519101906144a781600184016020880161334f565b016001019695505050505050565b6000600080516020614eee8339815191528083527f745f74797065223a224e756d62657220426f75676874222c2276616c7565223a6020840152845161450281604086016020890161334f565b611f4b60f21b604091850191820181905260428201929092527f745f74797065223a224e756d6265722052656d61696e696e67222c2276616c7560628201526232911d60e91b608282015284519161456183608584016020890161334f565b91016085810191909152608701949350505050565b6000845161458881846020890161334f565b8083019050600080516020614eee8339815191528082527f745f74797065223a225265616c697a65642050726f666974222c2276616c7565602083015261111d60f11b604083015285516145e3816042850160208a0161334f565b611f4b60f21b92016042810183905260448101919091527f745f74797065223a22556e7265616c697a65642050726f666974222c2276616c6064820152633ab2911d60e11b60848201528451909161464282608885016020890161334f565b60889290910191820152608a0195945050505050565b6000845161466a81846020890161334f565b8083019050600080516020614eee8339815191528082527f745f74797065223a22506f74656e7469616c20546f74616c2050726f6669742260208301526816113b30b63ab2911d60b91b604083015285516146cc816049850160208a0161334f565b808301925050611f4b60f21b80604984015281604b8401527f745f74797065223a22546f74616c20436f7374222c2276616c7565223a000000606b8401528551915061464282608885016020890161334f565b6000845161473181846020890161334f565b8083019050600080516020614eee8339815191528082527f745f74797065223a2252657475726e2052617465222c2276616c7565223a00006020830152855161478181603e850160208a0161334f565b611f4b60f21b603e939091019283015260408201527f745f74797065223a224172742054797065222c2276616c7565223a0000000000606082015283516147cf81607b84016020880161334f565b607d60f81b607b9290910191820152607c0195945050505050565b69101e3a32bc3a103c1e9160b11b8152845160009061481081600a850160208a0161334f565b6411103c9e9160d91b600a91840191820152855161483581600f840160208a0161334f565b68111031b630b9b99e9160b91b600f9290910191820152845161485f81601884016020890161334f565b600a8183010191505061111f60f11b600e820152835161488681601084016020880161334f565b6701e17ba32bc3a1f160c51b601092909101918201526018019695505050505050565b7f203c7465787420783d223530252220793d223135252220646f6d696e616e742d81527f626173656c696e653d226d6964646c652220746578742d616e63686f723d226d60208201527f6964646c652220666f6e742d73697a653d2231337078222066696c6c3d22234560408201527f35453644392220666f6e742d66616d696c793d2268656c76657469636122203e606082015260008551614953816080850160208a0161334f565b7f3c2f746578743e203c7465787420783d223530252220793d223735252220646f6080918401918201527f6d696e616e742d626173656c696e653d226d6964646c652220746578742d616e60a08201527f63686f723d226d6964646c652220666f6e742d73697a653d223234707822206660c08201527f696c6c3d22234535453644392220666f6e742d66616d696c793d2268656c766560e08201527f7469636122203e506f74656e7469616c20546f74616c2050726f6669743c2f746101008201527f6578743e203c7465787420783d223530252220793d223838252220646f6d696e6101208201527f616e742d626173656c696e653d226d6964646c652220746578742d616e63686f6101408201527f723d22656e642220666f6e742d73697a653d2231387078222066696c6c3d22236101608201527f4535453644392220666f6e742d66616d696c793d2268656c7665746963612220610180820152601f60f91b6101a0820152613d99614b8e6141cf614b65614b5f614ada6101a187018c613bed565b7f20ce9e3c2f746578743e203c7465787420783d223530252220793d223838252281527f20646f6d696e616e742d626173656c696e653d226d6964646c6522207465787460208201527f2d616e63686f723d2273746172742220666f6e742d73697a653d223138707822604082015266103334b6361e9160c91b606082015260670190565b89613bed565b7f2220666f6e742d66616d696c793d2268656c76657469636122203e20202800008152601e0190565b7f2025293c2f746578743e203c7465787420783d223530252220793d223825222081527f646f6d696e616e742d626173656c696e653d226d6964646c652220746578742d60208201527f616e63686f723d226d6964646c652220666f6e742d73697a653d22313870782260408201527f2066696c6c3d22234535453644392220666f6e742d66616d696c793d2268656c60608201527f76657469636122203e4f6e20436861696e2050726f6669742043616c63756c616080820152693a37b91e17ba32bc3a1f60b11b60a082015260aa0190565b69101e3a32bc3a103c1e9160b11b81528551600090614c8881600a850160208b0161334f565b6411103c9e9160d91b600a918401918201528651614cad81600f840160208b0161334f565b68111031b630b9b99e9160b91b600f92909101918201528551614cd7816018840160208a0161334f565b600a8183010191505061111f60f11b600e8201528451614cfe81601084016020890161334f565b6005818301019150508351614d1a81600b84016020880161334f565b613f8e600b828401016701e17ba32bc3a1f160c51b815260080190565b73101e3634b732903c189e9118981291103c989e9160611b81528251600090614d6781601485016020880161334f565b6e11103c191e911c981291103c991e9160891b6014918401918201528351614d9681602384016020880161334f565b7f22207374726f6b653d222341324343443622207374726f6b652d77696474683d60239290910191820152661118b83c11179f60c91b6043820152604a01949350505050565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906135b69083018461337b565b600060208284031215614e2157600080fd5b81516111328161331c56fe506c65617365207365742074686520676173206c696d697420746f2034303030303020706572204e46542e446f6e2774206275792074686973204e465420697420697320666f72206164766572746973656d656e742075736167654142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f557375616c6c792069742077696c6c2074616b6520323430303030206f72203332303030302c7b22646973706c61795f74797065223a20226e756d626572222c20227472616941204e465420636f6c6c656374696f6e2077686963682063616c63756c61746520796f75722070726f66697473206f6e20697473206f776e2e20546865206669727374206f6e636861696e204e465420776869636820747261636b7320697473206f776e20666c6f6f722070726963652e6f746865727769736520746865726520697320383025206368616e636520666f7220657865637574696f6e207265766572746564206572726f722ea264697066735822122059119d33257fee09aacf047ecd6ce95c5107033f855a9c13ee493f4e886193a264736f6c634300080d0033
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.