Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
Overview
Max Total Supply
32 MDLMGE
Holders
27
Total Transfers
-
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
MandalaMerge
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.8.17; //SPDX-License-Identifier: MIT import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./RLPReader.sol"; import './MandalaMetadata.sol'; // GET LISTED ON OPENSEA: https://testnets.opensea.io/get-listed/step-two error DoneMinting(); error MintNotEnough(); error CouldNotSend(); error CouldNotSendBuildGuidl(); error NotExists(); error AlreadyClaimed(); error NotClaimed(); error FutureBlockNotReached(); error MissedClaimWindow(); error ClaimWrongBlock(); error ClaimWrongBlockHeader(); error OnlyMintPostMerge(); contract MandalaMerge is ERC721Enumerable, Ownable { using RLPReader for RLPReader.RLPItem; using RLPReader for bytes; using Strings for uint256; using Counters for Counters.Counter; Counters.Counter private _tokenIds; event MandalaClaim(uint256 indexed tokenId); // 50% go to buidlguidl.eth address payable public constant buidlguidl = payable(0x97843608a00e2bbc75ab0C1911387E002565DEDE); address payable public constant recipient = payable(0x4762434888721F067F7d5BefA6eC1F8EE447a387); uint256 public constant limit = 1111; uint256 public constant step = 0.0001 ether; uint256 public price = 0.01 ether; uint256 public constant futureBlocks = 10; // tokenId -> mint block number mapping (uint256 => uint256) public blockNumbers; mapping (uint256 => bool) public claimed; mapping (uint256 => bytes32) public genes; constructor() ERC721("MandalaMerge", "MDLMGE") { } function mintItem() public payable returns (uint256) { if (!mergeHasOccured()) revert OnlyMintPostMerge(); if (_tokenIds.current() >= limit) revert DoneMinting(); if (msg.value < price) revert MintNotEnough(); price = price + step; _tokenIds.increment(); uint256 id = _tokenIds.current(); _mint(msg.sender, id); blockNumbers[id] = block.number; genes[id] = keccak256(abi.encodePacked(id, blockhash(block.number-1), msg.sender, address(this))); uint256 half = msg.value / 2; (bool successBuildGuidl, ) = buidlguidl.call{value: half}(""); if (!successBuildGuidl) revert CouldNotSendBuildGuidl(); (bool success, ) = recipient.call{value: msg.value - half}(""); if (!success) revert CouldNotSend(); return id; } /** * @notice Determine whether we're running in Proof of Work or Proof of Stake * @dev Post-merge, the DIFFICULTY opcode gets renamed to PREVRANDAO, * and stores the prevRandao field from the beacon chain state if EIP-4399 is finalized. * If not, the difficulty number must be 0 according to EIP-3675, so both possibilities are * checked here. */ function mergeHasOccured() public view returns (bool) { return block.difficulty > 2**64 || block.difficulty == 0; } function claim(uint256 id, bytes memory rlpBytes) external { if (!_exists(id)) revert NotExists(); if (claimed[id]) revert AlreadyClaimed(); if (block.number < blockNumbers[id] + futureBlocks) revert FutureBlockNotReached(); if (block.number >= blockNumbers[id] + futureBlocks + 256) revert MissedClaimWindow(); RLPReader.RLPItem[] memory ls = rlpBytes.toRlpItem().toList(); // we have to use mixHash on PoS networks -> https://eips.ethereum.org/EIPS/eip-4399 bytes memory mixHash = ls[13].toBytes(); uint256 blockNumber = ls[8].toUint(); if (blockNumber != blockNumbers[id] + futureBlocks) revert ClaimWrongBlock(); if (blockhash(blockNumber) != keccak256(rlpBytes)) revert ClaimWrongBlockHeader(); genes[id] = keccak256(abi.encodePacked(id, mixHash, address(this), msg.sender)); claimed[id] = true; emit MandalaClaim(id); } function tokenURI(uint256 id) public view override returns (string memory) { if (!_exists(id)) revert NotExists(); if (claimed[id] || block.number >= blockNumbers[id] + futureBlocks + 256) { return MandalaMetadata.tokenURI(id, ownerOf(id), claimed[id], generateSVGofTokenById(id)); } revert NotClaimed(); } function generateSVGofTokenById(uint256 id) internal view returns (string memory) { string memory svg = string(abi.encodePacked( '<svg viewBox="0 0 1200 1200" xmlns="http://www.w3.org/2000/svg">', renderTokenById(id), '</svg>' )); return svg; } // Visibility is `public` to enable it being called by other contracts for composition. // See https://eips.ethereum.org/EIPS/eip-4883 function renderTokenById(uint256 id) public view returns (string memory) { if (!_exists(id)) revert NotExists(); if (claimed[id]) { return MandalaMetadata.renderMandalaById(genes[id]); } if (block.number >= blockNumbers[id] + futureBlocks + 256) { return MandalaMetadata.renderUnclaimedMandalaById(genes[id]); } revert NotClaimed(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _setOwner(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _setOwner(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: Apache-2.0 /* * @author Hamdi Allam [email protected] * Please reach out with any questions or concerns */ pragma solidity >=0.8.0 <0.9.0; library RLPReader { uint8 constant STRING_SHORT_START = 0x80; uint8 constant STRING_LONG_START = 0xb8; uint8 constant LIST_SHORT_START = 0xc0; uint8 constant LIST_LONG_START = 0xf8; uint8 constant WORD_SIZE = 32; struct RLPItem { uint len; uint memPtr; } /* * @param item RLP encoded bytes */ function toRlpItem(bytes memory item) internal pure returns (RLPItem memory) { uint memPtr; assembly { memPtr := add(item, 0x20) } return RLPItem(item.length, memPtr); } /* * @param the RLP item. */ function rlpLen(RLPItem memory item) internal pure returns (uint) { return item.len; } /* * @param the RLP item. * @return (memPtr, len) pair: location of the item's payload in memory. */ function payloadLocation(RLPItem memory item) internal pure returns (uint, uint) { uint offset = _payloadOffset(item.memPtr); uint memPtr = item.memPtr + offset; uint len = item.len - offset; // data length return (memPtr, len); } /* * @param the RLP item. */ function payloadLen(RLPItem memory item) internal pure returns (uint) { (, uint len) = payloadLocation(item); return len; } /* * @param the RLP item containing the encoded list. */ function toList(RLPItem memory item) internal pure returns (RLPItem[] memory) { require(isList(item)); uint items = numItems(item); RLPItem[] memory result = new RLPItem[](items); uint memPtr = item.memPtr + _payloadOffset(item.memPtr); uint dataLen; for (uint i = 0; i < items; i++) { dataLen = _itemLength(memPtr); result[i] = RLPItem(dataLen, memPtr); memPtr = memPtr + dataLen; } return result; } // @return indicator whether encoded payload is a list. negate this function call for isData. function isList(RLPItem memory item) internal pure returns (bool) { if (item.len == 0) return false; uint8 byte0; uint memPtr = item.memPtr; assembly { byte0 := byte(0, mload(memPtr)) } if (byte0 < LIST_SHORT_START) return false; return true; } /** RLPItem conversions into data types **/ function toUint(RLPItem memory item) internal pure returns (uint) { require(item.len > 0 && item.len <= 33); (uint memPtr, uint len) = payloadLocation(item); uint result; assembly { result := mload(memPtr) // shfit to the correct location if neccesary if lt(len, 32) { result := div(result, exp(256, sub(32, len))) } } return result; } function toBytes(RLPItem memory item) internal pure returns (bytes memory) { require(item.len > 0); (uint memPtr, uint len) = payloadLocation(item); bytes memory result = new bytes(len); uint destPtr; assembly { destPtr := add(0x20, result) } copy(memPtr, destPtr, len); return result; } /* * Private Helpers */ // @return number of payload items inside an encoded list. function numItems(RLPItem memory item) private pure returns (uint) { if (item.len == 0) return 0; uint count = 0; uint currPtr = item.memPtr + _payloadOffset(item.memPtr); uint endPtr = item.memPtr + item.len; while (currPtr < endPtr) { currPtr = currPtr + _itemLength(currPtr); // skip over an item count++; } return count; } // @return entire rlp item byte length function _itemLength(uint memPtr) private pure returns (uint) { uint itemLen; uint byte0; assembly { byte0 := byte(0, mload(memPtr)) } if (byte0 < STRING_SHORT_START) itemLen = 1; else if (byte0 < STRING_LONG_START) itemLen = byte0 - STRING_SHORT_START + 1; else if (byte0 < LIST_SHORT_START) { assembly { let byteLen := sub(byte0, 0xb7) // # of bytes the actual length is memPtr := add(memPtr, 1) // skip over the first byte /* 32 byte word size */ let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to get the len itemLen := add(dataLen, add(byteLen, 1)) } } else if (byte0 < LIST_LONG_START) { itemLen = byte0 - LIST_SHORT_START + 1; } else { assembly { let byteLen := sub(byte0, 0xf7) memPtr := add(memPtr, 1) let dataLen := div(mload(memPtr), exp(256, sub(32, byteLen))) // right shifting to the correct length itemLen := add(dataLen, add(byteLen, 1)) } } return itemLen; } // @return number of bytes until the data function _payloadOffset(uint memPtr) private pure returns (uint) { uint byte0; assembly { byte0 := byte(0, mload(memPtr)) } if (byte0 < STRING_SHORT_START) return 0; else if (byte0 < STRING_LONG_START || (byte0 >= LIST_SHORT_START && byte0 < LIST_LONG_START)) return 1; else if (byte0 < LIST_SHORT_START) // being explicit return byte0 - (STRING_LONG_START - 1) + 1; else return byte0 - (LIST_LONG_START - 1) + 1; } /* * @param src Pointer to source * @param dest Pointer to destination * @param len Amount of memory to copy from the source */ function copy(uint src, uint dest, uint len) private pure { if (len == 0) return; // copy as many word sizes as possible for (; len >= WORD_SIZE; len -= WORD_SIZE) { assembly { mstore(dest, mload(src)) } src += WORD_SIZE; dest += WORD_SIZE; } if (len > 0) { // left over bytes. Mask is used to remove unwanted bytes from the word uint mask = 256 ** (WORD_SIZE - len) - 1; assembly { let srcpart := and(mload(src), not(mask)) // zero out src let destpart := and(mload(dest), mask) // retrieve the bytes mstore(dest, or(destpart, srcpart)) } } } }
//SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/utils/Strings.sol"; import 'base64-sol/base64.sol'; import './ToColor.sol'; import './HexStrings.sol'; library MandalaMetadata { using Strings for uint256; using Strings for uint8; using ToColor for bytes3; using HexStrings for uint160; function tokenURI(uint256 id, address owner, bool claimed, string memory svg) public pure returns (string memory) { string memory name = string(abi.encodePacked('Mandala Merge #',id.toString())); string memory description = string(abi.encodePacked('Random on-chain Mandala Merge animated SVG NFT')); string memory image = Base64.encode(bytes(svg)); string memory claimedBoolean = 'false'; if (claimed) { claimedBoolean = 'true'; } return string( abi.encodePacked( 'data:application/json;base64,', Base64.encode( bytes( abi.encodePacked( '{"name":"', name, '", "description":"', description, '", "external_url":"https://mandalamerge.com/token/', id.toString(), '", "attributes": [{"trait_type": "claimed", "value": ', claimedBoolean, '}], "owner":"', uint160(owner).toHexString(20), '", "image": "', 'data:image/svg+xml;base64,', image, '"}' ) ) ) ) ); } function renderMandalaById(bytes32 genes) public pure returns (string memory) { string memory render = string.concat('<defs><g id="svg-group">'); for (uint i = 0; i < 5; i++) { render = string.concat( render, '<circle cx="', uint8(genes[(i*6)+3]).toString(), '" cy="', uint8(genes[(i*6)+4]).toString(), '" r="', uint8(genes[(i*6)+5]).toString(), '" stroke="#', (bytes2(genes[(i*6)+0]) | (bytes2(genes[(i*6)+1]) >> 8) | (bytes3(genes[(i*6)+2]) >> 16)).toColor(), '" fill-opacity="0">', '<animate attributeName="r" begin="0s" dur="5s" repeatCount="indefinite" values="', uint8(genes[(i*6)+5]).toString(), ';', uint8(genes[(i*6)+5]) > 10 ? (uint8(genes[(i*6)+5]) - 10).toString() : '0', ';', uint8(genes[(i*6)+5]) > 20 ? (uint8(genes[(i*6)+5]) - 20).toString() : '0', ';', uint8(genes[(i*6)+5]) > 10 ? (uint8(genes[(i*6)+5]) - 10).toString() : '0', ';', uint8(genes[(i*6)+5]).toString(), '"/>', '</circle>' ); } render = string.concat( render, '</g></defs>', '<g id="svg-mandala" transform="translate(600, 600)"><g id="svg-layer">' ); for (uint i = 0; i < 72; i++) { render = string.concat(render, '<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#svg-group" transform="rotate(',(i*5).toString(),')"/>'); } render = string.concat(render, '</g></g>'); return render; } function renderUnclaimedMandalaById(bytes32 genes) public pure returns (string memory) { string memory render = string.concat('<defs><g id="svg-group">'); render = string.concat( render, '<circle cx="', uint8(genes[3]).toString(), '" cy="', uint8(genes[4]).toString(), '" r="', uint8(genes[5]).toString(), '" stroke="#', (bytes2(genes[0]) | (bytes2(genes[1]) >> 8) | (bytes3(genes[2]) >> 16)).toColor(), '" fill-opacity="0">', '<animate attributeName="r" begin="0s" dur="5s" repeatCount="indefinite" values="', uint8(genes[5]).toString(), ';', uint8(genes[5]) > 10 ? (uint8(genes[5]) - 10).toString() : '0', ';', uint8(genes[5]) > 20 ? (uint8(genes[5]) - 20).toString() : '0', ';', uint8(genes[5]) > 10 ? (uint8(genes[5]) - 10).toString() : '0', ';', uint8(genes[5]).toString(), '"/>', '</circle>' ); render = string.concat( render, '</g></defs>', '<g id="svg-mandala" transform="translate(600, 600)"><g id="svg-layer">' ); for (uint i = 0; i < 72; i++) { render = string.concat(render, '<use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#svg-group" transform="rotate(',(i*5).toString(),')"/>'); } render = string.concat(render, '</g></g>'); return render; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; /// @title Base64 /// @author Brecht Devos - <[email protected]> /// @notice Provides functions for encoding/decoding base64 library Base64 { string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; bytes internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000" hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000" hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000" hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000"; function encode(bytes memory data) internal pure returns (string memory) { if (data.length == 0) return ''; // load the table into memory string memory table = TABLE_ENCODE; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((data.length + 2) / 3); // add some extra buffer at the end required for the writing string memory result = new string(encodedLen + 32); assembly { // set the actual output length mstore(result, encodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 3 bytes at a time for {} lt(dataPtr, endPtr) {} { // read 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // write 4 characters mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and( input, 0x3F)))) resultPtr := add(resultPtr, 1) } // padding with '=' switch mod(mload(data), 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } } return result; } function decode(string memory _data) internal pure returns (bytes memory) { bytes memory data = bytes(_data); if (data.length == 0) return new bytes(0); require(data.length % 4 == 0, "invalid base64 decoder input"); // load the table into memory bytes memory table = TABLE_DECODE; // every 4 characters represent 3 bytes uint256 decodedLen = (data.length / 4) * 3; // add some extra buffer at the end required for the writing bytes memory result = new bytes(decodedLen + 32); assembly { // padding with '=' let lastBytes := mload(add(data, mload(data))) if eq(and(lastBytes, 0xFF), 0x3d) { decodedLen := sub(decodedLen, 1) if eq(and(lastBytes, 0xFFFF), 0x3d3d) { decodedLen := sub(decodedLen, 1) } } // set the actual output length mstore(result, decodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 4 characters at a time for {} lt(dataPtr, endPtr) {} { // read 4 characters dataPtr := add(dataPtr, 4) let input := mload(dataPtr) // write 3 bytes let output := add( add( shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)), shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))), add( shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)), and(mload(add(tablePtr, and( input , 0xFF))), 0xFF) ) ) mstore(resultPtr, shl(232, output)) resultPtr := add(resultPtr, 3) } } return result; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library ToColor { bytes16 internal constant ALPHABET = '0123456789abcdef'; function toColor(bytes3 value) internal pure returns (string memory) { bytes memory buffer = new bytes(6); for (uint256 i = 0; i < 3; i++) { buffer[i*2+1] = ALPHABET[uint8(value[i]) & 0xf]; buffer[i*2] = ALPHABET[uint8(value[i]>>4) & 0xf]; } return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library HexStrings { bytes16 internal constant ALPHABET = '0123456789abcdef'; function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = '0'; buffer[1] = 'x'; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = ALPHABET[value & 0xf]; value >>= 4; } return string(buffer); } }
{ "viaIR": true, "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": { "contracts/MandalaMetadata.sol": { "MandalaMetadata": "0x1cbaaae76bc0c8067bc62ed53111b4c7d78690d3" } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AlreadyClaimed","type":"error"},{"inputs":[],"name":"ClaimWrongBlock","type":"error"},{"inputs":[],"name":"ClaimWrongBlockHeader","type":"error"},{"inputs":[],"name":"CouldNotSend","type":"error"},{"inputs":[],"name":"CouldNotSendBuildGuidl","type":"error"},{"inputs":[],"name":"DoneMinting","type":"error"},{"inputs":[],"name":"FutureBlockNotReached","type":"error"},{"inputs":[],"name":"MintNotEnough","type":"error"},{"inputs":[],"name":"MissedClaimWindow","type":"error"},{"inputs":[],"name":"NotClaimed","type":"error"},{"inputs":[],"name":"NotExists","type":"error"},{"inputs":[],"name":"OnlyMintPostMerge","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"MandalaClaim","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":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"blockNumbers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buidlguidl","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"bytes","name":"rlpBytes","type":"bytes"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"futureBlocks","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"genes","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"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":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"limit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mergeHasOccured","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"mintItem","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"recipient","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"renderTokenById","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"step","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60803462000367576001600160401b039060408181018381118382101762000351578152600c82526020916b4d616e64616c614d6572676560a01b83820152815193828501858110828211176200035157835260068552654d444c4d474560d01b84860152815181811162000351576000948554916001948584811c9416801562000346575b8385101462000332578190601f94858111620002df575b5083908583116001146200027b5789926200026f575b5050600019600383901b1c191690851b1786555b86519283116200025b5783548481811c9116801562000250575b828210146200023c57828111620001f4575b50809183116001146200018d57508495829394959262000181575b5050600019600383901b1c191690821b1790555b600a8054336001600160a01b03198216811790925591519290916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09080a3662386f26fc10000600c556127f890816200036d8239f35b0151905038806200010d565b90601f198316968487528287209287905b898210620001dc575050838596979810620001c2575b505050811b01905562000121565b015160001960f88460031b161c19169055388080620001b4565b8087859682949686015181550195019301906200019e565b8487528187208380860160051c82019284871062000232575b0160051c019085905b82811062000226575050620000f2565b88815501859062000216565b925081926200020d565b634e487b7160e01b87526022600452602487fd5b90607f1690620000e0565b634e487b7160e01b86526041600452602486fd5b015190503880620000b2565b898052848a208894509190601f1984168b5b87828210620002c85750508411620002ae575b505050811b018655620000c6565b015160001960f88460031b161c19169055388080620002a0565b8385015186558b979095019493840193016200028d565b9091508880528389208580850160051c82019286861062000328575b918991869594930160051c01915b828110620003195750506200009c565b8b815585945089910162000309565b92508192620002fb565b634e487b7160e01b88526022600452602488fd5b93607f169362000085565b634e487b7160e01b600052604160045260246000fd5b600080fdfe60806040526004361015610013575b600080fd5b60003560e01c806301ffc9a71461029357806306fdde031461028a578063081812fc14610281578063095ea7b31461027857806318160ddd1461026f5780631f399a991461026657806323b872dd1461025d5780632f745c591461025457806338926b6d1461024b57806342842e0e146102425780634f359a37146102395780634f6ccce7146102305780636352211e1461022757806366d003ac1461021e57806370a0823114610215578063715018a61461020c5780638da5cb5b1461020357806395d89b41146101fa578063a035b1fe146101f1578063a22cb465146101e8578063a2d6c6da146101df578063a4d66daf146101d6578063ab1aa1c5146101cd578063b88d4fde146101c4578063c87b56dd146101bb578063cd8bff33146101b2578063d6ddb620146101a9578063dbe7e3bd146101a0578063e25fe17514610197578063e985e9c51461018e578063eb93406b146101855763f2fde38b1461017d57600080fd5b61000e6111b0565b5061000e611010565b5061000e610fb2565b5061000e610f90565b5061000e610f5e565b5061000e610f38565b5061000e610f0b565b5061000e610eeb565b5061000e610e9b565b5061000e610e6e565b5061000e610e50565b5061000e610e1c565b5061000e610d2f565b5061000e610d10565b5061000e610c4e565b5061000e610c24565b5061000e610bc2565b5061000e610b96565b5061000e610b66565b5061000e610b47565b5061000e610a9b565b5061000e610a7e565b5061000e610a36565b5061000e610830565b5061000e610699565b5061000e61066f565b5061000e61060a565b5061000e6105eb565b5061000e6104fb565b5061000e61049e565b5061000e610393565b5061000e6102ae565b6001600160e01b031981160361000e57565b503461000e57602036600319011261000e5760206004356102ce8161029c565b63ffffffff60e01b1663780e9d6360e01b81149081156102f4575b506040519015158152f35b6380ac58cd60e01b811491508115610326575b8115610315575b50386102e9565b6301ffc9a760e01b1490503861030e565b635b5e139f60e01b81149150610307565b60005b83811061034a5750506000910152565b818101518382015260200161033a565b9060209161037381518092818552858086019101610337565b601f01601f1916010190565b90602061039092818152019061035a565b90565b503461000e5760008060031936011261049b57604051908080549060019180831c92808216928315610491575b602092838610851461047d57858852602088019490811561045c5750600114610404575b610400876103f48189038261078d565b6040519182918261037f565b0390f35b6000805294509192917f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b83861061044b57505050910190506103f48261040038806103e4565b80548587015294820194810161042f565b60ff191685525050505090151560051b0190506103f48261040038806103e4565b634e487b7160e01b82526022600452602482fd5b93607f16936103c0565b80fd5b503461000e57602036600319011261000e5760206104bd60043561143d565b6040516001600160a01b039091168152f35b600435906001600160a01b038216820361000e57565b602435906001600160a01b038216820361000e57565b503461000e57604036600319011261000e576105156104cf565b60243561052181611353565b916001600160a01b03808416908216811461059c576105539361054e913314908115610555575b506113cb565b61197c565b005b6001600160a01b03166000908152600560205260409020610596915061058f9033905b9060018060a01b0316600052602052604060002090565b5460ff1690565b38610548565b60405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608490fd5b503461000e57600036600319011261000e576020600854604051908152f35b503461000e57600036600319011261000e5760206040517397843608a00e2bbc75ab0c1911387e002565dede8152f35b606090600319011261000e576001600160a01b0390600435828116810361000e5791602435908116810361000e579060443590565b503461000e576105536106813661063a565b9161069461068f84336115d0565b6114cf565b6117e3565b503461000e57604036600319011261000e576106b36104cf565b602435906106c0816112db565b8210156106f4576001600160a01b031660009081526006602090815260408083209383529281529082902054915191825290f35b60405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608490fd5b50634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761078057604052565b61078861074d565b604052565b90601f8019910116810190811067ffffffffffffffff82111761078057604052565b604051906107bc82610764565b565b60209067ffffffffffffffff81116107dc575b601f01601f19160190565b6107e461074d565b6107d1565b81601f8201121561000e57803590610800826107be565b9261080e604051948561078d565b8284526020838301011161000e57816000926020809301838601378301015290565b503461000e5760408060031936011261000e57600480359160243567ffffffffffffffff811161000e5761086790369084016107e9565b6000848152600260205260409020549092906001600160a01b03161561088c565b1590565b610a28576108a761058f85600052600e602052604060002090565b610a1a576108c86108c285600052600d602052604060002090565b54611798565b4310610a0c576108ed6108e86108c286600052600d602052604060002090565b6117a6565b4310156109fe5761090561090084612359565b6123be565b9261092a61092461091e61091887611f89565b51612540565b95611fa7565b516124b8565b906109426108c287600052600d602052604060002090565b82036109ee57602081519101209040036109e057505161097d8161096f6020820194339030908888611fdb565b03601f19810183528261078d565b51902061099482600052600f602052604060002090565b556109b96109ac82600052600e602052604060002090565b805460ff19166001179055565b7fb2abe4a475394d118f968c0e26cad10fbf34ea450ba93acb6a22740068e19299600080a2005b90516365899bc960e01b8152fd5b8351637c0f286360e11b81528390fd5b905163675ef9c160e01b8152fd5b905163848fa00360e01b8152fd5b9051630c8d9eab60e31b8152fd5b9051635861b41d60e01b8152fd5b503461000e57610553610a483661063a565b90604051926020840184811067ffffffffffffffff821117610a71575b60405260008452611535565b610a7961074d565b610a65565b503461000e57600036600319011261000e576020604051600a8152f35b503461000e57602036600319011261000e57600435600854811015610aed5760086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30154604051908152602090f35b60405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608490fd5b503461000e57602036600319011261000e5760206104bd600435611353565b503461000e57600036600319011261000e576020604051734762434888721f067f7d5befa6ec1f8ee447a3878152f35b503461000e57602036600319011261000e576020610bba610bb56104cf565b6112db565b604051908152f35b503461000e5760008060031936011261049b57600a5481906001600160a01b03811690610bf0338314611247565b6001600160a01b031916600a557f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461000e57600036600319011261000e57600a546040516001600160a01b039091168152602090f35b503461000e5760008060031936011261049b576040519080600190815480831c92808216928315610d06575b602092838610851461047d57858852602088019490811561045c5750600114610cad57610400876103f48189038261078d565b600160005294509192917fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b838610610cf557505050910190506103f48261040038806103e4565b805485870152948201948101610cd9565b93607f1693610c7a565b503461000e57600036600319011261000e576020600c54604051908152f35b503461000e57604036600319011261000e57610d496104cf565b602435801515810361000e576001600160a01b03821691338314610dd75781610d94610da59233600052600560205260406000209060018060a01b0316600052602052604060002090565b9060ff801983541691151516179055565b604051901515815233907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190602090a3005b60405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606490fd5b503461000e57602036600319011261000e57610400610e3c600435612263565b60405191829160208352602083019061035a565b503461000e57600036600319011261000e5760206040516104578152f35b503461000e57602036600319011261000e57600435600052600f6020526020604060002054604051908152f35b503461000e57608036600319011261000e57610eb56104cf565b610ebd6104e5565b6064359167ffffffffffffffff831161000e57610ee16105539336906004016107e9565b9160443591611535565b503461000e57602036600319011261000e57610400610e3c6004356120ad565b503461000e57602036600319011261000e57600435600052600d6020526020604060002054604051908152f35b503461000e57600036600319011261000e576020610f54611f73565b6040519015158152f35b503461000e57602036600319011261000e57600435600052600e602052602060ff604060002054166040519015158152f35b503461000e57600036600319011261000e576020604051655af3107a40008152f35b503461000e57604036600319011261000e57602060ff611004610fd36104cf565b610fdb6104e5565b6001600160a01b0391821660009081526005865260408082209290931681526020919091522090565b54166040519015158152f35b5060008060031936011261049b57611029610888611f73565b61119e57610457600b54101561118c57600c5480341061117a5761104f611054916117b5565b600c55565b6110626001600b5401600b55565b600b54906110708233611e4f565b4361108583600052600d602052604060002090565b5561108f4361172a565b60408051602081018581529240918101919091526bffffffffffffffffffffffff1933606090811b82168184015230901b1660748201526110d3816088810161096f565b5190206110ea83600052600f602052604060002090565b553460011c81808080847397843608a00e2bbc75ab0c1911387e002565dede5af1611113611a33565b501561116857818061112681933461178b565b734762434888721f067f7d5befa6ec1f8ee447a3875af1611145611a33565b501561115657604051908152602090f35b604051630d0532c360e31b8152600490fd5b6040516316d0455b60e01b8152600490fd5b6040516301bcb9eb60e11b8152600490fd5b60405163082115e160e31b8152600490fd5b6040516313a5d04f60e01b8152600490fd5b503461000e57602036600319011261000e576111ca6104cf565b600a546001600160a01b03906111e39082163314611247565b8116156111f35761055390611292565b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b1561124e57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b600a80546001600160a01b039283166001600160a01b0319821681179092559091167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b6001600160a01b031680156112fb57600052600360205260406000205490565b60405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608490fd5b6000908152600260205260409020546001600160a01b031680156113745790565b60405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608490fd5b156113d257565b60405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608490fd5b6000818152600260205260409020546001600160a01b031615611475576000908152600460205260409020546001600160a01b031690565b60405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608490fd5b156114d657565b60405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608490fd5b9061155993929161154961068f84336115d0565b6115548383836117e3565b611a63565b1561156057565b60405162461bcd60e51b8152806115796004820161157d565b0390fd5b60809060208152603260208201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60608201520190565b6000828152600260205260409020546001600160a01b031615611661576115f682611353565b6001600160a01b038281168282168114949091908515611649575b505050821561161f57505090565b6001600160a01b0316600090815260056020526040902060ff92506116449190610578565b541690565b611656919293955061143d565b161491388080611611565b60405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608490fd5b156116c257565b60405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b50634e487b7160e01b600052601160045260246000fd5b60001981019190821161173957565b6107bc611713565b60bf1981019190821161173957565b607f1981019190821161173957565b602003906020821161173957565b60f61981019190821161173957565b60b61981019190821161173957565b9190820391821161173957565b90600a820180921161173957565b90610100820180921161173957565b90655af3107a4000820180921161173957565b906001820180921161173957565b9190820180921161173957565b906117ed83611353565b6001600160a01b0383811692909182168390036118d1576118476118aa928216946118198615156116bb565b611824878483611b68565b61182d87611928565b6001600160a01b0316600090815260036020526040902090565b611851815461172a565b90556001600160a01b038116600090815260036020526040902061187581546117c8565b905561188b856000526002602052604060002090565b80546001600160a01b0319166001600160a01b03909216919091179055565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4565b60405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608490fd5b600081815260046020526040812080546001600160a01b03191690556001600160a01b0361195583611353565b167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258280a4565b600082815260046020526040902080546001600160a01b0319166001600160a01b0383161790556001600160a01b03806119b584611353565b169116907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600080a4565b9081602091031261000e57516103908161029c565b6001600160a01b0391821681529116602082015260408101919091526080606082018190526103909291019061035a565b506040513d6000823e3d90fd5b3d15611a5e573d90611a44826107be565b91611a52604051938461078d565b82523d6000602084013e565b606090565b92909190823b15611b1d57611a96926020926000604051809681958294630a85bd0160e11b9a8b855233600486016119f5565b03926001600160a01b03165af160009181611aed575b50611adf57611ab9611a33565b80519081611ada5760405162461bcd60e51b8152806115796004820161157d565b602001fd5b6001600160e01b0319161490565b611b0f91925060203d8111611b16575b611b07818361078d565b8101906119e0565b9038611aac565b503d611afd565b50505050600190565b50634e487b7160e01b600052603260045260246000fd5b90611b4781611cc5565b6001600160a01b038216611b5f576107bc9150611d39565b6107bc91611c8d565b9091906001600160a01b038082169182611ba25750611b8683611cc5565b831680611b995750506107bc9150611d39565b03611b5f575050565b8185168303611bb2575b50611b86565b611c26611bbe826112db565b6000198101908111611c80575b611c1760009387855260076020526040852054838103611c2d575b5084611bfc896000526007602052604060002090565b556001600160a01b0316600090815260066020526040902090565b90600052602052604060002090565b5538611bac565b878652600660205260408620848752602052611c79604087205480611c6884611c178760018060a01b03166000526006602052604060002090565b556000526007602052604060002090565b5538611be6565b611c88611713565b611bcb565b604090611c99816112db565b9260009160018060a01b0316825260066020528282208483526020528083832055815260076020522055565b60085481600052600960205280604060002055600160401b811015611d2c575b6001810180600855811015611d1f575b60086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b611d27611b26565b611cf5565b611d3461074d565b611ce5565b600880546000199290838101818111611e42575b611de960009384928184526009602052846040852054911015611e35575b868452611dd87ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee2958681015490831015611e28575b88865280837ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee301556000526009602052604060002090565b556000526009602052604060002090565b558254938415611e145784019380851015611e07575b838352015555565b611e0f611b26565b611dff565b634e487b7160e01b83526031600452602483fd5b611e30611b26565b611da0565b611e3d611b26565b611d6b565b611e4a611713565b611d4d565b6001600160a01b038116908115611f2f576000838152600260205260409020546001600160a01b0316611eea5780611e8a84611ec293611b3d565b6001600160a01b0381166000908152600360205260409020611eac81546117c8565b905561188b846000526002602052604060002090565b60007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4565b60405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606490fd5b606460405162461bcd60e51b815260206004820152602060248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152fd5b600160401b44118015611f835790565b50441590565b6101c0908051600d1015611f9b570190565b611fa3611b26565b0190565b61012090805160081015611f9b570190565b6020918151811015611fce575b60051b010190565b611fd6611b26565b611fc6565b6048949392918152611ff68251809360208085019101610337565b01916bffffffffffffffffffffffff19809260601b16602084015260601b1660348201520190565b60208183031261000e5780519067ffffffffffffffff821161000e570181601f8201121561000e578051612051816107be565b9261205f604051948561078d565b8184526020828401011161000e576103909160208085019101610337565b9081526001600160a01b03909116602082015290151560408201526080606082018190526103909291019061035a565b6000818152600260205260409020546001600160a01b0316156121bf576120e161058f82600052600e602052604060002090565b801561219c575b6120fe57604051635b95129160e11b8152600490fd5b600061210982611353565b61212061058f84600052600e602052604060002090565b9261214861212d826121d1565b604051635768ae1b60e11b815295869485946004860161207d565b0381731cbaaae76bc0c8067bc62ed53111b4c7d78690d35af490811561218f575b600091612174575090565b610390913d8091833e612187818361078d565b81019061201e565b612197611a26565b612169565b506121b76108e86108c283600052600d602052604060002090565b4310156120e8565b604051635861b41d60e01b8152600490fd5b6121da90612263565b610390606660405180937f3c7376672076696577426f783d22302030203132303020313230302220786d6c60208301527f6e733d22687474703a2f2f7777772e77332e6f72672f323030302f737667223e6040830152612244815180926020606086019101610337565b8101651e17b9bb339f60d11b606082015203604681018452018261078d565b6000818152600260205260409020546001600160a01b0316156121bf5761229761058f82600052600e602052604060002090565b612307576122b56108e86108c283600052600d602052604060002090565b4310156122ce57604051635b95129160e11b8152600490fd5b60006122e761214892600052600f602052604060002090565b5460405180938192635d4ef9ff60e11b8352600483019190602083019252565b600061232061214892600052600f602052604060002090565b546040518093819263df777a5b60e01b8352600483019190602083019252565b6040519061234d82610764565b60006020838281520152565b612361612340565b5060208151916040519261237484610764565b835201602082015290565b60209067ffffffffffffffff8111612399575b60051b0190565b6123a161074d565b612392565b60019060001981146123b6570190565b611fa3611713565b6123c781612491565b1561000e576123d58161258d565b6123de8161237f565b916123ec604051938461078d565b818352601f196123fb8361237f565b0160005b81811061247a57505061242060208092015161241a8161269e565b906117d6565b6000905b838210612432575050505090565b61246e8161244261247493612618565b9061244b6107af565b828152818782015261245d868a611fb9565b526124688589611fb9565b506117d6565b916123a6565b90612424565b602090612485612340565b828288010152016123ff565b8051156124b257602060c09101515160001a106124ad57600190565b600090565b50600090565b805180151590816124ee575b501561000e576124d3906124fa565b905190602081106124e2575090565b6020036101000a900490565b602191501115386124c4565b90602082019161250a835161269e565b925190838201809211612533575b51928303928311612527579190565b61252f611713565b9190565b61253b611713565b612518565b80511561000e57612553610390916124fa565b61255f819392936107be565b9261256d604051948561078d565b818452601f1961257c836107be565b01366020860137836020019061271b565b8051156124b257600090602081019081516125a78161269e565b810180911161260b575b9151905181018091116125fe575b91905b8281106125cf5750905090565b806125dc6125eb92612618565b81018091116125f157916123a6565b906125c2565b6125f9611713565b61246e565b612606611713565b6125bf565b612613611713565b6125b1565b805160001a90608082101561262e575050600190565b60b8821015612649575061264461039091611750565b6117c8565b9060c081101561266d5760b51991600160b783602003016101000a91015104010190565b9060f8821015612684575061264461039091611741565b60010151602082900360f7016101000a90040160f5190190565b5160001a60808110156126b15750600090565b60b8811080156126e8575b156126c75750600190565b60c08110156126dc576126446103909161177c565b6126446103909161176d565b5060c081101580156126bc575060f881106126bc565b601f811161270e575b6101000a90565b612716611713565b612707565b9290919283156127bc5792915b602093848410612787578051825284810180911161277a575b93810180911161276d575b91601f198101908111612760575b91612728565b612768611713565b61275a565b612775611713565b61274c565b612782611713565b612741565b919350918061279557505050565b6127a96127a46127ae9261175f565b6126fe565b61172a565b905182518216911916179052565b5091505056fea2646970667358221220e3974229779eb527785fb1eb2b003e3055945681455f6fb2bb14795a3eaafa9d64736f6c63430008110033
Deployed Bytecode
0x60806040526004361015610013575b600080fd5b60003560e01c806301ffc9a71461029357806306fdde031461028a578063081812fc14610281578063095ea7b31461027857806318160ddd1461026f5780631f399a991461026657806323b872dd1461025d5780632f745c591461025457806338926b6d1461024b57806342842e0e146102425780634f359a37146102395780634f6ccce7146102305780636352211e1461022757806366d003ac1461021e57806370a0823114610215578063715018a61461020c5780638da5cb5b1461020357806395d89b41146101fa578063a035b1fe146101f1578063a22cb465146101e8578063a2d6c6da146101df578063a4d66daf146101d6578063ab1aa1c5146101cd578063b88d4fde146101c4578063c87b56dd146101bb578063cd8bff33146101b2578063d6ddb620146101a9578063dbe7e3bd146101a0578063e25fe17514610197578063e985e9c51461018e578063eb93406b146101855763f2fde38b1461017d57600080fd5b61000e6111b0565b5061000e611010565b5061000e610fb2565b5061000e610f90565b5061000e610f5e565b5061000e610f38565b5061000e610f0b565b5061000e610eeb565b5061000e610e9b565b5061000e610e6e565b5061000e610e50565b5061000e610e1c565b5061000e610d2f565b5061000e610d10565b5061000e610c4e565b5061000e610c24565b5061000e610bc2565b5061000e610b96565b5061000e610b66565b5061000e610b47565b5061000e610a9b565b5061000e610a7e565b5061000e610a36565b5061000e610830565b5061000e610699565b5061000e61066f565b5061000e61060a565b5061000e6105eb565b5061000e6104fb565b5061000e61049e565b5061000e610393565b5061000e6102ae565b6001600160e01b031981160361000e57565b503461000e57602036600319011261000e5760206004356102ce8161029c565b63ffffffff60e01b1663780e9d6360e01b81149081156102f4575b506040519015158152f35b6380ac58cd60e01b811491508115610326575b8115610315575b50386102e9565b6301ffc9a760e01b1490503861030e565b635b5e139f60e01b81149150610307565b60005b83811061034a5750506000910152565b818101518382015260200161033a565b9060209161037381518092818552858086019101610337565b601f01601f1916010190565b90602061039092818152019061035a565b90565b503461000e5760008060031936011261049b57604051908080549060019180831c92808216928315610491575b602092838610851461047d57858852602088019490811561045c5750600114610404575b610400876103f48189038261078d565b6040519182918261037f565b0390f35b6000805294509192917f290decd9548b62a8d60345a988386fc84ba6bc95484008f6362f93160ef3e5635b83861061044b57505050910190506103f48261040038806103e4565b80548587015294820194810161042f565b60ff191685525050505090151560051b0190506103f48261040038806103e4565b634e487b7160e01b82526022600452602482fd5b93607f16936103c0565b80fd5b503461000e57602036600319011261000e5760206104bd60043561143d565b6040516001600160a01b039091168152f35b600435906001600160a01b038216820361000e57565b602435906001600160a01b038216820361000e57565b503461000e57604036600319011261000e576105156104cf565b60243561052181611353565b916001600160a01b03808416908216811461059c576105539361054e913314908115610555575b506113cb565b61197c565b005b6001600160a01b03166000908152600560205260409020610596915061058f9033905b9060018060a01b0316600052602052604060002090565b5460ff1690565b38610548565b60405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608490fd5b503461000e57600036600319011261000e576020600854604051908152f35b503461000e57600036600319011261000e5760206040517397843608a00e2bbc75ab0c1911387e002565dede8152f35b606090600319011261000e576001600160a01b0390600435828116810361000e5791602435908116810361000e579060443590565b503461000e576105536106813661063a565b9161069461068f84336115d0565b6114cf565b6117e3565b503461000e57604036600319011261000e576106b36104cf565b602435906106c0816112db565b8210156106f4576001600160a01b031660009081526006602090815260408083209383529281529082902054915191825290f35b60405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608490fd5b50634e487b7160e01b600052604160045260246000fd5b6040810190811067ffffffffffffffff82111761078057604052565b61078861074d565b604052565b90601f8019910116810190811067ffffffffffffffff82111761078057604052565b604051906107bc82610764565b565b60209067ffffffffffffffff81116107dc575b601f01601f19160190565b6107e461074d565b6107d1565b81601f8201121561000e57803590610800826107be565b9261080e604051948561078d565b8284526020838301011161000e57816000926020809301838601378301015290565b503461000e5760408060031936011261000e57600480359160243567ffffffffffffffff811161000e5761086790369084016107e9565b6000848152600260205260409020549092906001600160a01b03161561088c565b1590565b610a28576108a761058f85600052600e602052604060002090565b610a1a576108c86108c285600052600d602052604060002090565b54611798565b4310610a0c576108ed6108e86108c286600052600d602052604060002090565b6117a6565b4310156109fe5761090561090084612359565b6123be565b9261092a61092461091e61091887611f89565b51612540565b95611fa7565b516124b8565b906109426108c287600052600d602052604060002090565b82036109ee57602081519101209040036109e057505161097d8161096f6020820194339030908888611fdb565b03601f19810183528261078d565b51902061099482600052600f602052604060002090565b556109b96109ac82600052600e602052604060002090565b805460ff19166001179055565b7fb2abe4a475394d118f968c0e26cad10fbf34ea450ba93acb6a22740068e19299600080a2005b90516365899bc960e01b8152fd5b8351637c0f286360e11b81528390fd5b905163675ef9c160e01b8152fd5b905163848fa00360e01b8152fd5b9051630c8d9eab60e31b8152fd5b9051635861b41d60e01b8152fd5b503461000e57610553610a483661063a565b90604051926020840184811067ffffffffffffffff821117610a71575b60405260008452611535565b610a7961074d565b610a65565b503461000e57600036600319011261000e576020604051600a8152f35b503461000e57602036600319011261000e57600435600854811015610aed5760086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30154604051908152602090f35b60405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608490fd5b503461000e57602036600319011261000e5760206104bd600435611353565b503461000e57600036600319011261000e576020604051734762434888721f067f7d5befa6ec1f8ee447a3878152f35b503461000e57602036600319011261000e576020610bba610bb56104cf565b6112db565b604051908152f35b503461000e5760008060031936011261049b57600a5481906001600160a01b03811690610bf0338314611247565b6001600160a01b031916600a557f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461000e57600036600319011261000e57600a546040516001600160a01b039091168152602090f35b503461000e5760008060031936011261049b576040519080600190815480831c92808216928315610d06575b602092838610851461047d57858852602088019490811561045c5750600114610cad57610400876103f48189038261078d565b600160005294509192917fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf65b838610610cf557505050910190506103f48261040038806103e4565b805485870152948201948101610cd9565b93607f1693610c7a565b503461000e57600036600319011261000e576020600c54604051908152f35b503461000e57604036600319011261000e57610d496104cf565b602435801515810361000e576001600160a01b03821691338314610dd75781610d94610da59233600052600560205260406000209060018060a01b0316600052602052604060002090565b9060ff801983541691151516179055565b604051901515815233907f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c3190602090a3005b60405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606490fd5b503461000e57602036600319011261000e57610400610e3c600435612263565b60405191829160208352602083019061035a565b503461000e57600036600319011261000e5760206040516104578152f35b503461000e57602036600319011261000e57600435600052600f6020526020604060002054604051908152f35b503461000e57608036600319011261000e57610eb56104cf565b610ebd6104e5565b6064359167ffffffffffffffff831161000e57610ee16105539336906004016107e9565b9160443591611535565b503461000e57602036600319011261000e57610400610e3c6004356120ad565b503461000e57602036600319011261000e57600435600052600d6020526020604060002054604051908152f35b503461000e57600036600319011261000e576020610f54611f73565b6040519015158152f35b503461000e57602036600319011261000e57600435600052600e602052602060ff604060002054166040519015158152f35b503461000e57600036600319011261000e576020604051655af3107a40008152f35b503461000e57604036600319011261000e57602060ff611004610fd36104cf565b610fdb6104e5565b6001600160a01b0391821660009081526005865260408082209290931681526020919091522090565b54166040519015158152f35b5060008060031936011261049b57611029610888611f73565b61119e57610457600b54101561118c57600c5480341061117a5761104f611054916117b5565b600c55565b6110626001600b5401600b55565b600b54906110708233611e4f565b4361108583600052600d602052604060002090565b5561108f4361172a565b60408051602081018581529240918101919091526bffffffffffffffffffffffff1933606090811b82168184015230901b1660748201526110d3816088810161096f565b5190206110ea83600052600f602052604060002090565b553460011c81808080847397843608a00e2bbc75ab0c1911387e002565dede5af1611113611a33565b501561116857818061112681933461178b565b734762434888721f067f7d5befa6ec1f8ee447a3875af1611145611a33565b501561115657604051908152602090f35b604051630d0532c360e31b8152600490fd5b6040516316d0455b60e01b8152600490fd5b6040516301bcb9eb60e11b8152600490fd5b60405163082115e160e31b8152600490fd5b6040516313a5d04f60e01b8152600490fd5b503461000e57602036600319011261000e576111ca6104cf565b600a546001600160a01b03906111e39082163314611247565b8116156111f35761055390611292565b60405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608490fd5b1561124e57565b606460405162461bcd60e51b815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b600a80546001600160a01b039283166001600160a01b0319821681179092559091167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3565b6001600160a01b031680156112fb57600052600360205260406000205490565b60405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608490fd5b6000908152600260205260409020546001600160a01b031680156113745790565b60405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608490fd5b156113d257565b60405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608490fd5b6000818152600260205260409020546001600160a01b031615611475576000908152600460205260409020546001600160a01b031690565b60405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608490fd5b156114d657565b60405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6044820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b6064820152608490fd5b9061155993929161154961068f84336115d0565b6115548383836117e3565b611a63565b1561156057565b60405162461bcd60e51b8152806115796004820161157d565b0390fd5b60809060208152603260208201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60608201520190565b6000828152600260205260409020546001600160a01b031615611661576115f682611353565b6001600160a01b038281168282168114949091908515611649575b505050821561161f57505090565b6001600160a01b0316600090815260056020526040902060ff92506116449190610578565b541690565b611656919293955061143d565b161491388080611611565b60405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608490fd5b156116c257565b60405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608490fd5b50634e487b7160e01b600052601160045260246000fd5b60001981019190821161173957565b6107bc611713565b60bf1981019190821161173957565b607f1981019190821161173957565b602003906020821161173957565b60f61981019190821161173957565b60b61981019190821161173957565b9190820391821161173957565b90600a820180921161173957565b90610100820180921161173957565b90655af3107a4000820180921161173957565b906001820180921161173957565b9190820180921161173957565b906117ed83611353565b6001600160a01b0383811692909182168390036118d1576118476118aa928216946118198615156116bb565b611824878483611b68565b61182d87611928565b6001600160a01b0316600090815260036020526040902090565b611851815461172a565b90556001600160a01b038116600090815260036020526040902061187581546117c8565b905561188b856000526002602052604060002090565b80546001600160a01b0319166001600160a01b03909216919091179055565b7fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4565b60405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608490fd5b600081815260046020526040812080546001600160a01b03191690556001600160a01b0361195583611353565b167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258280a4565b600082815260046020526040902080546001600160a01b0319166001600160a01b0383161790556001600160a01b03806119b584611353565b169116907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925600080a4565b9081602091031261000e57516103908161029c565b6001600160a01b0391821681529116602082015260408101919091526080606082018190526103909291019061035a565b506040513d6000823e3d90fd5b3d15611a5e573d90611a44826107be565b91611a52604051938461078d565b82523d6000602084013e565b606090565b92909190823b15611b1d57611a96926020926000604051809681958294630a85bd0160e11b9a8b855233600486016119f5565b03926001600160a01b03165af160009181611aed575b50611adf57611ab9611a33565b80519081611ada5760405162461bcd60e51b8152806115796004820161157d565b602001fd5b6001600160e01b0319161490565b611b0f91925060203d8111611b16575b611b07818361078d565b8101906119e0565b9038611aac565b503d611afd565b50505050600190565b50634e487b7160e01b600052603260045260246000fd5b90611b4781611cc5565b6001600160a01b038216611b5f576107bc9150611d39565b6107bc91611c8d565b9091906001600160a01b038082169182611ba25750611b8683611cc5565b831680611b995750506107bc9150611d39565b03611b5f575050565b8185168303611bb2575b50611b86565b611c26611bbe826112db565b6000198101908111611c80575b611c1760009387855260076020526040852054838103611c2d575b5084611bfc896000526007602052604060002090565b556001600160a01b0316600090815260066020526040902090565b90600052602052604060002090565b5538611bac565b878652600660205260408620848752602052611c79604087205480611c6884611c178760018060a01b03166000526006602052604060002090565b556000526007602052604060002090565b5538611be6565b611c88611713565b611bcb565b604090611c99816112db565b9260009160018060a01b0316825260066020528282208483526020528083832055815260076020522055565b60085481600052600960205280604060002055600160401b811015611d2c575b6001810180600855811015611d1f575b60086000527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b611d27611b26565b611cf5565b611d3461074d565b611ce5565b600880546000199290838101818111611e42575b611de960009384928184526009602052846040852054911015611e35575b868452611dd87ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee2958681015490831015611e28575b88865280837ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee301556000526009602052604060002090565b556000526009602052604060002090565b558254938415611e145784019380851015611e07575b838352015555565b611e0f611b26565b611dff565b634e487b7160e01b83526031600452602483fd5b611e30611b26565b611da0565b611e3d611b26565b611d6b565b611e4a611713565b611d4d565b6001600160a01b038116908115611f2f576000838152600260205260409020546001600160a01b0316611eea5780611e8a84611ec293611b3d565b6001600160a01b0381166000908152600360205260409020611eac81546117c8565b905561188b846000526002602052604060002090565b60007fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8180a4565b60405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606490fd5b606460405162461bcd60e51b815260206004820152602060248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152fd5b600160401b44118015611f835790565b50441590565b6101c0908051600d1015611f9b570190565b611fa3611b26565b0190565b61012090805160081015611f9b570190565b6020918151811015611fce575b60051b010190565b611fd6611b26565b611fc6565b6048949392918152611ff68251809360208085019101610337565b01916bffffffffffffffffffffffff19809260601b16602084015260601b1660348201520190565b60208183031261000e5780519067ffffffffffffffff821161000e570181601f8201121561000e578051612051816107be565b9261205f604051948561078d565b8184526020828401011161000e576103909160208085019101610337565b9081526001600160a01b03909116602082015290151560408201526080606082018190526103909291019061035a565b6000818152600260205260409020546001600160a01b0316156121bf576120e161058f82600052600e602052604060002090565b801561219c575b6120fe57604051635b95129160e11b8152600490fd5b600061210982611353565b61212061058f84600052600e602052604060002090565b9261214861212d826121d1565b604051635768ae1b60e11b815295869485946004860161207d565b0381731cbaaae76bc0c8067bc62ed53111b4c7d78690d35af490811561218f575b600091612174575090565b610390913d8091833e612187818361078d565b81019061201e565b612197611a26565b612169565b506121b76108e86108c283600052600d602052604060002090565b4310156120e8565b604051635861b41d60e01b8152600490fd5b6121da90612263565b610390606660405180937f3c7376672076696577426f783d22302030203132303020313230302220786d6c60208301527f6e733d22687474703a2f2f7777772e77332e6f72672f323030302f737667223e6040830152612244815180926020606086019101610337565b8101651e17b9bb339f60d11b606082015203604681018452018261078d565b6000818152600260205260409020546001600160a01b0316156121bf5761229761058f82600052600e602052604060002090565b612307576122b56108e86108c283600052600d602052604060002090565b4310156122ce57604051635b95129160e11b8152600490fd5b60006122e761214892600052600f602052604060002090565b5460405180938192635d4ef9ff60e11b8352600483019190602083019252565b600061232061214892600052600f602052604060002090565b546040518093819263df777a5b60e01b8352600483019190602083019252565b6040519061234d82610764565b60006020838281520152565b612361612340565b5060208151916040519261237484610764565b835201602082015290565b60209067ffffffffffffffff8111612399575b60051b0190565b6123a161074d565b612392565b60019060001981146123b6570190565b611fa3611713565b6123c781612491565b1561000e576123d58161258d565b6123de8161237f565b916123ec604051938461078d565b818352601f196123fb8361237f565b0160005b81811061247a57505061242060208092015161241a8161269e565b906117d6565b6000905b838210612432575050505090565b61246e8161244261247493612618565b9061244b6107af565b828152818782015261245d868a611fb9565b526124688589611fb9565b506117d6565b916123a6565b90612424565b602090612485612340565b828288010152016123ff565b8051156124b257602060c09101515160001a106124ad57600190565b600090565b50600090565b805180151590816124ee575b501561000e576124d3906124fa565b905190602081106124e2575090565b6020036101000a900490565b602191501115386124c4565b90602082019161250a835161269e565b925190838201809211612533575b51928303928311612527579190565b61252f611713565b9190565b61253b611713565b612518565b80511561000e57612553610390916124fa565b61255f819392936107be565b9261256d604051948561078d565b818452601f1961257c836107be565b01366020860137836020019061271b565b8051156124b257600090602081019081516125a78161269e565b810180911161260b575b9151905181018091116125fe575b91905b8281106125cf5750905090565b806125dc6125eb92612618565b81018091116125f157916123a6565b906125c2565b6125f9611713565b61246e565b612606611713565b6125bf565b612613611713565b6125b1565b805160001a90608082101561262e575050600190565b60b8821015612649575061264461039091611750565b6117c8565b9060c081101561266d5760b51991600160b783602003016101000a91015104010190565b9060f8821015612684575061264461039091611741565b60010151602082900360f7016101000a90040160f5190190565b5160001a60808110156126b15750600090565b60b8811080156126e8575b156126c75750600190565b60c08110156126dc576126446103909161177c565b6126446103909161176d565b5060c081101580156126bc575060f881106126bc565b601f811161270e575b6101000a90565b612716611713565b612707565b9290919283156127bc5792915b602093848410612787578051825284810180911161277a575b93810180911161276d575b91601f198101908111612760575b91612728565b612768611713565b61275a565b612775611713565b61274c565b612782611713565b612741565b919350918061279557505050565b6127a96127a46127ae9261175f565b6126fe565b61172a565b905182518216911916179052565b5091505056fea2646970667358221220e3974229779eb527785fb1eb2b003e3055945681455f6fb2bb14795a3eaafa9d64736f6c63430008110033
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.