ERC-721
Overview
Max Total Supply
267 LOM
Holders
114
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
6 LOMLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
GenArt721CoreV2_LegendsOfMetaterra
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: LGPL-3.0-only // Created By: Art Blocks Inc. import "../../interfaces/0.8.x/IRandomizer.sol"; import "../../interfaces/0.8.x/IGenArt721CoreV2_PBAB.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; pragma solidity 0.8.9; /** * @title Powered by Art Blocks ERC-721 core contract. * @author Art Blocks Inc. */ contract GenArt721CoreV2_LegendsOfMetaterra is ERC721Enumerable, IGenArt721CoreV2_PBAB { /// randomizer contract IRandomizer public randomizerContract; struct Project { string name; string artist; string description; string website; string license; string projectBaseURI; uint256 invocations; uint256 maxInvocations; string scriptJSON; mapping(uint256 => string) scripts; uint256 scriptCount; string ipfsHash; bool active; bool locked; bool paused; } uint256 constant ONE_MILLION = 1_000_000; mapping(uint256 => Project) projects; //All financial functions are stripped from struct for visibility mapping(uint256 => address payable) public projectIdToArtistAddress; mapping(uint256 => string) public projectIdToCurrencySymbol; mapping(uint256 => address) public projectIdToCurrencyAddress; mapping(uint256 => uint256) public projectIdToPricePerTokenInWei; mapping(uint256 => address payable) public projectIdToAdditionalPayee; mapping(uint256 => uint256) public projectIdToAdditionalPayeePercentage; mapping(uint256 => uint256) public projectIdToSecondaryMarketRoyaltyPercentage; address payable public renderProviderAddress; /// Percentage of mint revenue allocated to render provider uint256 public renderProviderPercentage = 10; mapping(uint256 => uint256) public tokenIdToProjectId; mapping(uint256 => bytes32) public tokenIdToHash; mapping(bytes32 => uint256) public hashToTokenId; /// admin for contract address public admin; /// true if address is whitelisted mapping(address => bool) public isWhitelisted; /// true if minter is whitelisted mapping(address => bool) public isMintWhitelisted; /// next project ID to be created uint256 public nextProjectId = 0; modifier onlyValidTokenId(uint256 _tokenId) { require(_exists(_tokenId), "Token ID does not exist"); _; } modifier onlyUnlocked(uint256 _projectId) { require(!projects[_projectId].locked, "Only if unlocked"); _; } modifier onlyArtist(uint256 _projectId) { require( msg.sender == projectIdToArtistAddress[_projectId], "Only artist" ); _; } modifier onlyAdmin() { require(msg.sender == admin, "Only admin"); _; } modifier onlyWhitelisted() { require(isWhitelisted[msg.sender], "Only whitelisted"); _; } modifier onlyArtistOrWhitelisted(uint256 _projectId) { require( isWhitelisted[msg.sender] || msg.sender == projectIdToArtistAddress[_projectId], "Only artist or whitelisted" ); _; } /** * @notice Initializes contract. * @param _tokenName Name of token. * @param _tokenSymbol Token symbol. * @param _randomizerContract Randomizer contract. */ constructor( string memory _tokenName, string memory _tokenSymbol, address _randomizerContract ) ERC721(_tokenName, _tokenSymbol) { admin = msg.sender; isWhitelisted[msg.sender] = true; renderProviderAddress = payable(msg.sender); randomizerContract = IRandomizer(_randomizerContract); } /** * @notice Mints a token from project `_projectId` and sets the * token's owner to `_to`. * @param _to Address to be the minted token's owner. * @param _projectId Project ID to mint a token on. * @param _by Purchaser of minted token. * @dev sender must be a whitelisted minter */ function mint( address _to, uint256 _projectId, address _by ) external returns (uint256 _tokenId) { require( isMintWhitelisted[msg.sender], "Must mint from whitelisted minter contract." ); require( projects[_projectId].invocations + 1 <= projects[_projectId].maxInvocations, "Must not exceed max invocations" ); require( projects[_projectId].active || _by == projectIdToArtistAddress[_projectId], "Project must exist and be active" ); require( !projects[_projectId].paused || _by == projectIdToArtistAddress[_projectId], "Purchases are paused." ); uint256 tokenId = _mintToken(_to, _projectId); return tokenId; } function _mintToken(address _to, uint256 _projectId) internal returns (uint256 _tokenId) { uint256 tokenIdToBe = (_projectId * ONE_MILLION) + projects[_projectId].invocations; projects[_projectId].invocations = projects[_projectId].invocations + 1; bytes32 hash = keccak256( abi.encodePacked( projects[_projectId].invocations, block.number, blockhash(block.number - 1), randomizerContract.returnValue() ) ); tokenIdToHash[tokenIdToBe] = hash; hashToTokenId[hash] = tokenIdToBe; _mint(_to, tokenIdToBe); tokenIdToProjectId[tokenIdToBe] = _projectId; emit Mint(_to, tokenIdToBe, _projectId); return tokenIdToBe; } /** * @notice Updates contract admin to `_adminAddress`. */ function updateAdmin(address _adminAddress) public onlyAdmin { admin = _adminAddress; } /** * @notice Updates render provider address to `_renderProviderAddress`. */ function updateRenderProviderAddress(address payable _renderProviderAddress) public onlyAdmin { renderProviderAddress = _renderProviderAddress; } /** * @notice Updates render provider mint revenue percentage to * `_renderProviderPercentage`. */ function updateRenderProviderPercentage(uint256 _renderProviderPercentage) public onlyAdmin { require(_renderProviderPercentage <= 25, "Max of 25%"); renderProviderPercentage = _renderProviderPercentage; } /** * @notice Whitelists `_address`. */ function addWhitelisted(address _address) public onlyAdmin { isWhitelisted[_address] = true; } /** * @notice Revokes whitelisting of `_address`. */ function removeWhitelisted(address _address) public onlyAdmin { isWhitelisted[_address] = false; } /** * @notice Whitelists minter `_address`. */ function addMintWhitelisted(address _address) public onlyAdmin { isMintWhitelisted[_address] = true; } /** * @notice Revokes whitelisting of minter `_address`. */ function removeMintWhitelisted(address _address) public onlyAdmin { isMintWhitelisted[_address] = false; } /** * @notice Updates randomizer to `_randomizerAddress`. */ function updateRandomizerAddress(address _randomizerAddress) public onlyWhitelisted { randomizerContract = IRandomizer(_randomizerAddress); } /** * @notice Locks project `_projectId`. */ function toggleProjectIsLocked(uint256 _projectId) public onlyWhitelisted onlyUnlocked(_projectId) { projects[_projectId].locked = true; } /** * @notice Toggles project `_projectId` as active/inactive. */ function toggleProjectIsActive(uint256 _projectId) public onlyWhitelisted { projects[_projectId].active = !projects[_projectId].active; } /** * @notice Updates artist of project `_projectId` to `_artistAddress`. */ function updateProjectArtistAddress( uint256 _projectId, address payable _artistAddress ) public onlyArtistOrWhitelisted(_projectId) { projectIdToArtistAddress[_projectId] = _artistAddress; } /** * @notice Toggles paused state of project `_projectId`. */ function toggleProjectIsPaused(uint256 _projectId) public onlyArtist(_projectId) { projects[_projectId].paused = !projects[_projectId].paused; } /** * @notice Adds new project `_projectName` by `_artistAddress`. * @param _projectName Project name. * @param _artistAddress Artist's address. * @param _pricePerTokenInWei Price to mint a token, in Wei. */ function addProject( string memory _projectName, address payable _artistAddress, uint256 _pricePerTokenInWei ) public onlyWhitelisted { uint256 projectId = nextProjectId; projectIdToArtistAddress[projectId] = _artistAddress; projects[projectId].name = _projectName; projectIdToCurrencySymbol[projectId] = "ETH"; projectIdToPricePerTokenInWei[projectId] = _pricePerTokenInWei; projects[projectId].paused = true; projects[projectId].maxInvocations = ONE_MILLION; nextProjectId = nextProjectId + 1; } /** * @notice Updates payment currency of project `_projectId` to be * `_currencySymbol`. * @param _projectId Project ID to update. * @param _currencySymbol Currency symbol. * @param _currencyAddress Currency address. */ function updateProjectCurrencyInfo( uint256 _projectId, string memory _currencySymbol, address _currencyAddress ) public onlyArtist(_projectId) { projectIdToCurrencySymbol[_projectId] = _currencySymbol; projectIdToCurrencyAddress[_projectId] = _currencyAddress; } /** * @notice Updates price per token of project `_projectId` to be * '_pricePerTokenInWei`, in Wei. */ function updateProjectPricePerTokenInWei( uint256 _projectId, uint256 _pricePerTokenInWei ) public onlyArtist(_projectId) { projectIdToPricePerTokenInWei[_projectId] = _pricePerTokenInWei; } /** * @notice Updates name of project `_projectId` to be `_projectName`. */ function updateProjectName(uint256 _projectId, string memory _projectName) public onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) { projects[_projectId].name = _projectName; } /** * @notice Updates artist name for project `_projectId` to be * `_projectArtistName`. */ function updateProjectArtistName( uint256 _projectId, string memory _projectArtistName ) public onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) { projects[_projectId].artist = _projectArtistName; } /** * @notice Updates additional payee for project `_projectId` to be * `_additionalPayee`, receiving `_additionalPayeePercentage` percent * of artist mint and royalty revenues. */ function updateProjectAdditionalPayeeInfo( uint256 _projectId, address payable _additionalPayee, uint256 _additionalPayeePercentage ) public onlyArtist(_projectId) { require(_additionalPayeePercentage <= 100, "Max of 100%"); projectIdToAdditionalPayee[_projectId] = _additionalPayee; projectIdToAdditionalPayeePercentage[ _projectId ] = _additionalPayeePercentage; } /** * @notice Updates artist secondary market royalties for project * `_projectId` to be `_secondMarketRoyalty` percent. */ function updateProjectSecondaryMarketRoyaltyPercentage( uint256 _projectId, uint256 _secondMarketRoyalty ) public onlyArtist(_projectId) { require(_secondMarketRoyalty <= 100, "Max of 100%"); projectIdToSecondaryMarketRoyaltyPercentage[ _projectId ] = _secondMarketRoyalty; } /** * @notice Updates description of project `_projectId`. */ function updateProjectDescription( uint256 _projectId, string memory _projectDescription ) public onlyArtist(_projectId) { projects[_projectId].description = _projectDescription; } /** * @notice Updates website of project `_projectId` to be `_projectWebsite`. */ function updateProjectWebsite( uint256 _projectId, string memory _projectWebsite ) public onlyArtist(_projectId) { projects[_projectId].website = _projectWebsite; } /** * @notice Updates license for project `_projectId`. */ function updateProjectLicense( uint256 _projectId, string memory _projectLicense ) public onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) { projects[_projectId].license = _projectLicense; } /** * @notice Updates maximum invocations for project `_projectId` to * `_maxInvocations`. */ function updateProjectMaxInvocations( uint256 _projectId, uint256 _maxInvocations ) public onlyArtist(_projectId) { require( (!projects[_projectId].locked || _maxInvocations < projects[_projectId].maxInvocations), "Only if unlocked" ); require( _maxInvocations > projects[_projectId].invocations, "You must set max invocations greater than current invocations" ); require(_maxInvocations <= ONE_MILLION, "Cannot exceed 1000000"); projects[_projectId].maxInvocations = _maxInvocations; } /** * @notice Adds a script to project `_projectId`. * @param _projectId Project to be updated. * @param _script Script to be added. */ function addProjectScript(uint256 _projectId, string memory _script) public onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) { projects[_projectId].scripts[ projects[_projectId].scriptCount ] = _script; projects[_projectId].scriptCount = projects[_projectId].scriptCount + 1; } /** * @notice Updates script for project `_projectId` at script ID `_scriptId`. * @param _projectId Project to be updated. * @param _scriptId Script ID to be updated. * @param _script Script to be added. */ function updateProjectScript( uint256 _projectId, uint256 _scriptId, string memory _script ) public onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) { require( _scriptId < projects[_projectId].scriptCount, "scriptId out of range" ); projects[_projectId].scripts[_scriptId] = _script; } /** * @notice Removes last script from project `_projectId`. */ function removeProjectLastScript(uint256 _projectId) public onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) { require( projects[_projectId].scriptCount > 0, "there are no scripts to remove" ); delete projects[_projectId].scripts[ projects[_projectId].scriptCount - 1 ]; projects[_projectId].scriptCount = projects[_projectId].scriptCount - 1; } /** * @notice Updates script json for project `_projectId`. */ function updateProjectScriptJSON( uint256 _projectId, string memory _projectScriptJSON ) public onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) { projects[_projectId].scriptJSON = _projectScriptJSON; } /** * @notice Updates ipfs hash for project `_projectId`. */ function updateProjectIpfsHash(uint256 _projectId, string memory _ipfsHash) public onlyUnlocked(_projectId) onlyArtistOrWhitelisted(_projectId) { projects[_projectId].ipfsHash = _ipfsHash; } /** * @notice Updates base URI for project `_projectId` to `_newBaseURI`. */ function updateProjectBaseURI(uint256 _projectId, string memory _newBaseURI) public onlyArtist(_projectId) { projects[_projectId].projectBaseURI = _newBaseURI; } /** * @notice Returns project details for project `_projectId`. * @param _projectId Project to be queried. * @return projectName Name of project * @return artist Artist of project * @return description Project description * @return website Project website * @return license Project license */ function projectDetails(uint256 _projectId) public view returns ( string memory projectName, string memory artist, string memory description, string memory website, string memory license ) { projectName = projects[_projectId].name; artist = projects[_projectId].artist; description = projects[_projectId].description; website = projects[_projectId].website; license = projects[_projectId].license; } /** * @notice Returns project token information for project `_projectId`. * @param _projectId Project to be queried. * @return artistAddress Project Artist's address * @return pricePerTokenInWei Price to mint a token, in Wei * @return invocations Current number of invocations * @return maxInvocations Maximum allowed invocations * @return active Boolean representing if project is currently active * @return additionalPayee Additional payee address * @return additionalPayeePercentage Percentage of artist revenue * to be sent to the additional payee's address * @return currency Symbol of project's currency * @return currencyAddress Address of project's currency */ function projectTokenInfo(uint256 _projectId) public view returns ( address artistAddress, uint256 pricePerTokenInWei, uint256 invocations, uint256 maxInvocations, bool active, address additionalPayee, uint256 additionalPayeePercentage, string memory currency, address currencyAddress ) { artistAddress = projectIdToArtistAddress[_projectId]; pricePerTokenInWei = projectIdToPricePerTokenInWei[_projectId]; invocations = projects[_projectId].invocations; maxInvocations = projects[_projectId].maxInvocations; active = projects[_projectId].active; additionalPayee = projectIdToAdditionalPayee[_projectId]; additionalPayeePercentage = projectIdToAdditionalPayeePercentage[ _projectId ]; currency = projectIdToCurrencySymbol[_projectId]; currencyAddress = projectIdToCurrencyAddress[_projectId]; } /** * @notice Returns script information for project `_projectId`. * @param _projectId Project to be queried. * @return scriptJSON Project's script json * @return scriptCount Count of scripts for project * @return ipfsHash IPFS hash for project * @return locked Boolean representing if project is locked * @return paused Boolean representing if project is paused */ function projectScriptInfo(uint256 _projectId) public view returns ( string memory scriptJSON, uint256 scriptCount, string memory ipfsHash, bool locked, bool paused ) { scriptJSON = projects[_projectId].scriptJSON; scriptCount = projects[_projectId].scriptCount; ipfsHash = projects[_projectId].ipfsHash; locked = projects[_projectId].locked; paused = projects[_projectId].paused; } /** * @notice Returns script for project `_projectId` at script index `_index`. */ function projectScriptByIndex(uint256 _projectId, uint256 _index) public view returns (string memory) { return projects[_projectId].scripts[_index]; } /** * @notice Returns base URI for project `_projectId`. */ function projectURIInfo(uint256 _projectId) public view returns (string memory projectBaseURI) { projectBaseURI = projects[_projectId].projectBaseURI; } /** * @notice Gets royalty data for token ID `_tokenId`. * @param _tokenId Token ID to be queried. * @return artistAddress Artist's payment address * @return additionalPayee Additional payee's payment address * @return additionalPayeePercentage Percentage of artist revenue * to be sent to the additional payee's address * @return royaltyFeeByID Total royalty percentage to be sent to * combination of artist and additional payee */ function getRoyaltyData(uint256 _tokenId) public view returns ( address artistAddress, address additionalPayee, uint256 additionalPayeePercentage, uint256 royaltyFeeByID ) { artistAddress = projectIdToArtistAddress[tokenIdToProjectId[_tokenId]]; additionalPayee = projectIdToAdditionalPayee[ tokenIdToProjectId[_tokenId] ]; additionalPayeePercentage = projectIdToAdditionalPayeePercentage[ tokenIdToProjectId[_tokenId] ]; royaltyFeeByID = projectIdToSecondaryMarketRoyaltyPercentage[ tokenIdToProjectId[_tokenId] ]; } /** * @notice Gets token URI for token ID `_tokenId`. */ function tokenURI(uint256 _tokenId) public view override onlyValidTokenId(_tokenId) returns (string memory) { return string( abi.encodePacked( projects[tokenIdToProjectId[_tokenId]].projectBaseURI, Strings.toString(_tokenId) ) ); } }
// SPDX-License-Identifier: LGPL-3.0-only // Creatd By: Art Blocks Inc. pragma solidity ^0.8.0; interface IRandomizer { function returnValue() external view returns (bytes32); }
// SPDX-License-Identifier: LGPL-3.0-only // Created By: Art Blocks Inc. pragma solidity ^0.8.0; interface IGenArt721CoreV2_PBAB { /** * @notice Token ID `_tokenId` minted on project ID `_projectId` to `_to`. */ event Mint( address indexed _to, uint256 indexed _tokenId, uint256 indexed _projectId ); // getter function of public variable function admin() external view returns (address); // getter function of public variable function nextProjectId() external view returns (uint256); // getter function of public mapping function tokenIdToProjectId(uint256 tokenId) external view returns (uint256 projectId); function isWhitelisted(address sender) external view returns (bool); function projectIdToCurrencySymbol(uint256 _projectId) external view returns (string memory); function projectIdToCurrencyAddress(uint256 _projectId) external view returns (address); function projectIdToArtistAddress(uint256 _projectId) external view returns (address payable); function projectIdToPricePerTokenInWei(uint256 _projectId) external view returns (uint256); function projectIdToAdditionalPayee(uint256 _projectId) external view returns (address payable); function projectIdToAdditionalPayeePercentage(uint256 _projectId) external view returns (uint256); function projectTokenInfo(uint256 _projectId) external view returns ( address, uint256, uint256, uint256, bool, address, uint256, string memory, address ); function renderProviderAddress() external view returns (address payable); function renderProviderPercentage() external view returns (uint256); function mint( address _to, uint256 _projectId, address _by ) external returns (uint256 tokenId); function getRoyaltyData(uint256 _tokenId) external view returns ( address artistAddress, address additionalPayee, uint256 additionalPayeePercentage, uint256 royaltyFeeByID ); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @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. * - `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 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // 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 v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 100 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"_tokenName","type":"string"},{"internalType":"string","name":"_tokenSymbol","type":"string"},{"internalType":"address","name":"_randomizerContract","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_to","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"addMintWhitelisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_projectName","type":"string"},{"internalType":"address payable","name":"_artistAddress","type":"address"},{"internalType":"uint256","name":"_pricePerTokenInWei","type":"uint256"}],"name":"addProject","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_script","type":"string"}],"name":"addProjectScript","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"addWhitelisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"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":"getRoyaltyData","outputs":[{"internalType":"address","name":"artistAddress","type":"address"},{"internalType":"address","name":"additionalPayee","type":"address"},{"internalType":"uint256","name":"additionalPayeePercentage","type":"uint256"},{"internalType":"uint256","name":"royaltyFeeByID","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"hashToTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isMintWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"address","name":"_by","type":"address"}],"name":"mint","outputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextProjectId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectDetails","outputs":[{"internalType":"string","name":"projectName","type":"string"},{"internalType":"string","name":"artist","type":"string"},{"internalType":"string","name":"description","type":"string"},{"internalType":"string","name":"website","type":"string"},{"internalType":"string","name":"license","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"projectIdToAdditionalPayee","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"projectIdToAdditionalPayeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"projectIdToArtistAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"projectIdToCurrencyAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"projectIdToCurrencySymbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"projectIdToPricePerTokenInWei","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"projectIdToSecondaryMarketRoyaltyPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_index","type":"uint256"}],"name":"projectScriptByIndex","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectScriptInfo","outputs":[{"internalType":"string","name":"scriptJSON","type":"string"},{"internalType":"uint256","name":"scriptCount","type":"uint256"},{"internalType":"string","name":"ipfsHash","type":"string"},{"internalType":"bool","name":"locked","type":"bool"},{"internalType":"bool","name":"paused","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectTokenInfo","outputs":[{"internalType":"address","name":"artistAddress","type":"address"},{"internalType":"uint256","name":"pricePerTokenInWei","type":"uint256"},{"internalType":"uint256","name":"invocations","type":"uint256"},{"internalType":"uint256","name":"maxInvocations","type":"uint256"},{"internalType":"bool","name":"active","type":"bool"},{"internalType":"address","name":"additionalPayee","type":"address"},{"internalType":"uint256","name":"additionalPayeePercentage","type":"uint256"},{"internalType":"string","name":"currency","type":"string"},{"internalType":"address","name":"currencyAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"projectURIInfo","outputs":[{"internalType":"string","name":"projectBaseURI","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"randomizerContract","outputs":[{"internalType":"contract IRandomizer","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"removeMintWhitelisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"removeProjectLastScript","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"removeWhitelisted","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renderProviderAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renderProviderPercentage","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":"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":"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":"_projectId","type":"uint256"}],"name":"toggleProjectIsActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"toggleProjectIsLocked","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"}],"name":"toggleProjectIsPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdToHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenIdToProjectId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_adminAddress","type":"address"}],"name":"updateAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"address payable","name":"_additionalPayee","type":"address"},{"internalType":"uint256","name":"_additionalPayeePercentage","type":"uint256"}],"name":"updateProjectAdditionalPayeeInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"address payable","name":"_artistAddress","type":"address"}],"name":"updateProjectArtistAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_projectArtistName","type":"string"}],"name":"updateProjectArtistName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_newBaseURI","type":"string"}],"name":"updateProjectBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_currencySymbol","type":"string"},{"internalType":"address","name":"_currencyAddress","type":"address"}],"name":"updateProjectCurrencyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_projectDescription","type":"string"}],"name":"updateProjectDescription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_ipfsHash","type":"string"}],"name":"updateProjectIpfsHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_projectLicense","type":"string"}],"name":"updateProjectLicense","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_maxInvocations","type":"uint256"}],"name":"updateProjectMaxInvocations","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_projectName","type":"string"}],"name":"updateProjectName","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_pricePerTokenInWei","type":"uint256"}],"name":"updateProjectPricePerTokenInWei","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_scriptId","type":"uint256"},{"internalType":"string","name":"_script","type":"string"}],"name":"updateProjectScript","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_projectScriptJSON","type":"string"}],"name":"updateProjectScriptJSON","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"uint256","name":"_secondMarketRoyalty","type":"uint256"}],"name":"updateProjectSecondaryMarketRoyaltyPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_projectId","type":"uint256"},{"internalType":"string","name":"_projectWebsite","type":"string"}],"name":"updateProjectWebsite","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_randomizerAddress","type":"address"}],"name":"updateRandomizerAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_renderProviderAddress","type":"address"}],"name":"updateRenderProviderAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_renderProviderPercentage","type":"uint256"}],"name":"updateRenderProviderPercentage","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600a6014556000601b553480156200001b57600080fd5b50604051620043b4380380620043b48339810160408190526200003e9162000241565b82518390839062000057906000906020850190620000ce565b5080516200006d906001906020840190620000ce565b505060188054336001600160a01b031991821681179092556000828152601960205260409020805460ff19166001179055601380548216909217909155600a80549091166001600160a01b039390931692909217909155506200030b915050565b828054620000dc90620002ce565b90600052602060002090601f0160209004810192826200010057600085556200014b565b82601f106200011b57805160ff19168380011785556200014b565b828001600101855582156200014b579182015b828111156200014b5782518255916020019190600101906200012e565b50620001599291506200015d565b5090565b5b808211156200015957600081556001016200015e565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200019c57600080fd5b81516001600160401b0380821115620001b957620001b962000174565b604051601f8301601f19908116603f01168101908282118183101715620001e457620001e462000174565b816040528381526020925086838588010111156200020157600080fd5b600091505b8382101562000225578582018301518183018401529082019062000206565b83821115620002375760008385830101525b9695505050505050565b6000806000606084860312156200025757600080fd5b83516001600160401b03808211156200026f57600080fd5b6200027d878388016200018a565b945060208601519150808211156200029457600080fd5b50620002a3868287016200018a565b604086015190935090506001600160a01b0381168114620002c357600080fd5b809150509250925092565b600181811c90821680620002e357607f821691505b602082108114156200030557634e487b7160e01b600052602260045260246000fd5b50919050565b614099806200031b6000396000f3fe608060405234801561001057600080fd5b50600436106103875760003560e01c80638763ad1e116101e0578063b88d4fde11610110578063db2ff861116100a8578063db2ff8611461094e578063e13208b414610961578063e2f273bd14610974578063e935b7b114610987578063e985e9c514610990578063ed8abfda146109a3578063f51f74a9146109c3578063f70c0f04146109e3578063f851a44014610a0357600080fd5b8063b88d4fde14610880578063c34a03b514610893578063c6d73231146108a6578063c87b56dd146108b9578063cc74234b146108cc578063cfbf4d97146108ec578063d03c390c146108ff578063d195b36514610912578063d7b044b61461092557600080fd5b8063a11ec70a11610183578063a11ec70a14610740578063a22cb46514610753578063a3b2cca614610766578063a47d29cb14610779578063a65ff74c146107a2578063acad012414610824578063ad0305ce14610837578063b1656ba31461085a578063b7b04fae1461086d57600080fd5b80638763ad1e1461068d5780638ba8f14d146106a05780638bddb0a6146106b35780638c2c3622146106c65780638c3c9cdd146106ee5780638dd91a561461070157806395d89b411461072557806397dc86cf1461072d57600080fd5b806336c7c12c116102bb5780634f6ccce71161025e5780634f6ccce7146105d5578063621a1f74146105e85780636352211e1461060857806369d14faf1461061b5780636b6ec8a61461062e5780636c907b7f1461064157806370a0823114610654578063826fc39114610667578063867f1a3b1461067a57600080fd5b806336c7c12c1461050657806337859963146105195780633af32abf1461052c5780633e48e8481461054f5780633fef6c2a1461056257806342842e0e14610575578063498dd0c1146105885780634aa6d417146105b157600080fd5b806318160ddd1161032e57806318160ddd146104635780631b689c0b1461046b57806320927ec91461048b57806323b872dd1461049e57806325b75d68146104b1578063291d9549146104c45780632d9c0205146104d75780632e9eb74f146104ea5780632f745c59146104f357600080fd5b806301ffc9a71461038c57806306fdde03146103b4578063081812fc146103c9578063095ea7b3146103f45780630d170673146104095780630d4d15131461041c57806310154bad1461043d57806311f5fdf114610450575b600080fd5b61039f61039a3660046136ab565b610a16565b60405190151581526020015b60405180910390f35b6103bc610a41565b6040516103ab9190613727565b6103dc6103d736600461373a565b610ad3565b6040516001600160a01b0390911681526020016103ab565b610407610402366004613768565b610b60565b005b61040761041736600461383f565b610c71565b61042f61042a366004613885565b610d22565b6040519081526020016103ab565b61040761044b3660046138c7565b610f25565b61040761045e36600461373a565b610f73565b60085461042f565b61042f61047936600461373a565b60156020526000908152604090205481565b6103bc61049936600461373a565b610fe0565b6104076104ac3660046138e4565b61107a565b6104076104bf36600461383f565b6110ab565b6104076104d23660046138c7565b61115b565b6103bc6104e536600461373a565b6111a6565b61042f60145481565b61042f610501366004613768565b61124b565b600a546103dc906001600160a01b031681565b61040761052736600461383f565b6112e1565b61039f61053a3660046138c7565b60196020526000908152604090205460ff1681565b61040761055d36600461383f565b611344565b61040761057036600461383f565b6113a1565b6104076105833660046138e4565b611451565b6103dc61059636600461373a565b600e602052600090815260409020546001600160a01b031681565b6105c46105bf36600461373a565b61146c565b6040516103ab959493929190613925565b61042f6105e336600461373a565b6115ee565b61042f6105f636600461373a565b60166020526000908152604090205481565b6103dc61061636600461373a565b611681565b61040761062936600461396a565b6116f8565b61040761063c3660046138c7565b611779565b61040761064f3660046138c7565b6117c5565b61042f6106623660046138c7565b611816565b61040761067536600461399a565b61189d565b6104076106883660046138c7565b611a0e565b61040761069b3660046139bc565b611a59565b6104076106ae36600461373a565b611b51565b6104076106c13660046138c7565b611bda565b6106d96106d436600461373a565b611c28565b6040516103ab99989796959493929190613a04565b6103bc6106fc36600461399a565b611d49565b61071461070f36600461373a565b611dfa565b6040516103ab959493929190613a6a565b6103bc612128565b61040761073b36600461399a565b612137565b61040761074e36600461373a565b612182565b610407610761366004613ad7565b6121e9565b61040761077436600461383f565b6121f8565b6103dc61078736600461373a565b600c602052600090815260409020546001600160a01b031681565b6107f96107b036600461373a565b6000908152601560209081526040808320548352600c82528083205460108352818420546011845282852054601290945291909320546001600160a01b03938416949390911692565b604080516001600160a01b0395861681529490931660208501529183015260608201526080016103ab565b61040761083236600461383f565b612255565b61039f6108453660046138c7565b601a6020526000908152604090205460ff1681565b610407610868366004613b0a565b612347565b61040761087b36600461383f565b61245c565b61040761088e366004613b59565b61250c565b6104076108a136600461399a565b61253e565b6104076108b436600461383f565b6125aa565b6103bc6108c736600461373a565b61265a565b61042f6108da36600461373a565b60116020526000908152604090205481565b6013546103dc906001600160a01b031681565b61040761090d36600461373a565b6126fc565b610407610920366004613bd8565b61274e565b6103dc61093336600461373a565b6010602052600090815260409020546001600160a01b031681565b61040761095c36600461373a565b6127d7565b61040761096f366004613c27565b612938565b6104076109823660046138c7565b6129cb565b61042f601b5481565b61039f61099e366004613c4e565b612a17565b61042f6109b136600461373a565b60126020526000908152604090205481565b61042f6109d136600461373a565b60176020526000908152604090205481565b61042f6109f136600461373a565b600f6020526000908152604090205481565b6018546103dc906001600160a01b031681565b60006001600160e01b0319821663780e9d6360e01b1480610a3b5750610a3b82612a45565b92915050565b606060008054610a5090613c7c565b80601f0160208091040260200160405190810160405280929190818152602001828054610a7c90613c7c565b8015610ac95780601f10610a9e57610100808354040283529160200191610ac9565b820191906000526020600020905b815481529060010190602001808311610aac57829003601f168201915b5050505050905090565b6000610ade82612a95565b610b445760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610b6b82611681565b9050806001600160a01b0316836001600160a01b03161415610bd95760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610b3b565b336001600160a01b0382161480610bf55750610bf58133612a17565b610c625760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610b3b565b610c6c8383612ab2565b505050565b6000828152600b60205260409020600c01548290610100900460ff1615610caa5760405162461bcd60e51b8152600401610b3b90613cb1565b33600090815260196020526040902054839060ff1680610ce057506000818152600c60205260409020546001600160a01b031633145b610cfc5760405162461bcd60e51b8152600401610b3b90613cdb565b6000848152600b602090815260409091208451610d1b928601906135bf565b5050505050565b336000908152601a602052604081205460ff16610d955760405162461bcd60e51b815260206004820152602b60248201527f4d757374206d696e742066726f6d2077686974656c6973746564206d696e746560448201526a391031b7b73a3930b1ba1760a91b6064820152608401610b3b565b6000838152600b602052604090206007810154600690910154610db9906001613d28565b1115610e075760405162461bcd60e51b815260206004820152601f60248201527f4d757374206e6f7420657863656564206d617820696e766f636174696f6e73006044820152606401610b3b565b6000838152600b60205260409020600c015460ff1680610e4057506000838152600c60205260409020546001600160a01b038381169116145b610e8c5760405162461bcd60e51b815260206004820181905260248201527f50726f6a656374206d75737420657869737420616e64206265206163746976656044820152606401610b3b565b6000838152600b60205260409020600c015462010000900460ff161580610ecc57506000838152600c60205260409020546001600160a01b038381169116145b610f105760405162461bcd60e51b8152602060048201526015602482015274283ab931b430b9b2b99030b932903830bab9b2b21760591b6044820152606401610b3b565b6000610f1c8585612b20565b95945050505050565b6018546001600160a01b03163314610f4f5760405162461bcd60e51b8152600401610b3b90613d40565b6001600160a01b03166000908152601960205260409020805460ff19166001179055565b6018546001600160a01b03163314610f9d5760405162461bcd60e51b8152600401610b3b90613d40565b6019811115610fdb5760405162461bcd60e51b815260206004820152600a6024820152694d6178206f662032352560b01b6044820152606401610b3b565b601455565b600d6020526000908152604090208054610ff990613c7c565b80601f016020809104026020016040519081016040528092919081815260200182805461102590613c7c565b80156110725780601f1061104757610100808354040283529160200191611072565b820191906000526020600020905b81548152906001019060200180831161105557829003601f168201915b505050505081565b6110843382612cbf565b6110a05760405162461bcd60e51b8152600401610b3b90613d64565b610c6c838383612d89565b6000828152600b60205260409020600c01548290610100900460ff16156110e45760405162461bcd60e51b8152600401610b3b90613cb1565b33600090815260196020526040902054839060ff168061111a57506000818152600c60205260409020546001600160a01b031633145b6111365760405162461bcd60e51b8152600401610b3b90613cdb565b6000848152600b602090815260409091208451610d1b926004909201918601906135bf565b6018546001600160a01b031633146111855760405162461bcd60e51b8152600401610b3b90613d40565b6001600160a01b03166000908152601960205260409020805460ff19169055565b6000818152600b602052604090206005018054606091906111c690613c7c565b80601f01602080910402602001604051908101604052809291908181526020018280546111f290613c7c565b801561123f5780601f106112145761010080835404028352916020019161123f565b820191906000526020600020905b81548152906001019060200180831161122257829003601f168201915b50505050509050919050565b600061125683611816565b82106112b85760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610b3b565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6000828152600c602052604090205482906001600160a01b031633146113195760405162461bcd60e51b8152600401610b3b90613db5565b6000838152600b60209081526040909120835161133e926003909201918501906135bf565b50505050565b6000828152600c602052604090205482906001600160a01b0316331461137c5760405162461bcd60e51b8152600401610b3b90613db5565b6000838152600b60209081526040909120835161133e926005909201918501906135bf565b6000828152600b60205260409020600c01548290610100900460ff16156113da5760405162461bcd60e51b8152600401610b3b90613cb1565b33600090815260196020526040902054839060ff168061141057506000818152600c60205260409020546001600160a01b031633145b61142c5760405162461bcd60e51b8152600401610b3b90613cdb565b6000848152600b602081815260409092208551610d1b939190920191908601906135bf565b610c6c8383836040518060200160405280600081525061250c565b606060006060600080600b6000878152602001908152602001600020600801805461149690613c7c565b80601f01602080910402602001604051908101604052809291908181526020018280546114c290613c7c565b801561150f5780601f106114e45761010080835404028352916020019161150f565b820191906000526020600020905b8154815290600101906020018083116114f257829003601f168201915b5050506000898152600b60208190526040909120600a810154910180549499509097509261153f92509050613c7c565b80601f016020809104026020016040519081016040528092919081815260200182805461156b90613c7c565b80156115b85780601f1061158d576101008083540402835291602001916115b8565b820191906000526020600020905b81548152906001019060200180831161159b57829003601f168201915b50505060009889525050600b6020526040909620600c0154949693959460ff610100820481169562010000909204169350915050565b60006115f960085490565b821061165c5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610b3b565b6008828154811061166f5761166f613dda565b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b031680610a3b5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b3b565b33600090815260196020526040902054829060ff168061172e57506000818152600c60205260409020546001600160a01b031633145b61174a5760405162461bcd60e51b8152600401610b3b90613cdb565b506000918252600c602052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b6018546001600160a01b031633146117a35760405162461bcd60e51b8152600401610b3b90613d40565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526019602052604090205460ff166117f45760405162461bcd60e51b8152600401610b3b90613df0565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b0382166118815760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610b3b565b506001600160a01b031660009081526003602052604090205490565b6000828152600c602052604090205482906001600160a01b031633146118d55760405162461bcd60e51b8152600401610b3b90613db5565b6000838152600b60205260409020600c0154610100900460ff16158061190b57506000838152600b602052604090206007015482105b6119275760405162461bcd60e51b8152600401610b3b90613cb1565b6000838152600b602052604090206006015482116119ad5760405162461bcd60e51b815260206004820152603d60248201527f596f75206d75737420736574206d617820696e766f636174696f6e732067726560448201527f61746572207468616e2063757272656e7420696e766f636174696f6e730000006064820152608401610b3b565b620f42408211156119f85760405162461bcd60e51b8152602060048201526015602482015274043616e6e6f7420657863656564203130303030303605c1b6044820152606401610b3b565b506000918252600b602052604090912060070155565b6018546001600160a01b03163314611a385760405162461bcd60e51b8152600401610b3b90613d40565b6001600160a01b03166000908152601a60205260409020805460ff19169055565b3360009081526019602052604090205460ff16611a885760405162461bcd60e51b8152600401610b3b90613df0565b601b546000818152600c6020908152604080832080546001600160a01b0319166001600160a01b038816179055600b82529091208551611aca928701906135bf565b50604080518082018252600381526208aa8960eb1b60208083019182526000858152600d909152929092209051611b0192906135bf565b506000818152600f60209081526040808320859055600b9091529020600c8101805462ff0000191662010000179055620f4240600790910155601b54611b48906001613d28565b601b5550505050565b3360009081526019602052604090205460ff16611b805760405162461bcd60e51b8152600401610b3b90613df0565b6000818152600b60205260409020600c01548190610100900460ff1615611bb95760405162461bcd60e51b8152600401610b3b90613cb1565b506000908152600b60205260409020600c01805461ff001916610100179055565b6018546001600160a01b03163314611c045760405162461bcd60e51b8152600401610b3b90613d40565b6001600160a01b03166000908152601a60205260409020805460ff19166001179055565b6000818152600c6020818152604080842054600f835281852054600b845282862060068101546007820154919096015460108652848820546011875285892054600d90975294882080546001600160a01b0395861699949897939660ff9093169590921693606092909190611c9c90613c7c565b80601f0160208091040260200160405190810160405280929190818152602001828054611cc890613c7c565b8015611d155780601f10611cea57610100808354040283529160200191611d15565b820191906000526020600020905b815481529060010190602001808311611cf857829003601f168201915b50505060009c8d525050600e6020526040909a2054989a9799969895979496939592946001600160a01b0390931692915050565b6000828152600b602090815260408083208484526009019091529020805460609190611d7490613c7c565b80601f0160208091040260200160405190810160405280929190818152602001828054611da090613c7c565b8015611ded5780601f10611dc257610100808354040283529160200191611ded565b820191906000526020600020905b815481529060010190602001808311611dd057829003601f168201915b5050505050905092915050565b6060806060806060600b60008781526020019081526020016000206000018054611e2390613c7c565b80601f0160208091040260200160405190810160405280929190818152602001828054611e4f90613c7c565b8015611e9c5780601f10611e7157610100808354040283529160200191611e9c565b820191906000526020600020905b815481529060010190602001808311611e7f57829003601f168201915b5050506000898152600b60205260409020600101805493985092611ec292509050613c7c565b80601f0160208091040260200160405190810160405280929190818152602001828054611eee90613c7c565b8015611f3b5780601f10611f1057610100808354040283529160200191611f3b565b820191906000526020600020905b815481529060010190602001808311611f1e57829003601f168201915b5050506000898152600b60205260409020600201805493975092611f6192509050613c7c565b80601f0160208091040260200160405190810160405280929190818152602001828054611f8d90613c7c565b8015611fda5780601f10611faf57610100808354040283529160200191611fda565b820191906000526020600020905b815481529060010190602001808311611fbd57829003601f168201915b5050506000898152600b6020526040902060030180549396509261200092509050613c7c565b80601f016020809104026020016040519081016040528092919081815260200182805461202c90613c7c565b80156120795780601f1061204e57610100808354040283529160200191612079565b820191906000526020600020905b81548152906001019060200180831161205c57829003601f168201915b5050506000898152600b6020526040902060040180549395509261209f92509050613c7c565b80601f01602080910402602001604051908101604052809291908181526020018280546120cb90613c7c565b80156121185780601f106120ed57610100808354040283529160200191612118565b820191906000526020600020905b8154815290600101906020018083116120fb57829003601f168201915b5050505050905091939590929450565b606060018054610a5090613c7c565b6000828152600c602052604090205482906001600160a01b0316331461216f5760405162461bcd60e51b8152600401610b3b90613db5565b506000918252600f602052604090912055565b6000818152600c602052604090205481906001600160a01b031633146121ba5760405162461bcd60e51b8152600401610b3b90613db5565b506000908152600b60205260409020600c01805462ff0000198116620100009182900460ff1615909102179055565b6121f4338383612f30565b5050565b6000828152600c602052604090205482906001600160a01b031633146122305760405162461bcd60e51b8152600401610b3b90613db5565b6000838152600b60209081526040909120835161133e926002909201918501906135bf565b6000828152600b60205260409020600c01548290610100900460ff161561228e5760405162461bcd60e51b8152600401610b3b90613cb1565b33600090815260196020526040902054839060ff16806122c457506000818152600c60205260409020546001600160a01b031633145b6122e05760405162461bcd60e51b8152600401610b3b90613cdb565b6000848152600b60209081526040808320600a81015484526009018252909120845161230e928601906135bf565b506000848152600b60205260409020600a015461232c906001613d28565b6000948552600b6020526040909420600a0193909355505050565b6000838152600b60205260409020600c01548390610100900460ff16156123805760405162461bcd60e51b8152600401610b3b90613cb1565b33600090815260196020526040902054849060ff16806123b657506000818152600c60205260409020546001600160a01b031633145b6123d25760405162461bcd60e51b8152600401610b3b90613cdb565b6000858152600b60205260409020600a0154841061242a5760405162461bcd60e51b81526020600482015260156024820152747363726970744964206f7574206f662072616e676560581b6044820152606401610b3b565b6000858152600b6020908152604080832087845260090182529091208451612454928601906135bf565b505050505050565b6000828152600b60205260409020600c01548290610100900460ff16156124955760405162461bcd60e51b8152600401610b3b90613cb1565b33600090815260196020526040902054839060ff16806124cb57506000818152600c60205260409020546001600160a01b031633145b6124e75760405162461bcd60e51b8152600401610b3b90613cdb565b6000848152600b602090815260409091208451610d1b926001909201918601906135bf565b6125163383612cbf565b6125325760405162461bcd60e51b8152600401610b3b90613d64565b61133e84848484612ffb565b6000828152600c602052604090205482906001600160a01b031633146125765760405162461bcd60e51b8152600401610b3b90613db5565b60648211156125975760405162461bcd60e51b8152600401610b3b90613e1a565b5060009182526012602052604090912055565b6000828152600b60205260409020600c01548290610100900460ff16156125e35760405162461bcd60e51b8152600401610b3b90613cb1565b33600090815260196020526040902054839060ff168061261957506000818152600c60205260409020546001600160a01b031633145b6126355760405162461bcd60e51b8152600401610b3b90613cdb565b6000848152600b602090815260409091208451610d1b926008909201918601906135bf565b60608161266681612a95565b6126ac5760405162461bcd60e51b8152602060048201526017602482015276151bdad95b88125108191bd95cc81b9bdd08195e1a5cdd604a1b6044820152606401610b3b565b6000838152601560209081526040808320548352600b90915290206005016126d38461302e565b6040516020016126e4929190613e5b565b60405160208183030381529060405291505b50919050565b3360009081526019602052604090205460ff1661272b5760405162461bcd60e51b8152600401610b3b90613df0565b6000908152600b60205260409020600c01805460ff19811660ff90911615179055565b6000838152600c602052604090205483906001600160a01b031633146127865760405162461bcd60e51b8152600401610b3b90613db5565b6000848152600d6020908152604090912084516127a5928601906135bf565b50506000928352600e602052604090922080546001600160a01b0319166001600160a01b039093169290921790915550565b6000818152600b60205260409020600c01548190610100900460ff16156128105760405162461bcd60e51b8152600401610b3b90613cb1565b33600090815260196020526040902054829060ff168061284657506000818152600c60205260409020546001600160a01b031633145b6128625760405162461bcd60e51b8152600401610b3b90613cdb565b6000838152600b60205260409020600a01546128c05760405162461bcd60e51b815260206004820152601e60248201527f746865726520617265206e6f207363726970747320746f2072656d6f766500006044820152606401610b3b565b6000838152600b60205260408120600a810154600990910191906128e690600190613ef9565b815260200190815260200160002060006129009190613643565b6000838152600b60205260409020600a015461291e90600190613ef9565b6000938452600b6020526040909320600a01929092555050565b6000838152600c602052604090205483906001600160a01b031633146129705760405162461bcd60e51b8152600401610b3b90613db5565b60648211156129915760405162461bcd60e51b8152600401610b3b90613e1a565b50600092835260106020908152604080852080546001600160a01b0319166001600160a01b03959095169490941790935560119052912055565b6018546001600160a01b031633146129f55760405162461bcd60e51b8152600401610b3b90613d40565b601880546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60006001600160e01b031982166380ac58cd60e01b1480612a7657506001600160e01b03198216635b5e139f60e01b145b80610a3b57506301ffc9a760e01b6001600160e01b0319831614610a3b565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612ae782611681565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600b60205260408120600601548190612b41620f424085613f10565b612b4b9190613d28565b6000848152600b6020526040902060060154909150612b6b906001613d28565b6000848152600b602052604081206006018290559043612b8c600182613ef9565b40600a60009054906101000a90046001600160a01b03166001600160a01b031663990c8f796040518163ffffffff1660e01b815260040160206040518083038186803b158015612bdb57600080fd5b505afa158015612bef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c139190613f2f565b6040805160208101959095528401929092526060830152608082015260a00160408051601f198184030181529181528151602092830120600085815260168452828120829055818152601790935291208390559050612c72858361312b565b60008281526015602052604080822086905551859184916001600160a01b038916917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f91a4509392505050565b6000612cca82612a95565b612d2b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b3b565b6000612d3683611681565b9050806001600160a01b0316846001600160a01b03161480612d715750836001600160a01b0316612d6684610ad3565b6001600160a01b0316145b80612d815750612d818185612a17565b949350505050565b826001600160a01b0316612d9c82611681565b6001600160a01b031614612e005760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610b3b565b6001600160a01b038216612e625760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610b3b565b612e6d83838361326a565b612e78600082612ab2565b6001600160a01b0383166000908152600360205260408120805460019290612ea1908490613ef9565b90915550506001600160a01b0382166000908152600360205260408120805460019290612ecf908490613d28565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b816001600160a01b0316836001600160a01b03161415612f8e5760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610b3b565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b613006848484612d89565b61301284848484613322565b61133e5760405162461bcd60e51b8152600401610b3b90613f48565b6060816130525750506040805180820190915260018152600360fc1b602082015290565b8160005b811561307c578061306681613f9a565b91506130759050600a83613fcb565b9150613056565b6000816001600160401b0381111561309657613096613794565b6040519080825280601f01601f1916602001820160405280156130c0576020820181803683370190505b5090505b8415612d81576130d5600183613ef9565b91506130e2600a86613fdf565b6130ed906030613d28565b60f81b81838151811061310257613102613dda565b60200101906001600160f81b031916908160001a905350613124600a86613fcb565b94506130c4565b6001600160a01b0382166131815760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b3b565b61318a81612a95565b156131d75760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b3b565b6131e36000838361326a565b6001600160a01b038216600090815260036020526040812080546001929061320c908490613d28565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b0383166132c5576132c081600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6132e8565b816001600160a01b0316836001600160a01b0316146132e8576132e8838261342f565b6001600160a01b0382166132ff57610c6c816134cc565b826001600160a01b0316826001600160a01b031614610c6c57610c6c828261357b565b60006001600160a01b0384163b1561342457604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613366903390899088908890600401613ff3565b602060405180830381600087803b15801561338057600080fd5b505af19250505080156133b0575060408051601f3d908101601f191682019092526133ad91810190614030565b60015b61340a573d8080156133de576040519150601f19603f3d011682016040523d82523d6000602084013e6133e3565b606091505b5080516134025760405162461bcd60e51b8152600401610b3b90613f48565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612d81565b506001949350505050565b6000600161343c84611816565b6134469190613ef9565b600083815260076020526040902054909150808214613499576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906134de90600190613ef9565b6000838152600960205260408120546008805493945090928490811061350657613506613dda565b90600052602060002001549050806008838154811061352757613527613dda565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061355f5761355f61404d565b6001900381819060005260206000200160009055905550505050565b600061358683611816565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b8280546135cb90613c7c565b90600052602060002090601f0160209004810192826135ed5760008555613633565b82601f1061360657805160ff1916838001178555613633565b82800160010185558215613633579182015b82811115613633578251825591602001919060010190613618565b5061363f929150613680565b5090565b50805461364f90613c7c565b6000825580601f1061365f575050565b601f01602090049060005260206000209081019061367d9190613680565b50565b5b8082111561363f5760008155600101613681565b6001600160e01b03198116811461367d57600080fd5b6000602082840312156136bd57600080fd5b81356136c881613695565b9392505050565b60005b838110156136ea5781810151838201526020016136d2565b8381111561133e5750506000910152565b600081518084526137138160208601602086016136cf565b601f01601f19169290920160200192915050565b6020815260006136c860208301846136fb565b60006020828403121561374c57600080fd5b5035919050565b6001600160a01b038116811461367d57600080fd5b6000806040838503121561377b57600080fd5b823561378681613753565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b03808411156137c4576137c4613794565b604051601f8501601f19908116603f011681019082821181831017156137ec576137ec613794565b8160405280935085815286868601111561380557600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261383057600080fd5b6136c8838335602085016137aa565b6000806040838503121561385257600080fd5b8235915060208301356001600160401b0381111561386f57600080fd5b61387b8582860161381f565b9150509250929050565b60008060006060848603121561389a57600080fd5b83356138a581613753565b92506020840135915060408401356138bc81613753565b809150509250925092565b6000602082840312156138d957600080fd5b81356136c881613753565b6000806000606084860312156138f957600080fd5b833561390481613753565b9250602084013561391481613753565b929592945050506040919091013590565b60a08152600061393860a08301886136fb565b866020840152828103604084015261395081876136fb565b941515606084015250509015156080909101529392505050565b6000806040838503121561397d57600080fd5b82359150602083013561398f81613753565b809150509250929050565b600080604083850312156139ad57600080fd5b50508035926020909101359150565b6000806000606084860312156139d157600080fd5b83356001600160401b038111156139e757600080fd5b6139f38682870161381f565b935050602084013561391481613753565b600061012060018060a01b03808d1684528b60208501528a6040850152896060850152881515608085015280881660a08501528660c08501528160e0850152613a4f828501876136fb565b925080851661010085015250509a9950505050505050505050565b60a081526000613a7d60a08301886136fb565b8281036020840152613a8f81886136fb565b90508281036040840152613aa381876136fb565b90508281036060840152613ab781866136fb565b90508281036080840152613acb81856136fb565b98975050505050505050565b60008060408385031215613aea57600080fd5b8235613af581613753565b91506020830135801515811461398f57600080fd5b600080600060608486031215613b1f57600080fd5b833592506020840135915060408401356001600160401b03811115613b4357600080fd5b613b4f8682870161381f565b9150509250925092565b60008060008060808587031215613b6f57600080fd5b8435613b7a81613753565b93506020850135613b8a81613753565b92506040850135915060608501356001600160401b03811115613bac57600080fd5b8501601f81018713613bbd57600080fd5b613bcc878235602084016137aa565b91505092959194509250565b600080600060608486031215613bed57600080fd5b8335925060208401356001600160401b03811115613c0a57600080fd5b613c168682870161381f565b92505060408401356138bc81613753565b600080600060608486031215613c3c57600080fd5b83359250602084013561391481613753565b60008060408385031215613c6157600080fd5b8235613c6c81613753565b9150602083013561398f81613753565b600181811c90821680613c9057607f821691505b602082108114156126f657634e487b7160e01b600052602260045260246000fd5b60208082526010908201526f13db9b1e481a59881d5b9b1bd8dad95960821b604082015260600190565b6020808252601a908201527f4f6e6c7920617274697374206f722077686974656c6973746564000000000000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115613d3b57613d3b613d12565b500190565b6020808252600a908201526927b7363c9030b236b4b760b11b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252600b908201526a13db9b1e48185c9d1a5cdd60aa1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b60208082526010908201526f13db9b1e481dda1a5d195b1a5cdd195960821b604082015260600190565b6020808252600b908201526a4d6178206f66203130302560a81b604082015260600190565b60008151613e518185602086016136cf565b9290920192915050565b600080845481600182811c915080831680613e7757607f831692505b6020808410821415613e9757634e487b7160e01b86526022600452602486fd5b818015613eab5760018114613ebc57613ee9565b60ff19861689528489019650613ee9565b60008b81526020902060005b86811015613ee15781548b820152908501908301613ec8565b505084890196505b505050505050610f1c8185613e3f565b600082821015613f0b57613f0b613d12565b500390565b6000816000190483118215151615613f2a57613f2a613d12565b500290565b600060208284031215613f4157600080fd5b5051919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000600019821415613fae57613fae613d12565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082613fda57613fda613fb5565b500490565b600082613fee57613fee613fb5565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614026908301846136fb565b9695505050505050565b60006020828403121561404257600080fd5b81516136c881613695565b634e487b7160e01b600052603160045260246000fdfea264697066735822122097f9109a0bdee6543782c46f6b49d08ae6026cd34b6f25909e1efff93605606b64736f6c63430008090033000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000088098f7438773182b703625c4128aff85fcffc400000000000000000000000000000000000000000000000000000000000000194c6567656e6473206f66204d657461746572726120504241420000000000000000000000000000000000000000000000000000000000000000000000000000034c4f4d0000000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103875760003560e01c80638763ad1e116101e0578063b88d4fde11610110578063db2ff861116100a8578063db2ff8611461094e578063e13208b414610961578063e2f273bd14610974578063e935b7b114610987578063e985e9c514610990578063ed8abfda146109a3578063f51f74a9146109c3578063f70c0f04146109e3578063f851a44014610a0357600080fd5b8063b88d4fde14610880578063c34a03b514610893578063c6d73231146108a6578063c87b56dd146108b9578063cc74234b146108cc578063cfbf4d97146108ec578063d03c390c146108ff578063d195b36514610912578063d7b044b61461092557600080fd5b8063a11ec70a11610183578063a11ec70a14610740578063a22cb46514610753578063a3b2cca614610766578063a47d29cb14610779578063a65ff74c146107a2578063acad012414610824578063ad0305ce14610837578063b1656ba31461085a578063b7b04fae1461086d57600080fd5b80638763ad1e1461068d5780638ba8f14d146106a05780638bddb0a6146106b35780638c2c3622146106c65780638c3c9cdd146106ee5780638dd91a561461070157806395d89b411461072557806397dc86cf1461072d57600080fd5b806336c7c12c116102bb5780634f6ccce71161025e5780634f6ccce7146105d5578063621a1f74146105e85780636352211e1461060857806369d14faf1461061b5780636b6ec8a61461062e5780636c907b7f1461064157806370a0823114610654578063826fc39114610667578063867f1a3b1461067a57600080fd5b806336c7c12c1461050657806337859963146105195780633af32abf1461052c5780633e48e8481461054f5780633fef6c2a1461056257806342842e0e14610575578063498dd0c1146105885780634aa6d417146105b157600080fd5b806318160ddd1161032e57806318160ddd146104635780631b689c0b1461046b57806320927ec91461048b57806323b872dd1461049e57806325b75d68146104b1578063291d9549146104c45780632d9c0205146104d75780632e9eb74f146104ea5780632f745c59146104f357600080fd5b806301ffc9a71461038c57806306fdde03146103b4578063081812fc146103c9578063095ea7b3146103f45780630d170673146104095780630d4d15131461041c57806310154bad1461043d57806311f5fdf114610450575b600080fd5b61039f61039a3660046136ab565b610a16565b60405190151581526020015b60405180910390f35b6103bc610a41565b6040516103ab9190613727565b6103dc6103d736600461373a565b610ad3565b6040516001600160a01b0390911681526020016103ab565b610407610402366004613768565b610b60565b005b61040761041736600461383f565b610c71565b61042f61042a366004613885565b610d22565b6040519081526020016103ab565b61040761044b3660046138c7565b610f25565b61040761045e36600461373a565b610f73565b60085461042f565b61042f61047936600461373a565b60156020526000908152604090205481565b6103bc61049936600461373a565b610fe0565b6104076104ac3660046138e4565b61107a565b6104076104bf36600461383f565b6110ab565b6104076104d23660046138c7565b61115b565b6103bc6104e536600461373a565b6111a6565b61042f60145481565b61042f610501366004613768565b61124b565b600a546103dc906001600160a01b031681565b61040761052736600461383f565b6112e1565b61039f61053a3660046138c7565b60196020526000908152604090205460ff1681565b61040761055d36600461383f565b611344565b61040761057036600461383f565b6113a1565b6104076105833660046138e4565b611451565b6103dc61059636600461373a565b600e602052600090815260409020546001600160a01b031681565b6105c46105bf36600461373a565b61146c565b6040516103ab959493929190613925565b61042f6105e336600461373a565b6115ee565b61042f6105f636600461373a565b60166020526000908152604090205481565b6103dc61061636600461373a565b611681565b61040761062936600461396a565b6116f8565b61040761063c3660046138c7565b611779565b61040761064f3660046138c7565b6117c5565b61042f6106623660046138c7565b611816565b61040761067536600461399a565b61189d565b6104076106883660046138c7565b611a0e565b61040761069b3660046139bc565b611a59565b6104076106ae36600461373a565b611b51565b6104076106c13660046138c7565b611bda565b6106d96106d436600461373a565b611c28565b6040516103ab99989796959493929190613a04565b6103bc6106fc36600461399a565b611d49565b61071461070f36600461373a565b611dfa565b6040516103ab959493929190613a6a565b6103bc612128565b61040761073b36600461399a565b612137565b61040761074e36600461373a565b612182565b610407610761366004613ad7565b6121e9565b61040761077436600461383f565b6121f8565b6103dc61078736600461373a565b600c602052600090815260409020546001600160a01b031681565b6107f96107b036600461373a565b6000908152601560209081526040808320548352600c82528083205460108352818420546011845282852054601290945291909320546001600160a01b03938416949390911692565b604080516001600160a01b0395861681529490931660208501529183015260608201526080016103ab565b61040761083236600461383f565b612255565b61039f6108453660046138c7565b601a6020526000908152604090205460ff1681565b610407610868366004613b0a565b612347565b61040761087b36600461383f565b61245c565b61040761088e366004613b59565b61250c565b6104076108a136600461399a565b61253e565b6104076108b436600461383f565b6125aa565b6103bc6108c736600461373a565b61265a565b61042f6108da36600461373a565b60116020526000908152604090205481565b6013546103dc906001600160a01b031681565b61040761090d36600461373a565b6126fc565b610407610920366004613bd8565b61274e565b6103dc61093336600461373a565b6010602052600090815260409020546001600160a01b031681565b61040761095c36600461373a565b6127d7565b61040761096f366004613c27565b612938565b6104076109823660046138c7565b6129cb565b61042f601b5481565b61039f61099e366004613c4e565b612a17565b61042f6109b136600461373a565b60126020526000908152604090205481565b61042f6109d136600461373a565b60176020526000908152604090205481565b61042f6109f136600461373a565b600f6020526000908152604090205481565b6018546103dc906001600160a01b031681565b60006001600160e01b0319821663780e9d6360e01b1480610a3b5750610a3b82612a45565b92915050565b606060008054610a5090613c7c565b80601f0160208091040260200160405190810160405280929190818152602001828054610a7c90613c7c565b8015610ac95780601f10610a9e57610100808354040283529160200191610ac9565b820191906000526020600020905b815481529060010190602001808311610aac57829003601f168201915b5050505050905090565b6000610ade82612a95565b610b445760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610b6b82611681565b9050806001600160a01b0316836001600160a01b03161415610bd95760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610b3b565b336001600160a01b0382161480610bf55750610bf58133612a17565b610c625760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b6064820152608401610b3b565b610c6c8383612ab2565b505050565b6000828152600b60205260409020600c01548290610100900460ff1615610caa5760405162461bcd60e51b8152600401610b3b90613cb1565b33600090815260196020526040902054839060ff1680610ce057506000818152600c60205260409020546001600160a01b031633145b610cfc5760405162461bcd60e51b8152600401610b3b90613cdb565b6000848152600b602090815260409091208451610d1b928601906135bf565b5050505050565b336000908152601a602052604081205460ff16610d955760405162461bcd60e51b815260206004820152602b60248201527f4d757374206d696e742066726f6d2077686974656c6973746564206d696e746560448201526a391031b7b73a3930b1ba1760a91b6064820152608401610b3b565b6000838152600b602052604090206007810154600690910154610db9906001613d28565b1115610e075760405162461bcd60e51b815260206004820152601f60248201527f4d757374206e6f7420657863656564206d617820696e766f636174696f6e73006044820152606401610b3b565b6000838152600b60205260409020600c015460ff1680610e4057506000838152600c60205260409020546001600160a01b038381169116145b610e8c5760405162461bcd60e51b815260206004820181905260248201527f50726f6a656374206d75737420657869737420616e64206265206163746976656044820152606401610b3b565b6000838152600b60205260409020600c015462010000900460ff161580610ecc57506000838152600c60205260409020546001600160a01b038381169116145b610f105760405162461bcd60e51b8152602060048201526015602482015274283ab931b430b9b2b99030b932903830bab9b2b21760591b6044820152606401610b3b565b6000610f1c8585612b20565b95945050505050565b6018546001600160a01b03163314610f4f5760405162461bcd60e51b8152600401610b3b90613d40565b6001600160a01b03166000908152601960205260409020805460ff19166001179055565b6018546001600160a01b03163314610f9d5760405162461bcd60e51b8152600401610b3b90613d40565b6019811115610fdb5760405162461bcd60e51b815260206004820152600a6024820152694d6178206f662032352560b01b6044820152606401610b3b565b601455565b600d6020526000908152604090208054610ff990613c7c565b80601f016020809104026020016040519081016040528092919081815260200182805461102590613c7c565b80156110725780601f1061104757610100808354040283529160200191611072565b820191906000526020600020905b81548152906001019060200180831161105557829003601f168201915b505050505081565b6110843382612cbf565b6110a05760405162461bcd60e51b8152600401610b3b90613d64565b610c6c838383612d89565b6000828152600b60205260409020600c01548290610100900460ff16156110e45760405162461bcd60e51b8152600401610b3b90613cb1565b33600090815260196020526040902054839060ff168061111a57506000818152600c60205260409020546001600160a01b031633145b6111365760405162461bcd60e51b8152600401610b3b90613cdb565b6000848152600b602090815260409091208451610d1b926004909201918601906135bf565b6018546001600160a01b031633146111855760405162461bcd60e51b8152600401610b3b90613d40565b6001600160a01b03166000908152601960205260409020805460ff19169055565b6000818152600b602052604090206005018054606091906111c690613c7c565b80601f01602080910402602001604051908101604052809291908181526020018280546111f290613c7c565b801561123f5780601f106112145761010080835404028352916020019161123f565b820191906000526020600020905b81548152906001019060200180831161122257829003601f168201915b50505050509050919050565b600061125683611816565b82106112b85760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610b3b565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6000828152600c602052604090205482906001600160a01b031633146113195760405162461bcd60e51b8152600401610b3b90613db5565b6000838152600b60209081526040909120835161133e926003909201918501906135bf565b50505050565b6000828152600c602052604090205482906001600160a01b0316331461137c5760405162461bcd60e51b8152600401610b3b90613db5565b6000838152600b60209081526040909120835161133e926005909201918501906135bf565b6000828152600b60205260409020600c01548290610100900460ff16156113da5760405162461bcd60e51b8152600401610b3b90613cb1565b33600090815260196020526040902054839060ff168061141057506000818152600c60205260409020546001600160a01b031633145b61142c5760405162461bcd60e51b8152600401610b3b90613cdb565b6000848152600b602081815260409092208551610d1b939190920191908601906135bf565b610c6c8383836040518060200160405280600081525061250c565b606060006060600080600b6000878152602001908152602001600020600801805461149690613c7c565b80601f01602080910402602001604051908101604052809291908181526020018280546114c290613c7c565b801561150f5780601f106114e45761010080835404028352916020019161150f565b820191906000526020600020905b8154815290600101906020018083116114f257829003601f168201915b5050506000898152600b60208190526040909120600a810154910180549499509097509261153f92509050613c7c565b80601f016020809104026020016040519081016040528092919081815260200182805461156b90613c7c565b80156115b85780601f1061158d576101008083540402835291602001916115b8565b820191906000526020600020905b81548152906001019060200180831161159b57829003601f168201915b50505060009889525050600b6020526040909620600c0154949693959460ff610100820481169562010000909204169350915050565b60006115f960085490565b821061165c5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610b3b565b6008828154811061166f5761166f613dda565b90600052602060002001549050919050565b6000818152600260205260408120546001600160a01b031680610a3b5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610b3b565b33600090815260196020526040902054829060ff168061172e57506000818152600c60205260409020546001600160a01b031633145b61174a5760405162461bcd60e51b8152600401610b3b90613cdb565b506000918252600c602052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b6018546001600160a01b031633146117a35760405162461bcd60e51b8152600401610b3b90613d40565b601380546001600160a01b0319166001600160a01b0392909216919091179055565b3360009081526019602052604090205460ff166117f45760405162461bcd60e51b8152600401610b3b90613df0565b600a80546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160a01b0382166118815760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610b3b565b506001600160a01b031660009081526003602052604090205490565b6000828152600c602052604090205482906001600160a01b031633146118d55760405162461bcd60e51b8152600401610b3b90613db5565b6000838152600b60205260409020600c0154610100900460ff16158061190b57506000838152600b602052604090206007015482105b6119275760405162461bcd60e51b8152600401610b3b90613cb1565b6000838152600b602052604090206006015482116119ad5760405162461bcd60e51b815260206004820152603d60248201527f596f75206d75737420736574206d617820696e766f636174696f6e732067726560448201527f61746572207468616e2063757272656e7420696e766f636174696f6e730000006064820152608401610b3b565b620f42408211156119f85760405162461bcd60e51b8152602060048201526015602482015274043616e6e6f7420657863656564203130303030303605c1b6044820152606401610b3b565b506000918252600b602052604090912060070155565b6018546001600160a01b03163314611a385760405162461bcd60e51b8152600401610b3b90613d40565b6001600160a01b03166000908152601a60205260409020805460ff19169055565b3360009081526019602052604090205460ff16611a885760405162461bcd60e51b8152600401610b3b90613df0565b601b546000818152600c6020908152604080832080546001600160a01b0319166001600160a01b038816179055600b82529091208551611aca928701906135bf565b50604080518082018252600381526208aa8960eb1b60208083019182526000858152600d909152929092209051611b0192906135bf565b506000818152600f60209081526040808320859055600b9091529020600c8101805462ff0000191662010000179055620f4240600790910155601b54611b48906001613d28565b601b5550505050565b3360009081526019602052604090205460ff16611b805760405162461bcd60e51b8152600401610b3b90613df0565b6000818152600b60205260409020600c01548190610100900460ff1615611bb95760405162461bcd60e51b8152600401610b3b90613cb1565b506000908152600b60205260409020600c01805461ff001916610100179055565b6018546001600160a01b03163314611c045760405162461bcd60e51b8152600401610b3b90613d40565b6001600160a01b03166000908152601a60205260409020805460ff19166001179055565b6000818152600c6020818152604080842054600f835281852054600b845282862060068101546007820154919096015460108652848820546011875285892054600d90975294882080546001600160a01b0395861699949897939660ff9093169590921693606092909190611c9c90613c7c565b80601f0160208091040260200160405190810160405280929190818152602001828054611cc890613c7c565b8015611d155780601f10611cea57610100808354040283529160200191611d15565b820191906000526020600020905b815481529060010190602001808311611cf857829003601f168201915b50505060009c8d525050600e6020526040909a2054989a9799969895979496939592946001600160a01b0390931692915050565b6000828152600b602090815260408083208484526009019091529020805460609190611d7490613c7c565b80601f0160208091040260200160405190810160405280929190818152602001828054611da090613c7c565b8015611ded5780601f10611dc257610100808354040283529160200191611ded565b820191906000526020600020905b815481529060010190602001808311611dd057829003601f168201915b5050505050905092915050565b6060806060806060600b60008781526020019081526020016000206000018054611e2390613c7c565b80601f0160208091040260200160405190810160405280929190818152602001828054611e4f90613c7c565b8015611e9c5780601f10611e7157610100808354040283529160200191611e9c565b820191906000526020600020905b815481529060010190602001808311611e7f57829003601f168201915b5050506000898152600b60205260409020600101805493985092611ec292509050613c7c565b80601f0160208091040260200160405190810160405280929190818152602001828054611eee90613c7c565b8015611f3b5780601f10611f1057610100808354040283529160200191611f3b565b820191906000526020600020905b815481529060010190602001808311611f1e57829003601f168201915b5050506000898152600b60205260409020600201805493975092611f6192509050613c7c565b80601f0160208091040260200160405190810160405280929190818152602001828054611f8d90613c7c565b8015611fda5780601f10611faf57610100808354040283529160200191611fda565b820191906000526020600020905b815481529060010190602001808311611fbd57829003601f168201915b5050506000898152600b6020526040902060030180549396509261200092509050613c7c565b80601f016020809104026020016040519081016040528092919081815260200182805461202c90613c7c565b80156120795780601f1061204e57610100808354040283529160200191612079565b820191906000526020600020905b81548152906001019060200180831161205c57829003601f168201915b5050506000898152600b6020526040902060040180549395509261209f92509050613c7c565b80601f01602080910402602001604051908101604052809291908181526020018280546120cb90613c7c565b80156121185780601f106120ed57610100808354040283529160200191612118565b820191906000526020600020905b8154815290600101906020018083116120fb57829003601f168201915b5050505050905091939590929450565b606060018054610a5090613c7c565b6000828152600c602052604090205482906001600160a01b0316331461216f5760405162461bcd60e51b8152600401610b3b90613db5565b506000918252600f602052604090912055565b6000818152600c602052604090205481906001600160a01b031633146121ba5760405162461bcd60e51b8152600401610b3b90613db5565b506000908152600b60205260409020600c01805462ff0000198116620100009182900460ff1615909102179055565b6121f4338383612f30565b5050565b6000828152600c602052604090205482906001600160a01b031633146122305760405162461bcd60e51b8152600401610b3b90613db5565b6000838152600b60209081526040909120835161133e926002909201918501906135bf565b6000828152600b60205260409020600c01548290610100900460ff161561228e5760405162461bcd60e51b8152600401610b3b90613cb1565b33600090815260196020526040902054839060ff16806122c457506000818152600c60205260409020546001600160a01b031633145b6122e05760405162461bcd60e51b8152600401610b3b90613cdb565b6000848152600b60209081526040808320600a81015484526009018252909120845161230e928601906135bf565b506000848152600b60205260409020600a015461232c906001613d28565b6000948552600b6020526040909420600a0193909355505050565b6000838152600b60205260409020600c01548390610100900460ff16156123805760405162461bcd60e51b8152600401610b3b90613cb1565b33600090815260196020526040902054849060ff16806123b657506000818152600c60205260409020546001600160a01b031633145b6123d25760405162461bcd60e51b8152600401610b3b90613cdb565b6000858152600b60205260409020600a0154841061242a5760405162461bcd60e51b81526020600482015260156024820152747363726970744964206f7574206f662072616e676560581b6044820152606401610b3b565b6000858152600b6020908152604080832087845260090182529091208451612454928601906135bf565b505050505050565b6000828152600b60205260409020600c01548290610100900460ff16156124955760405162461bcd60e51b8152600401610b3b90613cb1565b33600090815260196020526040902054839060ff16806124cb57506000818152600c60205260409020546001600160a01b031633145b6124e75760405162461bcd60e51b8152600401610b3b90613cdb565b6000848152600b602090815260409091208451610d1b926001909201918601906135bf565b6125163383612cbf565b6125325760405162461bcd60e51b8152600401610b3b90613d64565b61133e84848484612ffb565b6000828152600c602052604090205482906001600160a01b031633146125765760405162461bcd60e51b8152600401610b3b90613db5565b60648211156125975760405162461bcd60e51b8152600401610b3b90613e1a565b5060009182526012602052604090912055565b6000828152600b60205260409020600c01548290610100900460ff16156125e35760405162461bcd60e51b8152600401610b3b90613cb1565b33600090815260196020526040902054839060ff168061261957506000818152600c60205260409020546001600160a01b031633145b6126355760405162461bcd60e51b8152600401610b3b90613cdb565b6000848152600b602090815260409091208451610d1b926008909201918601906135bf565b60608161266681612a95565b6126ac5760405162461bcd60e51b8152602060048201526017602482015276151bdad95b88125108191bd95cc81b9bdd08195e1a5cdd604a1b6044820152606401610b3b565b6000838152601560209081526040808320548352600b90915290206005016126d38461302e565b6040516020016126e4929190613e5b565b60405160208183030381529060405291505b50919050565b3360009081526019602052604090205460ff1661272b5760405162461bcd60e51b8152600401610b3b90613df0565b6000908152600b60205260409020600c01805460ff19811660ff90911615179055565b6000838152600c602052604090205483906001600160a01b031633146127865760405162461bcd60e51b8152600401610b3b90613db5565b6000848152600d6020908152604090912084516127a5928601906135bf565b50506000928352600e602052604090922080546001600160a01b0319166001600160a01b039093169290921790915550565b6000818152600b60205260409020600c01548190610100900460ff16156128105760405162461bcd60e51b8152600401610b3b90613cb1565b33600090815260196020526040902054829060ff168061284657506000818152600c60205260409020546001600160a01b031633145b6128625760405162461bcd60e51b8152600401610b3b90613cdb565b6000838152600b60205260409020600a01546128c05760405162461bcd60e51b815260206004820152601e60248201527f746865726520617265206e6f207363726970747320746f2072656d6f766500006044820152606401610b3b565b6000838152600b60205260408120600a810154600990910191906128e690600190613ef9565b815260200190815260200160002060006129009190613643565b6000838152600b60205260409020600a015461291e90600190613ef9565b6000938452600b6020526040909320600a01929092555050565b6000838152600c602052604090205483906001600160a01b031633146129705760405162461bcd60e51b8152600401610b3b90613db5565b60648211156129915760405162461bcd60e51b8152600401610b3b90613e1a565b50600092835260106020908152604080852080546001600160a01b0319166001600160a01b03959095169490941790935560119052912055565b6018546001600160a01b031633146129f55760405162461bcd60e51b8152600401610b3b90613d40565b601880546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60006001600160e01b031982166380ac58cd60e01b1480612a7657506001600160e01b03198216635b5e139f60e01b145b80610a3b57506301ffc9a760e01b6001600160e01b0319831614610a3b565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612ae782611681565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152600b60205260408120600601548190612b41620f424085613f10565b612b4b9190613d28565b6000848152600b6020526040902060060154909150612b6b906001613d28565b6000848152600b602052604081206006018290559043612b8c600182613ef9565b40600a60009054906101000a90046001600160a01b03166001600160a01b031663990c8f796040518163ffffffff1660e01b815260040160206040518083038186803b158015612bdb57600080fd5b505afa158015612bef573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c139190613f2f565b6040805160208101959095528401929092526060830152608082015260a00160408051601f198184030181529181528151602092830120600085815260168452828120829055818152601790935291208390559050612c72858361312b565b60008281526015602052604080822086905551859184916001600160a01b038916917f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f91a4509392505050565b6000612cca82612a95565b612d2b5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610b3b565b6000612d3683611681565b9050806001600160a01b0316846001600160a01b03161480612d715750836001600160a01b0316612d6684610ad3565b6001600160a01b0316145b80612d815750612d818185612a17565b949350505050565b826001600160a01b0316612d9c82611681565b6001600160a01b031614612e005760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610b3b565b6001600160a01b038216612e625760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610b3b565b612e6d83838361326a565b612e78600082612ab2565b6001600160a01b0383166000908152600360205260408120805460019290612ea1908490613ef9565b90915550506001600160a01b0382166000908152600360205260408120805460019290612ecf908490613d28565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b816001600160a01b0316836001600160a01b03161415612f8e5760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b6044820152606401610b3b565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b613006848484612d89565b61301284848484613322565b61133e5760405162461bcd60e51b8152600401610b3b90613f48565b6060816130525750506040805180820190915260018152600360fc1b602082015290565b8160005b811561307c578061306681613f9a565b91506130759050600a83613fcb565b9150613056565b6000816001600160401b0381111561309657613096613794565b6040519080825280601f01601f1916602001820160405280156130c0576020820181803683370190505b5090505b8415612d81576130d5600183613ef9565b91506130e2600a86613fdf565b6130ed906030613d28565b60f81b81838151811061310257613102613dda565b60200101906001600160f81b031916908160001a905350613124600a86613fcb565b94506130c4565b6001600160a01b0382166131815760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610b3b565b61318a81612a95565b156131d75760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610b3b565b6131e36000838361326a565b6001600160a01b038216600090815260036020526040812080546001929061320c908490613d28565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b0383166132c5576132c081600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b6132e8565b816001600160a01b0316836001600160a01b0316146132e8576132e8838261342f565b6001600160a01b0382166132ff57610c6c816134cc565b826001600160a01b0316826001600160a01b031614610c6c57610c6c828261357b565b60006001600160a01b0384163b1561342457604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613366903390899088908890600401613ff3565b602060405180830381600087803b15801561338057600080fd5b505af19250505080156133b0575060408051601f3d908101601f191682019092526133ad91810190614030565b60015b61340a573d8080156133de576040519150601f19603f3d011682016040523d82523d6000602084013e6133e3565b606091505b5080516134025760405162461bcd60e51b8152600401610b3b90613f48565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612d81565b506001949350505050565b6000600161343c84611816565b6134469190613ef9565b600083815260076020526040902054909150808214613499576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b6008546000906134de90600190613ef9565b6000838152600960205260408120546008805493945090928490811061350657613506613dda565b90600052602060002001549050806008838154811061352757613527613dda565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061355f5761355f61404d565b6001900381819060005260206000200160009055905550505050565b600061358683611816565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b8280546135cb90613c7c565b90600052602060002090601f0160209004810192826135ed5760008555613633565b82601f1061360657805160ff1916838001178555613633565b82800160010185558215613633579182015b82811115613633578251825591602001919060010190613618565b5061363f929150613680565b5090565b50805461364f90613c7c565b6000825580601f1061365f575050565b601f01602090049060005260206000209081019061367d9190613680565b50565b5b8082111561363f5760008155600101613681565b6001600160e01b03198116811461367d57600080fd5b6000602082840312156136bd57600080fd5b81356136c881613695565b9392505050565b60005b838110156136ea5781810151838201526020016136d2565b8381111561133e5750506000910152565b600081518084526137138160208601602086016136cf565b601f01601f19169290920160200192915050565b6020815260006136c860208301846136fb565b60006020828403121561374c57600080fd5b5035919050565b6001600160a01b038116811461367d57600080fd5b6000806040838503121561377b57600080fd5b823561378681613753565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b60006001600160401b03808411156137c4576137c4613794565b604051601f8501601f19908116603f011681019082821181831017156137ec576137ec613794565b8160405280935085815286868601111561380557600080fd5b858560208301376000602087830101525050509392505050565b600082601f83011261383057600080fd5b6136c8838335602085016137aa565b6000806040838503121561385257600080fd5b8235915060208301356001600160401b0381111561386f57600080fd5b61387b8582860161381f565b9150509250929050565b60008060006060848603121561389a57600080fd5b83356138a581613753565b92506020840135915060408401356138bc81613753565b809150509250925092565b6000602082840312156138d957600080fd5b81356136c881613753565b6000806000606084860312156138f957600080fd5b833561390481613753565b9250602084013561391481613753565b929592945050506040919091013590565b60a08152600061393860a08301886136fb565b866020840152828103604084015261395081876136fb565b941515606084015250509015156080909101529392505050565b6000806040838503121561397d57600080fd5b82359150602083013561398f81613753565b809150509250929050565b600080604083850312156139ad57600080fd5b50508035926020909101359150565b6000806000606084860312156139d157600080fd5b83356001600160401b038111156139e757600080fd5b6139f38682870161381f565b935050602084013561391481613753565b600061012060018060a01b03808d1684528b60208501528a6040850152896060850152881515608085015280881660a08501528660c08501528160e0850152613a4f828501876136fb565b925080851661010085015250509a9950505050505050505050565b60a081526000613a7d60a08301886136fb565b8281036020840152613a8f81886136fb565b90508281036040840152613aa381876136fb565b90508281036060840152613ab781866136fb565b90508281036080840152613acb81856136fb565b98975050505050505050565b60008060408385031215613aea57600080fd5b8235613af581613753565b91506020830135801515811461398f57600080fd5b600080600060608486031215613b1f57600080fd5b833592506020840135915060408401356001600160401b03811115613b4357600080fd5b613b4f8682870161381f565b9150509250925092565b60008060008060808587031215613b6f57600080fd5b8435613b7a81613753565b93506020850135613b8a81613753565b92506040850135915060608501356001600160401b03811115613bac57600080fd5b8501601f81018713613bbd57600080fd5b613bcc878235602084016137aa565b91505092959194509250565b600080600060608486031215613bed57600080fd5b8335925060208401356001600160401b03811115613c0a57600080fd5b613c168682870161381f565b92505060408401356138bc81613753565b600080600060608486031215613c3c57600080fd5b83359250602084013561391481613753565b60008060408385031215613c6157600080fd5b8235613c6c81613753565b9150602083013561398f81613753565b600181811c90821680613c9057607f821691505b602082108114156126f657634e487b7160e01b600052602260045260246000fd5b60208082526010908201526f13db9b1e481a59881d5b9b1bd8dad95960821b604082015260600190565b6020808252601a908201527f4f6e6c7920617274697374206f722077686974656c6973746564000000000000604082015260600190565b634e487b7160e01b600052601160045260246000fd5b60008219821115613d3b57613d3b613d12565b500190565b6020808252600a908201526927b7363c9030b236b4b760b11b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252600b908201526a13db9b1e48185c9d1a5cdd60aa1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b60208082526010908201526f13db9b1e481dda1a5d195b1a5cdd195960821b604082015260600190565b6020808252600b908201526a4d6178206f66203130302560a81b604082015260600190565b60008151613e518185602086016136cf565b9290920192915050565b600080845481600182811c915080831680613e7757607f831692505b6020808410821415613e9757634e487b7160e01b86526022600452602486fd5b818015613eab5760018114613ebc57613ee9565b60ff19861689528489019650613ee9565b60008b81526020902060005b86811015613ee15781548b820152908501908301613ec8565b505084890196505b505050505050610f1c8185613e3f565b600082821015613f0b57613f0b613d12565b500390565b6000816000190483118215151615613f2a57613f2a613d12565b500290565b600060208284031215613f4157600080fd5b5051919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000600019821415613fae57613fae613d12565b5060010190565b634e487b7160e01b600052601260045260246000fd5b600082613fda57613fda613fb5565b500490565b600082613fee57613fee613fb5565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090614026908301846136fb565b9695505050505050565b60006020828403121561404257600080fd5b81516136c881613695565b634e487b7160e01b600052603160045260246000fdfea264697066735822122097f9109a0bdee6543782c46f6b49d08ae6026cd34b6f25909e1efff93605606b64736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000006000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000088098f7438773182b703625c4128aff85fcffc400000000000000000000000000000000000000000000000000000000000000194c6567656e6473206f66204d657461746572726120504241420000000000000000000000000000000000000000000000000000000000000000000000000000034c4f4d0000000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _tokenName (string): Legends of Metaterra PBAB
Arg [1] : _tokenSymbol (string): LOM
Arg [2] : _randomizerContract (address): 0x088098F7438773182b703625C4128aFf85fcFfC4
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000060
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 000000000000000000000000088098f7438773182b703625c4128aff85fcffc4
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000019
Arg [4] : 4c6567656e6473206f66204d6574617465727261205042414200000000000000
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [6] : 4c4f4d0000000000000000000000000000000000000000000000000000000000
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.