ERC-721
NFT
Overview
Max Total Supply
3,826 RGB
Holders
708
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
10 RGBLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Colorverse
Compiler Version
v0.6.7+commit.b8d736ae
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "@openzeppelin/contracts/GSN/Context.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Metadata.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/introspection/ERC165.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/EnumerableSet.sol"; import "@openzeppelin/contracts/utils/EnumerableMap.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; interface AggregatorV3Interface { function latestAnswer() external view returns (int256); } interface ERC20 { function balanceOf(address tokenOwner) external view returns (uint balance); function transfer(address to, uint tokens) external returns (bool success); } interface Founder { function register(uint256[16] calldata _tokenIds, address founderAddr) external; } /** * @title ERC721 Non-Fungible Token Standard basic implementation * @dev see https://eips.ethereum.org/EIPS/eip-721 */ contract Colorverse is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable { using SafeMath for uint256; using Address for address; using EnumerableSet for EnumerableSet.UintSet; using EnumerableMap for EnumerableMap.UintToAddressMap; using Strings for uint256; // Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))` // which can be also obtained as `IERC721Receiver(0).onERC721Received.selector` bytes4 private constant _ERC721_RECEIVED = 0x150b7a02; // Mapping from holder address to their (enumerable) set of owned tokens mapping (address => EnumerableSet.UintSet) private _holderTokens; // Enumerable mapping from token ids to their owners EnumerableMap.UintToAddressMap private _tokenOwners; // 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; // Token name string private _name; // Token symbol string private _symbol; // Optional mapping for token URIs mapping (uint256 => string) private _tokenURIs; // Base URI string private _baseURI; /* * bytes4(keccak256('balanceOf(address)')) == 0x70a08231 * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3 * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465 * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5 * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde * * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^ * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd */ bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd; /* * bytes4(keccak256('name()')) == 0x06fdde03 * bytes4(keccak256('symbol()')) == 0x95d89b41 * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd * * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f */ bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; /* * bytes4(keccak256('totalSupply()')) == 0x18160ddd * bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59 * bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7 * * => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63 */ bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor () public { _name = "Colorverse"; //// Change for MAINNET _symbol = "RGB"; //// Change for MAINNET _owner = msg.sender; // register the supported interfaces to conform to ERC721 via ERC165 _registerInterface(_INTERFACE_ID_ERC721); _registerInterface(_INTERFACE_ID_ERC721_METADATA); _registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE); } //Upper bound of possbile "True Color" 24-bit color depth, 3-channel RGB colors. (2^8)^3==256^3==2^24==16,777,216 total color tokens possible: 0-16777215 as tokenIds. uint256 public constant TOTAL_MAX_SUPPLY = 16777216; uint256 public PRICE = 5e26; //Rinkeby Price 0x8A753747A1Fa494EC906cE90E9f37563A8AF630e //Mainnet Price 0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419 address public priceFeedAddress; AggregatorV3Interface internal priceFeed; //Rinkeby Safe 0x1A572d0Eab9AB9eD715F4066295cBAc0C4b2b344 //Mainnet Safe 0xea1652B9247f341EDc67c0fa844486F024Df570a address payable private safe; address public founderContract; address private _owner; string datajson = "data:application/json;utf8,"; string datasvg = "data:image/svg+xml;utf8,"; string svg1 = "<svg xmlns='http://www.w3.org/2000/svg'><rect width='350' height='350' style='fill: "; string svg2 = "'><title>"; string svg3 = "</title></rect></svg>"; string svga = "<svg%20xmlns='http://www.w3.org/2000/svg'><rect%20width='350'%20height='350'%20style='fill:%20"; // Mapping from token ID to name (from Hashmasks) mapping (uint256 => string) private _tokenName; // Mapping if certain name string has already been reserved (from Hashmasks) mapping (string => bool) private _nameReserved; event NameChange (uint256 indexed tokenId, string newName); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); modifier onlySafe() { require(msg.sender == safe, "Only safe"); //Change to MAINNET //require(msg.sender == safe, "Only safe can call this."); _; } modifier onlyOwner() { require(msg.sender == _owner, "Only owner"); //Change to MAINNET //require(owner() == _msgSender(), "Ownable: caller is not the owner"); //From OZ, Context, GSN _; } function contractOwner() public view returns (address) { return _owner; } function setOwner(address newOwner) public onlyOwner { _owner = newOwner; emit OwnershipTransferred(_owner, newOwner); } function setFounder(address founderAddress) public onlyOwner { founderContract = founderAddress; } function setPriceSource(address priceAddress) public onlyOwner { priceFeedAddress = priceAddress; priceFeed = AggregatorV3Interface(priceFeedAddress); } function getPriceSource() public view returns (address) { return priceFeedAddress; } function setSafe(address payable safeAddress) public onlyOwner { safe = safeAddress; } function withdraw() public onlySafe{ uint256 balance = address(this).balance; safe.transfer(balance); } function getLatestPrice() public view returns (int) { return priceFeed.latestAnswer(); } function getPrice() public view returns (uint256 price) { return PRICE/uint256(getLatestPrice()); } /** * @dev Returns name of the NFT at index.(from Hashmasks) */ function tokenNameById(uint256 tokenId) public view returns (string memory) { return _tokenName[tokenId]; } /** * @dev Returns if the name has been reserved. (from Hashmasks) */ function isNameReserved(string memory nameString) public view returns (bool) { return _nameReserved[toLower(nameString)]; } /** * @dev Changes the name for Hashmask tokenId (from Hashmasks) */ function changeName(uint256 tokenId, string memory newName) public payable { address colorOwner = ownerOf(tokenId); require(_msgSender() == colorOwner, "ERC721: caller is not the owner"); //GSN Network???? require(validateName(newName) == true, "Not a valid new name"); require(sha256(bytes(newName)) != sha256(bytes(_tokenName[tokenId])), "New name is same as the current one"); require(isNameReserved(newName) == false, "Name already reserved"); uint256 currentPrice = getPrice(); require(msg.value >= (currentPrice-((currentPrice*2)/100)), "Insufficient ETH amount"); // If already named, dereserve old name if (bytes(_tokenName[tokenId]).length > 0) { toggleReserveName(_tokenName[tokenId], false); } toggleReserveName(newName, true); _tokenName[tokenId] = newName; emit NameChange(tokenId, newName); } /** * @dev Reserves the name if isReserve is set to true, de-reserves if set to false (from Hashmasks) */ function toggleReserveName(string memory str, bool isReserve) internal { _nameReserved[toLower(str)] = isReserve; } /** * @dev Check if the name string is valid (Alphanumeric and spaces without leading or trailing space) (from Hashmasks) */ function validateName(string memory str) public pure returns (bool) { bytes memory b = bytes(str); if(b.length < 1) return false; if(b.length > 25) return false; // Cannot be longer than 25 characters if(b[0] == 0x20) return false; // Leading space if (b[b.length - 1] == 0x20) return false; // Trailing space bytes1 lastChar = b[0]; for(uint i; i<b.length; i++){ bytes1 char = b[i]; if (char == 0x20 && lastChar == 0x20) return false; // Cannot contain continous spaces if( !(char >= 0x30 && char <= 0x39) && //9-0 !(char >= 0x41 && char <= 0x5A) && //A-Z !(char >= 0x61 && char <= 0x7A) && //a-z !(char == 0x20) //space ) return false; lastChar = char; } return true; } /** * @dev Converts the string to lowercase (from Hashmasks) */ function toLower(string memory str) public pure returns (string memory) { bytes memory bStr = bytes(str); bytes memory bLower = new bytes(bStr.length); for (uint i = 0; i < bStr.length; i++) { // Uppercase character if ((uint8(bStr[i]) >= 65) && (uint8(bStr[i]) <= 90)) { bLower[i] = bytes1(uint8(bStr[i]) + 32); } else { bLower[i] = bStr[i]; } } return string(bLower); } function renderSVG(uint256 tokenId) public view returns (string memory) { require(_exists(tokenId), "SVG query for nonexistent token"); string memory hx = tokenIdToColorHex(tokenId); return string(abi.encodePacked(svg1, hx, svg2, hx, svg3)); /* string memory svg = render(tokenId, false); svg = string(abi.encodePacked(svgBegin, svg, svg16, tokenId.toString(), svgSpaces, "|", svgSpaces, CVAddressString)); svg = string(abi.encodePacked(svg, svgSpaces, "|", svgSpaces, "1/1", svgSpaces, "|", svgSpaces, "Block ", _founderNFTs[tokenId].blockNum.toString(), svgEnd)); return svg; */ } function svgURI(uint256 tokenId) public view returns (string memory) { require(_exists(tokenId), "URI query for nonexistent token"); string memory color = tokenIdToColor(tokenId); return string(abi.encodePacked(datasvg, svg1, "%23", color, svg2, "%23", color, svg3)); } function esvgURI(uint256 tokenId) public view returns (string memory) { require(_exists(tokenId), "URI query for nonexistent token"); string memory color = tokenIdToColor(tokenId); return string(abi.encodePacked(datasvg, svga, "%2523", color, svg2, "%2523", color, svg3)); } function tokenIdToColor(uint256 tokenId) public pure returns (string memory) { require(tokenId < TOTAL_MAX_SUPPLY, "24-bit color exceeded"); bytes32 val = bytes32(tokenId); bytes memory hx = "0123456789ABCDEF"; bytes memory str = new bytes(51); for (uint i = 17; i < 20; i++) { str[i*2] = hx[uint(uint8(val[i + 12] >> 4))]; str[1+i*2] = hx[uint(uint8(val[i + 12] & 0x0f))]; } return string(str); } function tokenIdToColorHex(uint256 tokenId) public pure returns (string memory) { return string(abi.encodePacked("#", tokenIdToColor(tokenId))); } function rgb(uint256 tokenId) public pure returns (uint256 r, uint256 g, uint256 b) { require (tokenId < TOTAL_MAX_SUPPLY, "24-bit color exceeded"); r = tokenId/(256**2); g = (tokenId/256)%256; b = tokenId%256; return (r, g, b); } function mint(uint256 _tokenId) internal { require(_tokenId<TOTAL_MAX_SUPPLY, "TokenID exceeds possible"); _safeMint(msg.sender, _tokenId); } function mintAll(uint256[] memory _tokenIds) public payable { require(_tokenIds.length>0, "No colors specified"); require(_tokenIds.length<17, "Color minting exceeded"); uint256 currentAmount = getPrice()*uint256(_tokenIds.length); require(msg.value >= (currentAmount-((currentAmount*2)/100)), "Insufficient ETH amount"); for (uint i=0; i<_tokenIds.length; i++) { mint(_tokenIds[i]); } //register founders token if 16 tokens if (_tokenIds.length==16) { uint256[16] memory tmpArr; for (uint i=0; i<_tokenIds.length; i++) { tmpArr[i] = _tokenIds[i]; } Founder(founderContract).register(tmpArr, msg.sender); } } function getCollectionHexString(address _address) public view returns (string memory) { uint256 addressBalance = balanceOf(_address); string memory list; if (addressBalance == 0) { return list; } for (uint256 i=0; i < addressBalance; i++) { string memory tokenIdString = tokenIdToColorHex(tokenOfOwnerByIndex(_address, i)); if (i==0){ list = string(abi.encodePacked(tokenIdString)); } else { list = string(abi.encodePacked(list, ",", tokenIdString)); } } return list; } function getCollectionArray(address _address) public view returns (uint256[] memory) { uint256 addressBalance = balanceOf(_address); uint256[] memory intArray = new uint256[](addressBalance); if (addressBalance == 0) { return intArray; } for (uint256 i=0; i < addressBalance; i++) { intArray[i] = tokenOfOwnerByIndex(_address, i); } return intArray; } function exists(uint256 tokenId) public view returns (bool) { return _exists(tokenId); } function batchTransfer(uint256[] memory tokenIds, address to) public { for (uint256 i=0; i < tokenIds.length; i++) { safeTransferFrom(_msgSender(), to, tokenIds[i], ""); } } function colorOfOwnerByIndex(address owner, uint256 index) public view returns (string memory) { return tokenIdToColorHex(tokenOfOwnerByIndex(owner, index)); } function transfer_targetToken(address target) public onlySafe { ERC20(target).transfer(safe, ERC20(target).balanceOf(address(this))); } function transfer_targetNFT(address target, uint256 tokenId) public onlySafe { IERC721(target).transferFrom(address(this), safe, tokenId); } ///////////////////// /** * @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 _holderTokens[owner].length(); } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return _tokenOwners.get(tokenId, "ERC721: owner query for nonexistent token"); } /** * @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; } function contractURI() public view returns (string memory) { string memory uri1 = "{\"name\":%20\"Colorverse%20Tokens%20(RGB)\",%20\"description\":%20\"All%20Colors.%20Tokensized.%20Find%20your%20colors.%20Own%20your%20colors.%20The%20first%20meta-NFT%20for%20generative,%20on-chain%20art%20-%201/1.\","; string memory uri2 = "\"image\":%20\"https://www.colorverse.io/colorverse.png\",%20\"external_url\":%20\"https://www.colorverse.io\"}"; string memory uri = string(abi.encodePacked(datajson, uri1, uri2)); return uri; } /** * @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 rname = tokenNameById(tokenId); string memory uriname; if (bytes(rname).length == 0) { uriname = string(abi.encodePacked("%23", tokenIdToColor(tokenId))); } else { uriname = string(abi.encodePacked("%23", tokenIdToColor(tokenId), "%20-%20", rname)); } string memory uri1 = "{\"name\": \""; string memory uri2 = "\", \"description\":%20\"All%20Colors.%20Tokensized.%20Find%20your%20colors.%20Own%20your%20colors.%20The%20first%20meta-NFT%20for%20generative,%20on-chain%20art%20-%201/1.\","; string memory uri3 = "\"external_url\":%20\"https://www.colorverse.io/"; string memory uri4 = "\", \"image\":%20\""; string memory uri = string(abi.encodePacked(datajson, uri1, uriname, uri2, uri3)); uri = string(abi.encodePacked(uri, tokenIdToColor(tokenId), uri4, esvgURI(tokenId), "\"}")); return uri; } /** * @dev Returns the base URI set via {_setBaseURI}. This will be * automatically added as a prefix in {tokenURI} to each token's URI, or * to the token ID if no specific URI is set for that token ID. */ function baseURI() public view virtual returns (string memory) { return _baseURI; } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { return _holderTokens[owner].at(index); } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { // _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds return _tokenOwners.length(); } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { (uint256 tokenId, ) = _tokenOwners.at(index); return tokenId; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory _data) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer(address from, address to, uint256 tokenId, bytes memory _data) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _tokenOwners.contains(tokenId); } /** * @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 = ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: d* * - `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); _holderTokens[to].add(tokenId); _tokenOwners.set(tokenId, to); emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ownerOf(tokenId); // internal owner _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); // Clear metadata (if any) if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } _holderTokens[owner].remove(tokenId); _tokenOwners.remove(tokenId); emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer(address from, address to, uint256 tokenId) internal virtual { require(ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); // internal 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); _holderTokens[from].remove(tokenId); _holderTokens[to].add(tokenId); _tokenOwners.set(tokenId, to); emit Transfer(from, to, tokenId); } /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token"); _tokenURIs[tokenId] = _tokenURI; } /** * @dev Internal function to set the base URI for all token IDs. It is * automatically added as a prefix to the value returned in {tokenURI}, * or to the token ID if {tokenURI} is empty. */ function _setBaseURI(string memory baseURI_) internal virtual { _baseURI = baseURI_; } /** * @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()) { return true; } bytes memory returndata = to.functionCall(abi.encodeWithSelector( IERC721Receiver(to).onERC721Received.selector, _msgSender(), from, tokenId, _data ), "ERC721: transfer to non ERC721Receiver implementer"); bytes4 retval = abi.decode(returndata, (bytes4)); return (retval == _ERC721_RECEIVED); } function _approve(address to, uint256 tokenId) private { _tokenApprovals[tokenId] = to; emit Approval(ownerOf(tokenId), to, tokenId); // internal owner } /** * @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 { } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.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 GSN 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 payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.2; import "../../introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.2; import "./IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.2; import "./IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts may inherit from this and call {_registerInterface} to declare * their support of an interface. */ contract ERC165 is IERC165 { /* * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7 */ bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; /** * @dev Mapping of interface ids to whether or not it's supported. */ mapping(bytes4 => bool) private _supportedInterfaces; constructor () internal { // Derived contracts need only register support for their own interfaces, // we register support for ERC165 itself here _registerInterface(_INTERFACE_ID_ERC165); } /** * @dev See {IERC165-supportsInterface}. * * Time complexity O(1), guaranteed to always use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) public view override returns (bool) { return _supportedInterfaces[interfaceId]; } /** * @dev Registers the contract as an implementer of the interface defined by * `interfaceId`. Support of the actual ERC165 interface is automatic and * registering its interface id is not required. * * See {IERC165-supportsInterface}. * * Requirements: * * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). */ function _registerInterface(bytes4 interfaceId) internal virtual { require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); _supportedInterfaces[interfaceId] = true; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.2; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (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"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); 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 // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256` * (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(value))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(value))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(value))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint256(_at(set._inner, index))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev Library for managing an enumerable variant of Solidity's * https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`] * type. * * Maps have the following properties: * * - Entries are added, removed, and checked for existence in constant time * (O(1)). * - Entries are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableMap for EnumerableMap.UintToAddressMap; * * // Declare a set state variable * EnumerableMap.UintToAddressMap private myMap; * } * ``` * * As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are * supported. */ library EnumerableMap { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Map type with // bytes32 keys and values. // The Map implementation uses private functions, and user-facing // implementations (such as Uint256ToAddressMap) are just wrappers around // the underlying Map. // This means that we can only create new EnumerableMaps for types that fit // in bytes32. struct MapEntry { bytes32 _key; bytes32 _value; } struct Map { // Storage of map keys and values MapEntry[] _entries; // Position of the entry defined by a key in the `entries` array, plus 1 // because index 0 means a key is not in the map. mapping (bytes32 => uint256) _indexes; } /** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */ function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) { // We read and store the key's index to prevent multiple reads from the same storage slot uint256 keyIndex = map._indexes[key]; if (keyIndex == 0) { // Equivalent to !contains(map, key) map._entries.push(MapEntry({ _key: key, _value: value })); // The entry is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value map._indexes[key] = map._entries.length; return true; } else { map._entries[keyIndex - 1]._value = value; return false; } } /** * @dev Removes a key-value pair from a map. O(1). * * Returns true if the key was removed from the map, that is if it was present. */ function _remove(Map storage map, bytes32 key) private returns (bool) { // We read and store the key's index to prevent multiple reads from the same storage slot uint256 keyIndex = map._indexes[key]; if (keyIndex != 0) { // Equivalent to contains(map, key) // To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one // in the array, and then remove the last entry (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = keyIndex - 1; uint256 lastIndex = map._entries.length - 1; // When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. MapEntry storage lastEntry = map._entries[lastIndex]; // Move the last entry to the index where the entry to delete is map._entries[toDeleteIndex] = lastEntry; // Update the index for the moved entry map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved entry was stored map._entries.pop(); // Delete the index for the deleted slot delete map._indexes[key]; return true; } else { return false; } } /** * @dev Returns true if the key is in the map. O(1). */ function _contains(Map storage map, bytes32 key) private view returns (bool) { return map._indexes[key] != 0; } /** * @dev Returns the number of key-value pairs in the map. O(1). */ function _length(Map storage map) private view returns (uint256) { return map._entries.length; } /** * @dev Returns the key-value pair stored at position `index` in the map. O(1). * * Note that there are no guarantees on the ordering of entries inside the * array, and it may change when more entries are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) { require(map._entries.length > index, "EnumerableMap: index out of bounds"); MapEntry storage entry = map._entries[index]; return (entry._key, entry._value); } /** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */ function _get(Map storage map, bytes32 key) private view returns (bytes32) { return _get(map, key, "EnumerableMap: nonexistent key"); } /** * @dev Same as {_get}, with a custom error message when `key` is not in the map. */ function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) { uint256 keyIndex = map._indexes[key]; require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key) return map._entries[keyIndex - 1]._value; // All indexes are 1-based } // UintToAddressMap struct UintToAddressMap { Map _inner; } /** * @dev Adds a key-value pair to a map, or updates the value for an existing * key. O(1). * * Returns true if the key was added to the map, that is if it was not * already present. */ function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) { return _set(map._inner, bytes32(key), bytes32(uint256(value))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the key was removed from the map, that is if it was present. */ function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) { return _remove(map._inner, bytes32(key)); } /** * @dev Returns true if the key is in the map. O(1). */ function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) { return _contains(map._inner, bytes32(key)); } /** * @dev Returns the number of elements in the map. O(1). */ function length(UintToAddressMap storage map) internal view returns (uint256) { return _length(map._inner); } /** * @dev Returns the element stored at position `index` in the set. O(1). * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) { (bytes32 key, bytes32 value) = _at(map._inner, index); return (uint256(key), address(uint256(value))); } /** * @dev Returns the value associated with `key`. O(1). * * Requirements: * * - `key` must be in the map. */ function get(UintToAddressMap storage map, uint256 key) internal view returns (address) { return address(uint256(_get(map._inner, bytes32(key)))); } /** * @dev Same as {get}, with a custom error message when `key` is not in the map. */ function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) { return address(uint256(_get(map._inner, bytes32(key), errorMessage))); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.0; /** * @dev String operations. */ library Strings { /** * @dev Converts a `uint256` to its ASCII `string` 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); uint256 index = digits - 1; temp = value; while (temp != 0) { buffer[index--] = byte(uint8(48 + temp % 10)); temp /= 10; } return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.6.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": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"newName","type":"string"}],"name":"NameChange","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOTAL_MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"address","name":"to","type":"address"}],"name":"batchTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"newName","type":"string"}],"name":"changeName","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"colorOfOwnerByIndex","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"esvgURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"founderContract","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"address","name":"_address","type":"address"}],"name":"getCollectionArray","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getCollectionHexString","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestPrice","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPrice","outputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getPriceSource","outputs":[{"internalType":"address","name":"","type":"address"}],"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":"string","name":"nameString","type":"string"}],"name":"isNameReserved","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"}],"name":"mintAll","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"priceFeedAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"renderSVG","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"rgb","outputs":[{"internalType":"uint256","name":"r","type":"uint256"},{"internalType":"uint256","name":"g","type":"uint256"},{"internalType":"uint256","name":"b","type":"uint256"}],"stateMutability":"pure","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":"address","name":"founderAddress","type":"address"}],"name":"setFounder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"priceAddress","type":"address"}],"name":"setPriceSource","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"safeAddress","type":"address"}],"name":"setSafe","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"svgURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"toLower","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","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":"tokenId","type":"uint256"}],"name":"tokenIdToColor","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenIdToColorHex","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenNameById","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"target","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transfer_targetNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"transfer_targetToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"str","type":"string"}],"name":"validateName","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6b019d971e4fe8401e74000000600a5560c0604052601b60808190527f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c000000000060a0908152620000509160109190620002ec565b506040805180820190915260188082527f646174613a696d6167652f7376672b786d6c3b757466382c000000000000000060209092019182526200009791601191620002ec565b5060405180608001604052806054815260200162004db2605491398051620000c891601291602090910190620002ec565b5060408051808201909152600980825268139f1e3a34ba36329f60b91b6020909201918252620000fb91601391620002ec565b506040805180820190915260158082527f3c2f7469746c653e3c2f726563743e3c2f7376673e000000000000000000000060209092019182526200014291601491620002ec565b506040518060800160405280605e815260200162004d54605e913980516200017391601591602090910190620002ec565b503480156200018157600080fd5b506200019d6301ffc9a760e01b6001600160e01b036200026716565b60408051808201909152600a80825269436f6c6f72766572736560b01b6020909201918252620001d091600691620002ec565b50604080518082019091526003808252622923a160e91b6020909201918252620001fd91600791620002ec565b50600f80546001600160a01b031916331790556200022b6380ac58cd60e01b6001600160e01b036200026716565b62000246635b5e139f60e01b6001600160e01b036200026716565b6200026163780e9d6360e01b6001600160e01b036200026716565b62000391565b6001600160e01b03198082161415620002c7576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200032f57805160ff19168380011785556200035f565b828001600101855582156200035f579182015b828111156200035f57825182559160200191906001019062000342565b506200036d92915062000371565b5090565b6200038e91905b808211156200036d576000815560010162000378565b90565b6149b380620003a16000396000f3fe6080604052600436106102c95760003560e01c80637a341bc711610175578063c87b56dd116100dc578063d307f60611610095578063e985e9c51161006f578063e985e9c514610ed7578063ea22071714610f12578063ec35cb7214610f3c578063f6a003fe14610f75576102c9565b8063d307f60614610e83578063e0abca0b14610ead578063e8a3d48514610ec2576102c9565b8063c87b56dd14610cfe578063ca54cc3f14610d28578063cc1798a914610d52578063ce40ad8614610d8b578063ce606ee014610e44578063d12a4c9814610e59576102c9565b806398d5fdca1161012e57806398d5fdca14610a4e5780639ffdb65a14610a63578063a22cb46514610b14578063b88d4fde14610b4f578063bda5310714610c20578063c39cbef114610c53576102c9565b80637a341bc71461088a57806385e5d7ee146108bd5780638d859f3e1461095e5780638e15f473146109735780639416b4231461098857806395d89b4114610a39576102c9565b8063370ead471161023457806352fa270d116101ed57806365b1de20116101c757806365b1de20146107fa5780636c0360eb1461080f5780636f1ac5301461082457806370a0823114610857576102c9565b806352fa270d146107555780635db0cb941461079d5780636352211e146107d0576102c9565b8063370ead471461066a5780633ccfd60b146106945780633f85f916146106a957806342842e0e146106be5780634f558e79146107015780634f6ccce71461072b576102c9565b806315a7fad11161028657806315a7fad11461046957806315b56d10146104ec57806318160ddd1461059d5780631e9ab605146105c457806323b872dd146105ee5780632f745c5914610631576102c9565b806301ffc9a7146102ce578063048de3811461031657806306fdde0314610347578063081812fc146103d1578063095ea7b3146103fb57806313af403514610436575b600080fd5b3480156102da57600080fd5b50610302600480360360208110156102f157600080fd5b50356001600160e01b031916610fa8565b604080519115158252519081900360200190f35b34801561032257600080fd5b5061032b610fcb565b604080516001600160a01b039092168252519081900360200190f35b34801561035357600080fd5b5061035c610fdb565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561039657818101518382015260200161037e565b50505050905090810190601f1680156103c35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103dd57600080fd5b5061032b600480360360208110156103f457600080fd5b5035611071565b34801561040757600080fd5b506104346004803603604081101561041e57600080fd5b506001600160a01b0381351690602001356110d3565b005b34801561044257600080fd5b506104346004803603602081101561045957600080fd5b50356001600160a01b03166111ae565b34801561047557600080fd5b5061049c6004803603602081101561048c57600080fd5b50356001600160a01b031661124a565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156104d85781810151838201526020016104c0565b505050509050019250505060405180910390f35b3480156104f857600080fd5b506103026004803603602081101561050f57600080fd5b810190602081018135600160201b81111561052957600080fd5b82018360208201111561053b57600080fd5b803590602001918460018302840111600160201b8311171561055c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506112e9945050505050565b3480156105a957600080fd5b506105b261135c565b60408051918252519081900360200190f35b3480156105d057600080fd5b5061035c600480360360208110156105e757600080fd5b503561136d565b3480156105fa57600080fd5b506104346004803603606081101561061157600080fd5b506001600160a01b038135811691602081013590911690604001356113f1565b34801561063d57600080fd5b506105b26004803603604081101561065457600080fd5b506001600160a01b038135169060200135611448565b34801561067657600080fd5b5061035c6004803603602081101561068d57600080fd5b5035611479565b3480156106a057600080fd5b5061043461172f565b3480156106b557600080fd5b5061032b6117b8565b3480156106ca57600080fd5b50610434600480360360608110156106e157600080fd5b506001600160a01b038135811691602081013590911690604001356117c7565b34801561070d57600080fd5b506103026004803603602081101561072457600080fd5b50356117e2565b34801561073757600080fd5b506105b26004803603602081101561074e57600080fd5b50356117ed565b34801561076157600080fd5b5061077f6004803603602081101561077857600080fd5b5035611801565b60408051938452602084019290925282820152519081900360600190f35b3480156107a957600080fd5b50610434600480360360208110156107c057600080fd5b50356001600160a01b031661186e565b3480156107dc57600080fd5b5061032b600480360360208110156107f357600080fd5b50356118dc565b34801561080657600080fd5b506105b261190a565b34801561081b57600080fd5b5061035c611912565b34801561083057600080fd5b506104346004803603602081101561084757600080fd5b50356001600160a01b0316611973565b34801561086357600080fd5b506105b26004803603602081101561087a57600080fd5b50356001600160a01b0316611ab8565b34801561089657600080fd5b50610434600480360360208110156108ad57600080fd5b50356001600160a01b0316611b20565b610434600480360360208110156108d357600080fd5b810190602081018135600160201b8111156108ed57600080fd5b8201836020820111156108ff57600080fd5b803590602001918460208302840111600160201b8311171561092057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611b8e945050505050565b34801561096a57600080fd5b506105b2611db2565b34801561097f57600080fd5b506105b2611db8565b34801561099457600080fd5b5061035c600480360360208110156109ab57600080fd5b810190602081018135600160201b8111156109c557600080fd5b8201836020820111156109d757600080fd5b803590602001918460018302840111600160201b831117156109f857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611e2e945050505050565b348015610a4557600080fd5b5061035c611f50565b348015610a5a57600080fd5b506105b2611fb1565b348015610a6f57600080fd5b5061030260048036036020811015610a8657600080fd5b810190602081018135600160201b811115610aa057600080fd5b820183602082011115610ab257600080fd5b803590602001918460018302840111600160201b83111715610ad357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611fcb945050505050565b348015610b2057600080fd5b5061043460048036036040811015610b3757600080fd5b506001600160a01b03813516906020013515156121b6565b348015610b5b57600080fd5b5061043460048036036080811015610b7257600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b811115610bac57600080fd5b820183602082011115610bbe57600080fd5b803590602001918460018302840111600160201b83111715610bdf57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506122bb945050505050565b348015610c2c57600080fd5b5061043460048036036020811015610c4357600080fd5b50356001600160a01b0316612319565b61043460048036036040811015610c6957600080fd5b81359190810190604081016020820135600160201b811115610c8a57600080fd5b820183602082011115610c9c57600080fd5b803590602001918460018302840111600160201b83111715610cbd57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612394945050505050565b348015610d0a57600080fd5b5061035c60048036036020811015610d2157600080fd5b503561281e565b348015610d3457600080fd5b5061035c60048036036020811015610d4b57600080fd5b5035612d7d565b348015610d5e57600080fd5b5061035c60048036036040811015610d7557600080fd5b506001600160a01b038135169060200135612f95565b348015610d9757600080fd5b5061043460048036036040811015610dae57600080fd5b810190602081018135600160201b811115610dc857600080fd5b820183602082011115610dda57600080fd5b803590602001918460208302840111600160201b83111715610dfb57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550505090356001600160a01b03169150612fa99050565b348015610e5057600080fd5b5061032b612ff2565b348015610e6557600080fd5b5061035c60048036036020811015610e7c57600080fd5b5035613001565b348015610e8f57600080fd5b5061035c60048036036020811015610ea657600080fd5b5035613239565b348015610eb957600080fd5b5061032b6132da565b348015610ece57600080fd5b5061035c6132e9565b348015610ee357600080fd5b5061030260048036036040811015610efa57600080fd5b506001600160a01b038135811691602001351661343e565b348015610f1e57600080fd5b5061035c60048036036020811015610f3557600080fd5b503561346c565b348015610f4857600080fd5b5061043460048036036040811015610f5f57600080fd5b506001600160a01b0381351690602001356135db565b348015610f8157600080fd5b5061035c60048036036020811015610f9857600080fd5b50356001600160a01b031661369d565b6001600160e01b0319811660009081526020819052604090205460ff165b919050565b600b546001600160a01b03165b90565b60068054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156110675780601f1061103c57610100808354040283529160200191611067565b820191906000526020600020905b81548152906001019060200180831161104a57829003601f168201915b5050505050905090565b600061107c82613819565b6110b75760405162461bcd60e51b815260040180806020018281038252602c815260200180614747602c913960400191505060405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006110de826118dc565b9050806001600160a01b0316836001600160a01b031614156111315760405162461bcd60e51b81526004018080602001828103825260218152602001806147ee6021913960400191505060405180910390fd5b806001600160a01b031661114361382c565b6001600160a01b0316148061116457506111648161115f61382c565b61343e565b61119f5760405162461bcd60e51b815260040180806020018281038252603881526020018061469a6038913960400191505060405180910390fd5b6111a98383613830565b505050565b600f546001600160a01b031633146111fa576040805162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b604482015290519081900360640190fd5b600f80546001600160a01b0319166001600160a01b0383811691821792839055604051919216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350565b6060600061125783611ab8565b905060608167ffffffffffffffff8111801561127257600080fd5b5060405190808252806020026020018201604052801561129c578160200160208202803683370190505b509050816112ad579150610fc69050565b60005b828110156112e1576112c28582611448565b8282815181106112ce57fe5b60209081029190910101526001016112b0565b509392505050565b600060176112f683611e2e565b6040518082805190602001908083835b602083106113255780518252601f199092019160209182019101611306565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff16949350505050565b6000611368600261389e565b905090565b60606113788261346c565b6040516020018080602360f81b81525060010182805190602001908083835b602083106113b65780518252601f199092019160209182019101611397565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040529050919050565b6114026113fc61382c565b826138a9565b61143d5760405162461bcd60e51b815260040180806020018281038252603181526020018061480f6031913960400191505060405180910390fd5b6111a983838361394d565b6001600160a01b0382166000908152600160205260408120611470908363ffffffff613aab16565b90505b92915050565b606061148482613819565b6114d5576040805162461bcd60e51b815260206004820152601f60248201527f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e00604482015290519081900360640190fd5b60606114e08361346c565b905060116015826013846014604051602001808780546001816001161561010002031660029004801561154a5780601f1061152857610100808354040283529182019161154a565b820191906000526020600020905b815481529060010190602001808311611536575b5050868054600181600116156101000203166002900480156115a35780601f106115815761010080835404028352918201916115a3565b820191906000526020600020905b81548152906001019060200180831161158f575b50508064253235323360d81b81525060050185805190602001908083835b602083106115e05780518252601f1990920191602091820191016115c1565b6001836020036101000a038019825116818451168082178552505050505050905001848054600181600116156101000203166002900480156116595780601f10611637576101008083540402835291820191611659565b820191906000526020600020905b815481529060010190602001808311611645575b50508064253235323360d81b81525060050183805190602001908083835b602083106116965780518252601f199092019160209182019101611677565b6001836020036101000a0380198251168184511680821785525050505050509050018280546001816001161561010002031660029004801561170f5780601f106116ed57610100808354040283529182019161170f565b820191906000526020600020905b8154815290600101906020018083116116fb575b505060408051601f198184030181529190529a9950505050505050505050565b600d546001600160a01b0316331461177a576040805162461bcd60e51b81526020600482015260096024820152684f6e6c79207361666560b81b604482015290519081900360640190fd5b600d5460405147916001600160a01b03169082156108fc029083906000818181858888f193505050501580156117b4573d6000803e3d6000fd5b5050565b600e546001600160a01b031681565b6111a9838383604051806020016040528060008152506122bb565b600061147382613819565b6000806112e160028463ffffffff613ab716565b600080600063010000008410611856576040805162461bcd60e51b81526020600482015260156024820152740c8d0b589a5d0818dbdb1bdc88195e18d959591959605a1b604482015290519081900360640190fd5b50506201000082049260ff6101008404811693169150565b600f546001600160a01b031633146118ba576040805162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b604482015290519081900360640190fd5b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6000611473826040518060600160405280602981526020016146fc602991396002919063ffffffff613ad316565b630100000081565b60098054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156110675780601f1061103c57610100808354040283529160200191611067565b600d546001600160a01b031633146119be576040805162461bcd60e51b81526020600482015260096024820152684f6e6c79207361666560b81b604482015290519081900360640190fd5b600d54604080516370a0823160e01b815230600482015290516001600160a01b038085169363a9059cbb9391169184916370a08231916024808301926020929190829003018186803b158015611a1357600080fd5b505afa158015611a27573d6000803e3d6000fd5b505050506040513d6020811015611a3d57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091525160448083019260209291908290030181600087803b158015611a8e57600080fd5b505af1158015611aa2573d6000803e3d6000fd5b505050506040513d60208110156111a957600080fd5b60006001600160a01b038216611aff5760405162461bcd60e51b815260040180806020018281038252602a8152602001806146d2602a913960400191505060405180910390fd5b6001600160a01b03821660009081526001602052604090206114739061389e565b600f546001600160a01b03163314611b6c576040805162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b604482015290519081900360640190fd5b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6000815111611bda576040805162461bcd60e51b8152602060048201526013602482015272139bc818dbdb1bdc9cc81cdc1958da599a5959606a1b604482015290519081900360640190fd5b6011815110611c29576040805162461bcd60e51b815260206004820152601660248201527510dbdb1bdc881b5a5b9d1a5b99c8195e18d95959195960521b604482015290519081900360640190fd5b60008151611c35611fb1565b029050606460028202048103341015611c8f576040805162461bcd60e51b8152602060048201526017602482015276125b9cdd59999a58da595b9d0811551208185b5bdd5b9d604a1b604482015290519081900360640190fd5b60005b8251811015611cbf57611cb7838281518110611caa57fe5b6020026020010151613aea565b600101611c92565b508151601014156117b457611cd261446b565b60005b8351811015611d0b57838181518110611cea57fe5b6020026020010151828260108110611cfe57fe5b6020020152600101611cd5565b50600e546040516383798dff60e01b81526001600160a01b03909116906383798dff9083903390600401808361020080838360005b83811015611d58578181015183820152602001611d40565b50505050905001826001600160a01b03166001600160a01b0316815260200192505050600060405180830381600087803b158015611d9557600080fd5b505af1158015611da9573d6000803e3d6000fd5b50505050505050565b600a5481565b600c54604080516350d25bcd60e01b815290516000926001600160a01b0316916350d25bcd916004808301926020929190829003018186803b158015611dfd57600080fd5b505afa158015611e11573d6000803e3d6000fd5b505050506040513d6020811015611e2757600080fd5b5051905090565b6060808290506060815167ffffffffffffffff81118015611e4e57600080fd5b506040519080825280601f01601f191660200182016040528015611e79576020820181803683370190505b50905060005b82518110156112e1576041838281518110611e9657fe5b016020015160f81c10801590611ec05750605a838281518110611eb557fe5b016020015160f81c11155b15611f0d57828181518110611ed157fe5b602001015160f81c60f81b60f81c60200160f81b828281518110611ef157fe5b60200101906001600160f81b031916908160001a905350611f48565b828181518110611f1957fe5b602001015160f81c60f81b828281518110611f3057fe5b60200101906001600160f81b031916908160001a9053505b600101611e7f565b60078054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156110675780601f1061103c57610100808354040283529160200191611067565b6000611fbb611db8565b600a5481611fc557fe5b04905090565b60006060829050600181511015611fe6576000915050610fc6565b601981511115611ffa576000915050610fc6565b8060008151811061200757fe5b6020910101516001600160f81b031916600160fd1b141561202c576000915050610fc6565b8060018251038151811061203c57fe5b6020910101516001600160f81b031916600160fd1b1415612061576000915050610fc6565b60008160008151811061207057fe5b01602001516001600160f81b031916905060005b82518110156121ab57600083828151811061209b57fe5b01602001516001600160f81b0319169050600160fd1b811480156120cc5750600160fd1b6001600160f81b03198416145b156120de576000945050505050610fc6565b600360fc1b6001600160f81b031982161080159061210a5750603960f81b6001600160f81b0319821611155b1580156121405750604160f81b6001600160f81b031982161080159061213e5750602d60f91b6001600160f81b0319821611155b155b80156121755750606160f81b6001600160f81b03198216108015906121735750603d60f91b6001600160f81b0319821611155b155b801561218f5750600160fd1b6001600160f81b0319821614155b156121a1576000945050505050610fc6565b9150600101612084565b506001949350505050565b6121be61382c565b6001600160a01b0316826001600160a01b03161415612224576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b806005600061223161382c565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff19169215159290921790915561227561382c565b60408051841515815290516001600160a01b0392909216917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319181900360200190a35050565b6122cc6122c661382c565b836138a9565b6123075760405162461bcd60e51b815260040180806020018281038252603181526020018061480f6031913960400191505060405180910390fd5b61231384848484613b4f565b50505050565b600f546001600160a01b03163314612365576040805162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b604482015290519081900360640190fd5b600b80546001600160a01b03199081166001600160a01b039384161791829055600c8054929093169116179055565b600061239f836118dc565b9050806001600160a01b03166123b361382c565b6001600160a01b03161461240e576040805162461bcd60e51b815260206004820152601f60248201527f4552433732313a2063616c6c6572206973206e6f7420746865206f776e657200604482015290519081900360640190fd5b61241782611fcb565b1515600114612464576040805162461bcd60e51b81526020600482015260146024820152734e6f7420612076616c6964206e6577206e616d6560601b604482015290519081900360640190fd5b60026016600085815260200190815260200160002060405180828054600181600116156101000203166002900480156124d45780601f106124b25761010080835404028352918201916124d4565b820191906000526020600020905b8154815290600101906020018083116124c0575b5050915050602060405180830381855afa1580156124f6573d6000803e3d6000fd5b5050506040513d602081101561250b57600080fd5b505160405183516002918591819060208401908083835b602083106125415780518252601f199092019160209182019101612522565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015612580573d6000803e3d6000fd5b5050506040513d602081101561259557600080fd5b505114156125d45760405162461bcd60e51b81526004018080602001828103825260238152602001806147cb6023913960400191505060405180910390fd5b6125dd826112e9565b15612627576040805162461bcd60e51b815260206004820152601560248201527413985b5948185b1c9958591e481c995cd95c9d9959605a1b604482015290519081900360640190fd5b6000612631611fb1565b905060646002820204810334101561268a576040805162461bcd60e51b8152602060048201526017602482015276125b9cdd59999a58da595b9d0811551208185b5bdd5b9d604a1b604482015290519081900360640190fd5b60008481526016602052604090205460026000196101006001841615020190911604156127535760008481526016602090815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845261275393928301828280156127475780601f1061271c57610100808354040283529160200191612747565b820191906000526020600020905b81548152906001019060200180831161272a57829003601f168201915b50505050506000613ba1565b61275e836001613ba1565b6000848152601660209081526040909120845161277d9286019061448a565b50837f7e632a301794d8d4a81ea7e20f37d1947158d36e66403af04ba85dd194b66f1b846040518080602001828103825283818151815260200191508051906020019080838360005b838110156127de5781810151838201526020016127c6565b50505050905090810190601f16801561280b5780820380516001836020036101000a031916815260200191505b509250505060405180910390a250505050565b606061282982613819565b6128645760405162461bcd60e51b815260040180806020018281038252602f81526020018061479c602f913960400191505060405180910390fd5b606061286f83613239565b90506060815160001415612901576128868461346c565b60405160200180806225323360e81b81525060030182805190602001908083835b602083106128c65780518252601f1990920191602091820191016128a7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405290506129de565b61290a8461346c565b8260405160200180806225323360e81b81525060030183805190602001908083835b6020831061294b5780518252601f19909201916020918201910161292c565b51815160209384036101000a60001901801990921691161790526602532302d2532360cc1b919093019081528451600790910192850191508083835b602083106129a65780518252601f199092019160209182019101612987565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405290505b60606040518060400160405280600a8152602001693d913730b6b2911d101160b11b815250905060606040518060e0016040528060aa815260200161484060aa9139905060606040518060600160405280602d8152602001614951602d9139905060606040518060400160405280600f81526020016e1116101134b6b0b3b2911d1299181160891b815250905060606010858786866040516020018086805460018160011615610100020316600290048015612ad15780601f10612aaf576101008083540402835291820191612ad1565b820191906000526020600020905b815481529060010190602001808311612abd575b5050855160208701908083835b60208310612afd5780518252601f199092019160209182019101612ade565b51815160209384036101000a600019018019909216911617905287519190930192870191508083835b60208310612b455780518252601f199092019160209182019101612b26565b51815160209384036101000a600019018019909216911617905286519190930192860191508083835b60208310612b8d5780518252601f199092019160209182019101612b6e565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310612bd55780518252601f199092019160209182019101612bb6565b6001836020036101000a03801982511681845116808217855250505050505090500195505050505050604051602081830303815290604052905080612c198a61346c565b83612c238c611479565b6040516020018085805190602001908083835b60208310612c555780518252601f199092019160209182019101612c36565b51815160209384036101000a600019018019909216911617905287519190930192870191508083835b60208310612c9d5780518252601f199092019160209182019101612c7e565b51815160209384036101000a600019018019909216911617905286519190930192860191508083835b60208310612ce55780518252601f199092019160209182019101612cc6565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310612d2d5780518252601f199092019160209182019101612d0e565b5181516020939093036101000a600019018019909116921691909117905261227d60f01b92019182525060408051808303601d19018152600290920190529e9d5050505050505050505050505050565b6060612d8882613819565b612dd9576040805162461bcd60e51b815260206004820152601f60248201527f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e00604482015290519081900360640190fd5b6060612de48361346c565b9050601160128260138460146040516020018087805460018160011615610100020316600290048015612e4e5780601f10612e2c576101008083540402835291820191612e4e565b820191906000526020600020905b815481529060010190602001808311612e3a575b505086805460018160011615610100020316600290048015612ea75780601f10612e85576101008083540402835291820191612ea7565b820191906000526020600020905b815481529060010190602001808311612e93575b5050806225323360e81b81525060030185805190602001908083835b60208310612ee25780518252601f199092019160209182019101612ec3565b6001836020036101000a03801982511681845116808217855250505050505090500184805460018160011615610100020316600290048015612f5b5780601f10612f39576101008083540402835291820191612f5b565b820191906000526020600020905b815481529060010190602001808311612f47575b5050806225323360e81b8152506003018380519060200190808383602083106116965780518252601f199092019160209182019101611677565b6060611470612fa48484611448565b61136d565b60005b82518110156111a957612fea612fc061382c565b83858481518110612fcd57fe5b6020026020010151604051806020016040528060008152506122bb565b600101612fac565b600f546001600160a01b031690565b606061300c82613819565b61305d576040805162461bcd60e51b815260206004820152601f60248201527f53564720717565727920666f72206e6f6e6578697374656e7420746f6b656e00604482015290519081900360640190fd5b60606130688361136d565b9050601281601383601460405160200180868054600181600116156101000203166002900480156130d05780601f106130ae5761010080835404028352918201916130d0565b820191906000526020600020905b8154815290600101906020018083116130bc575b5050855160208701908083835b602083106130fc5780518252601f1990920191602091820191016130dd565b6001836020036101000a038019825116818451168082178552505050505050905001848054600181600116156101000203166002900480156131755780601f10613153576101008083540402835291820191613175565b820191906000526020600020905b815481529060010190602001808311613161575b5050835160208501908083835b602083106131a15780518252601f199092019160209182019101613182565b6001836020036101000a0380198251168184511680821785525050505050509050018280546001816001161561010002031660029004801561321a5780601f106131f857610100808354040283529182019161321a565b820191906000526020600020905b815481529060010190602001808311613206575b505060408051601f198184030181529190529998505050505050505050565b60008181526016602090815260409182902080548351601f60026000196101006001861615020190931692909204918201849004840281018401909452808452606093928301828280156132ce5780601f106132a3576101008083540402835291602001916132ce565b820191906000526020600020905b8154815290600101906020018083116132b157829003601f168201915b50505050509050919050565b600b546001600160a01b031681565b60608060405180610100016040528060d381526020016145c760d39139905060606040518060a00160405280606781526020016148ea60679139905060606010838360405160200180848054600181600116156101000203166002900480156133895780601f10613367576101008083540402835291820191613389565b820191906000526020600020905b815481529060010190602001808311613375575b5050835160208501908083835b602083106133b55780518252601f199092019160209182019101613396565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106133fd5780518252601f1990920191602091820191016133de565b6001836020036101000a0380198251168184511680821785525050505050509050019350505050604051602081830303815290604052905080935050505090565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6060630100000082106134be576040805162461bcd60e51b81526020600482015260156024820152740c8d0b589a5d0818dbdb1bdc88195e18d959591959605a1b604482015290519081900360640190fd5b604080518082018252601081526f181899199a1a9b1b9c1ca0a121a222a360811b60208201528151603380825260608281019094528593919060208201818036833701905050905060115b60148110156135d2578260048583600c016020811061352457fe5b1a60f81b6001600160f81b031916901c60f81c60ff168151811061354457fe5b602001015160f81c60f81b82826002028151811061355e57fe5b60200101906001600160f81b031916908160001a905350828482600c016020811061358557fe5b825191901a600f1690811061359657fe5b602001015160f81c60f81b8282600202600101815181106135b357fe5b60200101906001600160f81b031916908160001a905350600101613509565b50949350505050565b600d546001600160a01b03163314613626576040805162461bcd60e51b81526020600482015260096024820152684f6e6c79207361666560b81b604482015290519081900360640190fd5b600d54604080516323b872dd60e01b81523060048201526001600160a01b039283166024820152604481018490529051918416916323b872dd9160648082019260009290919082900301818387803b15801561368157600080fd5b505af1158015613695573d6000803e3d6000fd5b505050505050565b606060006136aa83611ab8565b90506060816136bc579150610fc69050565b60005b828110156112e15760606136d6612fa48784611448565b90508161374b57806040516020018082805190602001908083835b602083106137105780518252601f1990920191602091820191016136f1565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040529250613810565b82816040516020018083805190602001908083835b6020831061377f5780518252601f199092019160209182019101613760565b6001836020036101000a03801982511681845116808217855250505050505090500180600b60fa1b81525060010182805190602001908083835b602083106137d85780518252601f1990920191602091820191016137b9565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292505b506001016136bf565b600061147360028363ffffffff613c1d16565b3390565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190613865826118dc565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061147382613c29565b60006138b482613819565b6138ef5760405162461bcd60e51b815260040180806020018281038252602c81526020018061459b602c913960400191505060405180910390fd5b60006138fa836118dc565b9050806001600160a01b0316846001600160a01b031614806139355750836001600160a01b031661392a84611071565b6001600160a01b0316145b806139455750613945818561343e565b949350505050565b826001600160a01b0316613960826118dc565b6001600160a01b0316146139a55760405162461bcd60e51b81526004018080602001828103825260298152602001806147736029913960400191505060405180910390fd5b6001600160a01b0382166139ea5760405162461bcd60e51b81526004018080602001828103825260248152602001806145776024913960400191505060405180910390fd5b6139f58383836111a9565b613a00600082613830565b6001600160a01b0383166000908152600160205260409020613a28908263ffffffff613c2d16565b506001600160a01b0382166000908152600160205260409020613a51908263ffffffff613c3916565b50613a646002828463ffffffff613c4516565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60006114708383613c5b565b6000808080613ac68686613cbf565b9097909650945050505050565b6000613ae0848484613d3a565b90505b9392505050565b63010000008110613b42576040805162461bcd60e51b815260206004820152601860248201527f546f6b656e4944206578636565647320706f737369626c650000000000000000604482015290519081900360640190fd5b613b4c3382613e04565b50565b613b5a84848461394d565b613b6684848484613e1e565b6123135760405162461bcd60e51b81526004018080602001828103825260328152602001806145456032913960400191505060405180910390fd5b806017613bad84611e2e565b6040518082805190602001908083835b60208310613bdc5780518252601f199092019160209182019101613bbd565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220805460ff19169315159390931790925550505050565b60006114708383613f9e565b5490565b60006114708383613fb6565b6000611470838361407c565b6000613ae084846001600160a01b0385166140c6565b81546000908210613c9d5760405162461bcd60e51b81526004018080602001828103825260228152602001806145236022913960400191505060405180910390fd5b826000018281548110613cac57fe5b9060005260206000200154905092915050565b815460009081908310613d035760405162461bcd60e51b81526004018080602001828103825260228152602001806147256022913960400191505060405180910390fd5b6000846000018481548110613d1457fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b60008281526001840160205260408120548281613dd55760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613d9a578181015183820152602001613d82565b50505050905090810190601f168015613dc75780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50846000016001820381548110613de857fe5b9060005260206000209060020201600101549150509392505050565b6117b482826040518060200160405280600081525061415d565b6000613e32846001600160a01b03166141af565b613e3e57506001613945565b6060613f64630a85bd0160e11b613e5361382c565b88878760405160240180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015613ecc578181015183820152602001613eb4565b50505050905090810190601f168015613ef95780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b038381831617835250505050604051806060016040528060328152602001614545603291396001600160a01b038816919063ffffffff6141b516565b90506000818060200190516020811015613f7d57600080fd5b50516001600160e01b031916630a85bd0160e11b1492505050949350505050565b60009081526001919091016020526040902054151590565b600081815260018301602052604081205480156140725783546000198083019190810190600090879083908110613fe957fe5b906000526020600020015490508087600001848154811061400657fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061403657fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050611473565b6000915050611473565b60006140888383613f9e565b6140be57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611473565b506000611473565b60008281526001840160205260408120548061412b575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055613ae3565b8285600001600183038154811061413e57fe5b9060005260206000209060020201600101819055506000915050613ae3565b61416783836141c4565b6141746000848484613e1e565b6111a95760405162461bcd60e51b81526004018080602001828103825260328152602001806145456032913960400191505060405180910390fd5b3b151590565b6060613ae084846000856142fe565b6001600160a01b03821661421f576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b61422881613819565b1561427a576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b614286600083836111a9565b6001600160a01b03821660009081526001602052604090206142ae908263ffffffff613c3916565b506142c16002828463ffffffff613c4516565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6060614309856141af565b61435a576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106143995780518252601f19909201916020918201910161437a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146143fb576040519150601f19603f3d011682016040523d82523d6000602084013e614400565b606091505b509150915081156144145791506139459050565b8051156144245780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315613d9a578181015183820152602001613d82565b6040518061020001604052806010906020820280368337509192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106144cb57805160ff19168380011785556144f8565b828001600101855582156144f8579182015b828111156144f85782518255916020019190600101906144dd565b50614504929150614508565b5090565b610fd891905b80821115614504576000815560010161450e56fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e7b226e616d65223a25323022436f6c6f727665727365253230546f6b656e732532302852474229222c253230226465736372697074696f6e223a25323022416c6c253230436f6c6f72732e253230546f6b656e73697a65642e25323046696e64253230796f7572253230636f6c6f72732e2532304f776e253230796f7572253230636f6c6f72732e25323054686525323066697273742532306d6574612d4e4654253230666f7225323067656e657261746976652c2532306f6e2d636861696e2532306172742532302d253230312f312e222c4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4e6577206e616d652069732073616d65206173207468652063757272656e74206f6e654552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564222c20226465736372697074696f6e223a25323022416c6c253230436f6c6f72732e253230546f6b656e73697a65642e25323046696e64253230796f7572253230636f6c6f72732e2532304f776e253230796f7572253230636f6c6f72732e25323054686525323066697273742532306d6574612d4e4654253230666f7225323067656e657261746976652c2532306f6e2d636861696e2532306172742532302d253230312f312e222c22696d616765223a2532302268747470733a2f2f7777772e636f6c6f7276657273652e696f2f636f6c6f7276657273652e706e67222c2532302265787465726e616c5f75726c223a2532302268747470733a2f2f7777772e636f6c6f7276657273652e696f227d2265787465726e616c5f75726c223a2532302268747470733a2f2f7777772e636f6c6f7276657273652e696f2fa264697066735822122010d11e2d134fef8b54ad43ca2c676e0d2400cb6f7e5426b70cd31498b578d98b64736f6c634300060700333c737667253230786d6c6e733d27687474703a2f2f7777772e77332e6f72672f323030302f737667273e3c7265637425323077696474683d27333530272532306865696768743d27333530272532307374796c653d2766696c6c3a2532303c73766720786d6c6e733d27687474703a2f2f7777772e77332e6f72672f323030302f737667273e3c726563742077696474683d2733353027206865696768743d2733353027207374796c653d2766696c6c3a20
Deployed Bytecode
0x6080604052600436106102c95760003560e01c80637a341bc711610175578063c87b56dd116100dc578063d307f60611610095578063e985e9c51161006f578063e985e9c514610ed7578063ea22071714610f12578063ec35cb7214610f3c578063f6a003fe14610f75576102c9565b8063d307f60614610e83578063e0abca0b14610ead578063e8a3d48514610ec2576102c9565b8063c87b56dd14610cfe578063ca54cc3f14610d28578063cc1798a914610d52578063ce40ad8614610d8b578063ce606ee014610e44578063d12a4c9814610e59576102c9565b806398d5fdca1161012e57806398d5fdca14610a4e5780639ffdb65a14610a63578063a22cb46514610b14578063b88d4fde14610b4f578063bda5310714610c20578063c39cbef114610c53576102c9565b80637a341bc71461088a57806385e5d7ee146108bd5780638d859f3e1461095e5780638e15f473146109735780639416b4231461098857806395d89b4114610a39576102c9565b8063370ead471161023457806352fa270d116101ed57806365b1de20116101c757806365b1de20146107fa5780636c0360eb1461080f5780636f1ac5301461082457806370a0823114610857576102c9565b806352fa270d146107555780635db0cb941461079d5780636352211e146107d0576102c9565b8063370ead471461066a5780633ccfd60b146106945780633f85f916146106a957806342842e0e146106be5780634f558e79146107015780634f6ccce71461072b576102c9565b806315a7fad11161028657806315a7fad11461046957806315b56d10146104ec57806318160ddd1461059d5780631e9ab605146105c457806323b872dd146105ee5780632f745c5914610631576102c9565b806301ffc9a7146102ce578063048de3811461031657806306fdde0314610347578063081812fc146103d1578063095ea7b3146103fb57806313af403514610436575b600080fd5b3480156102da57600080fd5b50610302600480360360208110156102f157600080fd5b50356001600160e01b031916610fa8565b604080519115158252519081900360200190f35b34801561032257600080fd5b5061032b610fcb565b604080516001600160a01b039092168252519081900360200190f35b34801561035357600080fd5b5061035c610fdb565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561039657818101518382015260200161037e565b50505050905090810190601f1680156103c35780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b3480156103dd57600080fd5b5061032b600480360360208110156103f457600080fd5b5035611071565b34801561040757600080fd5b506104346004803603604081101561041e57600080fd5b506001600160a01b0381351690602001356110d3565b005b34801561044257600080fd5b506104346004803603602081101561045957600080fd5b50356001600160a01b03166111ae565b34801561047557600080fd5b5061049c6004803603602081101561048c57600080fd5b50356001600160a01b031661124a565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156104d85781810151838201526020016104c0565b505050509050019250505060405180910390f35b3480156104f857600080fd5b506103026004803603602081101561050f57600080fd5b810190602081018135600160201b81111561052957600080fd5b82018360208201111561053b57600080fd5b803590602001918460018302840111600160201b8311171561055c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506112e9945050505050565b3480156105a957600080fd5b506105b261135c565b60408051918252519081900360200190f35b3480156105d057600080fd5b5061035c600480360360208110156105e757600080fd5b503561136d565b3480156105fa57600080fd5b506104346004803603606081101561061157600080fd5b506001600160a01b038135811691602081013590911690604001356113f1565b34801561063d57600080fd5b506105b26004803603604081101561065457600080fd5b506001600160a01b038135169060200135611448565b34801561067657600080fd5b5061035c6004803603602081101561068d57600080fd5b5035611479565b3480156106a057600080fd5b5061043461172f565b3480156106b557600080fd5b5061032b6117b8565b3480156106ca57600080fd5b50610434600480360360608110156106e157600080fd5b506001600160a01b038135811691602081013590911690604001356117c7565b34801561070d57600080fd5b506103026004803603602081101561072457600080fd5b50356117e2565b34801561073757600080fd5b506105b26004803603602081101561074e57600080fd5b50356117ed565b34801561076157600080fd5b5061077f6004803603602081101561077857600080fd5b5035611801565b60408051938452602084019290925282820152519081900360600190f35b3480156107a957600080fd5b50610434600480360360208110156107c057600080fd5b50356001600160a01b031661186e565b3480156107dc57600080fd5b5061032b600480360360208110156107f357600080fd5b50356118dc565b34801561080657600080fd5b506105b261190a565b34801561081b57600080fd5b5061035c611912565b34801561083057600080fd5b506104346004803603602081101561084757600080fd5b50356001600160a01b0316611973565b34801561086357600080fd5b506105b26004803603602081101561087a57600080fd5b50356001600160a01b0316611ab8565b34801561089657600080fd5b50610434600480360360208110156108ad57600080fd5b50356001600160a01b0316611b20565b610434600480360360208110156108d357600080fd5b810190602081018135600160201b8111156108ed57600080fd5b8201836020820111156108ff57600080fd5b803590602001918460208302840111600160201b8311171561092057600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611b8e945050505050565b34801561096a57600080fd5b506105b2611db2565b34801561097f57600080fd5b506105b2611db8565b34801561099457600080fd5b5061035c600480360360208110156109ab57600080fd5b810190602081018135600160201b8111156109c557600080fd5b8201836020820111156109d757600080fd5b803590602001918460018302840111600160201b831117156109f857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611e2e945050505050565b348015610a4557600080fd5b5061035c611f50565b348015610a5a57600080fd5b506105b2611fb1565b348015610a6f57600080fd5b5061030260048036036020811015610a8657600080fd5b810190602081018135600160201b811115610aa057600080fd5b820183602082011115610ab257600080fd5b803590602001918460018302840111600160201b83111715610ad357600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611fcb945050505050565b348015610b2057600080fd5b5061043460048036036040811015610b3757600080fd5b506001600160a01b03813516906020013515156121b6565b348015610b5b57600080fd5b5061043460048036036080811015610b7257600080fd5b6001600160a01b03823581169260208101359091169160408201359190810190608081016060820135600160201b811115610bac57600080fd5b820183602082011115610bbe57600080fd5b803590602001918460018302840111600160201b83111715610bdf57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506122bb945050505050565b348015610c2c57600080fd5b5061043460048036036020811015610c4357600080fd5b50356001600160a01b0316612319565b61043460048036036040811015610c6957600080fd5b81359190810190604081016020820135600160201b811115610c8a57600080fd5b820183602082011115610c9c57600080fd5b803590602001918460018302840111600160201b83111715610cbd57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612394945050505050565b348015610d0a57600080fd5b5061035c60048036036020811015610d2157600080fd5b503561281e565b348015610d3457600080fd5b5061035c60048036036020811015610d4b57600080fd5b5035612d7d565b348015610d5e57600080fd5b5061035c60048036036040811015610d7557600080fd5b506001600160a01b038135169060200135612f95565b348015610d9757600080fd5b5061043460048036036040811015610dae57600080fd5b810190602081018135600160201b811115610dc857600080fd5b820183602082011115610dda57600080fd5b803590602001918460208302840111600160201b83111715610dfb57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550505090356001600160a01b03169150612fa99050565b348015610e5057600080fd5b5061032b612ff2565b348015610e6557600080fd5b5061035c60048036036020811015610e7c57600080fd5b5035613001565b348015610e8f57600080fd5b5061035c60048036036020811015610ea657600080fd5b5035613239565b348015610eb957600080fd5b5061032b6132da565b348015610ece57600080fd5b5061035c6132e9565b348015610ee357600080fd5b5061030260048036036040811015610efa57600080fd5b506001600160a01b038135811691602001351661343e565b348015610f1e57600080fd5b5061035c60048036036020811015610f3557600080fd5b503561346c565b348015610f4857600080fd5b5061043460048036036040811015610f5f57600080fd5b506001600160a01b0381351690602001356135db565b348015610f8157600080fd5b5061035c60048036036020811015610f9857600080fd5b50356001600160a01b031661369d565b6001600160e01b0319811660009081526020819052604090205460ff165b919050565b600b546001600160a01b03165b90565b60068054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156110675780601f1061103c57610100808354040283529160200191611067565b820191906000526020600020905b81548152906001019060200180831161104a57829003601f168201915b5050505050905090565b600061107c82613819565b6110b75760405162461bcd60e51b815260040180806020018281038252602c815260200180614747602c913960400191505060405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006110de826118dc565b9050806001600160a01b0316836001600160a01b031614156111315760405162461bcd60e51b81526004018080602001828103825260218152602001806147ee6021913960400191505060405180910390fd5b806001600160a01b031661114361382c565b6001600160a01b0316148061116457506111648161115f61382c565b61343e565b61119f5760405162461bcd60e51b815260040180806020018281038252603881526020018061469a6038913960400191505060405180910390fd5b6111a98383613830565b505050565b600f546001600160a01b031633146111fa576040805162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b604482015290519081900360640190fd5b600f80546001600160a01b0319166001600160a01b0383811691821792839055604051919216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a350565b6060600061125783611ab8565b905060608167ffffffffffffffff8111801561127257600080fd5b5060405190808252806020026020018201604052801561129c578160200160208202803683370190505b509050816112ad579150610fc69050565b60005b828110156112e1576112c28582611448565b8282815181106112ce57fe5b60209081029190910101526001016112b0565b509392505050565b600060176112f683611e2e565b6040518082805190602001908083835b602083106113255780518252601f199092019160209182019101611306565b51815160209384036101000a600019018019909216911617905292019485525060405193849003019092205460ff16949350505050565b6000611368600261389e565b905090565b60606113788261346c565b6040516020018080602360f81b81525060010182805190602001908083835b602083106113b65780518252601f199092019160209182019101611397565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040529050919050565b6114026113fc61382c565b826138a9565b61143d5760405162461bcd60e51b815260040180806020018281038252603181526020018061480f6031913960400191505060405180910390fd5b6111a983838361394d565b6001600160a01b0382166000908152600160205260408120611470908363ffffffff613aab16565b90505b92915050565b606061148482613819565b6114d5576040805162461bcd60e51b815260206004820152601f60248201527f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e00604482015290519081900360640190fd5b60606114e08361346c565b905060116015826013846014604051602001808780546001816001161561010002031660029004801561154a5780601f1061152857610100808354040283529182019161154a565b820191906000526020600020905b815481529060010190602001808311611536575b5050868054600181600116156101000203166002900480156115a35780601f106115815761010080835404028352918201916115a3565b820191906000526020600020905b81548152906001019060200180831161158f575b50508064253235323360d81b81525060050185805190602001908083835b602083106115e05780518252601f1990920191602091820191016115c1565b6001836020036101000a038019825116818451168082178552505050505050905001848054600181600116156101000203166002900480156116595780601f10611637576101008083540402835291820191611659565b820191906000526020600020905b815481529060010190602001808311611645575b50508064253235323360d81b81525060050183805190602001908083835b602083106116965780518252601f199092019160209182019101611677565b6001836020036101000a0380198251168184511680821785525050505050509050018280546001816001161561010002031660029004801561170f5780601f106116ed57610100808354040283529182019161170f565b820191906000526020600020905b8154815290600101906020018083116116fb575b505060408051601f198184030181529190529a9950505050505050505050565b600d546001600160a01b0316331461177a576040805162461bcd60e51b81526020600482015260096024820152684f6e6c79207361666560b81b604482015290519081900360640190fd5b600d5460405147916001600160a01b03169082156108fc029083906000818181858888f193505050501580156117b4573d6000803e3d6000fd5b5050565b600e546001600160a01b031681565b6111a9838383604051806020016040528060008152506122bb565b600061147382613819565b6000806112e160028463ffffffff613ab716565b600080600063010000008410611856576040805162461bcd60e51b81526020600482015260156024820152740c8d0b589a5d0818dbdb1bdc88195e18d959591959605a1b604482015290519081900360640190fd5b50506201000082049260ff6101008404811693169150565b600f546001600160a01b031633146118ba576040805162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b604482015290519081900360640190fd5b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6000611473826040518060600160405280602981526020016146fc602991396002919063ffffffff613ad316565b630100000081565b60098054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156110675780601f1061103c57610100808354040283529160200191611067565b600d546001600160a01b031633146119be576040805162461bcd60e51b81526020600482015260096024820152684f6e6c79207361666560b81b604482015290519081900360640190fd5b600d54604080516370a0823160e01b815230600482015290516001600160a01b038085169363a9059cbb9391169184916370a08231916024808301926020929190829003018186803b158015611a1357600080fd5b505afa158015611a27573d6000803e3d6000fd5b505050506040513d6020811015611a3d57600080fd5b5051604080516001600160e01b031960e086901b1681526001600160a01b03909316600484015260248301919091525160448083019260209291908290030181600087803b158015611a8e57600080fd5b505af1158015611aa2573d6000803e3d6000fd5b505050506040513d60208110156111a957600080fd5b60006001600160a01b038216611aff5760405162461bcd60e51b815260040180806020018281038252602a8152602001806146d2602a913960400191505060405180910390fd5b6001600160a01b03821660009081526001602052604090206114739061389e565b600f546001600160a01b03163314611b6c576040805162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b604482015290519081900360640190fd5b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6000815111611bda576040805162461bcd60e51b8152602060048201526013602482015272139bc818dbdb1bdc9cc81cdc1958da599a5959606a1b604482015290519081900360640190fd5b6011815110611c29576040805162461bcd60e51b815260206004820152601660248201527510dbdb1bdc881b5a5b9d1a5b99c8195e18d95959195960521b604482015290519081900360640190fd5b60008151611c35611fb1565b029050606460028202048103341015611c8f576040805162461bcd60e51b8152602060048201526017602482015276125b9cdd59999a58da595b9d0811551208185b5bdd5b9d604a1b604482015290519081900360640190fd5b60005b8251811015611cbf57611cb7838281518110611caa57fe5b6020026020010151613aea565b600101611c92565b508151601014156117b457611cd261446b565b60005b8351811015611d0b57838181518110611cea57fe5b6020026020010151828260108110611cfe57fe5b6020020152600101611cd5565b50600e546040516383798dff60e01b81526001600160a01b03909116906383798dff9083903390600401808361020080838360005b83811015611d58578181015183820152602001611d40565b50505050905001826001600160a01b03166001600160a01b0316815260200192505050600060405180830381600087803b158015611d9557600080fd5b505af1158015611da9573d6000803e3d6000fd5b50505050505050565b600a5481565b600c54604080516350d25bcd60e01b815290516000926001600160a01b0316916350d25bcd916004808301926020929190829003018186803b158015611dfd57600080fd5b505afa158015611e11573d6000803e3d6000fd5b505050506040513d6020811015611e2757600080fd5b5051905090565b6060808290506060815167ffffffffffffffff81118015611e4e57600080fd5b506040519080825280601f01601f191660200182016040528015611e79576020820181803683370190505b50905060005b82518110156112e1576041838281518110611e9657fe5b016020015160f81c10801590611ec05750605a838281518110611eb557fe5b016020015160f81c11155b15611f0d57828181518110611ed157fe5b602001015160f81c60f81b60f81c60200160f81b828281518110611ef157fe5b60200101906001600160f81b031916908160001a905350611f48565b828181518110611f1957fe5b602001015160f81c60f81b828281518110611f3057fe5b60200101906001600160f81b031916908160001a9053505b600101611e7f565b60078054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156110675780601f1061103c57610100808354040283529160200191611067565b6000611fbb611db8565b600a5481611fc557fe5b04905090565b60006060829050600181511015611fe6576000915050610fc6565b601981511115611ffa576000915050610fc6565b8060008151811061200757fe5b6020910101516001600160f81b031916600160fd1b141561202c576000915050610fc6565b8060018251038151811061203c57fe5b6020910101516001600160f81b031916600160fd1b1415612061576000915050610fc6565b60008160008151811061207057fe5b01602001516001600160f81b031916905060005b82518110156121ab57600083828151811061209b57fe5b01602001516001600160f81b0319169050600160fd1b811480156120cc5750600160fd1b6001600160f81b03198416145b156120de576000945050505050610fc6565b600360fc1b6001600160f81b031982161080159061210a5750603960f81b6001600160f81b0319821611155b1580156121405750604160f81b6001600160f81b031982161080159061213e5750602d60f91b6001600160f81b0319821611155b155b80156121755750606160f81b6001600160f81b03198216108015906121735750603d60f91b6001600160f81b0319821611155b155b801561218f5750600160fd1b6001600160f81b0319821614155b156121a1576000945050505050610fc6565b9150600101612084565b506001949350505050565b6121be61382c565b6001600160a01b0316826001600160a01b03161415612224576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b806005600061223161382c565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff19169215159290921790915561227561382c565b60408051841515815290516001600160a01b0392909216917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c319181900360200190a35050565b6122cc6122c661382c565b836138a9565b6123075760405162461bcd60e51b815260040180806020018281038252603181526020018061480f6031913960400191505060405180910390fd5b61231384848484613b4f565b50505050565b600f546001600160a01b03163314612365576040805162461bcd60e51b815260206004820152600a60248201526927b7363c9037bbb732b960b11b604482015290519081900360640190fd5b600b80546001600160a01b03199081166001600160a01b039384161791829055600c8054929093169116179055565b600061239f836118dc565b9050806001600160a01b03166123b361382c565b6001600160a01b03161461240e576040805162461bcd60e51b815260206004820152601f60248201527f4552433732313a2063616c6c6572206973206e6f7420746865206f776e657200604482015290519081900360640190fd5b61241782611fcb565b1515600114612464576040805162461bcd60e51b81526020600482015260146024820152734e6f7420612076616c6964206e6577206e616d6560601b604482015290519081900360640190fd5b60026016600085815260200190815260200160002060405180828054600181600116156101000203166002900480156124d45780601f106124b25761010080835404028352918201916124d4565b820191906000526020600020905b8154815290600101906020018083116124c0575b5050915050602060405180830381855afa1580156124f6573d6000803e3d6000fd5b5050506040513d602081101561250b57600080fd5b505160405183516002918591819060208401908083835b602083106125415780518252601f199092019160209182019101612522565b51815160209384036101000a60001901801990921691161790526040519190930194509192505080830381855afa158015612580573d6000803e3d6000fd5b5050506040513d602081101561259557600080fd5b505114156125d45760405162461bcd60e51b81526004018080602001828103825260238152602001806147cb6023913960400191505060405180910390fd5b6125dd826112e9565b15612627576040805162461bcd60e51b815260206004820152601560248201527413985b5948185b1c9958591e481c995cd95c9d9959605a1b604482015290519081900360640190fd5b6000612631611fb1565b905060646002820204810334101561268a576040805162461bcd60e51b8152602060048201526017602482015276125b9cdd59999a58da595b9d0811551208185b5bdd5b9d604a1b604482015290519081900360640190fd5b60008481526016602052604090205460026000196101006001841615020190911604156127535760008481526016602090815260409182902080548351601f6002600019610100600186161502019093169290920491820184900484028101840190945280845261275393928301828280156127475780601f1061271c57610100808354040283529160200191612747565b820191906000526020600020905b81548152906001019060200180831161272a57829003601f168201915b50505050506000613ba1565b61275e836001613ba1565b6000848152601660209081526040909120845161277d9286019061448a565b50837f7e632a301794d8d4a81ea7e20f37d1947158d36e66403af04ba85dd194b66f1b846040518080602001828103825283818151815260200191508051906020019080838360005b838110156127de5781810151838201526020016127c6565b50505050905090810190601f16801561280b5780820380516001836020036101000a031916815260200191505b509250505060405180910390a250505050565b606061282982613819565b6128645760405162461bcd60e51b815260040180806020018281038252602f81526020018061479c602f913960400191505060405180910390fd5b606061286f83613239565b90506060815160001415612901576128868461346c565b60405160200180806225323360e81b81525060030182805190602001908083835b602083106128c65780518252601f1990920191602091820191016128a7565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405290506129de565b61290a8461346c565b8260405160200180806225323360e81b81525060030183805190602001908083835b6020831061294b5780518252601f19909201916020918201910161292c565b51815160209384036101000a60001901801990921691161790526602532302d2532360cc1b919093019081528451600790910192850191508083835b602083106129a65780518252601f199092019160209182019101612987565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405290505b60606040518060400160405280600a8152602001693d913730b6b2911d101160b11b815250905060606040518060e0016040528060aa815260200161484060aa9139905060606040518060600160405280602d8152602001614951602d9139905060606040518060400160405280600f81526020016e1116101134b6b0b3b2911d1299181160891b815250905060606010858786866040516020018086805460018160011615610100020316600290048015612ad15780601f10612aaf576101008083540402835291820191612ad1565b820191906000526020600020905b815481529060010190602001808311612abd575b5050855160208701908083835b60208310612afd5780518252601f199092019160209182019101612ade565b51815160209384036101000a600019018019909216911617905287519190930192870191508083835b60208310612b455780518252601f199092019160209182019101612b26565b51815160209384036101000a600019018019909216911617905286519190930192860191508083835b60208310612b8d5780518252601f199092019160209182019101612b6e565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310612bd55780518252601f199092019160209182019101612bb6565b6001836020036101000a03801982511681845116808217855250505050505090500195505050505050604051602081830303815290604052905080612c198a61346c565b83612c238c611479565b6040516020018085805190602001908083835b60208310612c555780518252601f199092019160209182019101612c36565b51815160209384036101000a600019018019909216911617905287519190930192870191508083835b60208310612c9d5780518252601f199092019160209182019101612c7e565b51815160209384036101000a600019018019909216911617905286519190930192860191508083835b60208310612ce55780518252601f199092019160209182019101612cc6565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310612d2d5780518252601f199092019160209182019101612d0e565b5181516020939093036101000a600019018019909116921691909117905261227d60f01b92019182525060408051808303601d19018152600290920190529e9d5050505050505050505050505050565b6060612d8882613819565b612dd9576040805162461bcd60e51b815260206004820152601f60248201527f55524920717565727920666f72206e6f6e6578697374656e7420746f6b656e00604482015290519081900360640190fd5b6060612de48361346c565b9050601160128260138460146040516020018087805460018160011615610100020316600290048015612e4e5780601f10612e2c576101008083540402835291820191612e4e565b820191906000526020600020905b815481529060010190602001808311612e3a575b505086805460018160011615610100020316600290048015612ea75780601f10612e85576101008083540402835291820191612ea7565b820191906000526020600020905b815481529060010190602001808311612e93575b5050806225323360e81b81525060030185805190602001908083835b60208310612ee25780518252601f199092019160209182019101612ec3565b6001836020036101000a03801982511681845116808217855250505050505090500184805460018160011615610100020316600290048015612f5b5780601f10612f39576101008083540402835291820191612f5b565b820191906000526020600020905b815481529060010190602001808311612f47575b5050806225323360e81b8152506003018380519060200190808383602083106116965780518252601f199092019160209182019101611677565b6060611470612fa48484611448565b61136d565b60005b82518110156111a957612fea612fc061382c565b83858481518110612fcd57fe5b6020026020010151604051806020016040528060008152506122bb565b600101612fac565b600f546001600160a01b031690565b606061300c82613819565b61305d576040805162461bcd60e51b815260206004820152601f60248201527f53564720717565727920666f72206e6f6e6578697374656e7420746f6b656e00604482015290519081900360640190fd5b60606130688361136d565b9050601281601383601460405160200180868054600181600116156101000203166002900480156130d05780601f106130ae5761010080835404028352918201916130d0565b820191906000526020600020905b8154815290600101906020018083116130bc575b5050855160208701908083835b602083106130fc5780518252601f1990920191602091820191016130dd565b6001836020036101000a038019825116818451168082178552505050505050905001848054600181600116156101000203166002900480156131755780601f10613153576101008083540402835291820191613175565b820191906000526020600020905b815481529060010190602001808311613161575b5050835160208501908083835b602083106131a15780518252601f199092019160209182019101613182565b6001836020036101000a0380198251168184511680821785525050505050509050018280546001816001161561010002031660029004801561321a5780601f106131f857610100808354040283529182019161321a565b820191906000526020600020905b815481529060010190602001808311613206575b505060408051601f198184030181529190529998505050505050505050565b60008181526016602090815260409182902080548351601f60026000196101006001861615020190931692909204918201849004840281018401909452808452606093928301828280156132ce5780601f106132a3576101008083540402835291602001916132ce565b820191906000526020600020905b8154815290600101906020018083116132b157829003601f168201915b50505050509050919050565b600b546001600160a01b031681565b60608060405180610100016040528060d381526020016145c760d39139905060606040518060a00160405280606781526020016148ea60679139905060606010838360405160200180848054600181600116156101000203166002900480156133895780601f10613367576101008083540402835291820191613389565b820191906000526020600020905b815481529060010190602001808311613375575b5050835160208501908083835b602083106133b55780518252601f199092019160209182019101613396565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106133fd5780518252601f1990920191602091820191016133de565b6001836020036101000a0380198251168184511680821785525050505050509050019350505050604051602081830303815290604052905080935050505090565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b6060630100000082106134be576040805162461bcd60e51b81526020600482015260156024820152740c8d0b589a5d0818dbdb1bdc88195e18d959591959605a1b604482015290519081900360640190fd5b604080518082018252601081526f181899199a1a9b1b9c1ca0a121a222a360811b60208201528151603380825260608281019094528593919060208201818036833701905050905060115b60148110156135d2578260048583600c016020811061352457fe5b1a60f81b6001600160f81b031916901c60f81c60ff168151811061354457fe5b602001015160f81c60f81b82826002028151811061355e57fe5b60200101906001600160f81b031916908160001a905350828482600c016020811061358557fe5b825191901a600f1690811061359657fe5b602001015160f81c60f81b8282600202600101815181106135b357fe5b60200101906001600160f81b031916908160001a905350600101613509565b50949350505050565b600d546001600160a01b03163314613626576040805162461bcd60e51b81526020600482015260096024820152684f6e6c79207361666560b81b604482015290519081900360640190fd5b600d54604080516323b872dd60e01b81523060048201526001600160a01b039283166024820152604481018490529051918416916323b872dd9160648082019260009290919082900301818387803b15801561368157600080fd5b505af1158015613695573d6000803e3d6000fd5b505050505050565b606060006136aa83611ab8565b90506060816136bc579150610fc69050565b60005b828110156112e15760606136d6612fa48784611448565b90508161374b57806040516020018082805190602001908083835b602083106137105780518252601f1990920191602091820191016136f1565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040529250613810565b82816040516020018083805190602001908083835b6020831061377f5780518252601f199092019160209182019101613760565b6001836020036101000a03801982511681845116808217855250505050505090500180600b60fa1b81525060010182805190602001908083835b602083106137d85780518252601f1990920191602091820191016137b9565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292505b506001016136bf565b600061147360028363ffffffff613c1d16565b3390565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190613865826118dc565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600061147382613c29565b60006138b482613819565b6138ef5760405162461bcd60e51b815260040180806020018281038252602c81526020018061459b602c913960400191505060405180910390fd5b60006138fa836118dc565b9050806001600160a01b0316846001600160a01b031614806139355750836001600160a01b031661392a84611071565b6001600160a01b0316145b806139455750613945818561343e565b949350505050565b826001600160a01b0316613960826118dc565b6001600160a01b0316146139a55760405162461bcd60e51b81526004018080602001828103825260298152602001806147736029913960400191505060405180910390fd5b6001600160a01b0382166139ea5760405162461bcd60e51b81526004018080602001828103825260248152602001806145776024913960400191505060405180910390fd5b6139f58383836111a9565b613a00600082613830565b6001600160a01b0383166000908152600160205260409020613a28908263ffffffff613c2d16565b506001600160a01b0382166000908152600160205260409020613a51908263ffffffff613c3916565b50613a646002828463ffffffff613c4516565b5080826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a4505050565b60006114708383613c5b565b6000808080613ac68686613cbf565b9097909650945050505050565b6000613ae0848484613d3a565b90505b9392505050565b63010000008110613b42576040805162461bcd60e51b815260206004820152601860248201527f546f6b656e4944206578636565647320706f737369626c650000000000000000604482015290519081900360640190fd5b613b4c3382613e04565b50565b613b5a84848461394d565b613b6684848484613e1e565b6123135760405162461bcd60e51b81526004018080602001828103825260328152602001806145456032913960400191505060405180910390fd5b806017613bad84611e2e565b6040518082805190602001908083835b60208310613bdc5780518252601f199092019160209182019101613bbd565b51815160209384036101000a60001901801990921691161790529201948552506040519384900301909220805460ff19169315159390931790925550505050565b60006114708383613f9e565b5490565b60006114708383613fb6565b6000611470838361407c565b6000613ae084846001600160a01b0385166140c6565b81546000908210613c9d5760405162461bcd60e51b81526004018080602001828103825260228152602001806145236022913960400191505060405180910390fd5b826000018281548110613cac57fe5b9060005260206000200154905092915050565b815460009081908310613d035760405162461bcd60e51b81526004018080602001828103825260228152602001806147256022913960400191505060405180910390fd5b6000846000018481548110613d1457fe5b906000526020600020906002020190508060000154816001015492509250509250929050565b60008281526001840160205260408120548281613dd55760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613d9a578181015183820152602001613d82565b50505050905090810190601f168015613dc75780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50846000016001820381548110613de857fe5b9060005260206000209060020201600101549150509392505050565b6117b482826040518060200160405280600081525061415d565b6000613e32846001600160a01b03166141af565b613e3e57506001613945565b6060613f64630a85bd0160e11b613e5361382c565b88878760405160240180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015613ecc578181015183820152602001613eb4565b50505050905090810190601f168015613ef95780820380516001836020036101000a031916815260200191505b5095505050505050604051602081830303815290604052906001600160e01b0319166020820180516001600160e01b038381831617835250505050604051806060016040528060328152602001614545603291396001600160a01b038816919063ffffffff6141b516565b90506000818060200190516020811015613f7d57600080fd5b50516001600160e01b031916630a85bd0160e11b1492505050949350505050565b60009081526001919091016020526040902054151590565b600081815260018301602052604081205480156140725783546000198083019190810190600090879083908110613fe957fe5b906000526020600020015490508087600001848154811061400657fe5b60009182526020808320909101929092558281526001898101909252604090209084019055865487908061403657fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050611473565b6000915050611473565b60006140888383613f9e565b6140be57508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155611473565b506000611473565b60008281526001840160205260408120548061412b575050604080518082018252838152602080820184815286546001818101895560008981528481209551600290930290950191825591519082015586548684528188019092529290912055613ae3565b8285600001600183038154811061413e57fe5b9060005260206000209060020201600101819055506000915050613ae3565b61416783836141c4565b6141746000848484613e1e565b6111a95760405162461bcd60e51b81526004018080602001828103825260328152602001806145456032913960400191505060405180910390fd5b3b151590565b6060613ae084846000856142fe565b6001600160a01b03821661421f576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b61422881613819565b1561427a576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b614286600083836111a9565b6001600160a01b03821660009081526001602052604090206142ae908263ffffffff613c3916565b506142c16002828463ffffffff613c4516565b5060405181906001600160a01b038416906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6060614309856141af565b61435a576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106143995780518252601f19909201916020918201910161437a565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146143fb576040519150601f19603f3d011682016040523d82523d6000602084013e614400565b606091505b509150915081156144145791506139459050565b8051156144245780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315613d9a578181015183820152602001613d82565b6040518061020001604052806010906020820280368337509192915050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106144cb57805160ff19168380011785556144f8565b828001600101855582156144f8579182015b828111156144f85782518255916020019190600101906144dd565b50614504929150614508565b5090565b610fd891905b80821115614504576000815560010161450e56fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e64734552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724552433732313a207472616e7366657220746f20746865207a65726f20616464726573734552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e7b226e616d65223a25323022436f6c6f727665727365253230546f6b656e732532302852474229222c253230226465736372697074696f6e223a25323022416c6c253230436f6c6f72732e253230546f6b656e73697a65642e25323046696e64253230796f7572253230636f6c6f72732e2532304f776e253230796f7572253230636f6c6f72732e25323054686525323066697273742532306d6574612d4e4654253230666f7225323067656e657261746976652c2532306f6e2d636861696e2532306172742532302d253230312f312e222c4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e456e756d657261626c654d61703a20696e646578206f7574206f6620626f756e64734552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656e4e6577206e616d652069732073616d65206173207468652063757272656e74206f6e654552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564222c20226465736372697074696f6e223a25323022416c6c253230436f6c6f72732e253230546f6b656e73697a65642e25323046696e64253230796f7572253230636f6c6f72732e2532304f776e253230796f7572253230636f6c6f72732e25323054686525323066697273742532306d6574612d4e4654253230666f7225323067656e657261746976652c2532306f6e2d636861696e2532306172742532302d253230312f312e222c22696d616765223a2532302268747470733a2f2f7777772e636f6c6f7276657273652e696f2f636f6c6f7276657273652e706e67222c2532302265787465726e616c5f75726c223a2532302268747470733a2f2f7777772e636f6c6f7276657273652e696f227d2265787465726e616c5f75726c223a2532302268747470733a2f2f7777772e636f6c6f7276657273652e696f2fa264697066735822122010d11e2d134fef8b54ad43ca2c676e0d2400cb6f7e5426b70cd31498b578d98b64736f6c63430006070033
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.