ERC-721
NFT
Overview
Max Total Supply
66 GCP8
Holders
14
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 GCP8Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Rainbow7
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 10 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //----------------------------------------------------------------------------- // geneticchain.io - NextGen Generative NFT Platform //----------------------------------------------------------------------------- /*\_____________________________________________________________ .¿yy¿. __ MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM```````/MMM\\\\\ \\$$$$$$S/ . MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM`` `/ yyyy ` _____J$$$^^^^/%#// MMMMMMMMMMMMMMMMMMMYYYMMM```` `\/ .¿yü / $ùpüüü%%% | ``|//|` __ MMMMMYYYYMMMMMMM/` `| ___.¿yüy¿. .d$$$$ / $$$$SSSSM | | || MMNNNNNNM M/`` ``\/` .¿ù%%/. |.d$$$$$$$b.$$$*°^ / o$$$ __ | | || MMMMMMMMM M .¿yy¿. .dX$$$$$$7.|$$$$"^"$$$$$$o` /MM o$$$ MM | | || MMYYYYYYM \\$$$$$$S/ .S$$o"^"4$$$$$$$` _ `SSSSS\ ____ MM |___|_|| MM ____ J$$$^^^^/%#//oSSS` YSSSSSS / pyyyüüü%%%XXXÙ$$$$ MM pyyyyyyy, `` ,$$$o .$$$` ___ pyyyyyyyyyyyy//+ / $$$$$$SSSSSSSÙM$$$. `` .S&&T$T$$$byyd$$$$\ \$$7 `` //o$$SSXMMSSSS | / $$/&&X _ ___ %$$$byyd$$$X\$`/S$$$$$$$S\ o$$l .\\YS$$X>$X _ ___| | / $$/%$$b.,.d$$$\`7$$$$$$$$7`.$ `"***"` __ o$$l __ 7$$$X>$$b.,.d$$$\ | / $$.`7$$$$$$$$%` `*+SX+*|_\\$ /. ..\MM o$$L MM !$$$$\$$$$$$$$$%|__| / $$// `*+XX*\'` `____ ` `/MMMMMMM /$$X, `` ,S$$$$\ `*+XX*\'`____ / %SXX . ., NERV ___.¿yüy¿. /MMMMM 7$$$byyd$$$>$X\ .,,_ $$$$ ` ___ .y%%ü¿. _______ $.d$$$$$$$S. `MMMM `/S$$$$$$$\\$J`.\\$$$ : $\`.¿yüy¿. `\\ $$$$$$S.//XXSSo $$$$$"^"$$$$. /MMM y `"**"`"Xo$7J$$$$$\ $.d$$$$$$$b. ^``/$$$$.`$$$$o $$$$\ _ 'SSSo /MMM M/.__ .,\Y$$$\\$$O` _/ $d$$$*°\ pyyyüüü%%%W $$$o.$$$$/ S$$$. ` S$To MMM MMMM` \$P*$$X+ b$$l MM $$$$` _ $$$$$$SSSSM $$$X.$T&&X o$$$. ` S$To MMM MMMX` $<.\X\` -X$$l MM $$$$ / $$/&&X X$$$/$/X$$dyS$$>. ` S$X%/ `MM MMMM/ `"` . -$$$l MM yyyy / $$/%$$b.__.d$$$$/$.'7$$$$$$$. ` %SXXX. MM MMMMM// ./M .<$$S, `` ,S$$> / $$.`7$$$$$$$$$$$/S//_'*+%%XX\ `._ /MM MMMMMMMMMMMMM\ /$$$$byyd$$$$\ / $$// `*+XX+*XXXX ,. .\MMMMMMMMMMM GENETIC/MMMMM\. /$$$$$$$$$$\| / %SXX ,_ . .\MMMMMMMMMMMMMMMMMMMMMMMM CHAIN/MMMMMMMM/__ `*+YY+*`_\| /_______//MMMMMMMMMMMMMMMMMMMMMMMMMMM/-/-/-\*/ //----------------------------------------------------------------------------- // Genetic Chain: Rainbow7 //----------------------------------------------------------------------------- // Author: papaver (@tronicdreams) //----------------------------------------------------------------------------- import "./GeneticChainMetadata.sol"; /** * @title Rainbow7 * GeneticChain - Project #8 - Rainbow7 */ contract Rainbow7 is GeneticChainMetadata { //------------------------------------------------------------------------- // ctor //------------------------------------------------------------------------- constructor( address spiral, string[2] memory tokenIpfsHashes, string memory baseUri, uint256 seed, address proxyRegistryAddress) GeneticChainMetadata( spiral, tokenIpfsHashes, baseUri, seed, proxyRegistryAddress) { } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), 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 { emit OwnershipTransferred(_owner, address(0)); _owner = 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"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (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"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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 // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.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) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant alphabet = "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] = alphabet[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is no longer needed starting with Solidity 0.8. The compiler * now has built in overflow checking. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //------------------------------------------------------------------------------ // geneticchain.io - NextGen Generative NFT Platform //------------------------------------------------------------------------------ //________________________________________________________________ .¿yy¿. __ //MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM```````/MMM\\\\\ \\$$$$$$S/ . //MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM`` `/ yyyy ` _____J$$$*^^*/%#// //MMMMMMMMMMMMMMMMMMMYYYMMM```` `\/ .¿yü / $ùpüüü%%% | ``|//|` __ //MMMMMYYYYMMMMMMM/` `| ___.¿yüy¿. .d$$$$ / $$$$SSSSM | | || MMNNNNNNM //M/`` ``\/` .¿ù%%/. |.d$$$$$$$b.$$$*°^ / o$$$ __ | | || MMMMMMMMM //M .¿yy¿. .dX$$$$$$7.|$$$$"^"$$$$$$o` /MM o$$$ MM | | || MMYYYYYYM // \\$$$$$$S/ .S$$o"^"4$$$$$$$` _ `SSSSS\ ____ MM |___|_|| MM ____ // J$$$*^^*/%#//oSSS` YSSSSSS / pyyyüüü%%%XXXÙ$$$$ MM pyyyyyyy, `` ,$$$o //.$$$` ___ pyyyyyyyyyyyy//+ / $$$$$$SSSSSSSÙM$$$. `` .S&&T$T$$$byyd$$$$\ //\$$7 `` //o$$SSXMMSSSS | / $$/&&X _ ___ %$$$byyd$$$X\$`/S$$$$$$$S\ //o$$l .\\YS$$X>$X _ ___| | / $$/%$$b.,.d$$$\`7$$$$$$$$7`.$ `"***"` __ //o$$l __ 7$$$X>$$b.,.d$$$\ | / $$.`7$$$$$$$$%` `*+SX+*|_\\$ /. ..\MM //o$$L MM !$$$$\$$$$$$$$$%|__| / $$// `*+XX*\'` `____ ` `/MMMMMMM ///$$X, `` ,S$$$$\ `*+XX*\'`____ / %SXX . ., NERV ___.¿yüy¿. /MMMMM // 7$$$byyd$$$>$X\ .,,_ $$$$ ` ___ .y%%ü¿. _______ $.d$$$$$$$S. `MMMM // `/S$$$$$$$\\$J`.\\$$$ : $\`.¿yüy¿. `\\ $$$$$$S.//XXSSo $$$$$"^"$$$$. /MMM //y `"**"`"Xo$7J$$$$$\ $.d$$$$$$$b. ^``/$$$$.`$$$$o $$$$\ _ 'SSSo /MMM //M/.__ .,\Y$$$\\$$O` _/ $d$$$*°\ pyyyüüü%%%W $$$o.$$$$/ S$$$. ` S$To MMM //MMMM` \$P*$$X+ b$$l MM $$$$` _ $$$$$$SSSSM $$$X.$T&&X o$$$. ` S$To MMM //MMMX` $<.\X\` -X$$l MM $$$$ / $$/&&X X$$$/$/X$$dyS$$>. ` S$X%/ `MM //MMMM/ `"` . -$$$l MM yyyy / $$/%$$b.__.d$$$$/$.'7$$$$$$$. ` %SXXX. MM //MMMMM// ./M .<$$S, `` ,S$$> / $$.`7$$$$$$$$$$$/S//_'*+%%XX\ `._ /MM //MMMMMMMMMMMMM\ /$$$$byyd$$$$\ / $$// `*+XX+*XXXX ,. .\MMMMMMMMMMM //GENETIC/MMMMM\. /$$$$$$$$$$\| / %SXX ,_ . .\MMMMMMMMMMMMMMMMMMMMMMMM //CHAIN/MMMMMMMM/__ `*+YY+*`_\| /_______//MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM //------------------------------------------------------------------------------ // Genetic Chain: GeneticChain721 //------------------------------------------------------------------------------ // Author: papaver (@tronicdreams) //------------------------------------------------------------------------------ import "openzeppelin-solidity/contracts/access/Ownable.sol"; import "openzeppelin-solidity/contracts/utils/Strings.sol"; import "./common/meta-transactions/ContentMixin.sol"; import "./common/meta-transactions/NativeMetaTransaction.sol"; import "./geneticchain/ERC721SequentialB.sol"; import "./geneticchain/ERC721SeqEnumerableB.sol"; import "./libraries/State.sol"; //------------------------------------------------------------------------------ // helper contracts //------------------------------------------------------------------------------ contract OwnableDelegateProxy {} //------------------------------------------------------------------------------ contract ProxyRegistry { mapping(address => OwnableDelegateProxy) public proxies; } //------------------------------------------------------------------------------ // GeneticChain721 //------------------------------------------------------------------------------ /** * @title GeneticChain721 * * ERC721 contract with various features: * - lower-gas implmentation * - low-gas generative token hash * - opensea proxy setup * - simple funds withdrawl */ abstract contract GeneticChain721 is ContextMixin, ERC721SeqEnumerableB, NativeMetaTransaction, Ownable { using State for State.Data; //------------------------------------------------------------------------- // events //------------------------------------------------------------------------- // track original pass ids event RainbowSplit(address indexed owner, uint256 tokenId, uint256 spiralId); //------------------------------------------------------------------------- // fields //------------------------------------------------------------------------- // token data uint256 private immutable _seed; // opensea proxy address private immutable _proxyRegistryAddress; // spiral address address internal immutable _spirals; // spiral tokenIds uint16[] internal _spiralIds; // minted ids mapping(uint16 => bool) private mintedIds; // contract state State.Data private _state; //------------------------------------------------------------------------- // modifiers //------------------------------------------------------------------------- modifier validTokenId(uint256 tokenId) { require(_exists(tokenId), "invalid token"); _; } //------------------------------------------------------------------------- modifier notLocked() { require(_state._locked == 0, "contract is locked"); _; } //------------------------------------------------------------------------- modifier availableId(uint16 spiralId) { require(!mintedIds[spiralId], 'already minted'); _; } //------------------------------------------------------------------------- // ctor //------------------------------------------------------------------------- constructor( address spirals, uint256 seed, address proxyRegistryAddress) ERC721SequentialB("Rainbow7 Pass", "GCP8") { _spirals = spirals; _seed = seed; _proxyRegistryAddress = proxyRegistryAddress; _initializeEIP712("Rainbow7 Pass"); // start tokens at 1 index _owners.push(); _spiralIds.push(); } //------------------------------------------------------------------------- // accessors //------------------------------------------------------------------------- /** * Lock contract. Disable public/member minting. Disallow on-chain * code/library updates. */ function lockContract() public onlyOwner { _state.setLocked(1); } //------------------------------------------------------------------------- /** * Check if contract is locked. */ function isLocked() public view returns (bool) { return _state._locked == 1; } //------------------------------------------------------------------------- /** * Returns entire list of spiralIds enumerated by thier tokenIds. */ function spiralIds() public view returns (uint16[] memory) { uint16[] memory spiralIds_ = _spiralIds; return spiralIds_; } //------------------------------------------------------------------------- // minting //------------------------------------------------------------------------- /** * Mint R7 Pass to rainbow spiral owner. */ function mint(uint16[] calldata spiralIds_) external onlyOwner notLocked { uint256 count = spiralIds_.length; for (uint256 i = 0; i < count; ++i) { _mint(spiralIds_[i]); } } //------------------------------------------------------------------------- // internal //------------------------------------------------------------------------- function _mint(uint16 spiralId) internal availableId(spiralId) { // track all r7 spiral ids _spiralIds.push(spiralId); mintedIds[spiralId] = true; // mint pass to spiral owner address owner = IERC721(_spirals).ownerOf(uint256(spiralId)); uint256 tokenId = _safeMint(owner); // track original pass ids emit RainbowSplit(owner, tokenId, uint256(spiralId)); } //------------------------------------------------------------------------- // ERC721Metadata //------------------------------------------------------------------------- function baseTokenURI() virtual public view returns (string memory); //------------------------------------------------------------------------- /** * @dev Returns uri of a token. Not guarenteed token exists. */ function tokenURI(uint256 tokenId) override public view returns (string memory) { return string(abi.encodePacked( baseTokenURI(), "/", Strings.toString(tokenId), "/meta")); } //------------------------------------------------------------------------- // generative //------------------------------------------------------------------------- /** * @dev Low-Gas alternative to storing the hash on the chain. * @return generated hash associated with valid a token. */ function tokenHash(uint256 tokenId) public view validTokenId(tokenId) returns (bytes32) { return keccak256( abi.encodePacked( _seed, tokenId, address(this))); } //------------------------------------------------------------------------- // money //------------------------------------------------------------------------- /** * Pull money out of this contract. */ function withdraw(address to, uint256 amount) public onlyOwner { require(amount > 0, "amount empty"); require(amount <= address(this).balance, "amount exceeds balance"); require(to != address(0), "address null"); payable(to).transfer(amount); } //------------------------------------------------------------------------- // approval //------------------------------------------------------------------------- /** * Override isApprovedForAll to whitelist user's OpenSea proxy accounts * to enable gas-less listings. */ function isApprovedForAll(address owner, address operator) override public view returns (bool) { // whitelist OpenSea proxy contract for easy trading ProxyRegistry proxyRegistry = ProxyRegistry(_proxyRegistryAddress); if (address(proxyRegistry.proxies(owner)) == operator) { return true; } return super.isApprovedForAll(owner, operator); } //------------------------------------------------------------------------- /** * This is used instead of msg.sender as transactions won't be sent by * the original token owner, but by OpenSea. */ function _msgSender() override internal view returns (address sender) { return ContextMixin.msgSender(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //------------------------------------------------------------------------------ // geneticchain.io - NextGen Generative NFT Platform //------------------------------------------------------------------------------ //________________________________________________________________ .¿yy¿. __ //MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM```````/MMM\\\\\ \\$$$$$$S/ . //MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM`` `/ yyyy ` _____J$$$*^^*/%#// //MMMMMMMMMMMMMMMMMMMYYYMMM```` `\/ .¿yü / $ùpüüü%%% | ``|//|` __ //MMMMMYYYYMMMMMMM/` `| ___.¿yüy¿. .d$$$$ / $$$$SSSSM | | || MMNNNNNNM //M/`` ``\/` .¿ù%%/. |.d$$$$$$$b.$$$*°^ / o$$$ __ | | || MMMMMMMMM //M .¿yy¿. .dX$$$$$$7.|$$$$"^"$$$$$$o` /MM o$$$ MM | | || MMYYYYYYM // \\$$$$$$S/ .S$$o"^"4$$$$$$$` _ `SSSSS\ ____ MM |___|_|| MM ____ // J$$$*^^*/%#//oSSS` YSSSSSS / pyyyüüü%%%XXXÙ$$$$ MM pyyyyyyy, `` ,$$$o //.$$$` ___ pyyyyyyyyyyyy//+ / $$$$$$SSSSSSSÙM$$$. `` .S&&T$T$$$byyd$$$$\ //\$$7 `` //o$$SSXMMSSSS | / $$/&&X _ ___ %$$$byyd$$$X\$`/S$$$$$$$S\ //o$$l .\\YS$$X>$X _ ___| | / $$/%$$b.,.d$$$\`7$$$$$$$$7`.$ `"***"` __ //o$$l __ 7$$$X>$$b.,.d$$$\ | / $$.`7$$$$$$$$%` `*+SX+*|_\\$ /. ..\MM //o$$L MM !$$$$\$$$$$$$$$%|__| / $$// `*+XX*\'` `____ ` `/MMMMMMM ///$$X, `` ,S$$$$\ `*+XX*\'`____ / %SXX . ., NERV ___.¿yüy¿. /MMMMM // 7$$$byyd$$$>$X\ .,,_ $$$$ ` ___ .y%%ü¿. _______ $.d$$$$$$$S. `MMMM // `/S$$$$$$$\\$J`.\\$$$ : $\`.¿yüy¿. `\\ $$$$$$S.//XXSSo $$$$$"^"$$$$. /MMM //y `"**"`"Xo$7J$$$$$\ $.d$$$$$$$b. ^``/$$$$.`$$$$o $$$$\ _ 'SSSo /MMM //M/.__ .,\Y$$$\\$$O` _/ $d$$$*°\ pyyyüüü%%%W $$$o.$$$$/ S$$$. ` S$To MMM //MMMM` \$P*$$X+ b$$l MM $$$$` _ $$$$$$SSSSM $$$X.$T&&X o$$$. ` S$To MMM //MMMX` $<.\X\` -X$$l MM $$$$ / $$/&&X X$$$/$/X$$dyS$$>. ` S$X%/ `MM //MMMM/ `"` . -$$$l MM yyyy / $$/%$$b.__.d$$$$/$.'7$$$$$$$. ` %SXXX. MM //MMMMM// ./M .<$$S, `` ,S$$> / $$.`7$$$$$$$$$$$/S//_'*+%%XX\ `._ /MM //MMMMMMMMMMMMM\ /$$$$byyd$$$$\ / $$// `*+XX+*XXXX ,. .\MMMMMMMMMMM //GENETIC/MMMMM\. /$$$$$$$$$$\| / %SXX ,_ . .\MMMMMMMMMMMMMMMMMMMMMMMM //CHAIN/MMMMMMMM/__ `*+YY+*`_\| /_______//MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM //------------------------------------------------------------------------------ // Genetic Chain: GeneticChainMetadata //------------------------------------------------------------------------------ // Author: papaver (@tronicdreams) //------------------------------------------------------------------------------ import "./GeneticChain721.sol"; //------------------------------------------------------------------------------ // GeneticChainMetadata //------------------------------------------------------------------------------ /** * @title GeneticChainMetadata * Holds all required metadata for Genetic Chain projects. */ abstract contract GeneticChainMetadata is GeneticChain721 { //------------------------------------------------------------------------- // constants //------------------------------------------------------------------------- uint256 constant private kActiveIdx = 0; uint256 constant private kDeactivatedIdx = 1; uint256 constant public projectId = 8; string constant public artist = "Alejandro Mirabal"; string constant public description = "The Rainbow7 Pass provides holders with membership to the Genetic Chain Platform. Passes will unlock access to pre-sales, free mints, future GC programs, as well as access to live events at the GC gallery."; //------------------------------------------------------------------------- // fields //------------------------------------------------------------------------- string[2] private _tokenIpfsHashes; string private _baseUri; //------------------------------------------------------------------------- // ctor //------------------------------------------------------------------------- constructor( address spirals, string[2] memory tokenIpfsHashes_, string memory baseUri_, uint256 seed, address proxyRegistryAddress) GeneticChain721( spirals, seed, proxyRegistryAddress) { _tokenIpfsHashes = tokenIpfsHashes_; _baseUri = baseUri_; } //------------------------------------------------------------------------- // functions //------------------------------------------------------------------------- /** * Each pass is associated with the spiral it was mint to. */ function isActive(uint256 tokenId) public view validTokenId(tokenId) returns (bool) { return ownerOf(tokenId) == IERC721(_spirals).ownerOf(_spiralIds[tokenId]); } //------------------------------------------------------------------------- // accessors //------------------------------------------------------------------------- function tokenIpfsHash(uint256 tokenId) public view returns (string memory) { return isActive(tokenId) ? _tokenIpfsHashes[kActiveIdx] : _tokenIpfsHashes[kDeactivatedIdx]; } //------------------------------------------------------------------------- function baseTokenURI() override public view returns (string memory) { return string(abi.encodePacked(_baseUri, "/api/project/", Strings.toString(projectId), "/token")); } //------------------------------------------------------------------------- function contractURI() public view returns (string memory) { return string(abi.encodePacked(_baseUri, "/api/project/", Strings.toString(projectId), "/contract")); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; abstract contract ContextMixin { function msgSender() internal view returns (address payable sender) { if (msg.sender == address(this)) { bytes memory array = msg.data; uint256 index = msg.data.length; assembly { // Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those. sender := and( mload(add(array, index)), 0xffffffffffffffffffffffffffffffffffffffff ) } } else { sender = payable(msg.sender); } return sender; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {Initializable} from "./Initializable.sol"; contract EIP712Base is Initializable { struct EIP712Domain { string name; string version; address verifyingContract; bytes32 salt; } string constant public ERC712_VERSION = "1"; bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256( bytes( "EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)" ) ); bytes32 internal domainSeperator; // supposed to be called once while initializing. // one of the contracts that inherits this contract follows proxy pattern // so it is not possible to do this in a constructor function _initializeEIP712( string memory name ) internal initializer { _setDomainSeperator(name); } function _setDomainSeperator(string memory name) internal { domainSeperator = keccak256( abi.encode( EIP712_DOMAIN_TYPEHASH, keccak256(bytes(name)), keccak256(bytes(ERC712_VERSION)), address(this), bytes32(getChainId()) ) ); } function getDomainSeperator() public view returns (bytes32) { return domainSeperator; } function getChainId() public view returns (uint256) { uint256 id; assembly { id := chainid() } return id; } /** * Accept message hash and returns hash message in EIP712 compatible form * So that it can be used to recover signer from signature signed using EIP712 formatted data * https://eips.ethereum.org/EIPS/eip-712 * "\\x19" makes the encoding deterministic * "\\x01" is the version byte to make it compatible to EIP-191 */ function toTypedMessageHash(bytes32 messageHash) internal view returns (bytes32) { return keccak256( abi.encodePacked("\x19\x01", getDomainSeperator(), messageHash) ); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; contract Initializable { bool inited = false; modifier initializer() { require(!inited, "already inited"); _; inited = true; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import {SafeMath} from "openzeppelin-solidity/contracts/utils/math/SafeMath.sol"; import {EIP712Base} from "./EIP712Base.sol"; contract NativeMetaTransaction is EIP712Base { using SafeMath for uint256; bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256( bytes( "MetaTransaction(uint256 nonce,address from,bytes functionSignature)" ) ); event MetaTransactionExecuted( address userAddress, address payable relayerAddress, bytes functionSignature ); mapping(address => uint256) nonces; /* * Meta transaction structure. * No point of including value field here as if user is doing value transfer then he has the funds to pay for gas * He should call the desired function directly in that case. */ struct MetaTransaction { uint256 nonce; address from; bytes functionSignature; } function executeMetaTransaction( address userAddress, bytes memory functionSignature, bytes32 sigR, bytes32 sigS, uint8 sigV ) public payable returns (bytes memory) { MetaTransaction memory metaTx = MetaTransaction({ nonce: nonces[userAddress], from: userAddress, functionSignature: functionSignature }); require( verify(userAddress, metaTx, sigR, sigS, sigV), "Signer and signature do not match" ); // increase nonce for user (to avoid re-use) nonces[userAddress] = nonces[userAddress].add(1); emit MetaTransactionExecuted( userAddress, payable(msg.sender), functionSignature ); // Append userAddress and relayer address at the end to extract it from calling context (bool success, bytes memory returnData) = address(this).call( abi.encodePacked(functionSignature, userAddress) ); require(success, "Function call not successful"); return returnData; } function hashMetaTransaction(MetaTransaction memory metaTx) internal pure returns (bytes32) { return keccak256( abi.encode( META_TRANSACTION_TYPEHASH, metaTx.nonce, metaTx.from, keccak256(metaTx.functionSignature) ) ); } function getNonce(address user) public view returns (uint256 nonce) { nonce = nonces[user]; } function verify( address signer, MetaTransaction memory metaTx, bytes32 sigR, bytes32 sigS, uint8 sigV ) internal view returns (bool) { require(signer != address(0), "NativeMetaTransaction: INVALID_SIGNER"); return signer == ecrecover( toTypedMessageHash(hashMetaTransaction(metaTx)), sigV, sigR, sigS ); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //------------------------------------------------------------------------------ // geneticchain.io - NextGen Generative NFT Platform //------------------------------------------------------------------------------ //________________________________________________________________ .¿yy¿. __ //MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM```````/MMM\\\\\ \\$$$$$$S/ . //MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM`` `/ yyyy ` _____J$$$*^^*/%#// //MMMMMMMMMMMMMMMMMMMYYYMMM```` `\/ .¿yü / $ùpüüü%%% | ``|//|` __ //MMMMMYYYYMMMMMMM/` `| ___.¿yüy¿. .d$$$$ / $$$$SSSSM | | || MMNNNNNNM //M/`` ``\/` .¿ù%%/. |.d$$$$$$$b.$$$*°^ / o$$$ __ | | || MMMMMMMMM //M .¿yy¿. .dX$$$$$$7.|$$$$"^"$$$$$$o` /MM o$$$ MM | | || MMYYYYYYM // \\$$$$$$S/ .S$$o"^"4$$$$$$$` _ `SSSSS\ ____ MM |___|_|| MM ____ // J$$$*^^*/%#//oSSS` YSSSSSS / pyyyüüü%%%XXXÙ$$$$ MM pyyyyyyy, `` ,$$$o //.$$$` ___ pyyyyyyyyyyyy//+ / $$$$$$SSSSSSSÙM$$$. `` .S&&T$T$$$byyd$$$$\ //\$$7 `` //o$$SSXMMSSSS | / $$/&&X _ ___ %$$$byyd$$$X\$`/S$$$$$$$S\ //o$$l .\\YS$$X>$X _ ___| | / $$/%$$b.,.d$$$\`7$$$$$$$$7`.$ `"***"` __ //o$$l __ 7$$$X>$$b.,.d$$$\ | / $$.`7$$$$$$$$%` `*+SX+*|_\\$ /. ..\MM //o$$L MM !$$$$\$$$$$$$$$%|__| / $$// `*+XX*\'` `____ ` `/MMMMMMM ///$$X, `` ,S$$$$\ `*+XX*\'`____ / %SXX . ., NERV ___.¿yüy¿. /MMMMM // 7$$$byyd$$$>$X\ .,,_ $$$$ ` ___ .y%%ü¿. _______ $.d$$$$$$$S. `MMMM // `/S$$$$$$$\\$J`.\\$$$ : $\`.¿yüy¿. `\\ $$$$$$S.//XXSSo $$$$$"^"$$$$. /MMM //y `"**"`"Xo$7J$$$$$\ $.d$$$$$$$b. ^``/$$$$.`$$$$o $$$$\ _ 'SSSo /MMM //M/.__ .,\Y$$$\\$$O` _/ $d$$$*°\ pyyyüüü%%%W $$$o.$$$$/ S$$$. ` S$To MMM //MMMM` \$P*$$X+ b$$l MM $$$$` _ $$$$$$SSSSM $$$X.$T&&X o$$$. ` S$To MMM //MMMX` $<.\X\` -X$$l MM $$$$ / $$/&&X X$$$/$/X$$dyS$$>. ` S$X%/ `MM //MMMM/ `"` . -$$$l MM yyyy / $$/%$$b.__.d$$$$/$.'7$$$$$$$. ` %SXXX. MM //MMMMM// ./M .<$$S, `` ,S$$> / $$.`7$$$$$$$$$$$/S//_'*+%%XX\ `._ /MM //MMMMMMMMMMMMM\ /$$$$byyd$$$$\ / $$// `*+XX+*XXXX ,. .\MMMMMMMMMMM //GENETIC/MMMMM\. /$$$$$$$$$$\| / %SXX ,_ . .\MMMMMMMMMMMMMMMMMMMMMMMM //CHAIN/MMMMMMMM/__ `*+YY+*`_\| /_______//MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM //------------------------------------------------------------------------------ // Genetic Chain: ERC721SeqEnumerableB //------------------------------------------------------------------------------ // Author: papaver (@tronicdreams) //------------------------------------------------------------------------------ import "openzeppelin-solidity/contracts/token/ERC721/extensions/IERC721Enumerable.sol"; import "./ERC721SequentialB.sol"; /** * @dev This is a no storage implementation of the optional extension {ERC721} * defined in the EIP that adds enumerability of all the token ids in the * contract as well as their owners. These functions are all O(n) and mainly * for convenience and should not be called from a contract on the chain. */ abstract contract ERC721SeqEnumerableB is ERC721SequentialB, IERC721Enumerable { address constant zero = address(0); /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface( bytes4 interfaceId ) public view virtual override(IERC165, ERC721SequentialB) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex( address owner, uint256 index ) public view virtual override returns (uint256 tokenId) { uint256 length = _owners.length; unchecked { for (; tokenId < length; ++tokenId) { if (_owners[tokenId] == owner) { if (index-- == 0) { break; } } } } require(tokenId < length, "ERC721Enumerable: owner index out of bounds"); } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256 supply) { unchecked { uint256 length = _owners.length; for (uint256 tokenId = 0; tokenId < length; ++tokenId) { if (_owners[tokenId] != zero) { ++supply; } } } } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex( uint256 index ) public view virtual override returns (uint256 tokenId) { uint256 length = _owners.length; unchecked { for (; tokenId < length; ++tokenId) { if (_owners[tokenId] != zero) { if (index-- == 0) { break; } } } } require(tokenId < length, "ERC721Enumerable: global index out of bounds"); } /** * @dev Get all tokens owned by owner. */ function ownerTokens( address owner ) public view returns (uint256[] memory) { uint256 tokenCount = ERC721SequentialB.balanceOf(owner); require(tokenCount != 0, "ERC721Enumerable: owner owns no tokens"); uint256 length = _owners.length; uint256[] memory tokenIds = new uint256[](tokenCount); unchecked { uint256 i = 0; for (uint256 tokenId = 0; tokenId < length; ++tokenId) { if (_owners[tokenId] == owner) { tokenIds[i++] = tokenId; } } } return tokenIds; } }
// SPDX-License-Identifier: MIT // Forked from: OpenZeppelin Contracts v4.4.0 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; //------------------------------------------------------------------------------ // geneticchain.io - NextGen Generative NFT Platform //------------------------------------------------------------------------------ //________________________________________________________________ .¿yy¿. __ //MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM```````/MMM\\\\\ \\$$$$$$S/ . //MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM`` `/ yyyy ` _____J$$$*^^*/%#// //MMMMMMMMMMMMMMMMMMMYYYMMM```` `\/ .¿yü / $ùpüüü%%% | ``|//|` __ //MMMMMYYYYMMMMMMM/` `| ___.¿yüy¿. .d$$$$ / $$$$SSSSM | | || MMNNNNNNM //M/`` ``\/` .¿ù%%/. |.d$$$$$$$b.$$$*°^ / o$$$ __ | | || MMMMMMMMM //M .¿yy¿. .dX$$$$$$7.|$$$$"^"$$$$$$o` /MM o$$$ MM | | || MMYYYYYYM // \\$$$$$$S/ .S$$o"^"4$$$$$$$` _ `SSSSS\ ____ MM |___|_|| MM ____ // J$$$*^^*/%#//oSSS` YSSSSSS / pyyyüüü%%%XXXÙ$$$$ MM pyyyyyyy, `` ,$$$o //.$$$` ___ pyyyyyyyyyyyy//+ / $$$$$$SSSSSSSÙM$$$. `` .S&&T$T$$$byyd$$$$\ //\$$7 `` //o$$SSXMMSSSS | / $$/&&X _ ___ %$$$byyd$$$X\$`/S$$$$$$$S\ //o$$l .\\YS$$X>$X _ ___| | / $$/%$$b.,.d$$$\`7$$$$$$$$7`.$ `"***"` __ //o$$l __ 7$$$X>$$b.,.d$$$\ | / $$.`7$$$$$$$$%` `*+SX+*|_\\$ /. ..\MM //o$$L MM !$$$$\$$$$$$$$$%|__| / $$// `*+XX*\'` `____ ` `/MMMMMMM ///$$X, `` ,S$$$$\ `*+XX*\'`____ / %SXX . ., NERV ___.¿yüy¿. /MMMMM // 7$$$byyd$$$>$X\ .,,_ $$$$ ` ___ .y%%ü¿. _______ $.d$$$$$$$S. `MMMM // `/S$$$$$$$\\$J`.\\$$$ : $\`.¿yüy¿. `\\ $$$$$$S.//XXSSo $$$$$"^"$$$$. /MMM //y `"**"`"Xo$7J$$$$$\ $.d$$$$$$$b. ^``/$$$$.`$$$$o $$$$\ _ 'SSSo /MMM //M/.__ .,\Y$$$\\$$O` _/ $d$$$*°\ pyyyüüü%%%W $$$o.$$$$/ S$$$. ` S$To MMM //MMMM` \$P*$$X+ b$$l MM $$$$` _ $$$$$$SSSSM $$$X.$T&&X o$$$. ` S$To MMM //MMMX` $<.\X\` -X$$l MM $$$$ / $$/&&X X$$$/$/X$$dyS$$>. ` S$X%/ `MM //MMMM/ `"` . -$$$l MM yyyy / $$/%$$b.__.d$$$$/$.'7$$$$$$$. ` %SXXX. MM //MMMMM// ./M .<$$S, `` ,S$$> / $$.`7$$$$$$$$$$$/S//_'*+%%XX\ `._ /MM //MMMMMMMMMMMMM\ /$$$$byyd$$$$\ / $$// `*+XX+*XXXX ,. .\MMMMMMMMMMM //GENETIC/MMMMM\. /$$$$$$$$$$\| / %SXX ,_ . .\MMMMMMMMMMMMMMMMMMMMMMMM //CHAIN/MMMMMMMM/__ `*+YY+*`_\| /_______//MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM //------------------------------------------------------------------------------ // Genetic Chain: ERC721SequentialB //------------------------------------------------------------------------------ // Author: papaver (@tronicdreams) //------------------------------------------------------------------------------ import "openzeppelin-solidity/contracts/token/ERC721/IERC721.sol"; import "openzeppelin-solidity/contracts/token/ERC721/IERC721Receiver.sol"; import "openzeppelin-solidity/contracts/token/ERC721/extensions/IERC721Metadata.sol"; import "openzeppelin-solidity/contracts/utils/Address.sol"; import "openzeppelin-solidity/contracts/utils/Context.sol"; import "openzeppelin-solidity/contracts/utils/Strings.sol"; import "openzeppelin-solidity/contracts/utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721 * [ERC721] Non-Fungible Token Standard * * This implmentation of ERC721 assumes sequential token creation to provide * efficient minting. Balances are still stored on chain to allow contract * calls to be efficient. Good for collections like passes which may need * to check if addresses are valid holders of a token. A convenience * function is provided which returns the list of owners and their token ids. * The zero address indicates burned tokens. */ contract ERC721SequentialB is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address 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 Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: owner query for nonexistent token"); address owner = _owners[tokenId]; return owner; } /** * @dev Returns entire list of owner enumerated by thier tokenIds. Burned tokens * will have a zero address. */ function owners() public view returns (address[] memory) { address[] memory owners_ = _owners; return owners_; } /** * @dev Return largest tokenId minted. */ function maxTokenId() public view returns (uint256) { return _owners.length - 1; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721SequentialB.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 tokenId < _owners.length && _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 = ERC721SequentialB.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to) internal virtual returns (uint256 tokenId) { tokenId = _safeMint(to, ""); } /** * @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, bytes memory _data ) internal virtual returns (uint256 tokenId) { tokenId = _mint(to); 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) internal virtual returns (uint256 tokenId) { require(to != address(0), "ERC721: mint to the zero address"); tokenId = _owners.length; _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners.push(to); emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721SequentialB.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721SequentialB.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721SequentialB.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 {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; //------------------------------------------------------------------------------ // geneticchain.io - NextGen Generative NFT Platform //------------------------------------------------------------------------------ //________________________________________________________________ .¿yy¿. __ //MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM```````/MMM\\\\\ \\$$$$$$S/ . //MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM`` `/ yyyy ` _____J$$$*^^*/%#// //MMMMMMMMMMMMMMMMMMMYYYMMM```` `\/ .¿yü / $ùpüüü%%% | ``|//|` __ //MMMMMYYYYMMMMMMM/` `| ___.¿yüy¿. .d$$$$ / $$$$SSSSM | | || MMNNNNNNM //M/`` ``\/` .¿ù%%/. |.d$$$$$$$b.$$$*°^ / o$$$ __ | | || MMMMMMMMM //M .¿yy¿. .dX$$$$$$7.|$$$$"^"$$$$$$o` /MM o$$$ MM | | || MMYYYYYYM // \\$$$$$$S/ .S$$o"^"4$$$$$$$` _ `SSSSS\ ____ MM |___|_|| MM ____ // J$$$*^^*/%#//oSSS` YSSSSSS / pyyyüüü%%%XXXÙ$$$$ MM pyyyyyyy, `` ,$$$o //.$$$` ___ pyyyyyyyyyyyy//+ / $$$$$$SSSSSSSÙM$$$. `` .S&&T$T$$$byyd$$$$\ //\$$7 `` //o$$SSXMMSSSS | / $$/&&X _ ___ %$$$byyd$$$X\$`/S$$$$$$$S\ //o$$l .\\YS$$X>$X _ ___| | / $$/%$$b.,.d$$$\`7$$$$$$$$7`.$ `"***"` __ //o$$l __ 7$$$X>$$b.,.d$$$\ | / $$.`7$$$$$$$$%` `*+SX+*|_\\$ /. ..\MM //o$$L MM !$$$$\$$$$$$$$$%|__| / $$// `*+XX*\'` `____ ` `/MMMMMMM ///$$X, `` ,S$$$$\ `*+XX*\'`____ / %SXX . ., NERV ___.¿yüy¿. /MMMMM // 7$$$byyd$$$>$X\ .,,_ $$$$ ` ___ .y%%ü¿. _______ $.d$$$$$$$S. `MMMM // `/S$$$$$$$\\$J`.\\$$$ : $\`.¿yüy¿. `\\ $$$$$$S.//XXSSo $$$$$"^"$$$$. /MMM //y `"**"`"Xo$7J$$$$$\ $.d$$$$$$$b. ^``/$$$$.`$$$$o $$$$\ _ 'SSSo /MMM //M/.__ .,\Y$$$\\$$O` _/ $d$$$*°\ pyyyüüü%%%W $$$o.$$$$/ S$$$. ` S$To MMM //MMMM` \$P*$$X+ b$$l MM $$$$` _ $$$$$$SSSSM $$$X.$T&&X o$$$. ` S$To MMM //MMMX` $<.\X\` -X$$l MM $$$$ / $$/&&X X$$$/$/X$$dyS$$>. ` S$X%/ `MM //MMMM/ `"` . -$$$l MM yyyy / $$/%$$b.__.d$$$$/$.'7$$$$$$$. ` %SXXX. MM //MMMMM// ./M .<$$S, `` ,S$$> / $$.`7$$$$$$$$$$$/S//_'*+%%XX\ `._ /MM //MMMMMMMMMMMMM\ /$$$$byyd$$$$\ / $$// `*+XX+*XXXX ,. .\MMMMMMMMMMM //GENETIC/MMMMM\. /$$$$$$$$$$\| / %SXX ,_ . .\MMMMMMMMMMMMMMMMMMMMMMMM //CHAIN/MMMMMMMM/__ `*+YY+*`_\| /_______//MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM //------------------------------------------------------------------------------ // Genetic Chain: library/State //------------------------------------------------------------------------------ // Author: papaver (@tronicdreams) //------------------------------------------------------------------------------ /** * @dev Handle contract state efficiently as possbile. */ library State { //------------------------------------------------------------------------- // structs //------------------------------------------------------------------------- struct Data { uint16 _locked; uint240 _unused; } //------------------------------------------------------------------------- // interface //------------------------------------------------------------------------- function setLocked(Data storage data, uint256 locked) internal { data._locked = uint16(locked); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 10 }, "evmVersion": "london", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"spiral","type":"address"},{"internalType":"string[2]","name":"tokenIpfsHashes","type":"string[2]"},{"internalType":"string","name":"baseUri","type":"string"},{"internalType":"uint256","name":"seed","type":"uint256"},{"internalType":"address","name":"proxyRegistryAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address payable","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","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":"owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"spiralId","type":"uint256"}],"name":"RainbowSplit","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":"ERC712_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"artist","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getDomainSeperator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isLocked","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maxTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint16[]","name":"spiralIds_","type":"uint16[]"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"ownerTokens","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owners","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"projectId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"spiralIds","outputs":[{"internalType":"uint16[]","name":"","type":"uint16[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenIpfsHash","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"supply","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":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60e06040526006805460ff191690553480156200001b57600080fd5b5060405162003695380380620036958339810160408190526200003e91620005b5565b84848484848482826040518060400160405280600d81526020016c5261696e626f7737205061737360981b8152506040518060400160405280600481526020016308e86a0760e31b8152508160009080519060200190620000a192919062000333565b508051620000b790600190602084019062000333565b5050506000620000cc620001b260201b60201c565b600980546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3506001600160a01b0380841660c0526080839052811660a05260408051808201909152600d81526c5261696e626f7737205061737360981b60208201526200016190620001ce565b50506002805460019081018255600a805490910181556000526200018b9150600d908690620003c2565b508251620001a190600f90602086019062000333565b5050505050505050505050620006f0565b6000620001c96200023260201b620018d31760201c565b905090565b60065460ff1615620002175760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481a5b9a5d195960921b604482015260640160405180910390fd5b620002228162000291565b506006805460ff19166001179055565b6000333014156200028b57600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b031691506200028e9050565b50335b90565b6040518060800160405280604f815260200162003646604f9139805160209182012082519282019290922060408051808201825260018152603160f81b90840152805180840194909452838101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc660608401523060808401524660a0808501919091528151808503909101815260c090930190528151910120600755565b8280546200034190620006b3565b90600052602060002090601f016020900481019282620003655760008555620003b0565b82601f106200038057805160ff1916838001178555620003b0565b82800160010185558215620003b0579182015b82811115620003b057825182559160200191906001019062000393565b50620003be92915062000415565b5090565b826002810192821562000407579160200282015b82811115620004075782518051620003f691849160209091019062000333565b5091602001919060010190620003d6565b50620003be9291506200042c565b5b80821115620003be576000815560010162000416565b80821115620003be5760006200044382826200044d565b506001016200042c565b5080546200045b90620006b3565b6000825580601f106200046c575050565b601f0160209004906000526020600020908101906200048c919062000415565b50565b80516001600160a01b0381168114620004a757600080fd5b919050565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715620004e757620004e7620004ac565b60405290565b604051601f8201601f191681016001600160401b0381118282101715620005185762000518620004ac565b604052919050565b600082601f8301126200053257600080fd5b81516001600160401b038111156200054e576200054e620004ac565b602062000564601f8301601f19168201620004ed565b82815285828487010111156200057957600080fd5b60005b83811015620005995785810183015182820184015282016200057c565b83811115620005ab5760008385840101525b5095945050505050565b600080600080600060a08688031215620005ce57600080fd5b620005d9866200048f565b602087810151919650906001600160401b0380821115620005f957600080fd5b818901915089601f8301126200060e57600080fd5b62000618620004c2565b80604084018c8111156200062b57600080fd5b845b818110156200066457805185811115620006475760008081fd5b620006558f82890162000520565b8552509286019286016200062d565b505060408b0151909850935050808311156200067f57600080fd5b50506200068f8882890162000520565b93505060608601519150620006a7608087016200048f565b90509295509295909350565b600181811c90821680620006c857607f821691505b60208210811415620006ea57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c051612f1f62000727600039600081816110b50152611e86015260006115c4015260006112f80152612f1f6000f3fe6080604052600436106101cb5760003560e01c806301ffc9a7146101d057806306fdde0314610205578063081812fc14610227578063095ea7b3146102545780630c53c51c146102765780630f7e59701461028957806318160ddd146102b657806320379ee5146102d9578063208af140146102ee57806323b872dd146103105780632d0335ab146103305780632f745c59146103665780633408e470146103865780633fafa1271461039957806342842e0e146103ae57806343bc1612146103ce5780634f6ccce71461040b5780635a19e3151461042b5780636352211e1461044b57806370a082311461046b578063715018a61461048b5780637284e416146104a0578063753868e3146104b557806382afd23b146104ca5780638da5cb5b146104ea57806391ba317a146104ff57806395d89b41146105145780639c5e92fb14610529578063a22cb46514610549578063a386439714610569578063a4e2d63414610589578063affe39c1146105a6578063b88d4fde146105c8578063bba7723e146105e8578063c87b56dd14610615578063d547cfb714610635578063e8a3d4851461064a578063e985e9c51461065f578063f2fde38b1461067f578063f3fef3a31461069f575b600080fd5b3480156101dc57600080fd5b506101f06101eb366004612486565b6106bf565b60405190151581526020015b60405180910390f35b34801561021157600080fd5b5061021a6106ea565b6040516101fc91906124fb565b34801561023357600080fd5b5061024761024236600461250e565b61077c565b6040516101fc9190612527565b34801561026057600080fd5b5061027461026f366004612550565b610809565b005b61021a61028436600461261e565b61092c565b34801561029557600080fd5b5061021a604051806040016040528060018152602001603160f81b81525081565b3480156102c257600080fd5b506102cb610b15565b6040519081526020016101fc565b3480156102e557600080fd5b506007546102cb565b3480156102fa57600080fd5b50610303610b71565b6040516101fc919061269b565b34801561031c57600080fd5b5061027461032b3660046126e3565b610bf5565b34801561033c57600080fd5b506102cb61034b366004612724565b6001600160a01b031660009081526008602052604090205490565b34801561037257600080fd5b506102cb610381366004612550565b610c2d565b34801561039257600080fd5b50466102cb565b3480156103a557600080fd5b506102cb600881565b3480156103ba57600080fd5b506102746103c93660046126e3565b610cf8565b3480156103da57600080fd5b5061021a60405180604001604052806011815260200170105b195a985b991c9bc8135a5c9858985b607a1b81525081565b34801561041757600080fd5b506102cb61042636600461250e565b610d13565b34801561043757600080fd5b5061021a61044636600461250e565b610dde565b34801561045757600080fd5b5061024761046636600461250e565b610e87565b34801561047757600080fd5b506102cb610486366004612724565b610f21565b34801561049757600080fd5b50610274610fa8565b3480156104ac57600080fd5b5061021a61101f565b3480156104c157600080fd5b5061027461103c565b3480156104d657600080fd5b506101f06104e536600461250e565b61108b565b3480156104f657600080fd5b506102476111a6565b34801561050b57600080fd5b506102cb6111b5565b34801561052057600080fd5b5061021a6111cc565b34801561053557600080fd5b50610274610544366004612741565b6111db565b34801561055557600080fd5b506102746105643660046127b5565b6112b4565b34801561057557600080fd5b506102cb61058436600461250e565b6112ca565b34801561059557600080fd5b506101f0600c5461ffff1660011490565b3480156105b257600080fd5b506105bb611357565b6040516101fc91906127f3565b3480156105d457600080fd5b506102746105e3366004612834565b6113bc565b3480156105f457600080fd5b50610608610603366004612724565b6113f5565b6040516101fc919061289f565b34801561062157600080fd5b5061021a61063036600461250e565b611526565b34801561064157600080fd5b5061021a611560565b34801561065657600080fd5b5061021a611593565b34801561066b57600080fd5b506101f061067a3660046128d7565b6115b2565b34801561068b57600080fd5b5061027461069a366004612724565b6116a3565b3480156106ab57600080fd5b506102746106ba366004612550565b611791565b60006001600160e01b0319821663780e9d6360e01b14806106e457506106e482611930565b92915050565b6060600080546106f990612905565b80601f016020809104026020016040519081016040528092919081815260200182805461072590612905565b80156107725780601f1061074757610100808354040283529160200191610772565b820191906000526020600020905b81548152906001019060200180831161075557829003601f168201915b5050505050905090565b600061078782611980565b6107ed5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061081482610e87565b9050806001600160a01b0316836001600160a01b031614156108825760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016107e4565b806001600160a01b03166108946119ca565b6001600160a01b031614806108b057506108b08161067a6119ca565b61091d5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b60648201526084016107e4565b61092783836119d4565b505050565b60408051606081810183526001600160a01b0388166000818152600860209081529085902054845283015291810186905261096a8782878787611a42565b6109c05760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636044820152600d60fb1b60648201526084016107e4565b6001600160a01b0387166000908152600860205260409020546109e4906001611b32565b6001600160a01b0388166000908152600860205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b90610a3490899033908a9061293a565b60405180910390a1600080306001600160a01b0316888a604051602001610a5c92919061296f565b60408051601f1981840301815290829052610a76916129a1565b6000604051808303816000865af19150503d8060008114610ab3576040519150601f19603f3d011682016040523d82523d6000602084013e610ab8565b606091505b509150915081610b095760405162461bcd60e51b815260206004820152601c60248201527b119d5b98dd1a5bdb8818d85b1b081b9bdd081cdd58d8d95cdcd99d5b60221b60448201526064016107e4565b98975050505050505050565b600254600090815b81811015610b6c5760006001600160a01b031660028281548110610b4357610b436129bd565b6000918252602090912001546001600160a01b031614610b64578260010192505b600101610b1d565b505090565b60606000600a805480602002602001604051908101604052809291908181526020018280548015610be957602002820191906000526020600020906000905b82829054906101000a900461ffff1661ffff1681526020019060020190602082600101049283019260010382029150808411610bb05790505b50939695505050505050565b610c06610c006119ca565b82611b45565b610c225760405162461bcd60e51b81526004016107e4906129d3565b610927838383611c07565b6002546000905b80821015610c8e57836001600160a01b031660028381548110610c5957610c596129bd565b6000918252602090912001546001600160a01b03161415610c8357600019830192610c8357610c8e565b816001019150610c34565b808210610cf15760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016107e4565b5092915050565b610927838383604051806020016040528060008152506113bc565b6002546000905b80821015610d745760006001600160a01b031660028381548110610d4057610d406129bd565b6000918252602090912001546001600160a01b031614610d6957600019830192610d6957610d74565b816001019150610d1a565b808210610dd85760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016107e4565b50919050565b6060610de98261108b565b610df457600e610df7565b600d5b8054610e0290612905565b80601f0160208091040260200160405190810160405280929190818152602001828054610e2e90612905565b8015610e7b5780601f10610e5057610100808354040283529160200191610e7b565b820191906000526020600020905b815481529060010190602001808311610e5e57829003601f168201915b50505050509050919050565b6000610e9282611980565b610ef05760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016107e4565b600060028381548110610f0557610f056129bd565b6000918252602090912001546001600160a01b03169392505050565b60006001600160a01b038216610f8c5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016107e4565b506001600160a01b031660009081526003602052604090205490565b610fb06119ca565b6001600160a01b0316610fc16111a6565b6001600160a01b031614610fe75760405162461bcd60e51b81526004016107e490612a24565b6009546040516000916001600160a01b031690600080516020612eaa833981519152908390a3600980546001600160a01b0319169055565b60405180610100016040528060ce8152602001612d9960ce913981565b6110446119ca565b6001600160a01b03166110556111a6565b6001600160a01b03161461107b5760405162461bcd60e51b81526004016107e490612a24565b600c805461ffff19166001179055565b60008161109781611980565b6110b35760405162461bcd60e51b81526004016107e490612a59565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636352211e600a85815481106110f5576110f56129bd565b6000918252602090912060108204015460405160e084901b6001600160e01b0319168152600f9092166002026101000a900461ffff16600482015260240160206040518083038186803b15801561114b57600080fd5b505afa15801561115f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111839190612a80565b6001600160a01b031661119584610e87565b6001600160a01b0316149392505050565b6009546001600160a01b031690565b6002546000906111c790600190612ab3565b905090565b6060600180546106f990612905565b6111e36119ca565b6001600160a01b03166111f46111a6565b6001600160a01b03161461121a5760405162461bcd60e51b81526004016107e490612a24565b600c5461ffff16156112635760405162461bcd60e51b815260206004820152601260248201527118dbdb9d1c9858dd081a5cc81b1bd8dad95960721b60448201526064016107e4565b8060005b818110156112ae5761129e848483818110611284576112846129bd565b90506020020160208101906112999190612aca565b611da9565b6112a781612aee565b9050611267565b50505050565b6112c66112bf6119ca565b8383611f6b565b5050565b6000816112d681611980565b6112f25760405162461bcd60e51b81526004016107e490612a59565b604080517f0000000000000000000000000000000000000000000000000000000000000000602082015290810184905230606090811b6001600160601b0319169082015260740160405160208183030381529060405280519060200120915050919050565b606060006002805480602002602001604051908101604052809291908181526020018280548015610be957602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116113935750939695505050505050565b6113cd6113c76119ca565b83611b45565b6113e95760405162461bcd60e51b81526004016107e4906129d3565b6112ae84848484612036565b6060600061140283610f21565b9050806114605760405162461bcd60e51b815260206004820152602660248201527f455243373231456e756d657261626c653a206f776e6572206f776e73206e6f20604482015265746f6b656e7360d01b60648201526084016107e4565b6002546000826001600160401b0381111561147d5761147d61257c565b6040519080825280602002602001820160405280156114a6578160200160208202803683370190505b5090506000805b8381101561151b57866001600160a01b0316600282815481106114d2576114d26129bd565b6000918252602090912001546001600160a01b031614156115135780838380600101945081518110611506576115066129bd565b6020026020010181815250505b6001016114ad565b509095945050505050565b6060611530611560565b61153983612069565b60405160200161154a929190612b09565b6040516020818303038152906040529050919050565b6060600f61156e6008612069565b60405160200161157f929190612bf1565b604051602081830303815290604052905090565b6060600f6115a16008612069565b60405160200161157f929190612c42565b60405163c455279160e01b81526000907f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b03808516919083169063c455279190611608908890600401612527565b60206040518083038186803b15801561162057600080fd5b505afa158015611634573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116589190612a80565b6001600160a01b031614156116715760019150506106e4565b6001600160a01b0380851660009081526005602090815260408083209387168352929052205460ff165b949350505050565b6116ab6119ca565b6001600160a01b03166116bc6111a6565b6001600160a01b0316146116e25760405162461bcd60e51b81526004016107e490612a24565b6001600160a01b0381166117475760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107e4565b6009546040516001600160a01b03808416921690600080516020612eaa83398151915290600090a3600980546001600160a01b0319166001600160a01b0392909216919091179055565b6117996119ca565b6001600160a01b03166117aa6111a6565b6001600160a01b0316146117d05760405162461bcd60e51b81526004016107e490612a24565b6000811161180f5760405162461bcd60e51b815260206004820152600c60248201526b616d6f756e7420656d70747960a01b60448201526064016107e4565b478111156118585760405162461bcd60e51b8152602060048201526016602482015275616d6f756e7420657863656564732062616c616e636560501b60448201526064016107e4565b6001600160a01b03821661189d5760405162461bcd60e51b815260206004820152600c60248201526b1859191c995cdcc81b9d5b1b60a21b60448201526064016107e4565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610927573d6000803e3d6000fd5b60003330141561192a57600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b0316915061192d9050565b50335b90565b60006001600160e01b031982166380ac58cd60e01b148061196157506001600160e01b03198216635b5e139f60e01b145b806106e457506301ffc9a760e01b6001600160e01b03198316146106e4565b600254600090821080156106e4575060006001600160a01b0316600283815481106119ad576119ad6129bd565b6000918252602090912001546001600160a01b0316141592915050565b60006111c76118d3565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611a0982610e87565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b038616611aa85760405162461bcd60e51b815260206004820152602560248201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360448201526424a3a722a960d91b60648201526084016107e4565b6001611abb611ab687612166565b6121e3565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa158015611b09573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b6000611b3e8284612c96565b9392505050565b6000611b5082611980565b611bb15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016107e4565b6000611bbc83610e87565b9050806001600160a01b0316846001600160a01b03161480611bf75750836001600160a01b0316611bec8461077c565b6001600160a01b0316145b8061169b575061169b81856115b2565b826001600160a01b0316611c1a82610e87565b6001600160a01b031614611c825760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016107e4565b6001600160a01b038216611ce45760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016107e4565b611cef6000826119d4565b6001600160a01b0383166000908152600360205260408120805460019290611d18908490612ab3565b90915550506001600160a01b0382166000908152600360205260408120805460019290611d46908490612c96565b925050819055508160028281548110611d6157611d616129bd565b6000918252602082200180546001600160a01b0319166001600160a01b0393841617905560405183928581169290871691600080516020612eca8339815191529190a4505050565b61ffff81166000908152600b6020526040902054819060ff1615611e005760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481b5a5b9d195960921b60448201526064016107e4565b600a80546001818101909255601081047fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a801805461ffff8087166002600f909516949094026101000a8481029102199091161790556000818152600b6020526040808220805460ff191690941790935591516331a9108f60e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001691636352211e91611ebe919060040190815260200190565b60206040518083038186803b158015611ed657600080fd5b505afa158015611eea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f0e9190612a80565b90506000611f1b82612213565b6040805182815261ffff871660208201529192506001600160a01b038416917fbce304da62362ce5ce88b95bb6f2d8389e1fd2d6727ba068c2eaf08e5a8ecd0e910160405180910390a250505050565b816001600160a01b0316836001600160a01b03161415611fc95760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b60448201526064016107e4565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612041848484611c07565b61204d8484848461222e565b6112ae5760405162461bcd60e51b81526004016107e490612cae565b60608161208d5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156120b757806120a181612aee565b91506120b09050600a83612d16565b9150612091565b6000816001600160401b038111156120d1576120d161257c565b6040519080825280601f01601f1916602001820160405280156120fb576020820181803683370190505b5090505b841561169b57612110600183612ab3565b915061211d600a86612d2a565b612128906030612c96565b60f81b81838151811061213d5761213d6129bd565b60200101906001600160f81b031916908160001a90535061215f600a86612d16565b94506120ff565b6000604051806080016040528060438152602001612e6760439139805160209182012083518483015160408087015180519086012090516121c6950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b60006121ee60075490565b60405161190160f01b60208201526022810191909152604281018390526062016121c6565b60006106e48260405180602001604052806000815250612342565b60006001600160a01b0384163b1561233757836001600160a01b031663150b7a026122576119ca565b8786866040518563ffffffff1660e01b81526004016122799493929190612d3e565b602060405180830381600087803b15801561229357600080fd5b505af19250505080156122c3575060408051601f3d908101601f191682019092526122c091810190612d7b565b60015b61231d573d8080156122f1576040519150601f19603f3d011682016040523d82523d6000602084013e6122f6565b606091505b5080516123155760405162461bcd60e51b81526004016107e490612cae565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061169b565b506001949350505050565b600061234d83612378565b905061235c600084838561222e565b6106e45760405162461bcd60e51b81526004016107e490612cae565b60006001600160a01b0382166123d05760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016107e4565b506002546001600160a01b03821660009081526003602052604081208054600192906123fd908490612c96565b90915550506002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b038516908117909155604051839290600080516020612eca833981519152908290a4919050565b6001600160e01b03198116811461248357600080fd5b50565b60006020828403121561249857600080fd5b8135611b3e8161246d565b60005b838110156124be5781810151838201526020016124a6565b838111156112ae5750506000910152565b600081518084526124e78160208601602086016124a3565b601f01601f19169290920160200192915050565b602081526000611b3e60208301846124cf565b60006020828403121561252057600080fd5b5035919050565b6001600160a01b0391909116815260200190565b6001600160a01b038116811461248357600080fd5b6000806040838503121561256357600080fd5b823561256e8161253b565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126125a357600080fd5b81356001600160401b03808211156125bd576125bd61257c565b604051601f8301601f19908116603f011681019082821181831017156125e5576125e561257c565b816040528381528660208588010111156125fe57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561263657600080fd5b85356126418161253b565b945060208601356001600160401b0381111561265c57600080fd5b61266888828901612592565b9450506040860135925060608601359150608086013560ff8116811461268d57600080fd5b809150509295509295909350565b6020808252825182820181905260009190848201906040850190845b818110156126d757835161ffff16835292840192918401916001016126b7565b50909695505050505050565b6000806000606084860312156126f857600080fd5b83356127038161253b565b925060208401356127138161253b565b929592945050506040919091013590565b60006020828403121561273657600080fd5b8135611b3e8161253b565b6000806020838503121561275457600080fd5b82356001600160401b038082111561276b57600080fd5b818501915085601f83011261277f57600080fd5b81358181111561278e57600080fd5b8660208260051b85010111156127a357600080fd5b60209290920196919550909350505050565b600080604083850312156127c857600080fd5b82356127d38161253b565b9150602083013580151581146127e857600080fd5b809150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156126d75783516001600160a01b03168352928401929184019160010161280f565b6000806000806080858703121561284a57600080fd5b84356128558161253b565b935060208501356128658161253b565b92506040850135915060608501356001600160401b0381111561288757600080fd5b61289387828801612592565b91505092959194509250565b6020808252825182820181905260009190848201906040850190845b818110156126d7578351835292840192918401916001016128bb565b600080604083850312156128ea57600080fd5b82356128f58161253b565b915060208301356127e88161253b565b600181811c9082168061291957607f821691505b60208210811415610dd857634e487b7160e01b600052602260045260246000fd5b6001600160a01b03848116825283166020820152606060408201819052600090612966908301846124cf565b95945050505050565b600083516129818184602088016124a3565b60609390931b6001600160601b0319169190920190815260140192915050565b600082516129b38184602087016124a3565b9190910192915050565b634e487b7160e01b600052603260045260246000fd5b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600d908201526c34b73b30b634b2103a37b5b2b760991b604082015260600190565b600060208284031215612a9257600080fd5b8151611b3e8161253b565b634e487b7160e01b600052601160045260246000fd5b600082821015612ac557612ac5612a9d565b500390565b600060208284031215612adc57600080fd5b813561ffff81168114611b3e57600080fd5b6000600019821415612b0257612b02612a9d565b5060010190565b60008351612b1b8184602088016124a3565b602f60f81b9083019081528351612b398160018401602088016124a3565b642f6d65746160d81b60019290910191820152600601949350505050565b8054600090600181811c9080831680612b7157607f831692505b6020808410821415612b9357634e487b7160e01b600052602260045260246000fd5b818015612ba75760018114612bb857612be5565b60ff19861689528489019650612be5565b60008881526020902060005b86811015612bdd5781548b820152908501908301612bc4565b505084890196505b50505050505092915050565b6000612bfd8285612b57565b6c2f6170692f70726f6a6563742f60981b81528351612c2381600d8401602088016124a3565b6517ba37b5b2b760d11b600d9290910191820152601301949350505050565b6000612c4e8285612b57565b6c2f6170692f70726f6a6563742f60981b81528351612c7481600d8401602088016124a3565b680bd8dbdb9d1c9858dd60ba1b600d9290910191820152601601949350505050565b60008219821115612ca957612ca9612a9d565b500190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082612d2557612d25612d00565b500490565b600082612d3957612d39612d00565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612d71908301846124cf565b9695505050505050565b600060208284031215612d8d57600080fd5b8151611b3e8161246d56fe546865205261696e626f773720506173732070726f766964657320686f6c646572732077697468206d656d6265727368697020746f207468652047656e6574696320436861696e20506c6174666f726d2e20205061737365732077696c6c20756e6c6f636b2061636365737320746f207072652d73616c65732c2066726565206d696e74732c206675747572652047432070726f6772616d732c2061732077656c6c2061732061636365737320746f206c697665206576656e7473206174207468652047432067616c6c6572792e4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e6174757265298be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220a2fe1186ccee054d4e0e3a24f28dfb6acc668b8c174158606988999b008c538964736f6c63430008090033454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c6164647265737320766572696679696e67436f6e74726163742c627974657333322073616c7429000000000000000000000000320e2fa93a4010ba47edcde762802374bac8d3f700000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001a01d860ce88a945b0e102d5d6e15d7dbea27d4b06c4c7b13b5db94dc973945bb67000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002e516d55713474426863426d6a32344c5865586a68536752524e4d676a78457961326f62735a69787467317a76524a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e516d537653334d6573514c675a347158676f67386561337171464a44587465706b35476d6f6a5437503675787156000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001768747470733a2f2f67656e65746963636861696e2e696f000000000000000000
Deployed Bytecode
0x6080604052600436106101cb5760003560e01c806301ffc9a7146101d057806306fdde0314610205578063081812fc14610227578063095ea7b3146102545780630c53c51c146102765780630f7e59701461028957806318160ddd146102b657806320379ee5146102d9578063208af140146102ee57806323b872dd146103105780632d0335ab146103305780632f745c59146103665780633408e470146103865780633fafa1271461039957806342842e0e146103ae57806343bc1612146103ce5780634f6ccce71461040b5780635a19e3151461042b5780636352211e1461044b57806370a082311461046b578063715018a61461048b5780637284e416146104a0578063753868e3146104b557806382afd23b146104ca5780638da5cb5b146104ea57806391ba317a146104ff57806395d89b41146105145780639c5e92fb14610529578063a22cb46514610549578063a386439714610569578063a4e2d63414610589578063affe39c1146105a6578063b88d4fde146105c8578063bba7723e146105e8578063c87b56dd14610615578063d547cfb714610635578063e8a3d4851461064a578063e985e9c51461065f578063f2fde38b1461067f578063f3fef3a31461069f575b600080fd5b3480156101dc57600080fd5b506101f06101eb366004612486565b6106bf565b60405190151581526020015b60405180910390f35b34801561021157600080fd5b5061021a6106ea565b6040516101fc91906124fb565b34801561023357600080fd5b5061024761024236600461250e565b61077c565b6040516101fc9190612527565b34801561026057600080fd5b5061027461026f366004612550565b610809565b005b61021a61028436600461261e565b61092c565b34801561029557600080fd5b5061021a604051806040016040528060018152602001603160f81b81525081565b3480156102c257600080fd5b506102cb610b15565b6040519081526020016101fc565b3480156102e557600080fd5b506007546102cb565b3480156102fa57600080fd5b50610303610b71565b6040516101fc919061269b565b34801561031c57600080fd5b5061027461032b3660046126e3565b610bf5565b34801561033c57600080fd5b506102cb61034b366004612724565b6001600160a01b031660009081526008602052604090205490565b34801561037257600080fd5b506102cb610381366004612550565b610c2d565b34801561039257600080fd5b50466102cb565b3480156103a557600080fd5b506102cb600881565b3480156103ba57600080fd5b506102746103c93660046126e3565b610cf8565b3480156103da57600080fd5b5061021a60405180604001604052806011815260200170105b195a985b991c9bc8135a5c9858985b607a1b81525081565b34801561041757600080fd5b506102cb61042636600461250e565b610d13565b34801561043757600080fd5b5061021a61044636600461250e565b610dde565b34801561045757600080fd5b5061024761046636600461250e565b610e87565b34801561047757600080fd5b506102cb610486366004612724565b610f21565b34801561049757600080fd5b50610274610fa8565b3480156104ac57600080fd5b5061021a61101f565b3480156104c157600080fd5b5061027461103c565b3480156104d657600080fd5b506101f06104e536600461250e565b61108b565b3480156104f657600080fd5b506102476111a6565b34801561050b57600080fd5b506102cb6111b5565b34801561052057600080fd5b5061021a6111cc565b34801561053557600080fd5b50610274610544366004612741565b6111db565b34801561055557600080fd5b506102746105643660046127b5565b6112b4565b34801561057557600080fd5b506102cb61058436600461250e565b6112ca565b34801561059557600080fd5b506101f0600c5461ffff1660011490565b3480156105b257600080fd5b506105bb611357565b6040516101fc91906127f3565b3480156105d457600080fd5b506102746105e3366004612834565b6113bc565b3480156105f457600080fd5b50610608610603366004612724565b6113f5565b6040516101fc919061289f565b34801561062157600080fd5b5061021a61063036600461250e565b611526565b34801561064157600080fd5b5061021a611560565b34801561065657600080fd5b5061021a611593565b34801561066b57600080fd5b506101f061067a3660046128d7565b6115b2565b34801561068b57600080fd5b5061027461069a366004612724565b6116a3565b3480156106ab57600080fd5b506102746106ba366004612550565b611791565b60006001600160e01b0319821663780e9d6360e01b14806106e457506106e482611930565b92915050565b6060600080546106f990612905565b80601f016020809104026020016040519081016040528092919081815260200182805461072590612905565b80156107725780601f1061074757610100808354040283529160200191610772565b820191906000526020600020905b81548152906001019060200180831161075557829003601f168201915b5050505050905090565b600061078782611980565b6107ed5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b600061081482610e87565b9050806001600160a01b0316836001600160a01b031614156108825760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016107e4565b806001600160a01b03166108946119ca565b6001600160a01b031614806108b057506108b08161067a6119ca565b61091d5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b60648201526084016107e4565b61092783836119d4565b505050565b60408051606081810183526001600160a01b0388166000818152600860209081529085902054845283015291810186905261096a8782878787611a42565b6109c05760405162461bcd60e51b815260206004820152602160248201527f5369676e657220616e64207369676e617475726520646f206e6f74206d6174636044820152600d60fb1b60648201526084016107e4565b6001600160a01b0387166000908152600860205260409020546109e4906001611b32565b6001600160a01b0388166000908152600860205260409081902091909155517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b90610a3490899033908a9061293a565b60405180910390a1600080306001600160a01b0316888a604051602001610a5c92919061296f565b60408051601f1981840301815290829052610a76916129a1565b6000604051808303816000865af19150503d8060008114610ab3576040519150601f19603f3d011682016040523d82523d6000602084013e610ab8565b606091505b509150915081610b095760405162461bcd60e51b815260206004820152601c60248201527b119d5b98dd1a5bdb8818d85b1b081b9bdd081cdd58d8d95cdcd99d5b60221b60448201526064016107e4565b98975050505050505050565b600254600090815b81811015610b6c5760006001600160a01b031660028281548110610b4357610b436129bd565b6000918252602090912001546001600160a01b031614610b64578260010192505b600101610b1d565b505090565b60606000600a805480602002602001604051908101604052809291908181526020018280548015610be957602002820191906000526020600020906000905b82829054906101000a900461ffff1661ffff1681526020019060020190602082600101049283019260010382029150808411610bb05790505b50939695505050505050565b610c06610c006119ca565b82611b45565b610c225760405162461bcd60e51b81526004016107e4906129d3565b610927838383611c07565b6002546000905b80821015610c8e57836001600160a01b031660028381548110610c5957610c596129bd565b6000918252602090912001546001600160a01b03161415610c8357600019830192610c8357610c8e565b816001019150610c34565b808210610cf15760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016107e4565b5092915050565b610927838383604051806020016040528060008152506113bc565b6002546000905b80821015610d745760006001600160a01b031660028381548110610d4057610d406129bd565b6000918252602090912001546001600160a01b031614610d6957600019830192610d6957610d74565b816001019150610d1a565b808210610dd85760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016107e4565b50919050565b6060610de98261108b565b610df457600e610df7565b600d5b8054610e0290612905565b80601f0160208091040260200160405190810160405280929190818152602001828054610e2e90612905565b8015610e7b5780601f10610e5057610100808354040283529160200191610e7b565b820191906000526020600020905b815481529060010190602001808311610e5e57829003601f168201915b50505050509050919050565b6000610e9282611980565b610ef05760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016107e4565b600060028381548110610f0557610f056129bd565b6000918252602090912001546001600160a01b03169392505050565b60006001600160a01b038216610f8c5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016107e4565b506001600160a01b031660009081526003602052604090205490565b610fb06119ca565b6001600160a01b0316610fc16111a6565b6001600160a01b031614610fe75760405162461bcd60e51b81526004016107e490612a24565b6009546040516000916001600160a01b031690600080516020612eaa833981519152908390a3600980546001600160a01b0319169055565b60405180610100016040528060ce8152602001612d9960ce913981565b6110446119ca565b6001600160a01b03166110556111a6565b6001600160a01b03161461107b5760405162461bcd60e51b81526004016107e490612a24565b600c805461ffff19166001179055565b60008161109781611980565b6110b35760405162461bcd60e51b81526004016107e490612a59565b7f000000000000000000000000320e2fa93a4010ba47edcde762802374bac8d3f76001600160a01b0316636352211e600a85815481106110f5576110f56129bd565b6000918252602090912060108204015460405160e084901b6001600160e01b0319168152600f9092166002026101000a900461ffff16600482015260240160206040518083038186803b15801561114b57600080fd5b505afa15801561115f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111839190612a80565b6001600160a01b031661119584610e87565b6001600160a01b0316149392505050565b6009546001600160a01b031690565b6002546000906111c790600190612ab3565b905090565b6060600180546106f990612905565b6111e36119ca565b6001600160a01b03166111f46111a6565b6001600160a01b03161461121a5760405162461bcd60e51b81526004016107e490612a24565b600c5461ffff16156112635760405162461bcd60e51b815260206004820152601260248201527118dbdb9d1c9858dd081a5cc81b1bd8dad95960721b60448201526064016107e4565b8060005b818110156112ae5761129e848483818110611284576112846129bd565b90506020020160208101906112999190612aca565b611da9565b6112a781612aee565b9050611267565b50505050565b6112c66112bf6119ca565b8383611f6b565b5050565b6000816112d681611980565b6112f25760405162461bcd60e51b81526004016107e490612a59565b604080517f1d860ce88a945b0e102d5d6e15d7dbea27d4b06c4c7b13b5db94dc973945bb67602082015290810184905230606090811b6001600160601b0319169082015260740160405160208183030381529060405280519060200120915050919050565b606060006002805480602002602001604051908101604052809291908181526020018280548015610be957602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116113935750939695505050505050565b6113cd6113c76119ca565b83611b45565b6113e95760405162461bcd60e51b81526004016107e4906129d3565b6112ae84848484612036565b6060600061140283610f21565b9050806114605760405162461bcd60e51b815260206004820152602660248201527f455243373231456e756d657261626c653a206f776e6572206f776e73206e6f20604482015265746f6b656e7360d01b60648201526084016107e4565b6002546000826001600160401b0381111561147d5761147d61257c565b6040519080825280602002602001820160405280156114a6578160200160208202803683370190505b5090506000805b8381101561151b57866001600160a01b0316600282815481106114d2576114d26129bd565b6000918252602090912001546001600160a01b031614156115135780838380600101945081518110611506576115066129bd565b6020026020010181815250505b6001016114ad565b509095945050505050565b6060611530611560565b61153983612069565b60405160200161154a929190612b09565b6040516020818303038152906040529050919050565b6060600f61156e6008612069565b60405160200161157f929190612bf1565b604051602081830303815290604052905090565b6060600f6115a16008612069565b60405160200161157f929190612c42565b60405163c455279160e01b81526000907f000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1906001600160a01b03808516919083169063c455279190611608908890600401612527565b60206040518083038186803b15801561162057600080fd5b505afa158015611634573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116589190612a80565b6001600160a01b031614156116715760019150506106e4565b6001600160a01b0380851660009081526005602090815260408083209387168352929052205460ff165b949350505050565b6116ab6119ca565b6001600160a01b03166116bc6111a6565b6001600160a01b0316146116e25760405162461bcd60e51b81526004016107e490612a24565b6001600160a01b0381166117475760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016107e4565b6009546040516001600160a01b03808416921690600080516020612eaa83398151915290600090a3600980546001600160a01b0319166001600160a01b0392909216919091179055565b6117996119ca565b6001600160a01b03166117aa6111a6565b6001600160a01b0316146117d05760405162461bcd60e51b81526004016107e490612a24565b6000811161180f5760405162461bcd60e51b815260206004820152600c60248201526b616d6f756e7420656d70747960a01b60448201526064016107e4565b478111156118585760405162461bcd60e51b8152602060048201526016602482015275616d6f756e7420657863656564732062616c616e636560501b60448201526064016107e4565b6001600160a01b03821661189d5760405162461bcd60e51b815260206004820152600c60248201526b1859191c995cdcc81b9d5b1b60a21b60448201526064016107e4565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610927573d6000803e3d6000fd5b60003330141561192a57600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b0316915061192d9050565b50335b90565b60006001600160e01b031982166380ac58cd60e01b148061196157506001600160e01b03198216635b5e139f60e01b145b806106e457506301ffc9a760e01b6001600160e01b03198316146106e4565b600254600090821080156106e4575060006001600160a01b0316600283815481106119ad576119ad6129bd565b6000918252602090912001546001600160a01b0316141592915050565b60006111c76118d3565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611a0982610e87565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b60006001600160a01b038616611aa85760405162461bcd60e51b815260206004820152602560248201527f4e61746976654d6574615472616e73616374696f6e3a20494e56414c49445f5360448201526424a3a722a960d91b60648201526084016107e4565b6001611abb611ab687612166565b6121e3565b6040805160008152602081018083529290925260ff851690820152606081018690526080810185905260a0016020604051602081039080840390855afa158015611b09573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b6000611b3e8284612c96565b9392505050565b6000611b5082611980565b611bb15760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016107e4565b6000611bbc83610e87565b9050806001600160a01b0316846001600160a01b03161480611bf75750836001600160a01b0316611bec8461077c565b6001600160a01b0316145b8061169b575061169b81856115b2565b826001600160a01b0316611c1a82610e87565b6001600160a01b031614611c825760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016107e4565b6001600160a01b038216611ce45760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016107e4565b611cef6000826119d4565b6001600160a01b0383166000908152600360205260408120805460019290611d18908490612ab3565b90915550506001600160a01b0382166000908152600360205260408120805460019290611d46908490612c96565b925050819055508160028281548110611d6157611d616129bd565b6000918252602082200180546001600160a01b0319166001600160a01b0393841617905560405183928581169290871691600080516020612eca8339815191529190a4505050565b61ffff81166000908152600b6020526040902054819060ff1615611e005760405162461bcd60e51b815260206004820152600e60248201526d185b1c9958591e481b5a5b9d195960921b60448201526064016107e4565b600a80546001818101909255601081047fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a801805461ffff8087166002600f909516949094026101000a8481029102199091161790556000818152600b6020526040808220805460ff191690941790935591516331a9108f60e11b81526001600160a01b037f000000000000000000000000320e2fa93a4010ba47edcde762802374bac8d3f71691636352211e91611ebe919060040190815260200190565b60206040518083038186803b158015611ed657600080fd5b505afa158015611eea573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f0e9190612a80565b90506000611f1b82612213565b6040805182815261ffff871660208201529192506001600160a01b038416917fbce304da62362ce5ce88b95bb6f2d8389e1fd2d6727ba068c2eaf08e5a8ecd0e910160405180910390a250505050565b816001600160a01b0316836001600160a01b03161415611fc95760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b60448201526064016107e4565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612041848484611c07565b61204d8484848461222e565b6112ae5760405162461bcd60e51b81526004016107e490612cae565b60608161208d5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156120b757806120a181612aee565b91506120b09050600a83612d16565b9150612091565b6000816001600160401b038111156120d1576120d161257c565b6040519080825280601f01601f1916602001820160405280156120fb576020820181803683370190505b5090505b841561169b57612110600183612ab3565b915061211d600a86612d2a565b612128906030612c96565b60f81b81838151811061213d5761213d6129bd565b60200101906001600160f81b031916908160001a90535061215f600a86612d16565b94506120ff565b6000604051806080016040528060438152602001612e6760439139805160209182012083518483015160408087015180519086012090516121c6950193845260208401929092526001600160a01b03166040830152606082015260800190565b604051602081830303815290604052805190602001209050919050565b60006121ee60075490565b60405161190160f01b60208201526022810191909152604281018390526062016121c6565b60006106e48260405180602001604052806000815250612342565b60006001600160a01b0384163b1561233757836001600160a01b031663150b7a026122576119ca565b8786866040518563ffffffff1660e01b81526004016122799493929190612d3e565b602060405180830381600087803b15801561229357600080fd5b505af19250505080156122c3575060408051601f3d908101601f191682019092526122c091810190612d7b565b60015b61231d573d8080156122f1576040519150601f19603f3d011682016040523d82523d6000602084013e6122f6565b606091505b5080516123155760405162461bcd60e51b81526004016107e490612cae565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061169b565b506001949350505050565b600061234d83612378565b905061235c600084838561222e565b6106e45760405162461bcd60e51b81526004016107e490612cae565b60006001600160a01b0382166123d05760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016107e4565b506002546001600160a01b03821660009081526003602052604081208054600192906123fd908490612c96565b90915550506002805460018101825560009182527f405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ace0180546001600160a01b0319166001600160a01b038516908117909155604051839290600080516020612eca833981519152908290a4919050565b6001600160e01b03198116811461248357600080fd5b50565b60006020828403121561249857600080fd5b8135611b3e8161246d565b60005b838110156124be5781810151838201526020016124a6565b838111156112ae5750506000910152565b600081518084526124e78160208601602086016124a3565b601f01601f19169290920160200192915050565b602081526000611b3e60208301846124cf565b60006020828403121561252057600080fd5b5035919050565b6001600160a01b0391909116815260200190565b6001600160a01b038116811461248357600080fd5b6000806040838503121561256357600080fd5b823561256e8161253b565b946020939093013593505050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126125a357600080fd5b81356001600160401b03808211156125bd576125bd61257c565b604051601f8301601f19908116603f011681019082821181831017156125e5576125e561257c565b816040528381528660208588010111156125fe57600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600060a0868803121561263657600080fd5b85356126418161253b565b945060208601356001600160401b0381111561265c57600080fd5b61266888828901612592565b9450506040860135925060608601359150608086013560ff8116811461268d57600080fd5b809150509295509295909350565b6020808252825182820181905260009190848201906040850190845b818110156126d757835161ffff16835292840192918401916001016126b7565b50909695505050505050565b6000806000606084860312156126f857600080fd5b83356127038161253b565b925060208401356127138161253b565b929592945050506040919091013590565b60006020828403121561273657600080fd5b8135611b3e8161253b565b6000806020838503121561275457600080fd5b82356001600160401b038082111561276b57600080fd5b818501915085601f83011261277f57600080fd5b81358181111561278e57600080fd5b8660208260051b85010111156127a357600080fd5b60209290920196919550909350505050565b600080604083850312156127c857600080fd5b82356127d38161253b565b9150602083013580151581146127e857600080fd5b809150509250929050565b6020808252825182820181905260009190848201906040850190845b818110156126d75783516001600160a01b03168352928401929184019160010161280f565b6000806000806080858703121561284a57600080fd5b84356128558161253b565b935060208501356128658161253b565b92506040850135915060608501356001600160401b0381111561288757600080fd5b61289387828801612592565b91505092959194509250565b6020808252825182820181905260009190848201906040850190845b818110156126d7578351835292840192918401916001016128bb565b600080604083850312156128ea57600080fd5b82356128f58161253b565b915060208301356127e88161253b565b600181811c9082168061291957607f821691505b60208210811415610dd857634e487b7160e01b600052602260045260246000fd5b6001600160a01b03848116825283166020820152606060408201819052600090612966908301846124cf565b95945050505050565b600083516129818184602088016124a3565b60609390931b6001600160601b0319169190920190815260140192915050565b600082516129b38184602087016124a3565b9190910192915050565b634e487b7160e01b600052603260045260246000fd5b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b6020808252600d908201526c34b73b30b634b2103a37b5b2b760991b604082015260600190565b600060208284031215612a9257600080fd5b8151611b3e8161253b565b634e487b7160e01b600052601160045260246000fd5b600082821015612ac557612ac5612a9d565b500390565b600060208284031215612adc57600080fd5b813561ffff81168114611b3e57600080fd5b6000600019821415612b0257612b02612a9d565b5060010190565b60008351612b1b8184602088016124a3565b602f60f81b9083019081528351612b398160018401602088016124a3565b642f6d65746160d81b60019290910191820152600601949350505050565b8054600090600181811c9080831680612b7157607f831692505b6020808410821415612b9357634e487b7160e01b600052602260045260246000fd5b818015612ba75760018114612bb857612be5565b60ff19861689528489019650612be5565b60008881526020902060005b86811015612bdd5781548b820152908501908301612bc4565b505084890196505b50505050505092915050565b6000612bfd8285612b57565b6c2f6170692f70726f6a6563742f60981b81528351612c2381600d8401602088016124a3565b6517ba37b5b2b760d11b600d9290910191820152601301949350505050565b6000612c4e8285612b57565b6c2f6170692f70726f6a6563742f60981b81528351612c7481600d8401602088016124a3565b680bd8dbdb9d1c9858dd60ba1b600d9290910191820152601601949350505050565b60008219821115612ca957612ca9612a9d565b500190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b600082612d2557612d25612d00565b500490565b600082612d3957612d39612d00565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612d71908301846124cf565b9695505050505050565b600060208284031215612d8d57600080fd5b8151611b3e8161246d56fe546865205261696e626f773720506173732070726f766964657320686f6c646572732077697468206d656d6265727368697020746f207468652047656e6574696320436861696e20506c6174666f726d2e20205061737365732077696c6c20756e6c6f636b2061636365737320746f207072652d73616c65732c2066726565206d696e74732c206675747572652047432070726f6772616d732c2061732077656c6c2061732061636365737320746f206c697665206576656e7473206174207468652047432067616c6c6572792e4d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e6174757265298be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efa2646970667358221220a2fe1186ccee054d4e0e3a24f28dfb6acc668b8c174158606988999b008c538964736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000320e2fa93a4010ba47edcde762802374bac8d3f700000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000001a01d860ce88a945b0e102d5d6e15d7dbea27d4b06c4c7b13b5db94dc973945bb67000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a0000000000000000000000000000000000000000000000000000000000000002e516d55713474426863426d6a32344c5865586a68536752524e4d676a78457961326f62735a69787467317a76524a000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002e516d537653334d6573514c675a347158676f67386561337171464a44587465706b35476d6f6a5437503675787156000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001768747470733a2f2f67656e65746963636861696e2e696f000000000000000000
-----Decoded View---------------
Arg [0] : spiral (address): 0x320e2fa93A4010ba47edcdE762802374bac8d3F7
Arg [1] : tokenIpfsHashes (string[2]): QmUq4tBhcBmj24LXeXjhSgRRNMgjxEya2obsZixtg1zvRJ,QmSvS3MesQLgZ4qXgog8ea3qqFJDXtepk5GmojT7P6uxqV
Arg [2] : baseUri (string): https://geneticchain.io
Arg [3] : seed (uint256): 13353919205852943267224336300325069512200954740837277011749743938703483845479
Arg [4] : proxyRegistryAddress (address): 0xa5409ec958C83C3f309868babACA7c86DCB077c1
-----Encoded View---------------
15 Constructor Arguments found :
Arg [0] : 000000000000000000000000320e2fa93a4010ba47edcde762802374bac8d3f7
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [3] : 1d860ce88a945b0e102d5d6e15d7dbea27d4b06c4c7b13b5db94dc973945bb67
Arg [4] : 000000000000000000000000a5409ec958c83c3f309868babaca7c86dcb077c1
Arg [5] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [6] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [7] : 000000000000000000000000000000000000000000000000000000000000002e
Arg [8] : 516d55713474426863426d6a32344c5865586a68536752524e4d676a78457961
Arg [9] : 326f62735a69787467317a76524a000000000000000000000000000000000000
Arg [10] : 000000000000000000000000000000000000000000000000000000000000002e
Arg [11] : 516d537653334d6573514c675a347158676f67386561337171464a4458746570
Arg [12] : 6b35476d6f6a5437503675787156000000000000000000000000000000000000
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000017
Arg [14] : 68747470733a2f2f67656e65746963636861696e2e696f000000000000000000
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.