ERC-721
Overview
Max Total Supply
13 PXLART
Holders
13
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Filtered by Token Holder
LooksRare: Treasury Safe MultisigBalance
1 PXLARTLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Pixels
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import "@openzeppelin/[email protected]/token/ERC721/ERC721.sol"; import "@openzeppelin/[email protected]/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/[email protected]/access/AccessControl.sol"; import "./Base64.sol"; contract Pixels is ERC721, ERC721Enumerable, AccessControl { event PixelsChanged(uint32[] pixels, bytes colors); event WhitelistSaleStarted(); event PublicSaleStarted(); event PriceChanged(uint newPrice); bytes32 constant MANAGER_ROLE = keccak256("MANAGER_ROLE"); address constant WITHDRAW_ADDRESS = 0xc726A39c79b1DECc7F7940e531459471da00825F; address constant ADDITIONAL_MANAGER_ADDRESS = 0xB6de01B0468Ad61a4C2a68f3c68878FC342AD88D; uint constant CANVAS_WIDTH = 1000; uint constant CANVAS_HEIGHT = 1000; uint constant TOTAL_PIXELS = CANVAS_WIDTH * CANVAS_HEIGHT; uint constant SVG_PIXEL_SIZE = 5; string constant SVG_PIXEL_SIZE_STR = "5"; uint constant COLORS_COUNT = 16; uint constant MAX_PIXELS_PER_MINT = 1024; uint public price = 0.001 ether; uint8[TOTAL_PIXELS] public pixelToColor; uint32[TOTAL_PIXELS] public pixelToChunk; mapping(uint32 => uint32[]) public chunkToPixels; uint32 public nextChunkToken = 1; string public baseExternalUrl = "https://re-place.art/"; // Whitelist & Pixels Claiming uint constant GM420_PIXELS_PER_TOKEN = 100; uint constant S33DS_PIXELS_PER_TOKEN = 9; uint constant BRICK_BREAKERS_PIXELS_PER_TOKEN = 4; IERC721Enumerable constant GM420 = IERC721Enumerable(0xFB4ccb3e948FEd6946fC528bA806e737eDc938c4); IERC721Enumerable constant S33ds = IERC721Enumerable(0x96eA4f8d4788Fb1D48d175Cd751dAaB056AdA627); IERC721Enumerable constant BrickBreakers = IERC721Enumerable(0x45929d1754E9Fc5450acfbe11f3D620FA2316F3D); mapping(uint => uint) public claimedGM420PixelsByToken; mapping(uint => uint) public claimedS33dsPixelsByToken; mapping(uint => uint) public claimedBrickBreakersPixelsByToken; bool public whitelistSaleStarted = false; bool public publicSaleStarted = false; constructor() ERC721("re:Place", "PXLART") { _grantRole(MANAGER_ROLE, msg.sender); _grantRole(MANAGER_ROLE, ADDITIONAL_MANAGER_ADDRESS); } function startWhitelistSale() public onlyRole(MANAGER_ROLE) { require(!whitelistSaleStarted, "Whitelist sale already started"); whitelistSaleStarted = true; emit WhitelistSaleStarted(); } function startPublicSale() public onlyRole(MANAGER_ROLE) { require(!publicSaleStarted, "Public sale already started"); publicSaleStarted = true; emit PublicSaleStarted(); } function giveaway(uint32[] calldata pixels, bytes calldata colors, address mintTo) public onlyRole(MANAGER_ROLE) { mintInternal(pixels, colors, mintTo); } function mint(uint32[] calldata pixels, bytes calldata colors) public payable { require(publicSaleStarted, "Public sale not started"); require(msg.value == pixels.length * price, "Amount of Ether sent is not correct"); mintInternal(pixels, colors, msg.sender); } function mintWhitelist(uint32[] calldata pixels, bytes calldata colors) public payable { require(whitelistSaleStarted, "Whitelist sale not started"); uint pixelsToPayFor = pixels.length; bool whiteListed = false; (bool tokensExists, uint claimedPixels) = claimPixelsFromTokens( GM420, claimedGM420PixelsByToken, GM420_PIXELS_PER_TOKEN, pixelsToPayFor ); pixelsToPayFor -= claimedPixels; if(tokensExists) whiteListed = true; (tokensExists, claimedPixels) = claimPixelsFromTokens( S33ds, claimedS33dsPixelsByToken, S33DS_PIXELS_PER_TOKEN, pixelsToPayFor ); pixelsToPayFor -= claimedPixels; if(tokensExists) whiteListed = true; (tokensExists, claimedPixels) = claimPixelsFromTokens( BrickBreakers, claimedBrickBreakersPixelsByToken, BRICK_BREAKERS_PIXELS_PER_TOKEN, pixelsToPayFor ); pixelsToPayFor -= claimedPixels; if(tokensExists) whiteListed = true; require(whiteListed, "Not whitelisted"); require(msg.value == pixelsToPayFor * price, "Amount of Ether sent is not correct"); mintInternal(pixels, colors, msg.sender); } function claimPixelsFromTokens( IERC721Enumerable tokensContract, mapping(uint => uint) storage claimedPixelsByToken, uint maxFreePixelsPerToken, uint pixelsToPayFor ) private returns ( bool tokensExists, uint claimedFreePixels ) { tokensExists = false; claimedFreePixels = 0; uint tokens = tokensContract.balanceOf(msg.sender); tokensExists = tokens > 0; for(uint i = 0; i < tokens; i++) { uint token = tokensContract.tokenOfOwnerByIndex(msg.sender, i); uint freePixelsToClaimFromToken = maxFreePixelsPerToken - claimedPixelsByToken[token]; if(pixelsToPayFor < freePixelsToClaimFromToken) freePixelsToClaimFromToken = pixelsToPayFor; pixelsToPayFor -= freePixelsToClaimFromToken; claimedPixelsByToken[token] += freePixelsToClaimFromToken; claimedFreePixels += freePixelsToClaimFromToken; } } function mintInternal(uint32[] calldata pixels, bytes calldata colors, address mintTo) private { require(pixels.length == colors.length, "pixels and colors should be of equal length"); require(pixels.length > 0, "Must mint at least 1 pixel"); require(pixels.length <= MAX_PIXELS_PER_MINT, "Can't mint more than 1024 pixels"); for(uint i = 0; i < pixels.length; i++) { uint32 pixel = pixels[i]; uint8 color = uint8(colors[i]); require(pixel < TOTAL_PIXELS, "Invalid pixel"); require(color < COLORS_COUNT, "Invalid color"); require(pixelToChunk[pixel] == 0, "Pixel already minted"); pixelToColor[pixel] = color; pixelToChunk[pixel] = nextChunkToken; } chunkToPixels[nextChunkToken] = pixels; _safeMint(mintTo, nextChunkToken); nextChunkToken++; emit PixelsChanged(pixels, colors); } function setPixelsColor(uint32[] calldata pixels, bytes calldata colors) public { require(pixels.length == colors.length, "pixels and colors should be of equal length"); require(pixels.length > 0, "Must set at least 1 pixel"); for(uint i = 0; i < pixels.length; i++) { uint32 pixel = pixels[i]; uint8 color = uint8(colors[i]); require(ownerOf(pixelToChunk[pixel]) == msg.sender, "Must own pixel to set its color"); require(color < COLORS_COUNT, "Invalid color"); pixelToColor[pixel] = color; } emit PixelsChanged(pixels, colors); } function getPixels(uint index, uint count) public view returns (bytes memory result) { result = new bytes(count); for(uint i = 0; i < count; i++) { result[i] = bytes1(pixelToColor[index + i]); } } function getChunksOwner(uint index, uint count) public view returns (address[] memory result) { result = new address[](count); for(uint i = 0; i < count; i++) { result[i] = ownerOf(index + i); } } function getPixelsChunk(uint index, uint count) public view returns (uint32[] memory result) { result = new uint32[](count); for(uint i = 0; i < count; i++) { uint32 chunk = pixelToChunk[index + i]; result[i] = chunk; } } function getChunkPixels(uint32 chunk) public view returns (uint32[] memory result) { return chunkToPixels[chunk]; } function withdraw() public onlyRole(MANAGER_ROLE) { uint balance = address(this).balance; (bool success, ) = payable(WITHDRAW_ADDRESS).call{value: balance}(""); require(success, "Failed transfer"); } function setPrice(uint newPrice) public onlyRole(MANAGER_ROLE) { price = newPrice; emit PriceChanged(newPrice); } function setBaseExternalUrl(string calldata newBaseExternalUrl) public onlyRole(MANAGER_ROLE) { baseExternalUrl = newBaseExternalUrl; } fallback() external payable { } receive() external payable { } // URI generation function tokenURI(uint tokenId) override public view returns (string memory) { string[16] memory colorsHex = ["#000000", "#898D90", "#D4D7D9", "#FFFFFF", "#FF4500", "#FFA800", "#FFD635", "#00A268", "#7EED56", "#2450A4", "#3690EA", "#51E9F4", "#811E9F", "#B44AC0", "#FF99AA", "#9C6926"]; uint32[] memory pixels = chunkToPixels[uint32(tokenId)]; uint32 minX = uint32(CANVAS_WIDTH); uint32 minY = uint32(CANVAS_HEIGHT); uint32 maxX = 0; uint32 maxY = 0; for(uint i = 0; i < pixels.length; i++) { uint32 pixel = pixels[i]; uint32 x = uint32(pixel % CANVAS_WIDTH); uint32 y = uint32(pixel / CANVAS_WIDTH); if(x < minX) minX = x; if(y < minY) minY = y; if(x > maxX) maxX = x; if(y > maxY) maxY = y; } uint32 width = maxX - minX + 1; uint32 height = maxY - minY + 1; string memory svgData = string(abi.encodePacked( "<svg xmlns='http://www.w3.org/2000/svg' width='", Strings.toString(width * SVG_PIXEL_SIZE), "' height='", Strings.toString(height * SVG_PIXEL_SIZE), "'>")); for(uint i = 0; i < pixels.length; i++) { uint32 pixel = pixels[i]; svgData = string(abi.encodePacked(svgData, "<rect x='", Strings.toString((pixel % CANVAS_WIDTH - minX) * SVG_PIXEL_SIZE), "' y='", Strings.toString((pixel / CANVAS_WIDTH - minY) * SVG_PIXEL_SIZE), "' fill='", colorsHex[pixelToColor[pixel]], "' width='", SVG_PIXEL_SIZE_STR, "' height='", SVG_PIXEL_SIZE_STR, "' />")); } svgData = string(abi.encodePacked(svgData, "</svg>")); string memory json = string(abi.encodePacked( '{' '"name": "Pixel Art #', Strings.toString(tokenId), '",' '"description": "**Pixel Art #', Strings.toString(tokenId), '** \\n*', Strings.toString(pixels.length), ' pixels on blockchain* \\n\\nThis amazing fully on-chain ', Strings.toString(width), 'x', Strings.toString(height), ' art piece was minted on **re:Place**, the 1 million on-chain pixels NFT project \\n\\nCheck out the full canvas - ', baseExternalUrl, '",' )); json = string(abi.encodePacked( json, '"image_data": "data:image/svg+xml;base64,', Base64.encode(bytes(svgData)), '",' '"external_url": "', baseExternalUrl, '?pixelArt=', Strings.toString(tokenId), '",' )); json = string(abi.encodePacked( json, '"attributes":[' '{"trait_type": "X", "value": "', Strings.toString(minX), '"},' '{"trait_type": "Y", "value": "', Strings.toString(minY), '"},' '{"trait_type": "Width", "value": "', Strings.toString(width), '"},' '{"trait_type": "Height", "value": "', Strings.toString(height), '"},' '{"trait_type": "Pixels", "value": "', Strings.toString(pixels.length), '"}' ']' '}' )); return string(abi.encodePacked('data:application/json,', json)); } // The following functions are overrides required by Solidity. function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal override(ERC721, ERC721Enumerable) { super._beforeTokenTransfer(from, to, tokenId); } function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC721Enumerable, AccessControl) returns (bool) { return super.supportsInterface(interfaceId); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// [MIT License] /// @title Base64 /// @notice Provides a function for encoding some bytes in base64 /// @author Brecht Devos <[email protected]> library Base64 { bytes internal constant TABLE = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; /// @notice Encodes some bytes to the base64 representation function encode(bytes memory data) internal pure returns (string memory) { uint256 len = data.length; if (len == 0) return ""; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((len + 2) / 3); // Add some extra buffer at the end bytes memory result = new bytes(encodedLen + 32); bytes memory table = TABLE; assembly { let tablePtr := add(table, 1) let resultPtr := add(result, 32) for { let i := 0 } lt(i, len) { } { i := add(i, 3) let input := and(mload(add(data, i)), 0xffffff) let out := mload(add(tablePtr, and(shr(18, input), 0x3F))) out := shl(8, out) out := add( out, and(mload(add(tablePtr, and(shr(12, input), 0x3F))), 0xFF) ) out := shl(8, out) out := add( out, and(mload(add(tablePtr, and(shr(6, input), 0x3F))), 0xFF) ) out := shl(8, out) out := add( out, and(mload(add(tablePtr, and(input, 0x3F))), 0xFF) ) out := shl(224, out) mstore(resultPtr, out) resultPtr := add(resultPtr, 4) } switch mod(len, 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } mstore(result, encodedLen) } return string(result); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32[]","name":"pixels","type":"uint32[]"},{"indexed":false,"internalType":"bytes","name":"colors","type":"bytes"}],"name":"PixelsChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"PriceChanged","type":"event"},{"anonymous":false,"inputs":[],"name":"PublicSaleStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","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"},{"anonymous":false,"inputs":[],"name":"WhitelistSaleStarted","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseExternalUrl","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"chunkToPixels","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimedBrickBreakersPixelsByToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimedGM420PixelsByToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"claimedS33dsPixelsByToken","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"chunk","type":"uint32"}],"name":"getChunkPixels","outputs":[{"internalType":"uint32[]","name":"result","type":"uint32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"getChunksOwner","outputs":[{"internalType":"address[]","name":"result","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"getPixels","outputs":[{"internalType":"bytes","name":"result","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"count","type":"uint256"}],"name":"getPixelsChunk","outputs":[{"internalType":"uint32[]","name":"result","type":"uint32[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32[]","name":"pixels","type":"uint32[]"},{"internalType":"bytes","name":"colors","type":"bytes"},{"internalType":"address","name":"mintTo","type":"address"}],"name":"giveaway","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32[]","name":"pixels","type":"uint32[]"},{"internalType":"bytes","name":"colors","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint32[]","name":"pixels","type":"uint32[]"},{"internalType":"bytes","name":"colors","type":"bytes"}],"name":"mintWhitelist","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextChunkToken","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"pixelToChunk","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"pixelToColor","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicSaleStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseExternalUrl","type":"string"}],"name":"setBaseExternalUrl","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32[]","name":"pixels","type":"uint32[]"},{"internalType":"bytes","name":"colors","type":"bytes"}],"name":"setPixelsColor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startPublicSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startWhitelistSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"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":[],"name":"whitelistSaleStarted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
66038d7ea4c68000600b5562026267805463ffffffff1916600117905560c0604052601560808190527f68747470733a2f2f72652d706c6163652e6172742f000000000000000000000060a09081526200005f91620262689190620001dd565b506202626c805461ffff191690553480156200007a57600080fd5b50604080518082018252600881526772653a506c61636560c01b60208083019182528351808501909452600684526514161310549560d21b908401528151919291620000c991600091620001dd565b508051620000df906001906020840190620001dd565b5050506200010360008051602062004998833981519152336200013860201b60201c565b620001326000805160206200499883398151915273b6de01b0468ad61a4c2a68f3c68878fc342ad88d62000138565b620002bf565b6000828152600a602090815260408083206001600160a01b038516845290915290205460ff16620001d9576000828152600a602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620001983390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b828054620001eb9062000283565b90600052602060002090601f0160209004810192826200020f57600085556200025a565b82601f106200022a57805160ff19168380011785556200025a565b828001600101855582156200025a579182015b828111156200025a5782518255916020019190600101906200023d565b50620002689291506200026c565b5090565b5b808211156200026857600081556001016200026d565b600181811c908216806200029857607f821691505b602082108103620002b957634e487b7160e01b600052602260045260246000fd5b50919050565b6146c980620002cf6000396000f3fe6080604052600436106102695760003560e01c80637f87198d11610143578063b88d4fde116100bb578063d55a176e11610077578063d55a176e146107d6578063e1c7bc93146107e9578063e985e9c5146107fc578063f01f79a214610845578063f56026af14610877578063ff44e9151461088c57005b8063b88d4fde14610716578063c506301d14610736578063c6cce90514610756578063c87b56dd14610776578063cb36863814610796578063d547741f146107b657005b806396c8f0511161010a57806396c8f0511461066a578063a035b1fe1461068a578063a217fddf146106a0578063a22cb465146106b5578063a2e91477146106d5578063a313543f146106f657005b80637f87198d146105bb5780637fcbfa1a146105e857806391b7f5ed1461061557806391d148541461063557806395d89b411461065557005b80632f745c59116101e15780634f6ccce71161019d5780634f6ccce7146104dd578063625f596f146104fd5780636352211e1461051d57806367c5fe871461053d57806370a082311461056c578063736308e51461058c57005b80632f745c591461042c57806336568abe1461044c5780633ccfd60b1461046c57806342842e0e146104815780634aca1e4c146104a15780634c48de98146104bd57005b80630c1c972a116102305780630c1c972a1461035e57806318160ddd1461037357806323b872dd14610388578063248a9ca3146103a857806325228ebe146103d85780632f2ff15d1461040c57005b806301ffc9a71461027257806306fdde03146102a7578063081812fc146102c9578063095ea7b3146103015780630b00e0ff1461032157005b3661027057005b005b34801561027e57600080fd5b5061029261028d3660046135ab565b6108a1565b60405190151581526020015b60405180910390f35b3480156102b357600080fd5b506102bc6108b2565b60405161029e9190613620565b3480156102d557600080fd5b506102e96102e4366004613633565b610944565b6040516001600160a01b03909116815260200161029e565b34801561030d57600080fd5b5061027061031c366004613668565b6109de565b34801561032d57600080fd5b5061035061033c366004613633565b620262696020526000908152604090205481565b60405190815260200161029e565b34801561036a57600080fd5b50610270610af3565b34801561037f57600080fd5b50600854610350565b34801561039457600080fd5b506102706103a3366004613692565b610ba3565b3480156103b457600080fd5b506103506103c3366004613633565b6000908152600a602052604090206001015490565b3480156103e457600080fd5b5062026267546103f79063ffffffff1681565b60405163ffffffff909116815260200161029e565b34801561041857600080fd5b506102706104273660046136ce565b610bd4565b34801561043857600080fd5b50610350610447366004613668565b610bfa565b34801561045857600080fd5b506102706104673660046136ce565b610c90565b34801561047857600080fd5b50610270610d0e565b34801561048d57600080fd5b5061027061049c366004613692565b610dc7565b3480156104ad57600080fd5b506202626c546102929060ff1681565b3480156104c957600080fd5b506103f76104d836600461370e565b610de2565b3480156104e957600080fd5b506103506104f8366004613633565b610e2d565b34801561050957600080fd5b506103f7610518366004613633565b610ec0565b34801561052957600080fd5b506102e9610538366004613633565b610ef3565b34801561054957600080fd5b50610350610558366004613633565b6202626a6020526000908152604090205481565b34801561057857600080fd5b5061035061058736600461372a565b610f6a565b34801561059857600080fd5b506103506105a7366004613633565b6202626b6020526000908152604090205481565b3480156105c757600080fd5b506105db6105d6366004613745565b610ff1565b60405161029e9190613760565b3480156105f457600080fd5b506106086106033660046137aa565b611088565b60405161029e91906137cc565b34801561062157600080fd5b50610270610630366004613633565b61112a565b34801561064157600080fd5b506102926106503660046136ce565b61117f565b34801561066157600080fd5b506102bc6111aa565b34801561067657600080fd5b5061027061068536600461389b565b6111b9565b34801561069657600080fd5b50610350600b5481565b3480156106ac57600080fd5b50610350600081565b3480156106c157600080fd5b506102706106d0366004613907565b6113f0565b3480156106e157600080fd5b506202626c5461029290610100900460ff1681565b34801561070257600080fd5b50610270610711366004613943565b6113fb565b34801561072257600080fd5b506102706107313660046139da565b611429565b34801561074257600080fd5b50610270610751366004613ab6565b611461565b34801561076257600080fd5b506102bc6107713660046137aa565b611488565b34801561078257600080fd5b506102bc610791366004613633565b61154d565b3480156107a257600080fd5b506105db6107b13660046137aa565b611bd0565b3480156107c257600080fd5b506102706107d13660046136ce565b611c9c565b6102706107e436600461389b565b611cc2565b6102706107f736600461389b565b611e5c565b34801561080857600080fd5b50610292610817366004613af8565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561085157600080fd5b50610865610860366004613633565b611eed565b60405160ff909116815260200161029e565b34801561088357600080fd5b506102bc611f19565b34801561089857600080fd5b50610270611fa9565b60006108ac82612052565b92915050565b6060600080546108c190613b22565b80601f01602080910402602001604051908101604052809291908181526020018280546108ed90613b22565b801561093a5780601f1061090f5761010080835404028352916020019161093a565b820191906000526020600020905b81548152906001019060200180831161091d57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166109c25760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006109e982610ef3565b9050806001600160a01b0316836001600160a01b031603610a565760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016109b9565b336001600160a01b0382161480610a725750610a728133610817565b610ae45760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016109b9565b610aee8383612077565b505050565b600080516020614634833981519152610b0c81336120e5565b6202626c54610100900460ff1615610b665760405162461bcd60e51b815260206004820152601b60248201527f5075626c69632073616c6520616c72656164792073746172746564000000000060448201526064016109b9565b6202626c805461ff0019166101001790556040517f7f61feaf9de325b870ef0cee2d50d59ea86b10142d5154a6595e06407eeda3e790600090a150565b610bad3382612149565b610bc95760405162461bcd60e51b81526004016109b990613b5c565b610aee838383612240565b6000828152600a6020526040902060010154610bf081336120e5565b610aee83836123e7565b6000610c0583610f6a565b8210610c675760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016109b9565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6001600160a01b0381163314610d005760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016109b9565b610d0a828261246d565b5050565b600080516020614634833981519152610d2781336120e5565b604051479060009073c726a39c79b1decc7f7940e531459471da00825f9083908381818185875af1925050503d8060008114610d7f576040519150601f19603f3d011682016040523d82523d6000602084013e610d84565b606091505b5050905080610aee5760405162461bcd60e51b815260206004820152600f60248201526e2330b4b632b2103a3930b739b332b960891b60448201526064016109b9565b610aee83838360405180602001604052806000815250611429565b620262666020528160005260406000208181548110610e0057600080fd5b9060005260206000209060089182820401919006600402915091509054906101000a900463ffffffff1681565b6000610e3860085490565b8210610e9b5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016109b9565b60088281548110610eae57610eae613bad565b90600052602060002001549050919050565b617a1e81620f42408110610ed357600080fd5b60089182820401919006600402915054906101000a900463ffffffff1681565b6000818152600260205260408120546001600160a01b0316806108ac5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016109b9565b60006001600160a01b038216610fd55760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016109b9565b506001600160a01b031660009081526003602052604090205490565b63ffffffff8116600090815262026266602090815260409182902080548351818402810184019094528084526060939283018282801561107c57602002820191906000526020600020906000905b82829054906101000a900463ffffffff1663ffffffff168152602001906004019060208260030104928301926001038202915080841161103f5790505b50505050509050919050565b60608167ffffffffffffffff8111156110a3576110a36139c4565b6040519080825280602002602001820160405280156110cc578160200160208202803683370190505b50905060005b82811015611123576110e76105388286613bd9565b8282815181106110f9576110f9613bad565b6001600160a01b03909216602092830291909101909101528061111b81613bf1565b9150506110d2565b5092915050565b60008051602061463483398151915261114381336120e5565b600b8290556040518281527fa6dc15bdb68da224c66db4b3838d9a2b205138e8cff6774e57d0af91e196d6229060200160405180910390a15050565b6000918252600a602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600180546108c190613b22565b8281146111d85760405162461bcd60e51b81526004016109b990613c0a565b826112255760405162461bcd60e51b815260206004820152601960248201527f4d75737420736574206174206c65617374203120706978656c0000000000000060448201526064016109b9565b60005b838110156113ac57600085858381811061124457611244613bad565b90506020020160208101906112599190613745565b9050600084848481811061126f5761126f613bad565b919091013560f81c91503390506112c2617a1e63ffffffff8516620f4240811061129b5761129b613bad565b600891828204019190066004029054906101000a900463ffffffff1663ffffffff16610ef3565b6001600160a01b0316146113185760405162461bcd60e51b815260206004820152601f60248201527f4d757374206f776e20706978656c20746f207365742069747320636f6c6f720060448201526064016109b9565b60108160ff161061135b5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21031b7b637b960991b60448201526064016109b9565b80600c8363ffffffff16620f4240811061137757611377613bad565b602091828204019190066101000a81548160ff021916908360ff160217905550505080806113a490613bf1565b915050611228565b507f691126094eaec23fcd17f1b94e91640cfd99ed7798d97f5847eaeb93e866fb09848484846040516113e29493929190613c55565b60405180910390a150505050565b610d0a3383836124d4565b60008051602061463483398151915261141481336120e5565b61142186868686866125a2565b505050505050565b6114333383612149565b61144f5760405162461bcd60e51b81526004016109b990613b5c565b61145b8484848461292a565b50505050565b60008051602061463483398151915261147a81336120e5565b61145b62026268848461344d565b60608167ffffffffffffffff8111156114a3576114a36139c4565b6040519080825280601f01601f1916602001820160405280156114cd576020820181803683370190505b50905060005b8281101561112357600c6114e78286613bd9565b620f424081106114f9576114f9613bad565b602091828204019190069054906101000a900460ff1660f81b82828151811061152457611524613bad565b60200101906001600160f81b031916908160001a9053508061154581613bf1565b9150506114d3565b604080516102408101825260076102008201818152660233030303030360cc1b610220840152825282518084018452818152660233839384439360cc1b6020828101919091528084019190915283518085018552828152662344344437443960c81b8183015283850152835180850185528281526611a3232323232360c91b8183015260608481019190915284518086018652838152660234646343530360cc1b81840152608085015284518086018652838152660234646413830360cc1b8184015260a085015284518086018652838152662346464436333560c81b8184015260c08501528451808601865283815266046606082646c760cb1b8184015260e08501528451808601865283815266119ba2a2a21a9b60c91b81840152610100850152845180860186528381526608cc8d0d4c104d60ca1b8184015261012085015284518086018652838152662333363930454160c81b81840152610140850152845180860186528381526608cd4c514e518d60ca1b818401526101608501528451808601865283815266119c1898a29ca360c91b8184015261018085015284518086018652838152660234234344143360cc1b818401526101a085015284518086018652838152662346463939414160c81b818401526101c08501528451808601865292835266119ca19b1c991b60c91b838301526101e084019290925263ffffffff8516600090815262026266825284812080548651818502810185019097528087529395919391929091908301828280156117d657602002820191906000526020600020906000905b82829054906101000a900463ffffffff1663ffffffff16815260200190600401906020826003010492830192600103820291508084116117995790505b509394506103e8935083925060009150819050805b85518110156118b657600086828151811061180857611808613bad565b6020026020010151905060006103e88263ffffffff166118289190613cdf565b9050600061183e6103e863ffffffff8516613cf3565b90508763ffffffff168263ffffffff161015611858578197505b8663ffffffff168163ffffffff161015611870578096505b8563ffffffff168263ffffffff161115611888578195505b8463ffffffff168163ffffffff1611156118a0578094505b50505080806118ae90613bf1565b9150506117eb565b5060006118c38584613d07565b6118ce906001613d2c565b905060006118dc8584613d07565b6118e7906001613d2c565b905060006119046118ff600563ffffffff8616613d54565b61295d565b6119186118ff600563ffffffff8616613d54565b604051602001611929929190613d8f565b604051602081830303815290604052905060005b8851811015611a6e57600089828151811061195a5761195a613bad565b602002602001015190508261199960058b63ffffffff166103e88563ffffffff166119859190613cdf565b61198f9190613e24565b6118ff9190613d54565b6119b960058b63ffffffff166103e88663ffffffff166119859190613cf3565b8d600c8563ffffffff16620f424081106119d5576119d5613bad565b602081049091015460ff601f9092166101000a900416601081106119fb576119fb613bad565b6020020151604051806040016040528060018152602001603560f81b815250604051806040016040528060018152602001603560f81b815250604051602001611a4996959493929190613e3b565b6040516020818303038152906040529250508080611a6690613bf1565b91505061193d565b5080604051602001611a809190613f31565b60405160208183030381529060405290506000611a9c8c61295d565b611aa58d61295d565b611aaf8b5161295d565b611abe8763ffffffff1661295d565b611acd8763ffffffff1661295d565b62026268604051602001611ae696959493929190613ff4565b604051602081830303815290604052905080611b0183612a5e565b62026268611b0e8f61295d565b604051602001611b2194939291906141c8565b604051602081830303815290604052905080611b428963ffffffff1661295d565b611b518963ffffffff1661295d565b611b608763ffffffff1661295d565b611b6f8763ffffffff1661295d565b611b798e5161295d565b604051602001611b8e96959493929190614297565b604051602081830303815290604052905080604051602001611bb09190614428565b6040516020818303038152906040529a5050505050505050505050919050565b60608167ffffffffffffffff811115611beb57611beb6139c4565b604051908082528060200260200182016040528015611c14578160200160208202803683370190505b50905060005b82811015611123576000617a1e611c318387613bd9565b620f42408110611c4357611c43613bad565b600891828204019190066004029054906101000a900463ffffffff16905080838381518110611c7457611c74613bad565b63ffffffff909216602092830291909101909101525080611c9481613bf1565b915050611c1a565b6000828152600a6020526040902060010154611cb881336120e5565b610aee838361246d565b6202626c5460ff16611d165760405162461bcd60e51b815260206004820152601a60248201527f57686974656c6973742073616c65206e6f74207374617274656400000000000060448201526064016109b9565b8260008080611d3f73fb4ccb3e948fed6946fc528ba806e737edc938c462026269606487612bc8565b9092509050611d4e8185613e24565b93508115611d5b57600192505b611d7f7396ea4f8d4788fb1d48d175cd751daab056ada6276202626a600987612bc8565b9092509050611d8e8185613e24565b93508115611d9b57600192505b611dbf7345929d1754e9fc5450acfbe11f3d620fa2316f3d6202626b600487612bc8565b9092509050611dce8185613e24565b93508115611ddb57600192505b82611e1a5760405162461bcd60e51b815260206004820152600f60248201526e139bdd081dda1a5d195b1a5cdd1959608a1b60448201526064016109b9565b600b54611e279085613d54565b3414611e455760405162461bcd60e51b81526004016109b990614466565b611e5288888888336125a2565b5050505050505050565b6202626c54610100900460ff16611eb55760405162461bcd60e51b815260206004820152601760248201527f5075626c69632073616c65206e6f74207374617274656400000000000000000060448201526064016109b9565b600b54611ec29084613d54565b3414611ee05760405162461bcd60e51b81526004016109b990614466565b61145b84848484336125a2565b600c81620f42408110611eff57600080fd5b60209182820401919006915054906101000a900460ff1681565b620262688054611f2890613b22565b80601f0160208091040260200160405190810160405280929190818152602001828054611f5490613b22565b8015611fa15780601f10611f7657610100808354040283529160200191611fa1565b820191906000526020600020905b815481529060010190602001808311611f8457829003601f168201915b505050505081565b600080516020614634833981519152611fc281336120e5565b6202626c5460ff16156120175760405162461bcd60e51b815260206004820152601e60248201527f57686974656c6973742073616c6520616c72656164792073746172746564000060448201526064016109b9565b6202626c805460ff191660011790556040517f9fd07df6ea4e006e0a19a84db2cd048c2b7cb446fc6af470c13e1e21a03fd80290600090a150565b60006001600160e01b03198216637965db0b60e01b14806108ac57506108ac82612d46565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906120ac82610ef3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6120ef828261117f565b610d0a57612107816001600160a01b03166014612d6b565b612112836020612d6b565b6040516020016121239291906144a9565b60408051601f198184030181529082905262461bcd60e51b82526109b991600401613620565b6000818152600260205260408120546001600160a01b03166121c25760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016109b9565b60006121cd83610ef3565b9050806001600160a01b0316846001600160a01b031614806122085750836001600160a01b03166121fd84610944565b6001600160a01b0316145b8061223857506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661225382610ef3565b6001600160a01b0316146122b75760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016109b9565b6001600160a01b0382166123195760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016109b9565b612324838383612f0e565b61232f600082612077565b6001600160a01b0383166000908152600360205260408120805460019290612358908490613e24565b90915550506001600160a01b0382166000908152600360205260408120805460019290612386908490613bd9565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6123f1828261117f565b610d0a576000828152600a602090815260408083206001600160a01b03851684529091529020805460ff191660011790556124293390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b612477828261117f565b15610d0a576000828152600a602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b816001600160a01b0316836001600160a01b0316036125355760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016109b9565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b8382146125c15760405162461bcd60e51b81526004016109b990613c0a565b8361260e5760405162461bcd60e51b815260206004820152601a60248201527f4d757374206d696e74206174206c65617374203120706978656c00000000000060448201526064016109b9565b6104008411156126605760405162461bcd60e51b815260206004820181905260248201527f43616e2774206d696e74206d6f7265207468616e203130323420706978656c7360448201526064016109b9565b60005b8481101561287157600086868381811061267f5761267f613bad565b90506020020160208101906126949190613745565b905060008585848181106126aa576126aa613bad565b919091013560f81c91506126c290506103e880613d54565b8263ffffffff16106127065760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081c1a5e195b609a1b60448201526064016109b9565b60108160ff16106127495760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21031b7b637b960991b60448201526064016109b9565b617a1e8263ffffffff16620f4240811061276557612765613bad565b60088104919091015460079091166004026101000a900463ffffffff16156127c65760405162461bcd60e51b8152602060048201526014602482015273141a5e195b08185b1c9958591e481b5a5b9d195960621b60448201526064016109b9565b80600c8363ffffffff16620f424081106127e2576127e2613bad565b602091828204019190066101000a81548160ff021916908360ff1602179055506202626760009054906101000a900463ffffffff16617a1e8363ffffffff16620f4240811061283357612833613bad565b600891828204019190066004026101000a81548163ffffffff021916908363ffffffff1602179055505050808061286990613bf1565b915050612663565b50620262675463ffffffff16600090815262026266602052604090206128989086866134d1565b5062026267546128af90829063ffffffff16612f19565b62026267805463ffffffff169060006128c78361451e565b91906101000a81548163ffffffff021916908363ffffffff160217905550507f691126094eaec23fcd17f1b94e91640cfd99ed7798d97f5847eaeb93e866fb098585858560405161291b9493929190613c55565b60405180910390a15050505050565b612935848484612240565b61294184848484612f33565b61145b5760405162461bcd60e51b81526004016109b990614541565b6060816000036129845750506040805180820190915260018152600360fc1b602082015290565b8160005b81156129ae578061299881613bf1565b91506129a79050600a83613cf3565b9150612988565b60008167ffffffffffffffff8111156129c9576129c96139c4565b6040519080825280601f01601f1916602001820160405280156129f3576020820181803683370190505b5090505b841561223857612a08600183613e24565b9150612a15600a86613cdf565b612a20906030613bd9565b60f81b818381518110612a3557612a35613bad565b60200101906001600160f81b031916908160001a905350612a57600a86613cf3565b94506129f7565b80516060906000819003612a82575050604080516020810190915260008152919050565b60006003612a91836002613bd9565b612a9b9190613cf3565b612aa6906004613d54565b90506000612ab5826020613bd9565b67ffffffffffffffff811115612acd57612acd6139c4565b6040519080825280601f01601f191660200182016040528015612af7576020820181803683370190505b5090506000604051806060016040528060408152602001614654604091399050600181016020830160005b86811015612b83576003818a01810151603f601282901c8116860151600c83901c8216870151600684901c831688015192909316870151600891821b60ff94851601821b92841692909201901b91160160e01b835260049092019101612b22565b506003860660018114612b9d5760028114612bae57612bba565b613d3d60f01b600119830152612bba565b603d60f81b6000198301525b505050918152949350505050565b6040516370a0823160e01b8152336004820152600090819081906001600160a01b038816906370a0823190602401602060405180830381865afa158015612c13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c379190614593565b905060008111925060005b81811015612d3b57604051632f745c5960e01b8152336004820152602481018290526000906001600160a01b038a1690632f745c5990604401602060405180830381865afa158015612c98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cbc9190614593565b600081815260208a9052604081205491925090612cd99089613e24565b905080871015612ce65750855b612cf08188613e24565b9650808960008481526020019081526020016000206000828254612d149190613bd9565b90915550612d2490508186613bd9565b945050508080612d3390613bf1565b915050612c42565b505094509492505050565b60006001600160e01b0319821663780e9d6360e01b14806108ac57506108ac82613034565b60606000612d7a836002613d54565b612d85906002613bd9565b67ffffffffffffffff811115612d9d57612d9d6139c4565b6040519080825280601f01601f191660200182016040528015612dc7576020820181803683370190505b509050600360fc1b81600081518110612de257612de2613bad565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612e1157612e11613bad565b60200101906001600160f81b031916908160001a9053506000612e35846002613d54565b612e40906001613bd9565b90505b6001811115612eb8576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612e7457612e74613bad565b1a60f81b828281518110612e8a57612e8a613bad565b60200101906001600160f81b031916908160001a90535060049490941c93612eb1816145ac565b9050612e43565b508315612f075760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016109b9565b9392505050565b610aee838383613084565b610d0a82826040518060200160405280600081525061313c565b60006001600160a01b0384163b1561302957604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612f779033908990889088906004016145c3565b6020604051808303816000875af1925050508015612fb2575060408051601f3d908101601f19168201909252612faf91810190614600565b60015b61300f573d808015612fe0576040519150601f19603f3d011682016040523d82523d6000602084013e612fe5565b606091505b5080516000036130075760405162461bcd60e51b81526004016109b990614541565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612238565b506001949350505050565b60006001600160e01b031982166380ac58cd60e01b148061306557506001600160e01b03198216635b5e139f60e01b145b806108ac57506301ffc9a760e01b6001600160e01b03198316146108ac565b6001600160a01b0383166130df576130da81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b613102565b816001600160a01b0316836001600160a01b03161461310257613102838261316f565b6001600160a01b03821661311957610aee8161320c565b826001600160a01b0316826001600160a01b031614610aee57610aee82826132bb565b61314683836132ff565b6131536000848484612f33565b610aee5760405162461bcd60e51b81526004016109b990614541565b6000600161317c84610f6a565b6131869190613e24565b6000838152600760205260409020549091508082146131d9576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061321e90600190613e24565b6000838152600960205260408120546008805493945090928490811061324657613246613bad565b90600052602060002001549050806008838154811061326757613267613bad565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061329f5761329f61461d565b6001900381819060005260206000200160009055905550505050565b60006132c683610f6a565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b0382166133555760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016109b9565b6000818152600260205260409020546001600160a01b0316156133ba5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016109b9565b6133c660008383612f0e565b6001600160a01b03821660009081526003602052604081208054600192906133ef908490613bd9565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461345990613b22565b90600052602060002090601f01602090048101928261347b57600085556134c1565b82601f106134945782800160ff198235161785556134c1565b828001600101855582156134c1579182015b828111156134c15782358255916020019190600101906134a6565b506134cd92915061357d565b5090565b828054828255906000526020600020906007016008900481019282156134c15791602002820160005b8382111561354457833563ffffffff1683826101000a81548163ffffffff021916908363ffffffff16021790555092602001926004016020816003010492830192600103026134fa565b80156135745782816101000a81549063ffffffff0219169055600401602081600301049283019260010302613544565b50506134cd9291505b5b808211156134cd576000815560010161357e565b6001600160e01b0319811681146135a857600080fd5b50565b6000602082840312156135bd57600080fd5b8135612f0781613592565b60005b838110156135e35781810151838201526020016135cb565b8381111561145b5750506000910152565b6000815180845261360c8160208601602086016135c8565b601f01601f19169290920160200192915050565b602081526000612f0760208301846135f4565b60006020828403121561364557600080fd5b5035919050565b80356001600160a01b038116811461366357600080fd5b919050565b6000806040838503121561367b57600080fd5b6136848361364c565b946020939093013593505050565b6000806000606084860312156136a757600080fd5b6136b08461364c565b92506136be6020850161364c565b9150604084013590509250925092565b600080604083850312156136e157600080fd5b823591506136f16020840161364c565b90509250929050565b803563ffffffff8116811461366357600080fd5b6000806040838503121561372157600080fd5b613684836136fa565b60006020828403121561373c57600080fd5b612f078261364c565b60006020828403121561375757600080fd5b612f07826136fa565b6020808252825182820181905260009190848201906040850190845b8181101561379e57835163ffffffff168352928401929184019160010161377c565b50909695505050505050565b600080604083850312156137bd57600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b8181101561379e5783516001600160a01b0316835292840192918401916001016137e8565b60008083601f84011261381f57600080fd5b50813567ffffffffffffffff81111561383757600080fd5b6020830191508360208260051b850101111561385257600080fd5b9250929050565b60008083601f84011261386b57600080fd5b50813567ffffffffffffffff81111561388357600080fd5b60208301915083602082850101111561385257600080fd5b600080600080604085870312156138b157600080fd5b843567ffffffffffffffff808211156138c957600080fd5b6138d58883890161380d565b909650945060208701359150808211156138ee57600080fd5b506138fb87828801613859565b95989497509550505050565b6000806040838503121561391a57600080fd5b6139238361364c565b91506020830135801515811461393857600080fd5b809150509250929050565b60008060008060006060868803121561395b57600080fd5b853567ffffffffffffffff8082111561397357600080fd5b61397f89838a0161380d565b9097509550602088013591508082111561399857600080fd5b506139a588828901613859565b90945092506139b890506040870161364c565b90509295509295909350565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156139f057600080fd5b6139f98561364c565b9350613a076020860161364c565b925060408501359150606085013567ffffffffffffffff80821115613a2b57600080fd5b818701915087601f830112613a3f57600080fd5b813581811115613a5157613a516139c4565b604051601f8201601f19908116603f01168101908382118183101715613a7957613a796139c4565b816040528281528a6020848701011115613a9257600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060208385031215613ac957600080fd5b823567ffffffffffffffff811115613ae057600080fd5b613aec85828601613859565b90969095509350505050565b60008060408385031215613b0b57600080fd5b613b148361364c565b91506136f16020840161364c565b600181811c90821680613b3657607f821691505b602082108103613b5657634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115613bec57613bec613bc3565b500190565b600060018201613c0357613c03613bc3565b5060010190565b6020808252602b908201527f706978656c7320616e6420636f6c6f72732073686f756c64206265206f66206560408201526a0e2eac2d840d8cadccee8d60ab1b606082015260800190565b6040808252810184905260008560608301825b87811015613c935763ffffffff613c7e846136fa565b16825260209283019290910190600101613c68565b508381036020850152848152848660208301376000602086830101526020601f19601f8701168201019250505095945050505050565b634e487b7160e01b600052601260045260246000fd5b600082613cee57613cee613cc9565b500690565b600082613d0257613d02613cc9565b500490565b600063ffffffff83811690831681811015613d2457613d24613bc3565b039392505050565b600063ffffffff808316818516808303821115613d4b57613d4b613bc3565b01949350505050565b6000816000190483118215151615613d6e57613d6e613bc3565b500290565b60008151613d858185602086016135c8565b9290920192915050565b7f3c73766720786d6c6e733d27687474703a2f2f7777772e77332e6f72672f323081526e30302f737667272077696474683d2760881b602082015260008351613ddf81602f8501602088016135c8565b6927206865696768743d2760b01b602f918401918201528351613e098160398401602088016135c8565b61139f60f11b60399290910191820152603b01949350505050565b600082821015613e3657613e36613bc3565b500390565b60008751613e4d818460208c016135c8565b683c7265637420783d2760b81b9083019081528751613e73816009840160208c016135c8565b642720793d2760d81b600992909101918201528651613e9981600e840160208b016135c8565b67272066696c6c3d2760c01b600e92909101918201528551613ec2816016840160208a016135c8565b68272077696474683d2760b81b601692909101918201528451613eec81601f8401602089016135c8565b6927206865696768743d2760b01b601f9290910191820152613f24613f146029830186613d73565b631390179f60e11b815260040190565b9998505050505050505050565b60008251613f438184602087016135c8565b651e17b9bb339f60d11b920191825250600601919050565b8054600090600181811c9080831680613f7557607f831692505b60208084108203613f9657634e487b7160e01b600052602260045260246000fd5b818015613faa5760018114613fbb57613fe8565b60ff19861689528489019650613fe8565b60008881526020902060005b86811015613fe05781548b820152908501908301613fc7565b505084890196505b50505050505092915050565b747b226e616d65223a2022506978656c20417274202360581b81528651600090614025816015850160208c016135c8565b7f222c226465736372697074696f6e223a20222a2a506978656c204172742023006015918401918201528751614062816034840160208c016135c8565b66151510102e371560c91b60349290910191820152865161408a81603b840160208b016135c8565b7f20706978656c73206f6e20626c6f636b636861696e2a20205c6e5c6e54686973603b92909101918201527f20616d617a696e672066756c6c79206f6e2d636861696e200000000000000000605b82015285516140ee816073840160208a016135c8565b6141ba6141ac6141a6614116614110607386880101600f60fb1b815260010190565b8a613d73565b7f2061727420706965636520776173206d696e746564206f6e202a2a72653a506c81527f6163652a2a2c207468652031206d696c6c696f6e206f6e2d636861696e20706960208201527f78656c73204e46542070726f6a65637420205c6e5c6e436865636b206f75742060408201527103a343290333ab6361031b0b73b30b99016960751b606082015260720190565b87613f5b565b61088b60f21b815260020190565b9a9950505050505050505050565b600085516141da818460208a016135c8565b80830190507f22696d6167655f64617461223a2022646174613a696d6167652f7376672b786d8152681b0ed8985cd94d8d0b60ba1b60208201528551614227816029840160208a016135c8565b7211161132bc3a32b93730b62fbab936111d101160691b60299290910191820152614255603c820186613f5b565b9050693f706978656c4172743d60b01b8152835161427a81600a8401602088016135c8565b61088b60f21b600a9290910191820152600c019695505050505050565b600087516142a9818460208c016135c8565b80830190507f2261747472696275746573223a5b7b2274726169745f74797065223a2022582281526b1610113b30b63ab2911d101160a11b602082015287516142f981602c840160208c016135c8565b7f227d2c7b2274726169745f74797065223a202259222c202276616c7565223a20602c9290910191820152601160f91b604c820152865161434181604d840160208b016135c8565b7f227d2c7b2274726169745f74797065223a20225769647468222c202276616c75604d92909101918201526432911d101160d91b606d820152855161438d816072840160208a016135c8565b6141ba6144186144126143da6141106072868801017f227d2c7b2274726169745f74797065223a2022486569676874222c202276616c8152653ab2911d101160d11b602082015260260190565b7f227d2c7b2274726169745f74797065223a2022506978656c73222c202276616c8152653ab2911d101160d11b602082015260260190565b87613d73565b63227d5d7d60e01b815260040190565b7519185d184e985c1c1b1a58d85d1a5bdb8bda9cdbdb8b60521b8152600082516144598160168501602087016135c8565b9190910160160192915050565b60208082526023908201527f416d6f756e74206f662045746865722073656e74206973206e6f7420636f72726040820152621958dd60ea1b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516144e18160178501602088016135c8565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516145128160288401602088016135c8565b01602801949350505050565b600063ffffffff80831681810361453757614537613bc3565b6001019392505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000602082840312156145a557600080fd5b5051919050565b6000816145bb576145bb613bc3565b506000190190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906145f6908301846135f4565b9695505050505050565b60006020828403121561461257600080fd5b8151612f0781613592565b634e487b7160e01b600052603160045260246000fdfe241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b084142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212200faedad459f940c2a203ec569fd8553353f8a6d52cd9014b1863b06be9f974a464736f6c634300080d0033241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b08
Deployed Bytecode
0x6080604052600436106102695760003560e01c80637f87198d11610143578063b88d4fde116100bb578063d55a176e11610077578063d55a176e146107d6578063e1c7bc93146107e9578063e985e9c5146107fc578063f01f79a214610845578063f56026af14610877578063ff44e9151461088c57005b8063b88d4fde14610716578063c506301d14610736578063c6cce90514610756578063c87b56dd14610776578063cb36863814610796578063d547741f146107b657005b806396c8f0511161010a57806396c8f0511461066a578063a035b1fe1461068a578063a217fddf146106a0578063a22cb465146106b5578063a2e91477146106d5578063a313543f146106f657005b80637f87198d146105bb5780637fcbfa1a146105e857806391b7f5ed1461061557806391d148541461063557806395d89b411461065557005b80632f745c59116101e15780634f6ccce71161019d5780634f6ccce7146104dd578063625f596f146104fd5780636352211e1461051d57806367c5fe871461053d57806370a082311461056c578063736308e51461058c57005b80632f745c591461042c57806336568abe1461044c5780633ccfd60b1461046c57806342842e0e146104815780634aca1e4c146104a15780634c48de98146104bd57005b80630c1c972a116102305780630c1c972a1461035e57806318160ddd1461037357806323b872dd14610388578063248a9ca3146103a857806325228ebe146103d85780632f2ff15d1461040c57005b806301ffc9a71461027257806306fdde03146102a7578063081812fc146102c9578063095ea7b3146103015780630b00e0ff1461032157005b3661027057005b005b34801561027e57600080fd5b5061029261028d3660046135ab565b6108a1565b60405190151581526020015b60405180910390f35b3480156102b357600080fd5b506102bc6108b2565b60405161029e9190613620565b3480156102d557600080fd5b506102e96102e4366004613633565b610944565b6040516001600160a01b03909116815260200161029e565b34801561030d57600080fd5b5061027061031c366004613668565b6109de565b34801561032d57600080fd5b5061035061033c366004613633565b620262696020526000908152604090205481565b60405190815260200161029e565b34801561036a57600080fd5b50610270610af3565b34801561037f57600080fd5b50600854610350565b34801561039457600080fd5b506102706103a3366004613692565b610ba3565b3480156103b457600080fd5b506103506103c3366004613633565b6000908152600a602052604090206001015490565b3480156103e457600080fd5b5062026267546103f79063ffffffff1681565b60405163ffffffff909116815260200161029e565b34801561041857600080fd5b506102706104273660046136ce565b610bd4565b34801561043857600080fd5b50610350610447366004613668565b610bfa565b34801561045857600080fd5b506102706104673660046136ce565b610c90565b34801561047857600080fd5b50610270610d0e565b34801561048d57600080fd5b5061027061049c366004613692565b610dc7565b3480156104ad57600080fd5b506202626c546102929060ff1681565b3480156104c957600080fd5b506103f76104d836600461370e565b610de2565b3480156104e957600080fd5b506103506104f8366004613633565b610e2d565b34801561050957600080fd5b506103f7610518366004613633565b610ec0565b34801561052957600080fd5b506102e9610538366004613633565b610ef3565b34801561054957600080fd5b50610350610558366004613633565b6202626a6020526000908152604090205481565b34801561057857600080fd5b5061035061058736600461372a565b610f6a565b34801561059857600080fd5b506103506105a7366004613633565b6202626b6020526000908152604090205481565b3480156105c757600080fd5b506105db6105d6366004613745565b610ff1565b60405161029e9190613760565b3480156105f457600080fd5b506106086106033660046137aa565b611088565b60405161029e91906137cc565b34801561062157600080fd5b50610270610630366004613633565b61112a565b34801561064157600080fd5b506102926106503660046136ce565b61117f565b34801561066157600080fd5b506102bc6111aa565b34801561067657600080fd5b5061027061068536600461389b565b6111b9565b34801561069657600080fd5b50610350600b5481565b3480156106ac57600080fd5b50610350600081565b3480156106c157600080fd5b506102706106d0366004613907565b6113f0565b3480156106e157600080fd5b506202626c5461029290610100900460ff1681565b34801561070257600080fd5b50610270610711366004613943565b6113fb565b34801561072257600080fd5b506102706107313660046139da565b611429565b34801561074257600080fd5b50610270610751366004613ab6565b611461565b34801561076257600080fd5b506102bc6107713660046137aa565b611488565b34801561078257600080fd5b506102bc610791366004613633565b61154d565b3480156107a257600080fd5b506105db6107b13660046137aa565b611bd0565b3480156107c257600080fd5b506102706107d13660046136ce565b611c9c565b6102706107e436600461389b565b611cc2565b6102706107f736600461389b565b611e5c565b34801561080857600080fd5b50610292610817366004613af8565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561085157600080fd5b50610865610860366004613633565b611eed565b60405160ff909116815260200161029e565b34801561088357600080fd5b506102bc611f19565b34801561089857600080fd5b50610270611fa9565b60006108ac82612052565b92915050565b6060600080546108c190613b22565b80601f01602080910402602001604051908101604052809291908181526020018280546108ed90613b22565b801561093a5780601f1061090f5761010080835404028352916020019161093a565b820191906000526020600020905b81548152906001019060200180831161091d57829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b03166109c25760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b60006109e982610ef3565b9050806001600160a01b0316836001600160a01b031603610a565760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016109b9565b336001600160a01b0382161480610a725750610a728133610817565b610ae45760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016109b9565b610aee8383612077565b505050565b600080516020614634833981519152610b0c81336120e5565b6202626c54610100900460ff1615610b665760405162461bcd60e51b815260206004820152601b60248201527f5075626c69632073616c6520616c72656164792073746172746564000000000060448201526064016109b9565b6202626c805461ff0019166101001790556040517f7f61feaf9de325b870ef0cee2d50d59ea86b10142d5154a6595e06407eeda3e790600090a150565b610bad3382612149565b610bc95760405162461bcd60e51b81526004016109b990613b5c565b610aee838383612240565b6000828152600a6020526040902060010154610bf081336120e5565b610aee83836123e7565b6000610c0583610f6a565b8210610c675760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016109b9565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6001600160a01b0381163314610d005760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b60648201526084016109b9565b610d0a828261246d565b5050565b600080516020614634833981519152610d2781336120e5565b604051479060009073c726a39c79b1decc7f7940e531459471da00825f9083908381818185875af1925050503d8060008114610d7f576040519150601f19603f3d011682016040523d82523d6000602084013e610d84565b606091505b5050905080610aee5760405162461bcd60e51b815260206004820152600f60248201526e2330b4b632b2103a3930b739b332b960891b60448201526064016109b9565b610aee83838360405180602001604052806000815250611429565b620262666020528160005260406000208181548110610e0057600080fd5b9060005260206000209060089182820401919006600402915091509054906101000a900463ffffffff1681565b6000610e3860085490565b8210610e9b5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016109b9565b60088281548110610eae57610eae613bad565b90600052602060002001549050919050565b617a1e81620f42408110610ed357600080fd5b60089182820401919006600402915054906101000a900463ffffffff1681565b6000818152600260205260408120546001600160a01b0316806108ac5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016109b9565b60006001600160a01b038216610fd55760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016109b9565b506001600160a01b031660009081526003602052604090205490565b63ffffffff8116600090815262026266602090815260409182902080548351818402810184019094528084526060939283018282801561107c57602002820191906000526020600020906000905b82829054906101000a900463ffffffff1663ffffffff168152602001906004019060208260030104928301926001038202915080841161103f5790505b50505050509050919050565b60608167ffffffffffffffff8111156110a3576110a36139c4565b6040519080825280602002602001820160405280156110cc578160200160208202803683370190505b50905060005b82811015611123576110e76105388286613bd9565b8282815181106110f9576110f9613bad565b6001600160a01b03909216602092830291909101909101528061111b81613bf1565b9150506110d2565b5092915050565b60008051602061463483398151915261114381336120e5565b600b8290556040518281527fa6dc15bdb68da224c66db4b3838d9a2b205138e8cff6774e57d0af91e196d6229060200160405180910390a15050565b6000918252600a602090815260408084206001600160a01b0393909316845291905290205460ff1690565b6060600180546108c190613b22565b8281146111d85760405162461bcd60e51b81526004016109b990613c0a565b826112255760405162461bcd60e51b815260206004820152601960248201527f4d75737420736574206174206c65617374203120706978656c0000000000000060448201526064016109b9565b60005b838110156113ac57600085858381811061124457611244613bad565b90506020020160208101906112599190613745565b9050600084848481811061126f5761126f613bad565b919091013560f81c91503390506112c2617a1e63ffffffff8516620f4240811061129b5761129b613bad565b600891828204019190066004029054906101000a900463ffffffff1663ffffffff16610ef3565b6001600160a01b0316146113185760405162461bcd60e51b815260206004820152601f60248201527f4d757374206f776e20706978656c20746f207365742069747320636f6c6f720060448201526064016109b9565b60108160ff161061135b5760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21031b7b637b960991b60448201526064016109b9565b80600c8363ffffffff16620f4240811061137757611377613bad565b602091828204019190066101000a81548160ff021916908360ff160217905550505080806113a490613bf1565b915050611228565b507f691126094eaec23fcd17f1b94e91640cfd99ed7798d97f5847eaeb93e866fb09848484846040516113e29493929190613c55565b60405180910390a150505050565b610d0a3383836124d4565b60008051602061463483398151915261141481336120e5565b61142186868686866125a2565b505050505050565b6114333383612149565b61144f5760405162461bcd60e51b81526004016109b990613b5c565b61145b8484848461292a565b50505050565b60008051602061463483398151915261147a81336120e5565b61145b62026268848461344d565b60608167ffffffffffffffff8111156114a3576114a36139c4565b6040519080825280601f01601f1916602001820160405280156114cd576020820181803683370190505b50905060005b8281101561112357600c6114e78286613bd9565b620f424081106114f9576114f9613bad565b602091828204019190069054906101000a900460ff1660f81b82828151811061152457611524613bad565b60200101906001600160f81b031916908160001a9053508061154581613bf1565b9150506114d3565b604080516102408101825260076102008201818152660233030303030360cc1b610220840152825282518084018452818152660233839384439360cc1b6020828101919091528084019190915283518085018552828152662344344437443960c81b8183015283850152835180850185528281526611a3232323232360c91b8183015260608481019190915284518086018652838152660234646343530360cc1b81840152608085015284518086018652838152660234646413830360cc1b8184015260a085015284518086018652838152662346464436333560c81b8184015260c08501528451808601865283815266046606082646c760cb1b8184015260e08501528451808601865283815266119ba2a2a21a9b60c91b81840152610100850152845180860186528381526608cc8d0d4c104d60ca1b8184015261012085015284518086018652838152662333363930454160c81b81840152610140850152845180860186528381526608cd4c514e518d60ca1b818401526101608501528451808601865283815266119c1898a29ca360c91b8184015261018085015284518086018652838152660234234344143360cc1b818401526101a085015284518086018652838152662346463939414160c81b818401526101c08501528451808601865292835266119ca19b1c991b60c91b838301526101e084019290925263ffffffff8516600090815262026266825284812080548651818502810185019097528087529395919391929091908301828280156117d657602002820191906000526020600020906000905b82829054906101000a900463ffffffff1663ffffffff16815260200190600401906020826003010492830192600103820291508084116117995790505b509394506103e8935083925060009150819050805b85518110156118b657600086828151811061180857611808613bad565b6020026020010151905060006103e88263ffffffff166118289190613cdf565b9050600061183e6103e863ffffffff8516613cf3565b90508763ffffffff168263ffffffff161015611858578197505b8663ffffffff168163ffffffff161015611870578096505b8563ffffffff168263ffffffff161115611888578195505b8463ffffffff168163ffffffff1611156118a0578094505b50505080806118ae90613bf1565b9150506117eb565b5060006118c38584613d07565b6118ce906001613d2c565b905060006118dc8584613d07565b6118e7906001613d2c565b905060006119046118ff600563ffffffff8616613d54565b61295d565b6119186118ff600563ffffffff8616613d54565b604051602001611929929190613d8f565b604051602081830303815290604052905060005b8851811015611a6e57600089828151811061195a5761195a613bad565b602002602001015190508261199960058b63ffffffff166103e88563ffffffff166119859190613cdf565b61198f9190613e24565b6118ff9190613d54565b6119b960058b63ffffffff166103e88663ffffffff166119859190613cf3565b8d600c8563ffffffff16620f424081106119d5576119d5613bad565b602081049091015460ff601f9092166101000a900416601081106119fb576119fb613bad565b6020020151604051806040016040528060018152602001603560f81b815250604051806040016040528060018152602001603560f81b815250604051602001611a4996959493929190613e3b565b6040516020818303038152906040529250508080611a6690613bf1565b91505061193d565b5080604051602001611a809190613f31565b60405160208183030381529060405290506000611a9c8c61295d565b611aa58d61295d565b611aaf8b5161295d565b611abe8763ffffffff1661295d565b611acd8763ffffffff1661295d565b62026268604051602001611ae696959493929190613ff4565b604051602081830303815290604052905080611b0183612a5e565b62026268611b0e8f61295d565b604051602001611b2194939291906141c8565b604051602081830303815290604052905080611b428963ffffffff1661295d565b611b518963ffffffff1661295d565b611b608763ffffffff1661295d565b611b6f8763ffffffff1661295d565b611b798e5161295d565b604051602001611b8e96959493929190614297565b604051602081830303815290604052905080604051602001611bb09190614428565b6040516020818303038152906040529a5050505050505050505050919050565b60608167ffffffffffffffff811115611beb57611beb6139c4565b604051908082528060200260200182016040528015611c14578160200160208202803683370190505b50905060005b82811015611123576000617a1e611c318387613bd9565b620f42408110611c4357611c43613bad565b600891828204019190066004029054906101000a900463ffffffff16905080838381518110611c7457611c74613bad565b63ffffffff909216602092830291909101909101525080611c9481613bf1565b915050611c1a565b6000828152600a6020526040902060010154611cb881336120e5565b610aee838361246d565b6202626c5460ff16611d165760405162461bcd60e51b815260206004820152601a60248201527f57686974656c6973742073616c65206e6f74207374617274656400000000000060448201526064016109b9565b8260008080611d3f73fb4ccb3e948fed6946fc528ba806e737edc938c462026269606487612bc8565b9092509050611d4e8185613e24565b93508115611d5b57600192505b611d7f7396ea4f8d4788fb1d48d175cd751daab056ada6276202626a600987612bc8565b9092509050611d8e8185613e24565b93508115611d9b57600192505b611dbf7345929d1754e9fc5450acfbe11f3d620fa2316f3d6202626b600487612bc8565b9092509050611dce8185613e24565b93508115611ddb57600192505b82611e1a5760405162461bcd60e51b815260206004820152600f60248201526e139bdd081dda1a5d195b1a5cdd1959608a1b60448201526064016109b9565b600b54611e279085613d54565b3414611e455760405162461bcd60e51b81526004016109b990614466565b611e5288888888336125a2565b5050505050505050565b6202626c54610100900460ff16611eb55760405162461bcd60e51b815260206004820152601760248201527f5075626c69632073616c65206e6f74207374617274656400000000000000000060448201526064016109b9565b600b54611ec29084613d54565b3414611ee05760405162461bcd60e51b81526004016109b990614466565b61145b84848484336125a2565b600c81620f42408110611eff57600080fd5b60209182820401919006915054906101000a900460ff1681565b620262688054611f2890613b22565b80601f0160208091040260200160405190810160405280929190818152602001828054611f5490613b22565b8015611fa15780601f10611f7657610100808354040283529160200191611fa1565b820191906000526020600020905b815481529060010190602001808311611f8457829003601f168201915b505050505081565b600080516020614634833981519152611fc281336120e5565b6202626c5460ff16156120175760405162461bcd60e51b815260206004820152601e60248201527f57686974656c6973742073616c6520616c72656164792073746172746564000060448201526064016109b9565b6202626c805460ff191660011790556040517f9fd07df6ea4e006e0a19a84db2cd048c2b7cb446fc6af470c13e1e21a03fd80290600090a150565b60006001600160e01b03198216637965db0b60e01b14806108ac57506108ac82612d46565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906120ac82610ef3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6120ef828261117f565b610d0a57612107816001600160a01b03166014612d6b565b612112836020612d6b565b6040516020016121239291906144a9565b60408051601f198184030181529082905262461bcd60e51b82526109b991600401613620565b6000818152600260205260408120546001600160a01b03166121c25760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016109b9565b60006121cd83610ef3565b9050806001600160a01b0316846001600160a01b031614806122085750836001600160a01b03166121fd84610944565b6001600160a01b0316145b8061223857506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b031661225382610ef3565b6001600160a01b0316146122b75760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b60648201526084016109b9565b6001600160a01b0382166123195760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016109b9565b612324838383612f0e565b61232f600082612077565b6001600160a01b0383166000908152600360205260408120805460019290612358908490613e24565b90915550506001600160a01b0382166000908152600360205260408120805460019290612386908490613bd9565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6123f1828261117f565b610d0a576000828152600a602090815260408083206001600160a01b03851684529091529020805460ff191660011790556124293390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b612477828261117f565b15610d0a576000828152600a602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b816001600160a01b0316836001600160a01b0316036125355760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016109b9565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b8382146125c15760405162461bcd60e51b81526004016109b990613c0a565b8361260e5760405162461bcd60e51b815260206004820152601a60248201527f4d757374206d696e74206174206c65617374203120706978656c00000000000060448201526064016109b9565b6104008411156126605760405162461bcd60e51b815260206004820181905260248201527f43616e2774206d696e74206d6f7265207468616e203130323420706978656c7360448201526064016109b9565b60005b8481101561287157600086868381811061267f5761267f613bad565b90506020020160208101906126949190613745565b905060008585848181106126aa576126aa613bad565b919091013560f81c91506126c290506103e880613d54565b8263ffffffff16106127065760405162461bcd60e51b815260206004820152600d60248201526c125b9d985b1a59081c1a5e195b609a1b60448201526064016109b9565b60108160ff16106127495760405162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21031b7b637b960991b60448201526064016109b9565b617a1e8263ffffffff16620f4240811061276557612765613bad565b60088104919091015460079091166004026101000a900463ffffffff16156127c65760405162461bcd60e51b8152602060048201526014602482015273141a5e195b08185b1c9958591e481b5a5b9d195960621b60448201526064016109b9565b80600c8363ffffffff16620f424081106127e2576127e2613bad565b602091828204019190066101000a81548160ff021916908360ff1602179055506202626760009054906101000a900463ffffffff16617a1e8363ffffffff16620f4240811061283357612833613bad565b600891828204019190066004026101000a81548163ffffffff021916908363ffffffff1602179055505050808061286990613bf1565b915050612663565b50620262675463ffffffff16600090815262026266602052604090206128989086866134d1565b5062026267546128af90829063ffffffff16612f19565b62026267805463ffffffff169060006128c78361451e565b91906101000a81548163ffffffff021916908363ffffffff160217905550507f691126094eaec23fcd17f1b94e91640cfd99ed7798d97f5847eaeb93e866fb098585858560405161291b9493929190613c55565b60405180910390a15050505050565b612935848484612240565b61294184848484612f33565b61145b5760405162461bcd60e51b81526004016109b990614541565b6060816000036129845750506040805180820190915260018152600360fc1b602082015290565b8160005b81156129ae578061299881613bf1565b91506129a79050600a83613cf3565b9150612988565b60008167ffffffffffffffff8111156129c9576129c96139c4565b6040519080825280601f01601f1916602001820160405280156129f3576020820181803683370190505b5090505b841561223857612a08600183613e24565b9150612a15600a86613cdf565b612a20906030613bd9565b60f81b818381518110612a3557612a35613bad565b60200101906001600160f81b031916908160001a905350612a57600a86613cf3565b94506129f7565b80516060906000819003612a82575050604080516020810190915260008152919050565b60006003612a91836002613bd9565b612a9b9190613cf3565b612aa6906004613d54565b90506000612ab5826020613bd9565b67ffffffffffffffff811115612acd57612acd6139c4565b6040519080825280601f01601f191660200182016040528015612af7576020820181803683370190505b5090506000604051806060016040528060408152602001614654604091399050600181016020830160005b86811015612b83576003818a01810151603f601282901c8116860151600c83901c8216870151600684901c831688015192909316870151600891821b60ff94851601821b92841692909201901b91160160e01b835260049092019101612b22565b506003860660018114612b9d5760028114612bae57612bba565b613d3d60f01b600119830152612bba565b603d60f81b6000198301525b505050918152949350505050565b6040516370a0823160e01b8152336004820152600090819081906001600160a01b038816906370a0823190602401602060405180830381865afa158015612c13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612c379190614593565b905060008111925060005b81811015612d3b57604051632f745c5960e01b8152336004820152602481018290526000906001600160a01b038a1690632f745c5990604401602060405180830381865afa158015612c98573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cbc9190614593565b600081815260208a9052604081205491925090612cd99089613e24565b905080871015612ce65750855b612cf08188613e24565b9650808960008481526020019081526020016000206000828254612d149190613bd9565b90915550612d2490508186613bd9565b945050508080612d3390613bf1565b915050612c42565b505094509492505050565b60006001600160e01b0319821663780e9d6360e01b14806108ac57506108ac82613034565b60606000612d7a836002613d54565b612d85906002613bd9565b67ffffffffffffffff811115612d9d57612d9d6139c4565b6040519080825280601f01601f191660200182016040528015612dc7576020820181803683370190505b509050600360fc1b81600081518110612de257612de2613bad565b60200101906001600160f81b031916908160001a905350600f60fb1b81600181518110612e1157612e11613bad565b60200101906001600160f81b031916908160001a9053506000612e35846002613d54565b612e40906001613bd9565b90505b6001811115612eb8576f181899199a1a9b1b9c1cb0b131b232b360811b85600f1660108110612e7457612e74613bad565b1a60f81b828281518110612e8a57612e8a613bad565b60200101906001600160f81b031916908160001a90535060049490941c93612eb1816145ac565b9050612e43565b508315612f075760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e7460448201526064016109b9565b9392505050565b610aee838383613084565b610d0a82826040518060200160405280600081525061313c565b60006001600160a01b0384163b1561302957604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612f779033908990889088906004016145c3565b6020604051808303816000875af1925050508015612fb2575060408051601f3d908101601f19168201909252612faf91810190614600565b60015b61300f573d808015612fe0576040519150601f19603f3d011682016040523d82523d6000602084013e612fe5565b606091505b5080516000036130075760405162461bcd60e51b81526004016109b990614541565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612238565b506001949350505050565b60006001600160e01b031982166380ac58cd60e01b148061306557506001600160e01b03198216635b5e139f60e01b145b806108ac57506301ffc9a760e01b6001600160e01b03198316146108ac565b6001600160a01b0383166130df576130da81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b613102565b816001600160a01b0316836001600160a01b03161461310257613102838261316f565b6001600160a01b03821661311957610aee8161320c565b826001600160a01b0316826001600160a01b031614610aee57610aee82826132bb565b61314683836132ff565b6131536000848484612f33565b610aee5760405162461bcd60e51b81526004016109b990614541565b6000600161317c84610f6a565b6131869190613e24565b6000838152600760205260409020549091508082146131d9576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061321e90600190613e24565b6000838152600960205260408120546008805493945090928490811061324657613246613bad565b90600052602060002001549050806008838154811061326757613267613bad565b600091825260208083209091019290925582815260099091526040808220849055858252812055600880548061329f5761329f61461d565b6001900381819060005260206000200160009055905550505050565b60006132c683610f6a565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6001600160a01b0382166133555760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016109b9565b6000818152600260205260409020546001600160a01b0316156133ba5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016109b9565b6133c660008383612f0e565b6001600160a01b03821660009081526003602052604081208054600192906133ef908490613bd9565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b82805461345990613b22565b90600052602060002090601f01602090048101928261347b57600085556134c1565b82601f106134945782800160ff198235161785556134c1565b828001600101855582156134c1579182015b828111156134c15782358255916020019190600101906134a6565b506134cd92915061357d565b5090565b828054828255906000526020600020906007016008900481019282156134c15791602002820160005b8382111561354457833563ffffffff1683826101000a81548163ffffffff021916908363ffffffff16021790555092602001926004016020816003010492830192600103026134fa565b80156135745782816101000a81549063ffffffff0219169055600401602081600301049283019260010302613544565b50506134cd9291505b5b808211156134cd576000815560010161357e565b6001600160e01b0319811681146135a857600080fd5b50565b6000602082840312156135bd57600080fd5b8135612f0781613592565b60005b838110156135e35781810151838201526020016135cb565b8381111561145b5750506000910152565b6000815180845261360c8160208601602086016135c8565b601f01601f19169290920160200192915050565b602081526000612f0760208301846135f4565b60006020828403121561364557600080fd5b5035919050565b80356001600160a01b038116811461366357600080fd5b919050565b6000806040838503121561367b57600080fd5b6136848361364c565b946020939093013593505050565b6000806000606084860312156136a757600080fd5b6136b08461364c565b92506136be6020850161364c565b9150604084013590509250925092565b600080604083850312156136e157600080fd5b823591506136f16020840161364c565b90509250929050565b803563ffffffff8116811461366357600080fd5b6000806040838503121561372157600080fd5b613684836136fa565b60006020828403121561373c57600080fd5b612f078261364c565b60006020828403121561375757600080fd5b612f07826136fa565b6020808252825182820181905260009190848201906040850190845b8181101561379e57835163ffffffff168352928401929184019160010161377c565b50909695505050505050565b600080604083850312156137bd57600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b8181101561379e5783516001600160a01b0316835292840192918401916001016137e8565b60008083601f84011261381f57600080fd5b50813567ffffffffffffffff81111561383757600080fd5b6020830191508360208260051b850101111561385257600080fd5b9250929050565b60008083601f84011261386b57600080fd5b50813567ffffffffffffffff81111561388357600080fd5b60208301915083602082850101111561385257600080fd5b600080600080604085870312156138b157600080fd5b843567ffffffffffffffff808211156138c957600080fd5b6138d58883890161380d565b909650945060208701359150808211156138ee57600080fd5b506138fb87828801613859565b95989497509550505050565b6000806040838503121561391a57600080fd5b6139238361364c565b91506020830135801515811461393857600080fd5b809150509250929050565b60008060008060006060868803121561395b57600080fd5b853567ffffffffffffffff8082111561397357600080fd5b61397f89838a0161380d565b9097509550602088013591508082111561399857600080fd5b506139a588828901613859565b90945092506139b890506040870161364c565b90509295509295909350565b634e487b7160e01b600052604160045260246000fd5b600080600080608085870312156139f057600080fd5b6139f98561364c565b9350613a076020860161364c565b925060408501359150606085013567ffffffffffffffff80821115613a2b57600080fd5b818701915087601f830112613a3f57600080fd5b813581811115613a5157613a516139c4565b604051601f8201601f19908116603f01168101908382118183101715613a7957613a796139c4565b816040528281528a6020848701011115613a9257600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060208385031215613ac957600080fd5b823567ffffffffffffffff811115613ae057600080fd5b613aec85828601613859565b90969095509350505050565b60008060408385031215613b0b57600080fd5b613b148361364c565b91506136f16020840161364c565b600181811c90821680613b3657607f821691505b602082108103613b5657634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008219821115613bec57613bec613bc3565b500190565b600060018201613c0357613c03613bc3565b5060010190565b6020808252602b908201527f706978656c7320616e6420636f6c6f72732073686f756c64206265206f66206560408201526a0e2eac2d840d8cadccee8d60ab1b606082015260800190565b6040808252810184905260008560608301825b87811015613c935763ffffffff613c7e846136fa565b16825260209283019290910190600101613c68565b508381036020850152848152848660208301376000602086830101526020601f19601f8701168201019250505095945050505050565b634e487b7160e01b600052601260045260246000fd5b600082613cee57613cee613cc9565b500690565b600082613d0257613d02613cc9565b500490565b600063ffffffff83811690831681811015613d2457613d24613bc3565b039392505050565b600063ffffffff808316818516808303821115613d4b57613d4b613bc3565b01949350505050565b6000816000190483118215151615613d6e57613d6e613bc3565b500290565b60008151613d858185602086016135c8565b9290920192915050565b7f3c73766720786d6c6e733d27687474703a2f2f7777772e77332e6f72672f323081526e30302f737667272077696474683d2760881b602082015260008351613ddf81602f8501602088016135c8565b6927206865696768743d2760b01b602f918401918201528351613e098160398401602088016135c8565b61139f60f11b60399290910191820152603b01949350505050565b600082821015613e3657613e36613bc3565b500390565b60008751613e4d818460208c016135c8565b683c7265637420783d2760b81b9083019081528751613e73816009840160208c016135c8565b642720793d2760d81b600992909101918201528651613e9981600e840160208b016135c8565b67272066696c6c3d2760c01b600e92909101918201528551613ec2816016840160208a016135c8565b68272077696474683d2760b81b601692909101918201528451613eec81601f8401602089016135c8565b6927206865696768743d2760b01b601f9290910191820152613f24613f146029830186613d73565b631390179f60e11b815260040190565b9998505050505050505050565b60008251613f438184602087016135c8565b651e17b9bb339f60d11b920191825250600601919050565b8054600090600181811c9080831680613f7557607f831692505b60208084108203613f9657634e487b7160e01b600052602260045260246000fd5b818015613faa5760018114613fbb57613fe8565b60ff19861689528489019650613fe8565b60008881526020902060005b86811015613fe05781548b820152908501908301613fc7565b505084890196505b50505050505092915050565b747b226e616d65223a2022506978656c20417274202360581b81528651600090614025816015850160208c016135c8565b7f222c226465736372697074696f6e223a20222a2a506978656c204172742023006015918401918201528751614062816034840160208c016135c8565b66151510102e371560c91b60349290910191820152865161408a81603b840160208b016135c8565b7f20706978656c73206f6e20626c6f636b636861696e2a20205c6e5c6e54686973603b92909101918201527f20616d617a696e672066756c6c79206f6e2d636861696e200000000000000000605b82015285516140ee816073840160208a016135c8565b6141ba6141ac6141a6614116614110607386880101600f60fb1b815260010190565b8a613d73565b7f2061727420706965636520776173206d696e746564206f6e202a2a72653a506c81527f6163652a2a2c207468652031206d696c6c696f6e206f6e2d636861696e20706960208201527f78656c73204e46542070726f6a65637420205c6e5c6e436865636b206f75742060408201527103a343290333ab6361031b0b73b30b99016960751b606082015260720190565b87613f5b565b61088b60f21b815260020190565b9a9950505050505050505050565b600085516141da818460208a016135c8565b80830190507f22696d6167655f64617461223a2022646174613a696d6167652f7376672b786d8152681b0ed8985cd94d8d0b60ba1b60208201528551614227816029840160208a016135c8565b7211161132bc3a32b93730b62fbab936111d101160691b60299290910191820152614255603c820186613f5b565b9050693f706978656c4172743d60b01b8152835161427a81600a8401602088016135c8565b61088b60f21b600a9290910191820152600c019695505050505050565b600087516142a9818460208c016135c8565b80830190507f2261747472696275746573223a5b7b2274726169745f74797065223a2022582281526b1610113b30b63ab2911d101160a11b602082015287516142f981602c840160208c016135c8565b7f227d2c7b2274726169745f74797065223a202259222c202276616c7565223a20602c9290910191820152601160f91b604c820152865161434181604d840160208b016135c8565b7f227d2c7b2274726169745f74797065223a20225769647468222c202276616c75604d92909101918201526432911d101160d91b606d820152855161438d816072840160208a016135c8565b6141ba6144186144126143da6141106072868801017f227d2c7b2274726169745f74797065223a2022486569676874222c202276616c8152653ab2911d101160d11b602082015260260190565b7f227d2c7b2274726169745f74797065223a2022506978656c73222c202276616c8152653ab2911d101160d11b602082015260260190565b87613d73565b63227d5d7d60e01b815260040190565b7519185d184e985c1c1b1a58d85d1a5bdb8bda9cdbdb8b60521b8152600082516144598160168501602087016135c8565b9190910160160192915050565b60208082526023908201527f416d6f756e74206f662045746865722073656e74206973206e6f7420636f72726040820152621958dd60ea1b606082015260800190565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516144e18160178501602088016135c8565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516145128160288401602088016135c8565b01602801949350505050565b600063ffffffff80831681810361453757614537613bc3565b6001019392505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6000602082840312156145a557600080fd5b5051919050565b6000816145bb576145bb613bc3565b506000190190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906145f6908301846135f4565b9695505050505050565b60006020828403121561461257600080fd5b8151612f0781613592565b634e487b7160e01b600052603160045260246000fdfe241ecf16d79d0f8dbfb92cbc07fe17840425976cf0667f022fe9877caa831b084142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa26469706673582212200faedad459f940c2a203ec569fd8553353f8a6d52cd9014b1863b06be9f974a464736f6c634300080d0033
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.