Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
DixelClubV2NFT
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 1500 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: BSD-3-Clause pragma solidity ^0.8.13; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "base64-sol/base64.sol"; import "./lib/ERC721Initializable.sol"; import "./lib/ERC721Queryable.sol"; import "./lib/ColorUtils.sol"; import "./lib/StringUtils.sol"; import "./IDixelClubV2Factory.sol"; import "./Shared.sol"; import "./Constants.sol"; import "./SVGGenerator.sol"; // inheriting Constants /* Change Logs <Version 2> 1. Add default dimemsions on SVG for better compatibility (Opensea) 2. Fix white gapp issues on Safari & iPhone browsers (hack: 25f5e59) 3. Allow new-line characters on descriptions <Version 3> 1. Remove JSON string validator (should be done on front-end) <Version 4> 1. Add `mintByOwner` function that can by-pass whitelist, mintingCost, mintingBeginsFrom checks */ contract DixelClubV2NFT is ERC721Queryable, Ownable, Constants, SVGGenerator { error DixelClubV2__NotExist(); error DixelClubV2__Initalized(); error DixelClubV2__InvalidCost(uint256 expected, uint256 actual); error DixelClubV2__MaximumMinted(); error DixelClubV2__NotStarted(uint40 beginAt, uint40 nowAt); error DixelClubV2__NotWhitelisted(); error DixelClubV2__NotApproved(); error DixelClubV2__PublicCollection(); error DixelClubV2__PrivateCollection(); error DixelClubV2__InvalidRoyalty(uint256 invalid); error DixelClubV2__AlreadyStarted(); error DixelClubV2__DescriptionTooLong(); error DixelClubV2__WhiteListValueDoNotMatch(address expected, address actual); struct EditionData { uint24[PALETTE_SIZE] palette; // 24bit color (16,777,216) - up to 16 colors } IDixelClubV2Factory private _factory; uint40 private _initializedAt; Shared.MetaData private _metaData; // Collection meta data EditionData[] private _editionData; // Color (palette) data for each edition uint8[PIXEL_ARRAY_SIZE] private _pixels; // 8 * 288 = 2304bit = 9 of 256bit storage block. Each uint8 saves 2 pixels. // NOTE: Implemented whitelist managing function with the simplest structure for gas saving // - EnumerableMap adds 3-5x more gas // - MerkleTree doesn't fit for managing the actual list on-chain address[] private _whitelist; string private _description; event Mint(address indexed to, uint256 indexed tokenId); event Burn(uint256 indexed tokenId); modifier checkTokenExists(uint256 tokenId) { if (!_exists(tokenId)) revert DixelClubV2__NotExist(); _; } function init( address owner_, string calldata name_, string calldata symbol_, string calldata description_, Shared.MetaData calldata metaData_, uint24[PALETTE_SIZE] calldata palette_, uint8[PIXEL_ARRAY_SIZE] calldata pixels_ ) external { if(_initializedAt != 0) revert DixelClubV2__Initalized(); _initializedAt = uint40(block.timestamp); _factory = IDixelClubV2Factory(msg.sender); // ERC721 attributes _name = name_; _symbol = symbol_; _description = description_; // Custom attributes _metaData = metaData_; _pixels = pixels_; // Transfer ownership to the collection creator, so he/she can edit info on marketplaces like Opeansea _transferOwnership(owner_); // Mint edition #0 to the creator with the default palette set automatically _mintNewEdition(owner_, palette_); } function mintPublic(address to, uint24[PALETTE_SIZE] calldata palette) external payable { if(_metaData.whitelistOnly) revert DixelClubV2__PrivateCollection(); _mintWithFees(to, palette); } function mintPrivate(uint256 whitelistIndex, address to, uint24[PALETTE_SIZE] calldata palette) external payable { if(!_metaData.whitelistOnly) revert DixelClubV2__PublicCollection(); _removeWhitelist(whitelistIndex, msg.sender); _mintWithFees(to, palette); } // Give free minting permission to the collection owner because owners can update settings anyway function mintByOwner(address to, uint24[PALETTE_SIZE] calldata palette) external onlyOwner { // By-passing whitelist, mintingCost, mintingBeginsFrom checks // maxSupply is not changeable even by the owner, so it should be checked if(nextTokenId() >= _metaData.maxSupply) revert DixelClubV2__MaximumMinted(); _mintNewEdition(to, palette); } function _mintWithFees(address to, uint24[PALETTE_SIZE] calldata palette) private { uint256 mintingCost = uint256(_metaData.mintingCost); if(msg.value != mintingCost) revert DixelClubV2__InvalidCost(mintingCost, msg.value); if(nextTokenId() >= _metaData.maxSupply) revert DixelClubV2__MaximumMinted(); if(uint40(block.timestamp) < _metaData.mintingBeginsFrom) revert DixelClubV2__NotStarted(_metaData.mintingBeginsFrom, uint40(block.timestamp)); if (mintingCost > 0) { // Send fee to the beneficiary uint256 fee = (mintingCost * _factory.mintingFee()) / FRICTION_BASE; (bool sent, ) = (_factory.beneficiary()).call{ value: fee }(""); require(sent, "FEE_TRANSFER_FAILED"); // Send the rest of minting cost to the collection creator (bool sent2, ) = (owner()).call{ value: mintingCost - fee }(""); require(sent2, "MINTING_COST_TRANSFER_FAILED"); } _mintNewEdition(to, palette); } function _mintNewEdition(address to, uint24[PALETTE_SIZE] calldata palette) private { uint256 nextId = nextTokenId(); _editionData.push(EditionData(palette)); unchecked { assert(nextId == _editionData.length - 1); } _safeMint(to, nextId); emit Mint(to, nextId); } function burn(uint256 tokenId) external { if(!_isApprovedOrOwner(msg.sender, tokenId)) revert DixelClubV2__NotApproved(); // This will check existence of token delete _editionData[tokenId]; _burn(tokenId); emit Burn(tokenId); } function tokenURI(uint256 tokenId) public view override checkTokenExists(tokenId) returns (string memory) { return string(abi.encodePacked("data:application/json;base64,", Base64.encode(bytes(tokenJSON(tokenId))))); } // Contract-level metadata for Opeansea // REF: https://docs.opensea.io/docs/contract-level-metadata function contractURI() public view returns (string memory) { return string(abi.encodePacked("data:application/json;base64,", Base64.encode(bytes(contractJSON())))); } // MARK: - Whitelist related functions // @dev Maximum length of list parameter can be limited by block gas limit of blockchain // @notice Duplicated address input means multiple allowance function addWhitelist(address[] calldata list) external onlyOwner { if(!_metaData.whitelistOnly) revert DixelClubV2__PublicCollection(); uint256 length = list.length; // gas saving for (uint256 i; i != length;) { _whitelist.push(list[i]); // O(1) for adding 1 address unchecked { ++i; } } } function _removeWhitelist(uint256 index, address value) private { if(!_metaData.whitelistOnly) revert DixelClubV2__PublicCollection(); if (_whitelist[index] != value) revert DixelClubV2__WhiteListValueDoNotMatch(value, _whitelist[index]); _whitelist[index] = _whitelist[_whitelist.length - 1]; // put the last element into the delete index _whitelist.pop(); // delete the last element to decrease array length; } // @dev O(1) for removing by index function removeWhitelist(uint256 index, address value) external onlyOwner { _removeWhitelist(index, value); } function resetWhitelist() external onlyOwner { delete _whitelist; } // @dev offset & limit for pagination function getAllWhitelist(uint256 offset, uint256 limit) external view returns (address[] memory list) { unchecked { address[] memory clone = _whitelist; // gas saving uint256 length = clone.length; // gas saving uint256 count = limit; if (offset >= length) { return list; // empty list } else if (offset + limit > length) { count = length - offset; } list = new address[](count); for (uint256 i = 0; i != count; ++i) { list[i] = clone[offset + i]; } } } function getWhitelistCount() external view returns (uint256) { return _whitelist.length; } // @dev utility function for front-end, that can be reverted if the list is too big function getWhitelistAllowanceLeft(address wallet) external view returns (uint256 allowance) { unchecked { address[] memory clone = _whitelist; // gas saving uint256 length = clone.length; // gas saving for (uint256 i; i != length; ++i) { if (clone[i] == wallet) { allowance++; } } return allowance; } } // @dev utility function for front-end, that can be reverted if the list is too big function getWhitelistIndex(address wallet) external view returns (uint256) { unchecked { address[] memory clone = _whitelist; // gas saving uint256 length = clone.length; // gas saving for (uint256 i; i != length; ++i) { if (clone[i] == wallet) { return i; } } revert DixelClubV2__NotWhitelisted(); } } // MARK: - Update metadata function updateMetadata(bool whitelistOnly, bool hidden, uint24 royaltyFriction, uint40 mintingBeginsFrom, uint152 mintingCost) external onlyOwner { if(royaltyFriction > MAX_ROYALTY_FRACTION) revert DixelClubV2__InvalidRoyalty(royaltyFriction); if(_metaData.mintingBeginsFrom != mintingBeginsFrom && uint40(block.timestamp) >= _metaData.mintingBeginsFrom) revert DixelClubV2__AlreadyStarted(); _metaData.whitelistOnly = whitelistOnly; if (!_metaData.whitelistOnly) { delete _whitelist; // empty whitelist array data if it becomes public } _metaData.hidden = hidden; _metaData.royaltyFriction = royaltyFriction; _metaData.mintingBeginsFrom = mintingBeginsFrom < block.timestamp ? uint40(block.timestamp) : mintingBeginsFrom; _metaData.mintingCost = mintingCost; } function updateDescription(string calldata description) external onlyOwner { if (bytes(description).length > 1000) revert DixelClubV2__DescriptionTooLong(); // ~900 gas per character _description = description; } // MARK: - External utility functions function generateSVG(uint256 tokenId) external view checkTokenExists(tokenId) returns (string memory) { return _generateSVG(_editionData[tokenId].palette, _pixels); } function generateBase64SVG(uint256 tokenId) public view checkTokenExists(tokenId) returns (string memory) { return _generateBase64SVG(_editionData[tokenId].palette, _pixels); } function tokenJSON(uint256 tokenId) public view checkTokenExists(tokenId) returns (string memory) { return string(abi.encodePacked( '{"name":"', _symbol, ' #', ColorUtils.uint2str(tokenId), '","description":"', _description, '","external_url":"https://dixel.club/collection/', ColorUtils.uint2str(block.chainid), '/', StringUtils.address2str(address(this)), '/', ColorUtils.uint2str(tokenId), '","image":"', generateBase64SVG(tokenId), '"}' )); } function contractJSON() public view returns (string memory) { return string(abi.encodePacked( '{"name":"', _name, '","description":"', _description, '","image":"', generateBase64SVG(0), '","external_link":"https://dixel.club/collection/', ColorUtils.uint2str(block.chainid), '/', StringUtils.address2str(address(this)), '","seller_fee_basis_points":"', ColorUtils.uint2str(_metaData.royaltyFriction), '","fee_recipient":"', StringUtils.address2str(owner()), '"}' )); } function exists(uint256 tokenId) external view returns (bool) { return _exists(tokenId); } function listData() external view returns (uint40 initializedAt_, bool hidden_) { initializedAt_ = _initializedAt; hidden_ = _metaData.hidden; } function metaData() external view returns ( string memory name_, bool whitelistOnly_, uint24 maxSupply_, uint24 royaltyFriction_, uint40 mintingBeginsFrom_, uint168 mintingCost_, string memory description_, uint256 nextTokenId_, uint256 totalSupply_, address owner_, uint8[PIXEL_ARRAY_SIZE] memory pixels_, uint24[PALETTE_SIZE] memory defaultPalette_ ) { name_ = name(); whitelistOnly_ = _metaData.whitelistOnly; maxSupply_ = _metaData.maxSupply; royaltyFriction_ = _metaData.royaltyFriction; mintingBeginsFrom_ = _metaData.mintingBeginsFrom; mintingCost_ = _metaData.mintingCost; description_ = _description; nextTokenId_ = nextTokenId(); totalSupply_ = totalSupply(); owner_ = owner(); pixels_ = _pixels; defaultPalette_ = _editionData[0].palette; } function paletteOf(uint256 tokenId) external view checkTokenExists(tokenId) returns (uint24[PALETTE_SIZE] memory) { return _editionData[tokenId].palette; } function getAllPixels() external view returns (uint8[PIXEL_ARRAY_SIZE] memory) { return _pixels; } // MARK: - Override extensions function supportsInterface(bytes4 interfaceId) public view override(ERC721Initializable) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @dev IERC2981 implementation * - NOTE: ERC2981 royalty info may not be applied on some marketplaces * - NOTE: Opensea uses contract-level metadata: https://docs.opensea.io/docs/contract-level-metadata */ function royaltyInfo(uint256 /*_tokenId*/, uint256 _salePrice) public view returns (address, uint256) { // NOTE: // 1. The same royalty friction for all tokens in the same collection // 2. Receiver is collection owner return (owner(), (_salePrice * _metaData.royaltyFriction) / FRICTION_BASE); } // NFT implementation version function version() external pure virtual returns (uint16) { return 4; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; /// @title Base64 /// @author Brecht Devos - <[email protected]> /// @notice Provides functions for encoding/decoding base64 library Base64 { string internal constant TABLE_ENCODE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; bytes internal constant TABLE_DECODE = hex"0000000000000000000000000000000000000000000000000000000000000000" hex"00000000000000000000003e0000003f3435363738393a3b3c3d000000000000" hex"00000102030405060708090a0b0c0d0e0f101112131415161718190000000000" hex"001a1b1c1d1e1f202122232425262728292a2b2c2d2e2f303132330000000000"; function encode(bytes memory data) internal pure returns (string memory) { if (data.length == 0) return ''; // load the table into memory string memory table = TABLE_ENCODE; // multiply by 4/3 rounded up uint256 encodedLen = 4 * ((data.length + 2) / 3); // add some extra buffer at the end required for the writing string memory result = new string(encodedLen + 32); assembly { // set the actual output length mstore(result, encodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 3 bytes at a time for {} lt(dataPtr, endPtr) {} { // read 3 bytes dataPtr := add(dataPtr, 3) let input := mload(dataPtr) // write 4 characters mstore8(resultPtr, mload(add(tablePtr, and(shr(18, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr(12, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and(shr( 6, input), 0x3F)))) resultPtr := add(resultPtr, 1) mstore8(resultPtr, mload(add(tablePtr, and( input, 0x3F)))) resultPtr := add(resultPtr, 1) } // padding with '=' switch mod(mload(data), 3) case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) } case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) } } return result; } function decode(string memory _data) internal pure returns (bytes memory) { bytes memory data = bytes(_data); if (data.length == 0) return new bytes(0); require(data.length % 4 == 0, "invalid base64 decoder input"); // load the table into memory bytes memory table = TABLE_DECODE; // every 4 characters represent 3 bytes uint256 decodedLen = (data.length / 4) * 3; // add some extra buffer at the end required for the writing bytes memory result = new bytes(decodedLen + 32); assembly { // padding with '=' let lastBytes := mload(add(data, mload(data))) if eq(and(lastBytes, 0xFF), 0x3d) { decodedLen := sub(decodedLen, 1) if eq(and(lastBytes, 0xFFFF), 0x3d3d) { decodedLen := sub(decodedLen, 1) } } // set the actual output length mstore(result, decodedLen) // prepare the lookup table let tablePtr := add(table, 1) // input ptr let dataPtr := data let endPtr := add(dataPtr, mload(data)) // result ptr, jump over length let resultPtr := add(result, 32) // run over the input, 4 characters at a time for {} lt(dataPtr, endPtr) {} { // read 4 characters dataPtr := add(dataPtr, 4) let input := mload(dataPtr) // write 3 bytes let output := add( add( shl(18, and(mload(add(tablePtr, and(shr(24, input), 0xFF))), 0xFF)), shl(12, and(mload(add(tablePtr, and(shr(16, input), 0xFF))), 0xFF))), add( shl( 6, and(mload(add(tablePtr, and(shr( 8, input), 0xFF))), 0xFF)), and(mload(add(tablePtr, and( input , 0xFF))), 0xFF) ) ) mstore(resultPtr, shl(232, output)) resultPtr := add(resultPtr, 3) } } return result; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.13; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; /** * @dev A slightly modified version of ERC721.sol (from Openzeppelin 4.6.0) for initialization pattern * - remove constructor * - make `_name`, `_symbol` and `_owners` internal instead of private * - rename ERC721 -> ERC721Initializable */ abstract contract ERC721Initializable is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string internal _name; // Token symbol string internal _symbol; // Mapping from token ID to owner address mapping(uint256 => address) internal _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 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 overridden 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 = ERC721Initializable.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 = ERC721Initializable.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == 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 = ERC721Initializable.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(ERC721Initializable.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; unchecked { _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(ERC721Initializable.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 pragma solidity ^0.8.4; import './ERC721Initializable.sol'; /** * @title ERC721A Queryable + ERC721Enumerable#totalSupply only to save gas * @dev ERC721A subclass with convenience query functions. */ abstract contract ERC721Queryable is ERC721Initializable { error ERC721Queryable__InvalidQueryRange(); // @dev Store total number of Tokens. uint256 private _totalSupply; // @dev The tokenId of the next token to be minted. uint256 private _currentIndex; /** * @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); unchecked { if (from == address(0)) { ++_totalSupply; ++_currentIndex; } else if (to == address(0)) { --_totalSupply; } } } function totalSupply() public view returns (uint256) { return _totalSupply; } /** * @dev Returns the next token ID to be minted. */ function nextTokenId() public view returns (uint256) { return _currentIndex; } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC721Queryable-tokensOfOwner}. * * Requirements: * * - `start` < `stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory) { unchecked { if (start >= stop) revert ERC721Queryable__InvalidQueryRange(); if (stop > _currentIndex) { stop = _currentIndex; } uint256 tokenIdsMaxLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsMaxLength); if (tokenIdsMaxLength == 0) { return tokenIds; } // Set `tokenIdsMaxLength = min(balanceOf(owner), stop - start)`, // to cater for cases where `balanceOf(owner)` is too big. if (stop - start < tokenIdsMaxLength) { tokenIdsMaxLength = stop - start; } uint256 tokenIdsIdx; for (uint256 i = start; i != stop && tokenIdsIdx != tokenIdsMaxLength; ++i) { if(_owners[i] == owner) { tokenIds[tokenIdsIdx++] = i; } } // Downsize the array to fit. assembly { mstore(tokenIds, tokenIdsIdx) } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(totalSupply) in complexity. * It is meant to be called off-chain. * * See {ERC721Queryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K pfp collections should be fine). */ function tokensOfOwner(address owner) external view returns (uint256[] memory) { unchecked { uint256 tokenIdsIdx; uint256 tokenIdsLength = balanceOf(owner); uint256[] memory tokenIds = new uint256[](tokenIdsLength); for (uint256 i = 0; tokenIdsIdx != tokenIdsLength; ++i) { if(_owners[i] == owner) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; library ColorUtils { function uint2str(uint256 i) internal pure returns (string memory) { if (i == 0) { return "0"; } uint256 j = i; uint256 len; while (j != 0) { len++; j /= 10; } bytes memory bstr = new bytes(len); uint256 k = len; while (i != 0) { k = k-1; uint8 temp = (48 + uint8(i - i / 10 * 10)); bytes1 b1 = bytes1(temp); bstr[k] = b1; i /= 10; } return string(bstr); } function uint2hex(uint24 i) internal pure returns (string memory) { bytes memory o = new bytes(6); uint24 mask = 0x00000f; // hex 15 uint256 k = 6; do { k--; uint8 masked = uint8(i & mask); o[k] = bytes1((masked > 9) ? (masked + 87) : (masked + 48)); // ASCII a-f => +87 | 0-9 => +48 i >>= 4; } while (k > 0); return string(o); } }
// SPDX-License-Identifier: BSD-3-Clause import "@openzeppelin/contracts/utils/Strings.sol"; pragma solidity ^0.8.13; library StringUtils { function address2str(address addr) internal pure returns (string memory) { return Strings.toHexString(uint160(addr), 20); } }
// SPDX-License-Identifier: BSD-3-Clause pragma solidity ^0.8.13; import "./Shared.sol"; interface IDixelClubV2Factory { function beneficiary() external view returns (address); function mintingFee() external view returns (uint256); }
// SPDX-License-Identifier: BSD-3-Clause pragma solidity ^0.8.13; library Shared { struct MetaData { bool whitelistOnly; bool hidden; uint24 maxSupply; // can be minted up to MAX_SUPPLY uint24 royaltyFriction; // used for `royaltyInfo` (ERC2981) and `seller_fee_basis_points` (Opeansea's Contract-level metadata) uint40 mintingBeginsFrom; // Timestamp that minting event begins uint152 mintingCost; // Native token (ETH, BNB, KLAY, etc) } }
// SPDX-License-Identifier: BSD-3-Clause pragma solidity ^0.8.13; abstract contract Constants { uint256 public constant MAX_SUPPLY = 1000000; // 1M hardcap max uint256 public constant MAX_ROYALTY_FRACTION = 1000; // 10% uint256 public constant FRICTION_BASE = 10000; uint256 internal constant PALETTE_SIZE = 16; // 16 colors max - equal to the data type max value of CANVAS_SIZE (2^8 = 16) uint256 internal constant CANVAS_SIZE = 24; // 24x24 pixels uint256 internal constant TOTAL_PIXEL_COUNT = CANVAS_SIZE * CANVAS_SIZE; // 24x24 uint256 internal constant PIXEL_ARRAY_SIZE = TOTAL_PIXEL_COUNT / 2; // packing 2 pixels in each uint8 }
// SPDX-License-Identifier: BSD-3-Clause pragma solidity ^0.8.13; import "base64-sol/base64.sol"; import "./lib/ColorUtils.sol"; import "./Constants.sol"; /** * @title Dixel SVG image generator */ abstract contract SVGGenerator is Constants { // Using paths for each palette color (speed: 700-2300 / size: 1-5KB) // - pros: faster average speed, smaller svg size (over 50%) // - cons: slower worst-case speed // NOTE: viewBox -0.5 on top to prevent top side crop issue // ref: https://codepen.io/shshaw/post/vector-pixels-svg-optimization-animation-and-understanding-path-data#crazy-pants-optimization-4 // NOTE: viewbox height 23.999 & preserveAspectRatio="none" to prevent gpas between shapes when it's resized to an indivisible dimensions (e.g. 480x480 -> fine, but 500x500 shows gaps) // ref: https://codepen.io/sydneyitguy/pen/MWVgOjG string private constant HEADER = '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 -0.5 24 23.999" width="960" height="960" preserveAspectRatio="none" shape-rendering="crispEdges">'; string private constant FOOTER = '</svg>'; function _generateSVG(uint24[PALETTE_SIZE] memory palette, uint8[PIXEL_ARRAY_SIZE] memory pixels) internal pure returns (string memory) { string[PALETTE_SIZE] memory paths; for (uint256 y; y < CANVAS_SIZE;) { uint256 prev = pixels[y * CANVAS_SIZE / 2] & 15; // prev pixel color. see comment below. x=0 so no shifting needed. paths[prev] = string(abi.encodePacked(paths[prev], "M0 ", ColorUtils.uint2str(y))); uint256 width = 1; for (uint256 x = 1; x < CANVAS_SIZE;) { /* Pixels array: we're packing 2 pixels into each uint8. So pixels[y * CANVAS_SIZE/2 + x/2] contains pixels (x,y) and (x+1,y). The 4 rightmost bits are (x,y), so to extract that value we mask pixels[y * CANVAS_SIZE/2 + x/2] with 15 ("00001111"). The 4 leftmost bits are (x+1,y), so to extract that value we shift pixels[y * CANVAS_SIZE/2 + x/2] 4 places to the right, and then mask it with 15 ("00001111"). */ uint256 current = (pixels[y * CANVAS_SIZE/2 + x/2] >> (4*(x%2))) & 15; // current pixel color. if (prev == current) { width++; } else { paths[prev] = string(abi.encodePacked(paths[prev], "h", ColorUtils.uint2str(width))); width = 1; paths[current] = string(abi.encodePacked(paths[current], "M", ColorUtils.uint2str(x), " ", ColorUtils.uint2str(y))); } if (x == CANVAS_SIZE - 1) { paths[current] = string(abi.encodePacked(paths[current], "h", ColorUtils.uint2str(width))); } prev = current; unchecked { ++x; } } unchecked { ++y; } } string memory joined; for (uint256 i; i < PALETTE_SIZE;) { if (bytes(paths[i]).length > 0) { joined = string(abi.encodePacked(joined, '<path stroke="#', ColorUtils.uint2hex(palette[i]), '" d="', paths[i], '"/>')); } unchecked { ++i; } } return string(abi.encodePacked(HEADER, joined, FOOTER)); } // Using block-stacking approach with color variables (speed: ~1500 / size: ~8.5KB) // - pros: constant speed & svg size, faster worst-case speed // - cons: slower average speed, bigger svg size /* DEPRECATED in favor of the solution above string private constant HEADER = '<svg xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="xMidYMid meet" viewBox="0 0 24 24" shape-rendering="crispEdges"><style>'; string private constant FOOTER = '</style><defs><rect id="p" width="40" height="40"/><svg id="r"><use href="#p" fill="var(--a)"/><use href="#p" x="1" fill="var(--b)"/><use href="#p" x="2" fill="var(--c)"/><use href="#p" x="3" fill="var(--d)"/><use href="#p" x="4" fill="var(--e)"/><use href="#p" x="5" fill="var(--f)"/><use href="#p" x="6" fill="var(--g)"/><use href="#p" x="7" fill="var(--h)"/><use href="#p" x="8" fill="var(--i)"/><use href="#p" x="9" fill="var(--j)"/><use href="#p" x="10" fill="var(--k)"/><use href="#p" x="11" fill="var(--l)"/><use href="#p" x="12" fill="var(--m)"/><use href="#p" x="13" fill="var(--n)"/><use href="#p" x="14" fill="var(--o)"/><use href="#p" x="15" fill="var(--p)"/><use href="#p" x="16" fill="var(--q)"/><use href="#p" x="17" fill="var(--r)"/><use href="#p" x="18" fill="var(--s)"/><use href="#p" x="19" fill="var(--t)"/><use href="#p" x="20" fill="var(--u)"/><use href="#p" x="21" fill="var(--v)"/><use href="#p" x="22" fill="var(--w)"/><use href="#p" x="23" fill="var(--x)"/></svg></defs><use href="#r" class="a"/><use href="#r" y="1" class="b"/><use href="#r" y="2" class="c"/><use href="#r" y="3" class="d"/><use href="#r" y="4" class="e"/><use href="#r" y="5" class="f"/><use href="#r" y="6" class="g"/><use href="#r" y="7" class="h"/><use href="#r" y="8" class="i"/><use href="#r" y="9" class="j"/><use href="#r" y="10" class="k"/><use href="#r" y="11" class="l"/><use href="#r" y="12" class="m"/><use href="#r" y="13" class="n"/><use href="#r" y="14" class="o"/><use href="#r" y="15" class="p"/><use href="#r" y="16" class="q"/><use href="#r" y="17" class="r"/><use href="#r" y="18" class="s"/><use href="#r" y="19" class="t"/><use href="#r" y="20" class="u"/><use href="#r" y="21" class="v"/><use href="#r" y="22" class="w"/><use href="#r" y="23" class="x"/></svg>'; bytes32 private constant CLASS = 'abcdefghijklmnopqrstuvwx'; // class names for each row, pixel (length must be equal to CANVAS_SIZE) function _generateSVG(uint24[PALETTE_SIZE] memory palette, uint8[TOTAL_PIXEL_COUNT] memory pixels) internal pure returns (string memory) { string memory joined; string[CANVAS_SIZE] memory styles; for (uint256 x = 0; x < CANVAS_SIZE; x++) { styles[x] = string(abi.encodePacked(styles[x], '.', CLASS[x], '{')); for (uint256 y = 0; y < CANVAS_SIZE; y++) { styles[x] = string(abi.encodePacked(styles[x], '--', CLASS[y], ':#', ColorUtils.uint2hex(palette[pixels[x * CANVAS_SIZE + y]]), ';')); } styles[x] = string(abi.encodePacked(styles[x], '}')); joined = string(abi.encodePacked(joined, styles[x])); } return string(abi.encodePacked(HEADER, joined, FOOTER)); } */ function _generateBase64SVG(uint24[PALETTE_SIZE] memory palette, uint8[PIXEL_ARRAY_SIZE] memory pixels) internal pure returns (string memory) { return string(abi.encodePacked("data:image/svg+xml;base64,", Base64.encode(bytes(_generateSVG(palette, pixels))))); } }
// 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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/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`. * * 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; /** * @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 Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (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 `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/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/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; } }
{ "optimizer": { "enabled": true, "runs": 1500 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"DixelClubV2__AlreadyStarted","type":"error"},{"inputs":[],"name":"DixelClubV2__DescriptionTooLong","type":"error"},{"inputs":[],"name":"DixelClubV2__Initalized","type":"error"},{"inputs":[{"internalType":"uint256","name":"expected","type":"uint256"},{"internalType":"uint256","name":"actual","type":"uint256"}],"name":"DixelClubV2__InvalidCost","type":"error"},{"inputs":[{"internalType":"uint256","name":"invalid","type":"uint256"}],"name":"DixelClubV2__InvalidRoyalty","type":"error"},{"inputs":[],"name":"DixelClubV2__MaximumMinted","type":"error"},{"inputs":[],"name":"DixelClubV2__NotApproved","type":"error"},{"inputs":[],"name":"DixelClubV2__NotExist","type":"error"},{"inputs":[{"internalType":"uint40","name":"beginAt","type":"uint40"},{"internalType":"uint40","name":"nowAt","type":"uint40"}],"name":"DixelClubV2__NotStarted","type":"error"},{"inputs":[],"name":"DixelClubV2__NotWhitelisted","type":"error"},{"inputs":[],"name":"DixelClubV2__PrivateCollection","type":"error"},{"inputs":[],"name":"DixelClubV2__PublicCollection","type":"error"},{"inputs":[{"internalType":"address","name":"expected","type":"address"},{"internalType":"address","name":"actual","type":"address"}],"name":"DixelClubV2__WhiteListValueDoNotMatch","type":"error"},{"inputs":[],"name":"ERC721Queryable__InvalidQueryRange","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"FRICTION_BASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_ROYALTY_FRACTION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"list","type":"address[]"}],"name":"addWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractJSON","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"generateBase64SVG","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"generateSVG","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAllPixels","outputs":[{"internalType":"uint8[288]","name":"","type":"uint8[288]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"offset","type":"uint256"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"getAllWhitelist","outputs":[{"internalType":"address[]","name":"list","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"getWhitelistAllowanceLeft","outputs":[{"internalType":"uint256","name":"allowance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getWhitelistCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"getWhitelistIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"string","name":"description_","type":"string"},{"components":[{"internalType":"bool","name":"whitelistOnly","type":"bool"},{"internalType":"bool","name":"hidden","type":"bool"},{"internalType":"uint24","name":"maxSupply","type":"uint24"},{"internalType":"uint24","name":"royaltyFriction","type":"uint24"},{"internalType":"uint40","name":"mintingBeginsFrom","type":"uint40"},{"internalType":"uint152","name":"mintingCost","type":"uint152"}],"internalType":"struct Shared.MetaData","name":"metaData_","type":"tuple"},{"internalType":"uint24[16]","name":"palette_","type":"uint24[16]"},{"internalType":"uint8[288]","name":"pixels_","type":"uint8[288]"}],"name":"init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"listData","outputs":[{"internalType":"uint40","name":"initializedAt_","type":"uint40"},{"internalType":"bool","name":"hidden_","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"metaData","outputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"bool","name":"whitelistOnly_","type":"bool"},{"internalType":"uint24","name":"maxSupply_","type":"uint24"},{"internalType":"uint24","name":"royaltyFriction_","type":"uint24"},{"internalType":"uint40","name":"mintingBeginsFrom_","type":"uint40"},{"internalType":"uint168","name":"mintingCost_","type":"uint168"},{"internalType":"string","name":"description_","type":"string"},{"internalType":"uint256","name":"nextTokenId_","type":"uint256"},{"internalType":"uint256","name":"totalSupply_","type":"uint256"},{"internalType":"address","name":"owner_","type":"address"},{"internalType":"uint8[288]","name":"pixels_","type":"uint8[288]"},{"internalType":"uint24[16]","name":"defaultPalette_","type":"uint24[16]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint24[16]","name":"palette","type":"uint24[16]"}],"name":"mintByOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"whitelistIndex","type":"uint256"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint24[16]","name":"palette","type":"uint24[16]"}],"name":"mintPrivate","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint24[16]","name":"palette","type":"uint24[16]"}],"name":"mintPublic","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"nextTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"paletteOf","outputs":[{"internalType":"uint24[16]","name":"","type":"uint24[16]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"address","name":"value","type":"address"}],"name":"removeWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resetWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenJSON","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"description","type":"string"}],"name":"updateDescription","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"whitelistOnly","type":"bool"},{"internalType":"bool","name":"hidden","type":"bool"},{"internalType":"uint24","name":"royaltyFriction","type":"uint24"},{"internalType":"uint40","name":"mintingBeginsFrom","type":"uint40"},{"internalType":"uint152","name":"mintingCost","type":"uint152"}],"name":"updateMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"pure","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b506200001d3362000023565b62000075565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6150f580620000856000396000f3fe60806040526004361061031e5760003560e01c80636dcee4ca116101a5578063a22cb465116100ec578063d51684c711610095578063e985e9c51161006f578063e985e9c5146108f7578063edac985b14610940578063f025c5e414610960578063f2fde38b1461097357600080fd5b8063d51684c7146108a2578063e735b48a146108c2578063e8a3d485146108e257600080fd5b8063c297838a116100c6578063c297838a1461081a578063c463906f14610862578063c87b56dd1461088257600080fd5b8063a22cb465146107ad578063b88d4fde146107cd578063baf2a4eb146107ed57600080fd5b80638aae790e1161014e57806394008a6e1161012857806394008a6e1461075857806395d89b411461077857806399a2557a1461078d57600080fd5b80638aae790e146107045780638da5cb5b1461071a5780638f7bb1791461073857600080fd5b8063715018a61161017f578063715018a6146106ad57806375794a3c146106c25780638462151c146106d757600080fd5b80636dcee4ca1461064b57806370a082311461066b57806370d72d631461068b57600080fd5b80633092606a1161026957806342966c68116102125780635909865a116101ec5780635909865a146106015780635f17cac3146106165780636352211e1461062b57600080fd5b806342966c68146105a55780634f558e79146105c557806354fd4d50146105e557600080fd5b80633edff20f116102435780633edff20f1461055057806341ea99b71461056557806342842e0e1461058557600080fd5b80633092606a1461050357806332cb6b0c146105235780633963d7eb1461053a57600080fd5b80630b9001c9116102cb57806323b872dd116102a557806323b872dd146104915780632a55205a146104b15780632d58e63b146104f057600080fd5b80630b9001c91461042f5780631497faa41461044f57806318160ddd1461047c57600080fd5b806308a0ccb1116102fc57806308a0ccb1146103b2578063094d0d12146103df578063095ea7b31461040d57600080fd5b806301ffc9a71461032357806306fdde0314610358578063081812fc1461037a575b600080fd5b34801561032f57600080fd5b5061034361033e366004613dbe565b610993565b60405190151581526020015b60405180910390f35b34801561036457600080fd5b5061036d6109d7565b60405161034f9190613e33565b34801561038657600080fd5b5061039a610395366004613e46565b610a69565b6040516001600160a01b03909116815260200161034f565b3480156103be57600080fd5b506103d26103cd366004613e5f565b610b14565b60405161034f9190613e81565b3480156103eb57600080fd5b506103ff6103fa366004613ee3565b610c3f565b60405190815260200161034f565b34801561041957600080fd5b5061042d610428366004613f00565b610d22565b005b34801561043b57600080fd5b5061042d61044a366004613f92565b610e53565b34801561045b57600080fd5b5061046f61046a366004613e46565b610f45565b60405161034f91906140a9565b34801561048857600080fd5b506006546103ff565b34801561049d57600080fd5b5061042d6104ac3660046140b8565b611009565b3480156104bd57600080fd5b506104d16104cc366004613e5f565b611090565b604080516001600160a01b03909316835260208301919091520161034f565b61042d6104fe3660046140f9565b6110da565b34801561050f57600080fd5b5061036d61051e366004613e46565b611125565b34801561052f57600080fd5b506103ff620f424081565b34801561054657600080fd5b506103ff6103e881565b34801561055c57600080fd5b506015546103ff565b34801561057157600080fd5b506103ff610580366004613ee3565b61123e565b34801561059157600080fd5b5061042d6105a03660046140b8565b6112f5565b3480156105b157600080fd5b5061042d6105c0366004613e46565b611310565b3480156105d157600080fd5b506103436105e0366004613e46565b6113b1565b3480156105f157600080fd5b506040516004815260200161034f565b34801561060d57600080fd5b5061042d6113d0565b34801561062257600080fd5b5061036d611438565b34801561063757600080fd5b5061039a610646366004613e46565b6114b8565b34801561065757600080fd5b5061036d610666366004613e46565b611543565b34801561067757600080fd5b506103ff610686366004613ee3565b611655565b34801561069757600080fd5b506106a06116ef565b60405161034f9190614157565b3480156106b957600080fd5b5061042d611749565b3480156106ce57600080fd5b506007546103ff565b3480156106e357600080fd5b506106f76106f2366004613ee3565b6117ad565b60405161034f9190614166565b34801561071057600080fd5b506103ff61271081565b34801561072657600080fd5b506008546001600160a01b031661039a565b34801561074457600080fd5b5061036d610753366004613e46565b611866565b34801561076457600080fd5b5061042d61077336600461419e565b611905565b34801561078457600080fd5b5061036d611969565b34801561079957600080fd5b506106f76107a83660046141ce565b611978565b3480156107b957600080fd5b5061042d6107c8366004614211565b611aab565b3480156107d957600080fd5b5061042d6107e8366004614255565b611ab6565b3480156107f957600080fd5b50610802611b44565b60405161034f9c9b9a99989796959493929190614335565b34801561082657600080fd5b50600954600a54600160a01b90910464ffffffffff1690610100900460ff166040805164ffffffffff909316835290151560208301520161034f565b34801561086e57600080fd5b5061042d61087d366004614439565b611d66565b34801561088e57600080fd5b5061036d61089d366004613e46565b611f59565b3480156108ae57600080fd5b5061042d6108bd3660046140f9565b611fbb565b3480156108ce57600080fd5b5061042d6108dd3660046144aa565b612055565b3480156108ee57600080fd5b5061036d6120f7565b34801561090357600080fd5b506103436109123660046144ec565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561094c57600080fd5b5061042d61095b36600461451a565b612114565b61042d61096e36600461458f565b6121fd565b34801561097f57600080fd5b5061042d61098e366004613ee3565b612234565b60006001600160e01b031982167f2a55205a0000000000000000000000000000000000000000000000000000000014806109d157506109d182612316565b92915050565b6060600080546109e6906145cf565b80601f0160208091040260200160405190810160405280929190818152602001828054610a12906145cf565b8015610a5f5780601f10610a3457610100808354040283529160200191610a5f565b820191906000526020600020905b815481529060010190602001808311610a4257829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610af85760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b606060006015805480602002602001604051908101604052809291908181526020018280548015610b6e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b50575b505083519394508692505050818610610b89575050506109d1565b818587011115610b9857508481035b8067ffffffffffffffff811115610bb157610bb161423f565b604051908082528060200260200182016040528015610bda578160200160208202803683370190505b50935060005b818114610c35578381880181518110610bfb57610bfb614603565b6020026020010151858281518110610c1557610c15614603565b6001600160a01b0390921660209283029190910190910152600101610be0565b5050505092915050565b6000806015805480602002602001604051908101604052809291908181526020018280548015610c9857602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c7a575b505083519394506000925050505b818114610cef57846001600160a01b0316838281518110610cc957610cc9614603565b60200260200101516001600160a01b031603610ce757949350505050565b600101610ca6565b506040517f7441311500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610d2d826114b8565b9050806001600160a01b0316836001600160a01b031603610db65760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610aef565b336001600160a01b0382161480610dd25750610dd28133610912565b610e445760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610aef565b610e4e83836123b1565b505050565b600954600160a01b900464ffffffffff1615610e9b576040517f63403d3900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600980546001600160a01b031964ffffffffff4216600160a01b02167fffffffffffffff000000000000000000000000000000000000000000000000009091161733179055610eec60008a8a613b72565b50610ef960018888613b72565b50610f0660168686613b72565b5082600a610f148282614640565b50610f259050600c82610120613bf6565b50610f2f8a61241f565b610f398a83612471565b50505050505050505050565b610f4d613c87565b60008281526002602052604090205482906001600160a01b0316610f845760405163975ed9f560e01b815260040160405180910390fd5b600b8381548110610f9757610f97614603565b60009182526020909120604080516102008101909152916002020160108282826020028201916000905b82829054906101000a900462ffffff1662ffffff1681526020019060030190602082600201049283019260010382029150808411610fc1579050505050505091505b50919050565b6110133382612530565b6110855760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610aef565b610e4e838383612638565b6000806110a56008546001600160a01b031690565b600a54612710906110c49065010000000000900462ffffff168661478f565b6110ce91906147c4565b915091505b9250929050565b600a5460ff1615611117576040517f83a2ddce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61112182826127f2565b5050565b606081611149816000908152600260205260409020546001600160a01b0316151590565b6111665760405163975ed9f560e01b815260040160405180910390fd5b611237600b848154811061117c5761117c614603565b60009182526020909120604080516102008101909152916002020160108282826020028201916000905b82829054906101000a900462ffffff1662ffffff16815260200190600301906020826002010492830192600103820291508084116111a6575050604080516124008101918290529450600c935061012092509050826000855b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116111ff5790505050505050612b80565b9392505050565b600080601580548060200260200160405190810160405280929190818152602001828054801561129757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611279575b505083519394506000925050505b8181146112ed57846001600160a01b03168382815181106112c8576112c8614603565b60200260200101516001600160a01b0316036112e5576001909301925b6001016112a5565b505050919050565b610e4e83838360405180602001604052806000815250611ab6565b61131a3382612530565b611350576040517f6414f05b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b818154811061136357611363614603565b600091825260208220600291909102018181556001015561138381612bb6565b60405181907fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb90600090a250565b6000818152600260205260408120546001600160a01b031615156109d1565b6008546001600160a01b0316331461142a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610aef565b61143660156000613ca6565b565b6060600060166114486000611125565b61145146612c5d565b61145a30612d80565b600a546114749065010000000000900462ffffff16612c5d565b61148e6114896008546001600160a01b031690565b612d80565b6040516020016114a4979695949392919061488d565b604051602081830303815290604052905090565b6000818152600260205260408120546001600160a01b0316806109d15760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610aef565b606081611567816000908152600260205260409020546001600160a01b0316151590565b6115845760405163975ed9f560e01b815260040160405180910390fd5b611237600b848154811061159a5761159a614603565b60009182526020909120604080516102008101909152916002020160108282826020028201916000905b82829054906101000a900462ffffff1662ffffff16815260200190600301906020826002010492830192600103820291508084116115c4575050604080516124008101918290529450600c935061012092509050826000855b825461010083900a900460ff1681526020600192830181810494850194909303909202910180841161161d5790505050505050612d96565b60006001600160a01b0382166116d35760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610aef565b506001600160a01b031660009081526003602052604090205490565b6116f7613cc4565b6040805161240081019182905290600c9061012090826000855b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116117115790505050505050905090565b6008546001600160a01b031633146117a35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610aef565b611436600061241f565b60606000806117bb84611655565b905060008167ffffffffffffffff8111156117d8576117d861423f565b604051908082528060200260200182016040528015611801578160200160208202803683370190505b50905060005b82841461185d576000818152600260205260409020546001600160a01b03808816911603611855578082858060010196508151811061184857611848614603565b6020026020010181815250505b600101611807565b50949350505050565b60608161188a816000908152600260205260409020546001600160a01b0316151590565b6118a75760405163975ed9f560e01b815260040160405180910390fd5b60016118b284612c5d565b60166118bd46612c5d565b6118c630612d80565b6118cf88612c5d565b6118d889611125565b6040516020016118ee9796959493929190614a58565b604051602081830303815290604052915050919050565b6008546001600160a01b0316331461195f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610aef565b6111218282613113565b6060600180546109e6906145cf565b60608183106119b2576040517e39e4d700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6007548211156119c25760075491505b60006119cd85611655565b905060008167ffffffffffffffff8111156119ea576119ea61423f565b604051908082528060200260200182016040528015611a13578160200160208202803683370190505b50905081600003611a275791506112379050565b818585031015611a375784840391505b6000855b858114158015611a4b5750838214155b15611a9f576000818152600260205260409020546001600160a01b03808a16911603611a975780838380600101945081518110611a8a57611a8a614603565b6020026020010181815250505b600101611a3b565b50815295945050505050565b611121338383613283565b611ac03383612530565b611b325760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610aef565b611b3e84848484613351565b50505050565b6060600080600080600060606000806000611b5d613cc4565b611b65613c87565b611b6d6109d7565b600a5460168054929e5060ff82169d5062010000820462ffffff9081169d50650100000000008304169b5068010000000000000000820464ffffffffff169a506d010000000000000000000000000090910472ffffffffffffffffffffffffffffffffffffff16985090611be0906145cf565b80601f0160208091040260200160405190810160405280929190818152602001828054611c0c906145cf565b8015611c595780601f10611c2e57610100808354040283529160200191611c59565b820191906000526020600020905b815481529060010190602001808311611c3c57829003601f168201915b50505050509550611c6960075490565b9450611c7460065490565b9350611c886008546001600160a01b031690565b60408051612400810191829052919450600c9061012090826000855b825461010083900a900460ff16815260206001928301818104948501949093039092029101808411611ca457905050505050509150600b600081548110611ced57611ced614603565b60009182526020909120604080516102008101909152916002020160108282826020028201916000905b82829054906101000a900462ffffff1662ffffff1681526020019060030190602082600201049283019260010382029150808411611d1757905050505050509050909192939495969798999a9b565b6008546001600160a01b03163314611dc05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610aef565b6103e88362ffffff161115611e08576040517f05b0bff100000000000000000000000000000000000000000000000000000000815262ffffff84166004820152602401610aef565b600a5464ffffffffff838116680100000000000000009092041614801590611e4a5750600a5464ffffffffff6801000000000000000090910481164290911610155b15611e81576040517fca1f988a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a805460ff191686151590811790915560ff16611ea557611ea560156000613ca6565b600a805467ffffff000000ff0019166101008615150267ffffff00000000001916176501000000000062ffffff8616021790554264ffffffffff831610611eec5781611eee565b425b600a805472ffffffffffffffffffffffffffffffffffffff9093166d0100000000000000000000000000026cffffffffffffffffffffffffff64ffffffffff9390931668010000000000000000029290921667ffffffffffffffff9093169290921717905550505050565b606081611f7d816000908152600260205260409020546001600160a01b0316151590565b611f9a5760405163975ed9f560e01b815260040160405180910390fd5b611fab611fa684611866565b6133da565b6040516020016118ee9190614bc3565b6008546001600160a01b031633146120155760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610aef565b600a5462ffffff620100009091041661202d60075490565b1061204b57604051638b793d9d60e01b815260040160405180910390fd5b6111218282612471565b6008546001600160a01b031633146120af5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610aef565b6103e88111156120eb576040517f605ab9fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e4e60168383613b72565b6060612104611fa6611438565b6040516020016114a49190614bc3565b6008546001600160a01b0316331461216e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610aef565b600a5460ff1661219157604051630628cadf60e11b815260040160405180910390fd5b8060005b818114611b3e5760158484838181106121b0576121b0614603565b90506020020160208101906121c59190613ee3565b815460018082018455600093845260209093200180546001600160a01b0319166001600160a01b039290921691909117905501612195565b600a5460ff1661222057604051630628cadf60e11b815260040160405180910390fd5b61222a8333613113565b610e4e82826127f2565b6008546001600160a01b0316331461228e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610aef565b6001600160a01b03811661230a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610aef565b6123138161241f565b50565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061237957506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806109d157507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316146109d1565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906123e6826114b8565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061247c60075490565b604080516102208101909152909150600b908060208101856010828261020080828437600092018290525092909352508354600181018555938152602090208251929360020201916124d2915082906010613ce4565b5050600b5460001901821490506124eb576124eb614c08565b6124f58382613576565b60405181906001600160a01b038516907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688590600090a3505050565b6000818152600260205260408120546001600160a01b03166125ba5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610aef565b60006125c5836114b8565b9050806001600160a01b0316846001600160a01b0316148061260c57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806126305750836001600160a01b031661262584610a69565b6001600160a01b0316145b949350505050565b826001600160a01b031661264b826114b8565b6001600160a01b0316146126c75760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610aef565b6001600160a01b0382166127425760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610aef565b61274d838383613590565b6127586000826123b1565b6001600160a01b0383166000908152600360205260408120805460019290612781908490614c1e565b90915550506001600160a01b03808316600081815260036020908152604080832080546001019055858352600290915280822080546001600160a01b031916841790555184938716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600a546d0100000000000000000000000000900472ffffffffffffffffffffffffffffffffffffff1634811461285d576040517f0fcba3be00000000000000000000000000000000000000000000000000000000815260048101829052346024820152604401610aef565b600a5462ffffff620100009091041661287560075490565b1061289357604051638b793d9d60e01b815260040160405180910390fd5b600a5464ffffffffff68010000000000000000909104811642909116101561290857600a546040517fbce693d70000000000000000000000000000000000000000000000000000000081526801000000000000000090910464ffffffffff908116600483015242166024820152604401610aef565b8015612b76576000612710600960009054906101000a90046001600160a01b03166001600160a01b0316635a64ad956040518163ffffffff1660e01b8152600401602060405180830381865afa158015612966573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061298a9190614c35565b612994908461478f565b61299e91906147c4565b90506000600960009054906101000a90046001600160a01b03166001600160a01b03166338af3eed6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156129f5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a199190614c4e565b6001600160a01b03168260405160006040518083038185875af1925050503d8060008114612a63576040519150601f19603f3d011682016040523d82523d6000602084013e612a68565b606091505b5050905080612ab95760405162461bcd60e51b815260206004820152601360248201527f4645455f5452414e534645525f4641494c4544000000000000000000000000006044820152606401610aef565b6000612acd6008546001600160a01b031690565b6001600160a01b0316612ae08486614c1e565b604051600081818185875af1925050503d8060008114612b1c576040519150601f19603f3d011682016040523d82523d6000602084013e612b21565b606091505b5050905080612b725760405162461bcd60e51b815260206004820152601c60248201527f4d494e54494e475f434f53545f5452414e534645525f4641494c4544000000006044820152606401610aef565b5050505b610e4e8383612471565b6060612b8f611fa68484612d96565b604051602001612b9f9190614c6b565b604051602081830303815290604052905092915050565b6000612bc1826114b8565b9050612bcf81600084613590565b612bda6000836123b1565b6001600160a01b0381166000908152600360205260408120805460019290612c03908490614c1e565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b606081600003612c845750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612cae5780612c9881614cb0565b9150612ca79050600a836147c4565b9150612c88565b60008167ffffffffffffffff811115612cc957612cc961423f565b6040519080825280601f01601f191660200182016040528015612cf3576020820181803683370190505b509050815b851561185d57612d09600182614c1e565b90506000612d18600a886147c4565b612d2390600a61478f565b612d2d9088614c1e565b612d38906030614cc9565b905060008160f81b905080848481518110612d5557612d55614603565b60200101906001600160f81b031916908160001a905350612d77600a896147c4565b97505050612cf8565b60606109d1826001600160a01b031660146135d5565b6060612da0613d6b565b60005b6018811015613005576000846002612dbc60188561478f565b612dc691906147c4565b6101208110612dd757612dd7614603565b6020020151600f169050828160108110612df357612df3614603565b6020020151612e0183612c5d565b604051602001612e12929190614cee565b604051602081830303815290604052838260108110612e3357612e33614603565b60200201526001805b6018811015612ff7576000612e52600283614d46565b612e5d90600461478f565b88612e696002856147c4565b6002612e7660188a61478f565b612e8091906147c4565b612e8a9190614d5a565b6101208110612e9b57612e9b614603565b602002015160ff16901c600f1660ff169050808403612ec65782612ebe81614cb0565b935050612f83565b858460108110612ed857612ed8614603565b6020020151612ee684612c5d565b604051602001612ef7929190614d72565b604051602081830303815290604052868560108110612f1857612f18614603565b602002015260019250858160108110612f3357612f33614603565b6020020151612f4183612c5d565b612f4a87612c5d565b604051602001612f5c93929190614dca565b604051602081830303815290604052868260108110612f7d57612f7d614603565b60200201525b612f8f60016018614c1e565b8203612fed57858160108110612fa757612fa7614603565b6020020151612fb584612c5d565b604051602001612fc6929190614d72565b604051602081830303815290604052868260108110612fe757612fe7614603565b60200201525b9250600101612e3c565b508260010192505050612da3565b50606060005b601081101561309757600083826010811061302857613028614603565b602002015151111561308f578161305487836010811061304a5761304a614603565b602002015161379a565b84836010811061306657613066614603565b602002015160405160200161307d93929190614e61565b60405160208183030381529060405291505b60010161300b565b506040518060c001604052806094815260200161502c60949139816040518060400160405280600681526020017f3c2f7376673e00000000000000000000000000000000000000000000000000008152506040516020016130fa93929190614f22565b6040516020818303038152906040529250505092915050565b600a5460ff1661313657604051630628cadf60e11b815260040160405180910390fd5b806001600160a01b03166015838154811061315357613153614603565b6000918252602090912001546001600160a01b0316146131d257806015838154811061318157613181614603565b6000918252602090912001546040517f4b2454db0000000000000000000000000000000000000000000000000000000081526001600160a01b03928316600482015291166024820152604401610aef565b601580546131e290600190614c1e565b815481106131f2576131f2614603565b600091825260209091200154601580546001600160a01b03909216918490811061321e5761321e614603565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550601580548061325d5761325d614f65565b600082815260209020810160001990810180546001600160a01b03191690550190555050565b816001600160a01b0316836001600160a01b0316036132e45760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610aef565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61335c848484612638565b61336884848484613844565b611b3e5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610aef565b606081516000036133f957505060408051602081019091526000815290565b6000604051806060016040528060408152602001614fec60409139905060006003845160026134289190614d5a565b61343291906147c4565b61343d90600461478f565b9050600061344c826020614d5a565b67ffffffffffffffff8111156134645761346461423f565b6040519080825280601f01601f19166020018201604052801561348e576020820181803683370190505b509050818152600183018586518101602084015b818310156134fa576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f81168501518253506001016134a2565b600389510660018114613514576002811461354057613568565b7f3d3d000000000000000000000000000000000000000000000000000000000000600119830152613568565b7f3d000000000000000000000000000000000000000000000000000000000000006000198301525b509398975050505050505050565b61112182826040518060200160405280600081525061399b565b6001600160a01b0383166135b857600680546001908101909155600780549091019055505050565b6001600160a01b038216610e4e5760068054600019019055505050565b606060006135e483600261478f565b6135ef906002614d5a565b67ffffffffffffffff8111156136075761360761423f565b6040519080825280601f01601f191660200182016040528015613631576020820181803683370190505b509050600360fc1b8160008151811061364c5761364c614603565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061369757613697614603565b60200101906001600160f81b031916908160001a90535060006136bb84600261478f565b6136c6906001614d5a565b90505b600181111561374b577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061370757613707614603565b1a60f81b82828151811061371d5761371d614603565b60200101906001600160f81b031916908160001a90535060049490941c9361374481614f7b565b90506136c9565b5083156112375760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610aef565b60408051600680825281830190925260609160009190602082018180368337019050509050600f60065b806137ce81614f7b565b915050848216600960ff8216116137ef576137ea816030614cc9565b6137fa565b6137fa816057614cc9565b60f81b84838151811061380f5761380f614603565b60200101906001600160f81b031916908160001a90535060048662ffffff16901c955050600081116137c45750909392505050565b60006001600160a01b0384163b1561399057604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613888903390899088908890600401614f92565b6020604051808303816000875af19250505080156138c3575060408051601f3d908101601f191682019092526138c091810190614fce565b60015b613976573d8080156138f1576040519150601f19603f3d011682016040523d82523d6000602084013e6138f6565b606091505b50805160000361396e5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610aef565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612630565b506001949350505050565b6139a58383613a24565b6139b26000848484613844565b610e4e5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610aef565b6001600160a01b038216613a7a5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610aef565b6000818152600260205260409020546001600160a01b031615613adf5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610aef565b613aeb60008383613590565b6001600160a01b0382166000908152600360205260408120805460019290613b14908490614d5a565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054613b7e906145cf565b90600052602060002090601f016020900481019282613ba05760008555613be6565b82601f10613bb95782800160ff19823516178555613be6565b82800160010185558215613be6579182015b82811115613be6578235825591602001919060010190613bcb565b50613bf2929150613d93565b5090565b600983019183908215613be65791602002820160005b83821115613c4d57833560ff1683826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302613c0c565b8015613c7a5782816101000a81549060ff0219169055600101602081600001049283019260010302613c4d565b5050613bf2929150613d93565b6040518061020001604052806010906020820280368337509192915050565b50805460008255906000526020600020908101906123139190613d93565b604051806124000160405280610120906020820280368337509192915050565b600283019183908215613be65791602002820160005b83821115613d3c57835183826101000a81548162ffffff021916908362ffffff1602179055509260200192600301602081600201049283019260010302613cfa565b8015613c7a5782816101000a81549062ffffff0219169055600301602081600201049283019260010302613d3c565b6040518061020001604052806010905b6060815260200190600190039081613d7b5790505090565b5b80821115613bf25760008155600101613d94565b6001600160e01b03198116811461231357600080fd5b600060208284031215613dd057600080fd5b813561123781613da8565b60005b83811015613df6578181015183820152602001613dde565b83811115611b3e5750506000910152565b60008151808452613e1f816020860160208601613ddb565b601f01601f19169290920160200192915050565b6020815260006112376020830184613e07565b600060208284031215613e5857600080fd5b5035919050565b60008060408385031215613e7257600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b81811015613ec25783516001600160a01b031683529284019291840191600101613e9d565b50909695505050505050565b6001600160a01b038116811461231357600080fd5b600060208284031215613ef557600080fd5b813561123781613ece565b60008060408385031215613f1357600080fd5b8235613f1e81613ece565b946020939093013593505050565b60008083601f840112613f3e57600080fd5b50813567ffffffffffffffff811115613f5657600080fd5b6020830191508360208285010111156110d357600080fd5b8061020081018310156109d157600080fd5b8061240081018310156109d157600080fd5b6000806000806000806000806000806127408b8d031215613fb257600080fd5b613fbc8b35613ece565b8a35995060208b013567ffffffffffffffff80821115613fdb57600080fd5b613fe78e838f01613f2c565b909b50995060408d013591508082111561400057600080fd5b61400c8e838f01613f2c565b909950975060608d013591508082111561402557600080fd5b506140328d828e01613f2c565b90965094505060c08b8d03607f1901121561404c57600080fd5b60808b0192506140608c6101408d01613f6e565b91506140708c6103408d01613f80565b90509295989b9194979a5092959850565b8060005b6010811015611b3e57815162ffffff16845260209384019390910190600101614085565b61020081016109d18284614081565b6000806000606084860312156140cd57600080fd5b83356140d881613ece565b925060208401356140e881613ece565b929592945050506040919091013590565b600080610220838503121561410d57600080fd5b823561411881613ece565b91506141278460208501613f6e565b90509250929050565b8060005b610120811015611b3e57815160ff16845260209384019390910190600101614134565b61240081016109d18284614130565b6020808252825182820181905260009190848201906040850190845b81811015613ec257835183529284019291840191600101614182565b600080604083850312156141b157600080fd5b8235915060208301356141c381613ece565b809150509250929050565b6000806000606084860312156141e357600080fd5b83356141ee81613ece565b95602085013595506040909401359392505050565b801515811461231357600080fd5b6000806040838503121561422457600080fd5b823561422f81613ece565b915060208301356141c381614203565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561426b57600080fd5b843561427681613ece565b9350602085013561428681613ece565b925060408501359150606085013567ffffffffffffffff808211156142aa57600080fd5b818701915087601f8301126142be57600080fd5b8135818111156142d0576142d061423f565b604051601f8201601f19908116603f011681019083821181831017156142f8576142f861423f565b816040528281528a602084870101111561431157600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6127408152600061434a61274083018f613e07565b8d1515602084015262ffffff8d811660408501528c16606084015264ffffffffff8b16608084015274ffffffffffffffffffffffffffffffffffffffffff8a1660a084015282810360c08401526143a1818a613e07565b9150508660e0830152856101008301526143c76101208301866001600160a01b03169052565b6143d5610140830185614130565b6143e3612540830184614081565b9d9c50505050505050505050505050565b62ffffff8116811461231357600080fd5b64ffffffffff8116811461231357600080fd5b72ffffffffffffffffffffffffffffffffffffff8116811461231357600080fd5b600080600080600060a0868803121561445157600080fd5b853561445c81614203565b9450602086013561446c81614203565b9350604086013561447c816143f4565b9250606086013561448c81614405565b9150608086013561449c81614418565b809150509295509295909350565b600080602083850312156144bd57600080fd5b823567ffffffffffffffff8111156144d457600080fd5b6144e085828601613f2c565b90969095509350505050565b600080604083850312156144ff57600080fd5b823561450a81613ece565b915060208301356141c381613ece565b6000806020838503121561452d57600080fd5b823567ffffffffffffffff8082111561454557600080fd5b818501915085601f83011261455957600080fd5b81358181111561456857600080fd5b8660208260051b850101111561457d57600080fd5b60209290920196919550909350505050565b600080600061024084860312156145a557600080fd5b8335925060208401356145b781613ece565b91506145c68560408601613f6e565b90509250925092565b600181811c908216806145e357607f821691505b60208210810361100357634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600081356109d1816143f4565b600081356109d181614405565b600081356109d181614418565b813561464b81614203565b815460ff19811691151560ff169182178355602084013561466b81614203565b61ff0090151560081b1661ffff198216831781178455604085013561468f816143f4565b64ffffff00008160101b168464ffffffffff198516178317178555505050506146df6146bd60608401614619565b825467ffffff0000000000191660289190911b67ffffff000000000016178255565b61472c6146ee60808401614626565b82547fffffffffffffffffffffffffffffffffffffff0000000000ffffffffffffffff1660409190911b6cffffffffff000000000000000016178255565b61112161473b60a08401614633565b82546cffffffffffffffffffffffffff1660689190911b7fffffffffffffffffffffffffffffffffffffff0000000000000000000000000016178255565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156147a9576147a9614779565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826147d3576147d36147ae565b500490565b8054600090600181811c90808316806147f257607f831692505b6020808410820361481357634e487b7160e01b600052602260045260246000fd5b818015614827576001811461483857614865565b60ff19861689528489019650614865565b60008881526020902060005b8681101561485d5781548b820152908501908301614844565b505084890196505b50505050505092915050565b60008151614883818560208601613ddb565b9290920192915050565b7f7b226e616d65223a220000000000000000000000000000000000000000000000815260006148bf600983018a6147d8565b7f222c226465736372697074696f6e223a2200000000000000000000000000000081526148ef601182018a6147d8565b90507f222c22696d616765223a220000000000000000000000000000000000000000008152875161492781600b840160208c01613ddb565b7f222c2265787465726e616c5f6c696e6b223a2268747470733a2f2f646978656c600b92909101918201527f2e636c75622f636f6c6c656374696f6e2f000000000000000000000000000000602b820152865161498b81603c840160208b01613ddb565b602f60f81b603c929091019182015285516149ad81603d840160208a01613ddb565b614a49614a20614a1a6149f16149eb603d868801017f222c2273656c6c65725f6665655f62617369735f706f696e7473223a220000008152601d0190565b8a614871565b7f222c226665655f726563697069656e74223a2200000000000000000000000000815260130190565b87614871565b7f227d000000000000000000000000000000000000000000000000000000000000815260020190565b9b9a5050505050505050505050565b7f7b226e616d65223a22000000000000000000000000000000000000000000000081526000614a8a600983018a6147d8565b7f202300000000000000000000000000000000000000000000000000000000000081528851614ac0816002840160208d01613ddb565b7f222c226465736372697074696f6e223a2200000000000000000000000000000060029290910191820152614af860138201896147d8565b90507f222c2265787465726e616c5f75726c223a2268747470733a2f2f646978656c2e81527f636c75622f636f6c6c656374696f6e2f0000000000000000000000000000000060208201528651614b56816030840160208b01613ddb565b602f60f81b603092909101918201528551614b78816031840160208a01613ddb565b614a49614a20614a1a614b9a6149eb603186880101602f60f81b815260010190565b7f222c22696d616765223a220000000000000000000000000000000000000000008152600b0190565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251614bfb81601d850160208701613ddb565b91909101601d0192915050565b634e487b7160e01b600052600160045260246000fd5b600082821015614c3057614c30614779565b500390565b600060208284031215614c4757600080fd5b5051919050565b600060208284031215614c6057600080fd5b815161123781613ece565b7f646174613a696d6167652f7376672b786d6c3b6261736536342c000000000000815260008251614ca381601a850160208701613ddb565b91909101601a0192915050565b600060018201614cc257614cc2614779565b5060010190565b600060ff821660ff84168060ff03821115614ce657614ce6614779565b019392505050565b60008351614d00818460208801613ddb565b7f4d302000000000000000000000000000000000000000000000000000000000009083019081528351614d3a816003840160208801613ddb565b01600301949350505050565b600082614d5557614d556147ae565b500690565b60008219821115614d6d57614d6d614779565b500190565b60008351614d84818460208801613ddb565b7f68000000000000000000000000000000000000000000000000000000000000009083019081528351614dbe816001840160208801613ddb565b01600101949350505050565b60008451614ddc818460208901613ddb565b7f4d000000000000000000000000000000000000000000000000000000000000009083019081528451614e16816001840160208901613ddb565b7f2000000000000000000000000000000000000000000000000000000000000000600192909101918201528351614e54816002840160208801613ddb565b0160020195945050505050565b60008451614e73818460208901613ddb565b7f3c70617468207374726f6b653d222300000000000000000000000000000000009083019081528451614ead81600f840160208901613ddb565b7f2220643d22000000000000000000000000000000000000000000000000000000600f92909101918201528351614eeb816014840160208801613ddb565b7f222f3e00000000000000000000000000000000000000000000000000000000006014929091019182015260170195945050505050565b60008451614f34818460208901613ddb565b845190830190614f48818360208901613ddb565b8451910190614f5b818360208801613ddb565b0195945050505050565b634e487b7160e01b600052603160045260246000fd5b600081614f8a57614f8a614779565b506000190190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152614fc46080830184613e07565b9695505050505050565b600060208284031215614fe057600080fd5b815161123781613da856fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f737667222076696577426f783d2230202d302e352032342032332e393939222077696474683d2239363022206865696768743d2239363022207072657365727665417370656374526174696f3d226e6f6e65222073686170652d72656e646572696e673d2263726973704564676573223ea2646970667358221220285081f1e2b213c26ae5af2dd82fe64c996105758885aae3a436d5f0a9a1188c64736f6c634300080d0033
Deployed Bytecode
0x60806040526004361061031e5760003560e01c80636dcee4ca116101a5578063a22cb465116100ec578063d51684c711610095578063e985e9c51161006f578063e985e9c5146108f7578063edac985b14610940578063f025c5e414610960578063f2fde38b1461097357600080fd5b8063d51684c7146108a2578063e735b48a146108c2578063e8a3d485146108e257600080fd5b8063c297838a116100c6578063c297838a1461081a578063c463906f14610862578063c87b56dd1461088257600080fd5b8063a22cb465146107ad578063b88d4fde146107cd578063baf2a4eb146107ed57600080fd5b80638aae790e1161014e57806394008a6e1161012857806394008a6e1461075857806395d89b411461077857806399a2557a1461078d57600080fd5b80638aae790e146107045780638da5cb5b1461071a5780638f7bb1791461073857600080fd5b8063715018a61161017f578063715018a6146106ad57806375794a3c146106c25780638462151c146106d757600080fd5b80636dcee4ca1461064b57806370a082311461066b57806370d72d631461068b57600080fd5b80633092606a1161026957806342966c68116102125780635909865a116101ec5780635909865a146106015780635f17cac3146106165780636352211e1461062b57600080fd5b806342966c68146105a55780634f558e79146105c557806354fd4d50146105e557600080fd5b80633edff20f116102435780633edff20f1461055057806341ea99b71461056557806342842e0e1461058557600080fd5b80633092606a1461050357806332cb6b0c146105235780633963d7eb1461053a57600080fd5b80630b9001c9116102cb57806323b872dd116102a557806323b872dd146104915780632a55205a146104b15780632d58e63b146104f057600080fd5b80630b9001c91461042f5780631497faa41461044f57806318160ddd1461047c57600080fd5b806308a0ccb1116102fc57806308a0ccb1146103b2578063094d0d12146103df578063095ea7b31461040d57600080fd5b806301ffc9a71461032357806306fdde0314610358578063081812fc1461037a575b600080fd5b34801561032f57600080fd5b5061034361033e366004613dbe565b610993565b60405190151581526020015b60405180910390f35b34801561036457600080fd5b5061036d6109d7565b60405161034f9190613e33565b34801561038657600080fd5b5061039a610395366004613e46565b610a69565b6040516001600160a01b03909116815260200161034f565b3480156103be57600080fd5b506103d26103cd366004613e5f565b610b14565b60405161034f9190613e81565b3480156103eb57600080fd5b506103ff6103fa366004613ee3565b610c3f565b60405190815260200161034f565b34801561041957600080fd5b5061042d610428366004613f00565b610d22565b005b34801561043b57600080fd5b5061042d61044a366004613f92565b610e53565b34801561045b57600080fd5b5061046f61046a366004613e46565b610f45565b60405161034f91906140a9565b34801561048857600080fd5b506006546103ff565b34801561049d57600080fd5b5061042d6104ac3660046140b8565b611009565b3480156104bd57600080fd5b506104d16104cc366004613e5f565b611090565b604080516001600160a01b03909316835260208301919091520161034f565b61042d6104fe3660046140f9565b6110da565b34801561050f57600080fd5b5061036d61051e366004613e46565b611125565b34801561052f57600080fd5b506103ff620f424081565b34801561054657600080fd5b506103ff6103e881565b34801561055c57600080fd5b506015546103ff565b34801561057157600080fd5b506103ff610580366004613ee3565b61123e565b34801561059157600080fd5b5061042d6105a03660046140b8565b6112f5565b3480156105b157600080fd5b5061042d6105c0366004613e46565b611310565b3480156105d157600080fd5b506103436105e0366004613e46565b6113b1565b3480156105f157600080fd5b506040516004815260200161034f565b34801561060d57600080fd5b5061042d6113d0565b34801561062257600080fd5b5061036d611438565b34801561063757600080fd5b5061039a610646366004613e46565b6114b8565b34801561065757600080fd5b5061036d610666366004613e46565b611543565b34801561067757600080fd5b506103ff610686366004613ee3565b611655565b34801561069757600080fd5b506106a06116ef565b60405161034f9190614157565b3480156106b957600080fd5b5061042d611749565b3480156106ce57600080fd5b506007546103ff565b3480156106e357600080fd5b506106f76106f2366004613ee3565b6117ad565b60405161034f9190614166565b34801561071057600080fd5b506103ff61271081565b34801561072657600080fd5b506008546001600160a01b031661039a565b34801561074457600080fd5b5061036d610753366004613e46565b611866565b34801561076457600080fd5b5061042d61077336600461419e565b611905565b34801561078457600080fd5b5061036d611969565b34801561079957600080fd5b506106f76107a83660046141ce565b611978565b3480156107b957600080fd5b5061042d6107c8366004614211565b611aab565b3480156107d957600080fd5b5061042d6107e8366004614255565b611ab6565b3480156107f957600080fd5b50610802611b44565b60405161034f9c9b9a99989796959493929190614335565b34801561082657600080fd5b50600954600a54600160a01b90910464ffffffffff1690610100900460ff166040805164ffffffffff909316835290151560208301520161034f565b34801561086e57600080fd5b5061042d61087d366004614439565b611d66565b34801561088e57600080fd5b5061036d61089d366004613e46565b611f59565b3480156108ae57600080fd5b5061042d6108bd3660046140f9565b611fbb565b3480156108ce57600080fd5b5061042d6108dd3660046144aa565b612055565b3480156108ee57600080fd5b5061036d6120f7565b34801561090357600080fd5b506103436109123660046144ec565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561094c57600080fd5b5061042d61095b36600461451a565b612114565b61042d61096e36600461458f565b6121fd565b34801561097f57600080fd5b5061042d61098e366004613ee3565b612234565b60006001600160e01b031982167f2a55205a0000000000000000000000000000000000000000000000000000000014806109d157506109d182612316565b92915050565b6060600080546109e6906145cf565b80601f0160208091040260200160405190810160405280929190818152602001828054610a12906145cf565b8015610a5f5780601f10610a3457610100808354040283529160200191610a5f565b820191906000526020600020905b815481529060010190602001808311610a4257829003601f168201915b5050505050905090565b6000818152600260205260408120546001600160a01b0316610af85760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b606060006015805480602002602001604051908101604052809291908181526020018280548015610b6e57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610b50575b505083519394508692505050818610610b89575050506109d1565b818587011115610b9857508481035b8067ffffffffffffffff811115610bb157610bb161423f565b604051908082528060200260200182016040528015610bda578160200160208202803683370190505b50935060005b818114610c35578381880181518110610bfb57610bfb614603565b6020026020010151858281518110610c1557610c15614603565b6001600160a01b0390921660209283029190910190910152600101610be0565b5050505092915050565b6000806015805480602002602001604051908101604052809291908181526020018280548015610c9857602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610c7a575b505083519394506000925050505b818114610cef57846001600160a01b0316838281518110610cc957610cc9614603565b60200260200101516001600160a01b031603610ce757949350505050565b600101610ca6565b506040517f7441311500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610d2d826114b8565b9050806001600160a01b0316836001600160a01b031603610db65760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610aef565b336001600160a01b0382161480610dd25750610dd28133610912565b610e445760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610aef565b610e4e83836123b1565b505050565b600954600160a01b900464ffffffffff1615610e9b576040517f63403d3900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600980546001600160a01b031964ffffffffff4216600160a01b02167fffffffffffffff000000000000000000000000000000000000000000000000009091161733179055610eec60008a8a613b72565b50610ef960018888613b72565b50610f0660168686613b72565b5082600a610f148282614640565b50610f259050600c82610120613bf6565b50610f2f8a61241f565b610f398a83612471565b50505050505050505050565b610f4d613c87565b60008281526002602052604090205482906001600160a01b0316610f845760405163975ed9f560e01b815260040160405180910390fd5b600b8381548110610f9757610f97614603565b60009182526020909120604080516102008101909152916002020160108282826020028201916000905b82829054906101000a900462ffffff1662ffffff1681526020019060030190602082600201049283019260010382029150808411610fc1579050505050505091505b50919050565b6110133382612530565b6110855760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610aef565b610e4e838383612638565b6000806110a56008546001600160a01b031690565b600a54612710906110c49065010000000000900462ffffff168661478f565b6110ce91906147c4565b915091505b9250929050565b600a5460ff1615611117576040517f83a2ddce00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61112182826127f2565b5050565b606081611149816000908152600260205260409020546001600160a01b0316151590565b6111665760405163975ed9f560e01b815260040160405180910390fd5b611237600b848154811061117c5761117c614603565b60009182526020909120604080516102008101909152916002020160108282826020028201916000905b82829054906101000a900462ffffff1662ffffff16815260200190600301906020826002010492830192600103820291508084116111a6575050604080516124008101918290529450600c935061012092509050826000855b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116111ff5790505050505050612b80565b9392505050565b600080601580548060200260200160405190810160405280929190818152602001828054801561129757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611279575b505083519394506000925050505b8181146112ed57846001600160a01b03168382815181106112c8576112c8614603565b60200260200101516001600160a01b0316036112e5576001909301925b6001016112a5565b505050919050565b610e4e83838360405180602001604052806000815250611ab6565b61131a3382612530565b611350576040517f6414f05b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600b818154811061136357611363614603565b600091825260208220600291909102018181556001015561138381612bb6565b60405181907fb90306ad06b2a6ff86ddc9327db583062895ef6540e62dc50add009db5b356eb90600090a250565b6000818152600260205260408120546001600160a01b031615156109d1565b6008546001600160a01b0316331461142a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610aef565b61143660156000613ca6565b565b6060600060166114486000611125565b61145146612c5d565b61145a30612d80565b600a546114749065010000000000900462ffffff16612c5d565b61148e6114896008546001600160a01b031690565b612d80565b6040516020016114a4979695949392919061488d565b604051602081830303815290604052905090565b6000818152600260205260408120546001600160a01b0316806109d15760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610aef565b606081611567816000908152600260205260409020546001600160a01b0316151590565b6115845760405163975ed9f560e01b815260040160405180910390fd5b611237600b848154811061159a5761159a614603565b60009182526020909120604080516102008101909152916002020160108282826020028201916000905b82829054906101000a900462ffffff1662ffffff16815260200190600301906020826002010492830192600103820291508084116115c4575050604080516124008101918290529450600c935061012092509050826000855b825461010083900a900460ff1681526020600192830181810494850194909303909202910180841161161d5790505050505050612d96565b60006001600160a01b0382166116d35760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610aef565b506001600160a01b031660009081526003602052604090205490565b6116f7613cc4565b6040805161240081019182905290600c9061012090826000855b825461010083900a900460ff168152602060019283018181049485019490930390920291018084116117115790505050505050905090565b6008546001600160a01b031633146117a35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610aef565b611436600061241f565b60606000806117bb84611655565b905060008167ffffffffffffffff8111156117d8576117d861423f565b604051908082528060200260200182016040528015611801578160200160208202803683370190505b50905060005b82841461185d576000818152600260205260409020546001600160a01b03808816911603611855578082858060010196508151811061184857611848614603565b6020026020010181815250505b600101611807565b50949350505050565b60608161188a816000908152600260205260409020546001600160a01b0316151590565b6118a75760405163975ed9f560e01b815260040160405180910390fd5b60016118b284612c5d565b60166118bd46612c5d565b6118c630612d80565b6118cf88612c5d565b6118d889611125565b6040516020016118ee9796959493929190614a58565b604051602081830303815290604052915050919050565b6008546001600160a01b0316331461195f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610aef565b6111218282613113565b6060600180546109e6906145cf565b60608183106119b2576040517e39e4d700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6007548211156119c25760075491505b60006119cd85611655565b905060008167ffffffffffffffff8111156119ea576119ea61423f565b604051908082528060200260200182016040528015611a13578160200160208202803683370190505b50905081600003611a275791506112379050565b818585031015611a375784840391505b6000855b858114158015611a4b5750838214155b15611a9f576000818152600260205260409020546001600160a01b03808a16911603611a975780838380600101945081518110611a8a57611a8a614603565b6020026020010181815250505b600101611a3b565b50815295945050505050565b611121338383613283565b611ac03383612530565b611b325760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610aef565b611b3e84848484613351565b50505050565b6060600080600080600060606000806000611b5d613cc4565b611b65613c87565b611b6d6109d7565b600a5460168054929e5060ff82169d5062010000820462ffffff9081169d50650100000000008304169b5068010000000000000000820464ffffffffff169a506d010000000000000000000000000090910472ffffffffffffffffffffffffffffffffffffff16985090611be0906145cf565b80601f0160208091040260200160405190810160405280929190818152602001828054611c0c906145cf565b8015611c595780601f10611c2e57610100808354040283529160200191611c59565b820191906000526020600020905b815481529060010190602001808311611c3c57829003601f168201915b50505050509550611c6960075490565b9450611c7460065490565b9350611c886008546001600160a01b031690565b60408051612400810191829052919450600c9061012090826000855b825461010083900a900460ff16815260206001928301818104948501949093039092029101808411611ca457905050505050509150600b600081548110611ced57611ced614603565b60009182526020909120604080516102008101909152916002020160108282826020028201916000905b82829054906101000a900462ffffff1662ffffff1681526020019060030190602082600201049283019260010382029150808411611d1757905050505050509050909192939495969798999a9b565b6008546001600160a01b03163314611dc05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610aef565b6103e88362ffffff161115611e08576040517f05b0bff100000000000000000000000000000000000000000000000000000000815262ffffff84166004820152602401610aef565b600a5464ffffffffff838116680100000000000000009092041614801590611e4a5750600a5464ffffffffff6801000000000000000090910481164290911610155b15611e81576040517fca1f988a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600a805460ff191686151590811790915560ff16611ea557611ea560156000613ca6565b600a805467ffffff000000ff0019166101008615150267ffffff00000000001916176501000000000062ffffff8616021790554264ffffffffff831610611eec5781611eee565b425b600a805472ffffffffffffffffffffffffffffffffffffff9093166d0100000000000000000000000000026cffffffffffffffffffffffffff64ffffffffff9390931668010000000000000000029290921667ffffffffffffffff9093169290921717905550505050565b606081611f7d816000908152600260205260409020546001600160a01b0316151590565b611f9a5760405163975ed9f560e01b815260040160405180910390fd5b611fab611fa684611866565b6133da565b6040516020016118ee9190614bc3565b6008546001600160a01b031633146120155760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610aef565b600a5462ffffff620100009091041661202d60075490565b1061204b57604051638b793d9d60e01b815260040160405180910390fd5b6111218282612471565b6008546001600160a01b031633146120af5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610aef565b6103e88111156120eb576040517f605ab9fc00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610e4e60168383613b72565b6060612104611fa6611438565b6040516020016114a49190614bc3565b6008546001600160a01b0316331461216e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610aef565b600a5460ff1661219157604051630628cadf60e11b815260040160405180910390fd5b8060005b818114611b3e5760158484838181106121b0576121b0614603565b90506020020160208101906121c59190613ee3565b815460018082018455600093845260209093200180546001600160a01b0319166001600160a01b039290921691909117905501612195565b600a5460ff1661222057604051630628cadf60e11b815260040160405180910390fd5b61222a8333613113565b610e4e82826127f2565b6008546001600160a01b0316331461228e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610aef565b6001600160a01b03811661230a5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610aef565b6123138161241f565b50565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061237957506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806109d157507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316146109d1565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906123e6826114b8565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600880546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b600061247c60075490565b604080516102208101909152909150600b908060208101856010828261020080828437600092018290525092909352508354600181018555938152602090208251929360020201916124d2915082906010613ce4565b5050600b5460001901821490506124eb576124eb614c08565b6124f58382613576565b60405181906001600160a01b038516907f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688590600090a3505050565b6000818152600260205260408120546001600160a01b03166125ba5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610aef565b60006125c5836114b8565b9050806001600160a01b0316846001600160a01b0316148061260c57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b806126305750836001600160a01b031661262584610a69565b6001600160a01b0316145b949350505050565b826001600160a01b031661264b826114b8565b6001600160a01b0316146126c75760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e65720000000000000000000000000000000000000000000000000000006064820152608401610aef565b6001600160a01b0382166127425760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610aef565b61274d838383613590565b6127586000826123b1565b6001600160a01b0383166000908152600360205260408120805460019290612781908490614c1e565b90915550506001600160a01b03808316600081815260036020908152604080832080546001019055858352600290915280822080546001600160a01b031916841790555184938716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600a546d0100000000000000000000000000900472ffffffffffffffffffffffffffffffffffffff1634811461285d576040517f0fcba3be00000000000000000000000000000000000000000000000000000000815260048101829052346024820152604401610aef565b600a5462ffffff620100009091041661287560075490565b1061289357604051638b793d9d60e01b815260040160405180910390fd5b600a5464ffffffffff68010000000000000000909104811642909116101561290857600a546040517fbce693d70000000000000000000000000000000000000000000000000000000081526801000000000000000090910464ffffffffff908116600483015242166024820152604401610aef565b8015612b76576000612710600960009054906101000a90046001600160a01b03166001600160a01b0316635a64ad956040518163ffffffff1660e01b8152600401602060405180830381865afa158015612966573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061298a9190614c35565b612994908461478f565b61299e91906147c4565b90506000600960009054906101000a90046001600160a01b03166001600160a01b03166338af3eed6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156129f5573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a199190614c4e565b6001600160a01b03168260405160006040518083038185875af1925050503d8060008114612a63576040519150601f19603f3d011682016040523d82523d6000602084013e612a68565b606091505b5050905080612ab95760405162461bcd60e51b815260206004820152601360248201527f4645455f5452414e534645525f4641494c4544000000000000000000000000006044820152606401610aef565b6000612acd6008546001600160a01b031690565b6001600160a01b0316612ae08486614c1e565b604051600081818185875af1925050503d8060008114612b1c576040519150601f19603f3d011682016040523d82523d6000602084013e612b21565b606091505b5050905080612b725760405162461bcd60e51b815260206004820152601c60248201527f4d494e54494e475f434f53545f5452414e534645525f4641494c4544000000006044820152606401610aef565b5050505b610e4e8383612471565b6060612b8f611fa68484612d96565b604051602001612b9f9190614c6b565b604051602081830303815290604052905092915050565b6000612bc1826114b8565b9050612bcf81600084613590565b612bda6000836123b1565b6001600160a01b0381166000908152600360205260408120805460019290612c03908490614c1e565b909155505060008281526002602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b606081600003612c845750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612cae5780612c9881614cb0565b9150612ca79050600a836147c4565b9150612c88565b60008167ffffffffffffffff811115612cc957612cc961423f565b6040519080825280601f01601f191660200182016040528015612cf3576020820181803683370190505b509050815b851561185d57612d09600182614c1e565b90506000612d18600a886147c4565b612d2390600a61478f565b612d2d9088614c1e565b612d38906030614cc9565b905060008160f81b905080848481518110612d5557612d55614603565b60200101906001600160f81b031916908160001a905350612d77600a896147c4565b97505050612cf8565b60606109d1826001600160a01b031660146135d5565b6060612da0613d6b565b60005b6018811015613005576000846002612dbc60188561478f565b612dc691906147c4565b6101208110612dd757612dd7614603565b6020020151600f169050828160108110612df357612df3614603565b6020020151612e0183612c5d565b604051602001612e12929190614cee565b604051602081830303815290604052838260108110612e3357612e33614603565b60200201526001805b6018811015612ff7576000612e52600283614d46565b612e5d90600461478f565b88612e696002856147c4565b6002612e7660188a61478f565b612e8091906147c4565b612e8a9190614d5a565b6101208110612e9b57612e9b614603565b602002015160ff16901c600f1660ff169050808403612ec65782612ebe81614cb0565b935050612f83565b858460108110612ed857612ed8614603565b6020020151612ee684612c5d565b604051602001612ef7929190614d72565b604051602081830303815290604052868560108110612f1857612f18614603565b602002015260019250858160108110612f3357612f33614603565b6020020151612f4183612c5d565b612f4a87612c5d565b604051602001612f5c93929190614dca565b604051602081830303815290604052868260108110612f7d57612f7d614603565b60200201525b612f8f60016018614c1e565b8203612fed57858160108110612fa757612fa7614603565b6020020151612fb584612c5d565b604051602001612fc6929190614d72565b604051602081830303815290604052868260108110612fe757612fe7614603565b60200201525b9250600101612e3c565b508260010192505050612da3565b50606060005b601081101561309757600083826010811061302857613028614603565b602002015151111561308f578161305487836010811061304a5761304a614603565b602002015161379a565b84836010811061306657613066614603565b602002015160405160200161307d93929190614e61565b60405160208183030381529060405291505b60010161300b565b506040518060c001604052806094815260200161502c60949139816040518060400160405280600681526020017f3c2f7376673e00000000000000000000000000000000000000000000000000008152506040516020016130fa93929190614f22565b6040516020818303038152906040529250505092915050565b600a5460ff1661313657604051630628cadf60e11b815260040160405180910390fd5b806001600160a01b03166015838154811061315357613153614603565b6000918252602090912001546001600160a01b0316146131d257806015838154811061318157613181614603565b6000918252602090912001546040517f4b2454db0000000000000000000000000000000000000000000000000000000081526001600160a01b03928316600482015291166024820152604401610aef565b601580546131e290600190614c1e565b815481106131f2576131f2614603565b600091825260209091200154601580546001600160a01b03909216918490811061321e5761321e614603565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550601580548061325d5761325d614f65565b600082815260209020810160001990810180546001600160a01b03191690550190555050565b816001600160a01b0316836001600160a01b0316036132e45760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610aef565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61335c848484612638565b61336884848484613844565b611b3e5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610aef565b606081516000036133f957505060408051602081019091526000815290565b6000604051806060016040528060408152602001614fec60409139905060006003845160026134289190614d5a565b61343291906147c4565b61343d90600461478f565b9050600061344c826020614d5a565b67ffffffffffffffff8111156134645761346461423f565b6040519080825280601f01601f19166020018201604052801561348e576020820181803683370190505b509050818152600183018586518101602084015b818310156134fa576003830192508251603f8160121c168501518253600182019150603f81600c1c168501518253600182019150603f8160061c168501518253600182019150603f81168501518253506001016134a2565b600389510660018114613514576002811461354057613568565b7f3d3d000000000000000000000000000000000000000000000000000000000000600119830152613568565b7f3d000000000000000000000000000000000000000000000000000000000000006000198301525b509398975050505050505050565b61112182826040518060200160405280600081525061399b565b6001600160a01b0383166135b857600680546001908101909155600780549091019055505050565b6001600160a01b038216610e4e5760068054600019019055505050565b606060006135e483600261478f565b6135ef906002614d5a565b67ffffffffffffffff8111156136075761360761423f565b6040519080825280601f01601f191660200182016040528015613631576020820181803683370190505b509050600360fc1b8160008151811061364c5761364c614603565b60200101906001600160f81b031916908160001a9053507f78000000000000000000000000000000000000000000000000000000000000008160018151811061369757613697614603565b60200101906001600160f81b031916908160001a90535060006136bb84600261478f565b6136c6906001614d5a565b90505b600181111561374b577f303132333435363738396162636465660000000000000000000000000000000085600f166010811061370757613707614603565b1a60f81b82828151811061371d5761371d614603565b60200101906001600160f81b031916908160001a90535060049490941c9361374481614f7b565b90506136c9565b5083156112375760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610aef565b60408051600680825281830190925260609160009190602082018180368337019050509050600f60065b806137ce81614f7b565b915050848216600960ff8216116137ef576137ea816030614cc9565b6137fa565b6137fa816057614cc9565b60f81b84838151811061380f5761380f614603565b60200101906001600160f81b031916908160001a90535060048662ffffff16901c955050600081116137c45750909392505050565b60006001600160a01b0384163b1561399057604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290613888903390899088908890600401614f92565b6020604051808303816000875af19250505080156138c3575060408051601f3d908101601f191682019092526138c091810190614fce565b60015b613976573d8080156138f1576040519150601f19603f3d011682016040523d82523d6000602084013e6138f6565b606091505b50805160000361396e5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610aef565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612630565b506001949350505050565b6139a58383613a24565b6139b26000848484613844565b610e4e5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610aef565b6001600160a01b038216613a7a5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610aef565b6000818152600260205260409020546001600160a01b031615613adf5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610aef565b613aeb60008383613590565b6001600160a01b0382166000908152600360205260408120805460019290613b14908490614d5a565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b828054613b7e906145cf565b90600052602060002090601f016020900481019282613ba05760008555613be6565b82601f10613bb95782800160ff19823516178555613be6565b82800160010185558215613be6579182015b82811115613be6578235825591602001919060010190613bcb565b50613bf2929150613d93565b5090565b600983019183908215613be65791602002820160005b83821115613c4d57833560ff1683826101000a81548160ff021916908360ff1602179055509260200192600101602081600001049283019260010302613c0c565b8015613c7a5782816101000a81549060ff0219169055600101602081600001049283019260010302613c4d565b5050613bf2929150613d93565b6040518061020001604052806010906020820280368337509192915050565b50805460008255906000526020600020908101906123139190613d93565b604051806124000160405280610120906020820280368337509192915050565b600283019183908215613be65791602002820160005b83821115613d3c57835183826101000a81548162ffffff021916908362ffffff1602179055509260200192600301602081600201049283019260010302613cfa565b8015613c7a5782816101000a81549062ffffff0219169055600301602081600201049283019260010302613d3c565b6040518061020001604052806010905b6060815260200190600190039081613d7b5790505090565b5b80821115613bf25760008155600101613d94565b6001600160e01b03198116811461231357600080fd5b600060208284031215613dd057600080fd5b813561123781613da8565b60005b83811015613df6578181015183820152602001613dde565b83811115611b3e5750506000910152565b60008151808452613e1f816020860160208601613ddb565b601f01601f19169290920160200192915050565b6020815260006112376020830184613e07565b600060208284031215613e5857600080fd5b5035919050565b60008060408385031215613e7257600080fd5b50508035926020909101359150565b6020808252825182820181905260009190848201906040850190845b81811015613ec25783516001600160a01b031683529284019291840191600101613e9d565b50909695505050505050565b6001600160a01b038116811461231357600080fd5b600060208284031215613ef557600080fd5b813561123781613ece565b60008060408385031215613f1357600080fd5b8235613f1e81613ece565b946020939093013593505050565b60008083601f840112613f3e57600080fd5b50813567ffffffffffffffff811115613f5657600080fd5b6020830191508360208285010111156110d357600080fd5b8061020081018310156109d157600080fd5b8061240081018310156109d157600080fd5b6000806000806000806000806000806127408b8d031215613fb257600080fd5b613fbc8b35613ece565b8a35995060208b013567ffffffffffffffff80821115613fdb57600080fd5b613fe78e838f01613f2c565b909b50995060408d013591508082111561400057600080fd5b61400c8e838f01613f2c565b909950975060608d013591508082111561402557600080fd5b506140328d828e01613f2c565b90965094505060c08b8d03607f1901121561404c57600080fd5b60808b0192506140608c6101408d01613f6e565b91506140708c6103408d01613f80565b90509295989b9194979a5092959850565b8060005b6010811015611b3e57815162ffffff16845260209384019390910190600101614085565b61020081016109d18284614081565b6000806000606084860312156140cd57600080fd5b83356140d881613ece565b925060208401356140e881613ece565b929592945050506040919091013590565b600080610220838503121561410d57600080fd5b823561411881613ece565b91506141278460208501613f6e565b90509250929050565b8060005b610120811015611b3e57815160ff16845260209384019390910190600101614134565b61240081016109d18284614130565b6020808252825182820181905260009190848201906040850190845b81811015613ec257835183529284019291840191600101614182565b600080604083850312156141b157600080fd5b8235915060208301356141c381613ece565b809150509250929050565b6000806000606084860312156141e357600080fd5b83356141ee81613ece565b95602085013595506040909401359392505050565b801515811461231357600080fd5b6000806040838503121561422457600080fd5b823561422f81613ece565b915060208301356141c381614203565b634e487b7160e01b600052604160045260246000fd5b6000806000806080858703121561426b57600080fd5b843561427681613ece565b9350602085013561428681613ece565b925060408501359150606085013567ffffffffffffffff808211156142aa57600080fd5b818701915087601f8301126142be57600080fd5b8135818111156142d0576142d061423f565b604051601f8201601f19908116603f011681019083821181831017156142f8576142f861423f565b816040528281528a602084870101111561431157600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b6127408152600061434a61274083018f613e07565b8d1515602084015262ffffff8d811660408501528c16606084015264ffffffffff8b16608084015274ffffffffffffffffffffffffffffffffffffffffff8a1660a084015282810360c08401526143a1818a613e07565b9150508660e0830152856101008301526143c76101208301866001600160a01b03169052565b6143d5610140830185614130565b6143e3612540830184614081565b9d9c50505050505050505050505050565b62ffffff8116811461231357600080fd5b64ffffffffff8116811461231357600080fd5b72ffffffffffffffffffffffffffffffffffffff8116811461231357600080fd5b600080600080600060a0868803121561445157600080fd5b853561445c81614203565b9450602086013561446c81614203565b9350604086013561447c816143f4565b9250606086013561448c81614405565b9150608086013561449c81614418565b809150509295509295909350565b600080602083850312156144bd57600080fd5b823567ffffffffffffffff8111156144d457600080fd5b6144e085828601613f2c565b90969095509350505050565b600080604083850312156144ff57600080fd5b823561450a81613ece565b915060208301356141c381613ece565b6000806020838503121561452d57600080fd5b823567ffffffffffffffff8082111561454557600080fd5b818501915085601f83011261455957600080fd5b81358181111561456857600080fd5b8660208260051b850101111561457d57600080fd5b60209290920196919550909350505050565b600080600061024084860312156145a557600080fd5b8335925060208401356145b781613ece565b91506145c68560408601613f6e565b90509250925092565b600181811c908216806145e357607f821691505b60208210810361100357634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b600081356109d1816143f4565b600081356109d181614405565b600081356109d181614418565b813561464b81614203565b815460ff19811691151560ff169182178355602084013561466b81614203565b61ff0090151560081b1661ffff198216831781178455604085013561468f816143f4565b64ffffff00008160101b168464ffffffffff198516178317178555505050506146df6146bd60608401614619565b825467ffffff0000000000191660289190911b67ffffff000000000016178255565b61472c6146ee60808401614626565b82547fffffffffffffffffffffffffffffffffffffff0000000000ffffffffffffffff1660409190911b6cffffffffff000000000000000016178255565b61112161473b60a08401614633565b82546cffffffffffffffffffffffffff1660689190911b7fffffffffffffffffffffffffffffffffffffff0000000000000000000000000016178255565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156147a9576147a9614779565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826147d3576147d36147ae565b500490565b8054600090600181811c90808316806147f257607f831692505b6020808410820361481357634e487b7160e01b600052602260045260246000fd5b818015614827576001811461483857614865565b60ff19861689528489019650614865565b60008881526020902060005b8681101561485d5781548b820152908501908301614844565b505084890196505b50505050505092915050565b60008151614883818560208601613ddb565b9290920192915050565b7f7b226e616d65223a220000000000000000000000000000000000000000000000815260006148bf600983018a6147d8565b7f222c226465736372697074696f6e223a2200000000000000000000000000000081526148ef601182018a6147d8565b90507f222c22696d616765223a220000000000000000000000000000000000000000008152875161492781600b840160208c01613ddb565b7f222c2265787465726e616c5f6c696e6b223a2268747470733a2f2f646978656c600b92909101918201527f2e636c75622f636f6c6c656374696f6e2f000000000000000000000000000000602b820152865161498b81603c840160208b01613ddb565b602f60f81b603c929091019182015285516149ad81603d840160208a01613ddb565b614a49614a20614a1a6149f16149eb603d868801017f222c2273656c6c65725f6665655f62617369735f706f696e7473223a220000008152601d0190565b8a614871565b7f222c226665655f726563697069656e74223a2200000000000000000000000000815260130190565b87614871565b7f227d000000000000000000000000000000000000000000000000000000000000815260020190565b9b9a5050505050505050505050565b7f7b226e616d65223a22000000000000000000000000000000000000000000000081526000614a8a600983018a6147d8565b7f202300000000000000000000000000000000000000000000000000000000000081528851614ac0816002840160208d01613ddb565b7f222c226465736372697074696f6e223a2200000000000000000000000000000060029290910191820152614af860138201896147d8565b90507f222c2265787465726e616c5f75726c223a2268747470733a2f2f646978656c2e81527f636c75622f636f6c6c656374696f6e2f0000000000000000000000000000000060208201528651614b56816030840160208b01613ddb565b602f60f81b603092909101918201528551614b78816031840160208a01613ddb565b614a49614a20614a1a614b9a6149eb603186880101602f60f81b815260010190565b7f222c22696d616765223a220000000000000000000000000000000000000000008152600b0190565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251614bfb81601d850160208701613ddb565b91909101601d0192915050565b634e487b7160e01b600052600160045260246000fd5b600082821015614c3057614c30614779565b500390565b600060208284031215614c4757600080fd5b5051919050565b600060208284031215614c6057600080fd5b815161123781613ece565b7f646174613a696d6167652f7376672b786d6c3b6261736536342c000000000000815260008251614ca381601a850160208701613ddb565b91909101601a0192915050565b600060018201614cc257614cc2614779565b5060010190565b600060ff821660ff84168060ff03821115614ce657614ce6614779565b019392505050565b60008351614d00818460208801613ddb565b7f4d302000000000000000000000000000000000000000000000000000000000009083019081528351614d3a816003840160208801613ddb565b01600301949350505050565b600082614d5557614d556147ae565b500690565b60008219821115614d6d57614d6d614779565b500190565b60008351614d84818460208801613ddb565b7f68000000000000000000000000000000000000000000000000000000000000009083019081528351614dbe816001840160208801613ddb565b01600101949350505050565b60008451614ddc818460208901613ddb565b7f4d000000000000000000000000000000000000000000000000000000000000009083019081528451614e16816001840160208901613ddb565b7f2000000000000000000000000000000000000000000000000000000000000000600192909101918201528351614e54816002840160208801613ddb565b0160020195945050505050565b60008451614e73818460208901613ddb565b7f3c70617468207374726f6b653d222300000000000000000000000000000000009083019081528451614ead81600f840160208901613ddb565b7f2220643d22000000000000000000000000000000000000000000000000000000600f92909101918201528351614eeb816014840160208801613ddb565b7f222f3e00000000000000000000000000000000000000000000000000000000006014929091019182015260170195945050505050565b60008451614f34818460208901613ddb565b845190830190614f48818360208901613ddb565b8451910190614f5b818360208801613ddb565b0195945050505050565b634e487b7160e01b600052603160045260246000fd5b600081614f8a57614f8a614779565b506000190190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152614fc46080830184613e07565b9695505050505050565b600060208284031215614fe057600080fd5b815161123781613da856fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2f3c73766720786d6c6e733d22687474703a2f2f7777772e77332e6f72672f323030302f737667222076696577426f783d2230202d302e352032342032332e393939222077696474683d2239363022206865696768743d2239363022207072657365727665417370656374526174696f3d226e6f6e65222073686170652d72656e646572696e673d2263726973704564676573223ea2646970667358221220285081f1e2b213c26ae5af2dd82fe64c996105758885aae3a436d5f0a9a1188c64736f6c634300080d0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 35 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.