Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 190 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Stop Entry | 14434751 | 910 days ago | IN | 0 ETH | 0.00070496 | ||||
Play | 14432367 | 910 days ago | IN | 0 ETH | 0.00592143 | ||||
Play | 14432358 | 910 days ago | IN | 0 ETH | 0.00516125 | ||||
Play | 14431212 | 910 days ago | IN | 0 ETH | 0.00720444 | ||||
Play | 14430952 | 910 days ago | IN | 0 ETH | 0.00492863 | ||||
Play | 14430607 | 910 days ago | IN | 0 ETH | 0.00355369 | ||||
Play | 14430465 | 910 days ago | IN | 0 ETH | 0.00343879 | ||||
Play | 14430421 | 910 days ago | IN | 0 ETH | 0.00486652 | ||||
Play | 14430359 | 910 days ago | IN | 0 ETH | 0.00061525 | ||||
Play | 14429722 | 910 days ago | IN | 0 ETH | 0.00232764 | ||||
Play | 14429213 | 910 days ago | IN | 0 ETH | 0.0019559 | ||||
Play | 14429213 | 910 days ago | IN | 0 ETH | 0.00204595 | ||||
Play | 14429198 | 910 days ago | IN | 0 ETH | 0.00192995 | ||||
Play | 14429198 | 910 days ago | IN | 0 ETH | 0.00192995 | ||||
Play | 14429198 | 910 days ago | IN | 0 ETH | 0.00192995 | ||||
Play | 14429187 | 910 days ago | IN | 0 ETH | 0.00319317 | ||||
Play | 14429167 | 910 days ago | IN | 0 ETH | 0.00261713 | ||||
Play | 14429164 | 910 days ago | IN | 0 ETH | 0.00216914 | ||||
Play | 14429084 | 910 days ago | IN | 0 ETH | 0.00284183 | ||||
Play | 14429069 | 910 days ago | IN | 0 ETH | 0.0027948 | ||||
Play | 14428902 | 910 days ago | IN | 0 ETH | 0.00191857 | ||||
Play | 14426850 | 911 days ago | IN | 0 ETH | 0.00247368 | ||||
Play | 14426694 | 911 days ago | IN | 0 ETH | 0.00210361 | ||||
Play | 14426118 | 911 days ago | IN | 0 ETH | 0.0021438 | ||||
Play | 14425466 | 911 days ago | IN | 0 ETH | 0.00337571 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
14347965 | 923 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
Lottery
Compiler Version
v0.8.0+commit.c7dfd78e
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2022-03-09 */ // SPDX-License-Identifier: MIT // File nft_contracts/utils/Context.sol // OpenZeppelin Contracts v4.3.2 (utils/Context.sol) pragma solidity 0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } // File nft_contracts/utils/Ownable.sol // OpenZeppelin Contracts v4.3.2 (access/Ownable.sol) pragma solidity 0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() external virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) external virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // File nft_contracts/library/SafeMath.sol // OpenZeppelin Contracts v4.3.2 (utils/math/SafeMath.sol) 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 generally not needed starting with Solidity 0.8, since 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. 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; } } } // File nft_contracts/interfaces/IERC20.sol // OpenZeppelin Contracts v4.3.2 (token/ERC20/IERC20.sol) pragma solidity 0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); } // File nft_contracts/interfaces/IERC165.sol // OpenZeppelin Contracts v4.3.2 (utils/introspection/IERC165.sol) pragma solidity 0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); } // File nft_contracts/interfaces/IERC721.sol // OpenZeppelin Contracts v4.3.2 (token/ERC721/IERC721.sol) pragma solidity 0.8.0; /** * @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; } // File nft_contracts/interfaces/IERC721Util.sol // OpenZeppelin Contracts v4.3.2 (token/ERC721/IERC721.sol) pragma solidity 0.8.0; interface IERC721Util { function burn(uint256 tokenId) external; function burnFor(address burner, uint256 tokenId) external; function mintForWithId(address minter, uint256 tokenId) external; } // File nft_contracts/interfaces/IERC721Receiver.sol // OpenZeppelin Contracts v4.3.2 (token/ERC721/IERC721Receiver.sol) pragma solidity 0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } // File nft_contracts/interfaces/IERC721Metadata.sol // OpenZeppelin Contracts v4.3.2 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity 0.8.0; /** * @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); } // File nft_contracts/library/Address.sol // OpenZeppelin Contracts v4.3.2 (utils/Address.sol) pragma solidity 0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // File nft_contracts/library/Strings.sol // OpenZeppelin Contracts v4.3.2 (utils/Strings.sol) pragma solidity 0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } } // File nft_contracts/utils/ERC165.sol // OpenZeppelin Contracts v4.3.2 (utils/introspection/ERC165.sol) pragma solidity 0.8.0; /** * @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; } } // File nft_contracts/library/Counters.sol // OpenZeppelin Contracts v4.3.2 (utils/Counters.sol) pragma solidity 0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal returns (uint256){ unchecked { counter._value += 1; return counter._value; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } function set(Counter storage counter, uint256 value) internal { counter._value = value; } } // File nft_contracts/utils/ERC721.sol // OpenZeppelin Contracts v4.3.2 (token/ERC721/ERC721.sol) pragma solidity 0.8.0; contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; using Counters for Counters.Counter; Counters.Counter internal tokenIdCounter; // Token name string private _name; // Token symbol string private _symbol; string private _baseURI; mapping (uint256 => string) private tokenIdToOffchainHash; // Mapping from token ID to owner address mapping (uint256 => address) private _owners; // Mapping owner address to token count mapping (address => uint256) private _balances; // Mapping from token ID to approved address mapping (uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping (address => mapping (address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor (string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } function _mintItem(address minter) internal virtual returns(uint256) { uint256 newTokenId = tokenIdCounter.increment(); _safeMint(minter, newTokenId); return newTokenId; } function _mintItemWithMeta(address minter, string memory _tokenURI) internal virtual returns(uint256) { uint256 newTokenId = tokenIdCounter.increment(); _safeMint(minter, newTokenId); _setTokenURI(newTokenId, _tokenURI); return newTokenId; } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() external view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() external 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"); if (bytes(tokenIdToOffchainHash[tokenId]).length != 0) { return tokenIdToOffchainHash[tokenId]; } else { string memory baseURI_ = _baseURI; return bytes(baseURI_).length > 0 ? string(abi.encodePacked(baseURI_, tokenId.toString())) : ''; } } function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { tokenIdToOffchainHash[tokenId] = _tokenURI; } function _setBaseURI(string memory baseURI_) internal virtual { _baseURI = baseURI_; } function baseURI() external view returns (string memory) { return _baseURI; } function baseTokenURI() external view returns (string memory) { return _baseURI; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) external virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) external virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) external 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) external 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) external view returns (bool) { return _owners[tokenId] != address(0); } function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint(address to, uint256 tokenId, bytes memory _data) internal virtual { _mint(to, tokenId); require(_checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer(address from, address to, uint256 tokenId) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received(address from, address to, uint256 tokenId, bytes memory _data) private returns (bool) { if (!to.isContract()) { return true; } bytes4 retval = IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data); return (retval == IERC721Receiver(to).onERC721Received.selector); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { } } // File nft_contracts/interfaces/IERC721Enumerable.sol // OpenZeppelin Contracts v4.3.2 (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity 0.8.0; /** * @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); } // File nft_contracts/utils/ERC721Enumerable.sol // OpenZeppelin Contracts v4.3.2 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity 0.8.0; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; bytes4 internal constant InterfaceId_ERC721 = 0x80ac58cd; bytes4 internal constant InterfaceId_ERC721Exists = 0x4f558e79; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == InterfaceId_ERC721 || interfaceId == InterfaceId_ERC721Exists || interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) external view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } } // File nft_contracts/P_NFT.sol pragma solidity 0.8.0; contract P_NFT is ERC721Enumerable, Ownable { using SafeMath for uint256; bool public isFrozen; uint256 public maxCount = 1770; address private _lottery; event PermanentURI(string _value, uint256 indexed _id); modifier nonFrozen() { require(!isFrozen, "P-NFT: FROZEN"); _; } modifier onlyLottery() { require(lottery() == _msgSender(), "Ownable: caller is not the lottery"); _; } constructor() ERC721("Out of Africa: Poster NFTs", "P-NFT") { _setBaseURI("ipfs://QmRuT8ZbW2AdGJwoBgTeYc3DbfyZh2zdaJKg9inkpgbEAt/"); } function lottery() public view virtual returns (address) { return _lottery; } function setLottery(address newLottery) external onlyOwner { _lottery = newLottery; } function setBaseUrl(string memory baseURI_) external onlyOwner nonFrozen { _setBaseURI(baseURI_); } function setTokenURI(uint256 tokenId, string memory _tokenURI) external onlyOwner nonFrozen { _setTokenURI(tokenId, _tokenURI); } function mint() external onlyOwner nonFrozen returns(uint256) { require(totalSupply() < maxCount, "P-NFT: MAX_COUNT_IS_1770"); return _mintItem(_msgSender()); } function mintFor(address minter) external onlyLottery nonFrozen returns(uint256) { require(totalSupply() < maxCount, "P-NFT: MAX_COUNT_IS_1770"); return _mintItem(minter); } function mintWithMeta(string memory _tokenURI) external onlyOwner nonFrozen returns(uint256) { return _mintItemWithMeta(_msgSender(), _tokenURI); } function mintWithCount(uint256 count) external onlyOwner nonFrozen returns(uint256[] memory) { require(count.add(totalSupply()) <= maxCount, "P-NFT: MAX_COUNT_IS_1770"); uint256[] memory retIds = new uint256[](count); for (uint256 i = 0; i < count; i++) { retIds[i] = _mintItem(_msgSender()); } return retIds; } function mintWithCountFor(uint256 count, address minter) external onlyOwner nonFrozen returns(uint256[] memory) { require(count.add(totalSupply()) <= maxCount, "P-NFT: MAX_COUNT_IS_1770"); uint256[] memory retIds = new uint256[](count); for (uint256 i = 0; i < count; i++) { retIds[i] = _mintItem(minter); } return retIds; } function burn(uint256 tokenId) external { address tokenOwner = ownerOf(tokenId); require(tokenOwner == _msgSender(), "P-NFT: NOT_ITEM_OWNER"); _burn(tokenId); } function isHavePNFT(address account) external view returns (bool) { return balanceOf(account) > 0; } function stillHave() external view returns (bool) { return totalSupply() < maxCount; } function canMint() external view returns (uint256) { return maxCount.sub(totalSupply()); } function freeze() external onlyOwner nonFrozen { isFrozen = true; } function freezeToken(uint256 tokenId) external onlyOwner nonFrozen { emit PermanentURI(tokenURI(tokenId), tokenId); } } // File nft_contracts/OA_NFT.sol pragma solidity 0.8.0; contract OA_NFT is ERC721Enumerable, Ownable { using SafeMath for uint256; struct Nft { bool unclaimable; bool claimed; } mapping(uint256 => Nft) private delivery; uint256 public maxCount = 118; bool public isFrozen; event PermanentURI(string _value, uint256 indexed _id); modifier nonFrozen() { require(!isFrozen, "P-NFT: FROZEN"); _; } constructor() ERC721("Out of Africa: Original Artwork NFTs", "O-NFT") { _setBaseURI("ipfs://QmYY9PUiCrQvoZCEeLfKBtnGYnfy7uCxLqXFui94Y9CQx9/"); } function isClaimable(uint256 tokenId) external view returns (bool) { return !delivery[tokenId].unclaimable; } function isClaimed(uint256 tokenId) external view returns (bool) { return delivery[tokenId].claimed; } function setBaseUrl(string memory baseURI_) external onlyOwner nonFrozen { _setBaseURI(baseURI_); } function setTokenURI(uint256 tokenId, string memory _tokenURI) external onlyOwner nonFrozen { _setTokenURI(tokenId, _tokenURI); } function mint() external onlyOwner nonFrozen returns(uint256) { require(totalSupply() < maxCount, "P-NFT: MAX_COUNT_IS_118"); return _mintItem(_msgSender()); } function mintWithMeta(string memory _tokenURI) external onlyOwner nonFrozen returns(uint256) { require(totalSupply() < maxCount, "P-NFT: MAX_COUNT_IS_118"); return _mintItemWithMeta(_msgSender(), _tokenURI); } function mintFor(address minter) external onlyOwner nonFrozen returns(uint256) { require(totalSupply() < maxCount, "P-NFT: MAX_COUNT_IS_118"); require(minter != address(0), "O-NFT: MINTER_IS_ZERO_ADDRESS"); return _mintItem(minter); } function mintWithCount(uint256 count) external onlyOwner nonFrozen returns(uint256[] memory) { require(count.add(totalSupply()) <= maxCount, "P-NFT: MAX_COUNT_IS_118"); uint256[] memory retIds = new uint256[](count); for (uint256 i = 0; i < count; i++) { retIds[i] = _mintItem(_msgSender()); } return retIds; } function mintForWithId(address minter, uint256 tokenId) external onlyOwner nonFrozen { require(minter != address(0), "O-NFT: MINTER_IS_ZERO_ADDRESS"); require(tokenId > 0, "O-NFT: INVALID_TOKEN_ID"); require(totalSupply() < maxCount, "P-NFT: MAX_COUNT_IS_118"); _safeMint(minter, tokenId); } function freeze() external onlyOwner { isFrozen = true; } function burn(uint256 tokenId) external { address tokenOwner = ownerOf(tokenId); require(tokenOwner == _msgSender(), "O-NFT: NOT_ITEM_OWNER"); _burn(tokenId); } function burnFor(address burner, uint256 tokenId) external onlyOwner { address tokenOwner = ownerOf(tokenId); require(tokenOwner == burner, "O-NFT: NOT_ITEM_OWNER"); _burn(tokenId); } function claim(uint256 tokenId) external { address tokenOwner = ownerOf(tokenId); require(tokenOwner == _msgSender(), "O-NFT: NOT_ITEM_OWNER"); require(!delivery[tokenId].unclaimable, "O-NFT: UNCLAIMABLE"); delivery[tokenId].claimed = true; } function setUnclaimable(bool unclaimable, uint256 tokenId) external onlyOwner { delivery[tokenId].unclaimable = unclaimable; } function setUnclaimed(uint256 tokenId) external onlyOwner { delivery[tokenId].claimed = false; } function freezeToken(uint256 tokenId) external onlyOwner nonFrozen { emit PermanentURI(tokenURI(tokenId), tokenId); } } // File nft_contracts/utils/ERC721Receiver.sol pragma solidity 0.8.0; contract ERC721Receiver is IERC721Receiver { bytes4 private constant _retval = IERC721Receiver.onERC721Received.selector; event Received(address operator, address from, uint256 tokenId, bytes data, uint256 gas); function onERC721Received( address operator, address from, uint256 tokenId, bytes memory data ) external override returns (bytes4) { emit Received(operator, from, tokenId, data, gasleft()); return _retval; } } // File nft_contracts/Lottery.sol pragma solidity 0.8.0; /** * @title Lottery * @author NFT Labs * @dev Lottery should work as follows: * 1. Lottery period starts * 2. Users interact with smart contract to enter their wallets into the draw * 3. Entry period ends. * 4. Winning wallets determined randomly. * 5. Claim/mint period starts. * 6. Claim/mint period ends. * 7. Unclaimed NFTs sent to team wallet. */ contract Lottery is Ownable, ERC721Receiver { using SafeMath for uint256; struct Ticket { bool exist; uint256 block; uint256 ticketId; bool claimed; } address public PNFTToken; bool _isActive; bool _isClaimActive; uint256 public winScore = 5000; uint256 public ticketIdCounter; mapping(address => Ticket) private tickets; bool private _notEntered; event Won(address player, uint256 ticketId, uint256 tokenId); event NewTicket(address player, uint256 ticketId); modifier nonReentrant() { require(_notEntered, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _notEntered = false; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _notEntered = true; } constructor(address _PNFTToken) { _notEntered = true; require(_PNFTToken != address(0), "Factory: ZERO_ADDRESS"); PNFTToken = _PNFTToken; } function setPNFTToken(address _PNFTToken) external onlyOwner { require(_PNFTToken != address(0), "Factory: ZERO_ADDRESS"); PNFTToken = _PNFTToken; } function setWinScore(uint256 _winScore ) external onlyOwner { winScore = _winScore; } function activateEntry() external onlyOwner { _isActive = true; } function stopEntry() external onlyOwner { _isActive = false; } function activateClaim() external onlyOwner { _isClaimActive = true; } function stopClaim() external onlyOwner { _isClaimActive = false; } function getResult(address account) external view returns (bool) { return getBetResult(account); } function isActive() external view returns (bool) { return _isActive; } function isClaimActive() external view returns (bool) { return _isClaimActive; } function isTicketExist(address account) external view returns (bool) { return tickets[account].exist; } function ticketNumber(address account) external view returns (uint256) { return tickets[account].ticketId; } function isTicketClaimed(address account) external view returns (bool) { return tickets[account].claimed; } function play() external { _checkPlayPossible(); tickets[_msgSender()] = Ticket(true, block.number, _getNewTicketId(), false); emit NewTicket(_msgSender(), tickets[_msgSender()].ticketId); } function claim() external nonReentrant { address sender = _msgSender(); Ticket memory accountTicket = tickets[sender]; require(accountTicket.exist, "BetResult: NOT_EXIST"); require(_isClaimActive, "PlayItem: NOT_ACTIVE"); require(P_NFT(PNFTToken).stillHave(), "PlayItem: NO_P_NFTS"); require(!accountTicket.claimed, "PlayItem: P_NFT_SENT"); tickets[sender].claimed = true; bool betResult = ifBetWon(sender, accountTicket.block); if (betResult) { uint256 tokenId = P_NFT(PNFTToken).mintFor(sender); emit Won(sender, tickets[sender].ticketId, tokenId); } } function _checkPlayPossible() private view { require(_isActive, "PlayItem: NOT_ACTIVE"); require(_msgSender() != address(0), "PlayItem: INVALID_ADDRESS"); require(!tickets[_msgSender()].exist, "PlayItem: ONLY_ONCE"); require(P_NFT(PNFTToken).stillHave(), "PlayItem: NO_P_NFTS"); } function getBet(address account, uint256 _block) public view returns (uint256) { Ticket memory accountTicket = tickets[account]; require(accountTicket.exist, "BetResult: NOT_EXIST"); uint256 tempBlock = _block; bytes32 firstblock = blockhash(tempBlock); bytes32 secondblock = blockhash(tempBlock.add(1)); bytes memory bytesArray = new bytes(32); bytes memory player = abi.encodePacked(account); for (uint256 i = 0; i < 15; i++) { bytesArray[i] = firstblock[7 + i]; } bytesArray[15] = player[7]; for (uint256 i = 16; i < 32; i++) { bytesArray[i] = secondblock[i]; } return uint(keccak256( bytesArray )) >> 16; } function getBetResult(address account) private view returns (bool) { Ticket memory accountTicket = tickets[account]; require(accountTicket.exist, "BetResult: NOT_EXIST"); require(_isClaimActive, "PlayItem: NOT_ACTIVE"); require(P_NFT(PNFTToken).stillHave(), "PlayItem: NO_P_NFTS"); require(!accountTicket.claimed, "PlayItem: P_NFT_SENT"); return ifBetWon(account, accountTicket.block); } function ifBetWon(address account, uint256 _block) private view returns (bool) { uint256 dice = getBet(account, _block); if (dice % 10000 < winScore) { return true; } else { return false; } } function withdrawToken(address _token, uint256 _amount) external onlyOwner returns (bool) { return IERC20(_token).transfer(msg.sender, _amount); } function _getNewTicketId() private returns (uint256) { ticketIdCounter += 1; return ticketIdCounter; } } // File nft_contracts/Factory.sol pragma solidity 0.8.0; contract Factory is Ownable { using SafeMath for uint256; address public PNFTToken; address public OANFTToken; address public LotteryAddress; constructor() { address sender = _msgSender(); P_NFT pNFT = new P_NFT(); PNFTToken = address(pNFT); Lottery lotteryContract = new Lottery(PNFTToken ); LotteryAddress = address(lotteryContract); lotteryContract.transferOwnership(sender); pNFT.setLottery(LotteryAddress); pNFT.transferOwnership(sender); OA_NFT oaNFT = new OA_NFT(); OANFTToken = address(oaNFT); oaNFT.transferOwnership(sender); } function withdrawToken(address _token, uint256 _amount) external onlyOwner returns (bool) { return IERC20(_token).transfer(msg.sender, _amount); } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_PNFTToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"player","type":"address"},{"indexed":false,"internalType":"uint256","name":"ticketId","type":"uint256"}],"name":"NewTicket","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":false,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"data","type":"bytes"},{"indexed":false,"internalType":"uint256","name":"gas","type":"uint256"}],"name":"Received","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"player","type":"address"},{"indexed":false,"internalType":"uint256","name":"ticketId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Won","type":"event"},{"inputs":[],"name":"PNFTToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"activateClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"activateEntry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"_block","type":"uint256"}],"name":"getBet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getResult","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isClaimActive","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isTicketClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"isTicketExist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"play","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_PNFTToken","type":"address"}],"name":"setPNFTToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_winScore","type":"uint256"}],"name":"setWinScore","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopClaim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stopEntry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"ticketIdCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"ticketNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"winScore","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040526113886002553480156200001757600080fd5b5060405162001799380380620017998339810160408190526200003a9162000107565b6200004e62000048620000b3565b620000b7565b6005805460ff191660011790556001600160a01b0381166200008d5760405162461bcd60e51b8152600401620000849062000137565b60405180910390fd5b600180546001600160a01b0319166001600160a01b03929092169190911790556200016e565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b60006020828403121562000119578081fd5b81516001600160a01b038116811462000130578182fd5b9392505050565b60208082526015908201527f466163746f72793a205a45524f5f414444524553530000000000000000000000604082015260600190565b61161b806200017e6000396000f3fe608060405234801561001057600080fd5b506004361061014d5760003560e01c8063715018a6116100c357806393e84cd91161007c57806393e84cd91461025b5780639735d85d146102635780639e281a9814610276578063c0b044dc14610289578063f2fde38b1461029c578063ff6c9bc9146102af5761014d565b8063715018a6146102205780637fc278031461022857806382e78a89146102305780638802255f146102385780638a6b114b146102405780638da5cb5b146102535761014d565b8063446a37e011610115578063446a37e0146101c057806345767b53146101d35780634586d8f0146101e85780634e71d92d146101fb5780634f62e7961461020357806350a2ce931461020b5761014d565b8063150b7a021461015257806322f3e2d41461017b5780632c4a0875146101905780633626fa1a1461019a578063430c5141146101ad575b600080fd5b610165610160366004611113565b6102b7565b604051610172919061134c565b60405180910390f35b610183610309565b6040516101729190611341565b610198610319565b005b6101836101a83660046110f9565b610370565b6101986101bb3660046110f9565b610395565b6101836101ce3660046110f9565b61041c565b6101db61042d565b604051610172919061155d565b6101836101f63660046110f9565b610433565b610198610451565b61019861071b565b61021361076f565b6040516101729190611275565b61019861077e565b6101836107c9565b6101986107d9565b6101db61082d565b6101db61024e3660046111df565b610833565b610213610a7a565b610198610a89565b6101db6102713660046110f9565b610b91565b6101836102843660046111df565b610baf565b610198610297366004611228565b610c77565b6101986102aa3660046110f9565b610cbb565b610198610d2c565b60007f28fa6e16458f9c24aa59ddd4085264573006dbe30304837873c7deafc702b038858585855a6040516102f0959493929190611289565b60405180910390a150630a85bd0160e11b949350505050565b600154600160a01b900460ff1690565b610321610d7a565b6001600160a01b0316610332610a7a565b6001600160a01b0316146103615760405162461bcd60e51b81526004016103589061145e565b60405180910390fd5b6001805460ff60a01b19169055565b6001600160a01b03811660009081526004602052604090206003015460ff165b919050565b61039d610d7a565b6001600160a01b03166103ae610a7a565b6001600160a01b0316146103d45760405162461bcd60e51b81526004016103589061145e565b6001600160a01b0381166103fa5760405162461bcd60e51b8152600401610358906114ca565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600061042782610d7e565b92915050565b60025481565b6001600160a01b031660009081526004602052604090205460ff1690565b60055460ff166104735760405162461bcd60e51b8152600401610358906114f9565b6005805460ff191690556000610487610d7a565b6001600160a01b0381166000908152600460209081526040918290208251608081018452815460ff908116151580835260018401549483019490945260028301549482019490945260039091015490921615156060830152919250906104ff5760405162461bcd60e51b8152600401610358906113d5565b600154600160a81b900460ff166105285760405162461bcd60e51b815260040161035890611403565b600160009054906101000a90046001600160a01b03166001600160a01b0316630b29d0666040518163ffffffff1660e01b815260040160206040518083038186803b15801561057657600080fd5b505afa15801561058a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ae9190611208565b6105ca5760405162461bcd60e51b815260040161035890611431565b8060600151156105ec5760405162461bcd60e51b8152600401610358906113a7565b6001600160a01b03821660009081526004602090815260408220600301805460ff19166001179055820151610622908490610ee9565b9050801561070957600154604051631c795e3760e21b81526000916001600160a01b0316906371e578dc9061065b908790600401611275565b602060405180830381600087803b15801561067557600080fd5b505af1158015610689573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ad9190611240565b6001600160a01b038516600090815260046020526040908190206002015490519192507ffdc49939175858b2bb557093a7d52fa6b6f3aad917d282d61758fab4805f102a916106ff9187918590611320565b60405180910390a1505b50506005805460ff1916600117905550565b610723610d7a565b6001600160a01b0316610734610a7a565b6001600160a01b03161461075a5760405162461bcd60e51b81526004016103589061145e565b6001805460ff60a01b1916600160a01b179055565b6001546001600160a01b031681565b610786610d7a565b6001600160a01b0316610797610a7a565b6001600160a01b0316146107bd5760405162461bcd60e51b81526004016103589061145e565b6107c76000610f22565b565b600154600160a81b900460ff1690565b6107e1610d7a565b6001600160a01b03166107f2610a7a565b6001600160a01b0316146108185760405162461bcd60e51b81526004016103589061145e565b6001805460ff60a81b1916600160a81b179055565b60035481565b6001600160a01b03821660009081526004602090815260408083208151608081018352815460ff908116151580835260018401549583019590955260028301549382019390935260039091015490911615156060820152906108a75760405162461bcd60e51b8152600401610358906113d5565b82804060006108b7836001610f72565b60408051602080825281830190925291409250600091906020820181803683370190505090506000886040516020016108f09190611258565b604051602081830303815290604052905060005b600f8110156109845784610919826007611566565b6020811061093757634e487b7160e01b600052603260045260246000fd5b1a60f81b83828151811061095b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053508061097c8161157e565b915050610904565b50806007815181106109a657634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b82600f815181106109d257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060105b6020811015610a6257838160208110610a1557634e487b7160e01b600052603260045260246000fd5b1a60f81b838281518110610a3957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535080610a5a8161157e565b9150506109ec565b5050805160209091012060101c979650505050505050565b6000546001600160a01b031690565b610a91610f7e565b6040805160808101825260018152436020820152908101610ab06110c0565b81526020016000151581525060046000610ac8610d7a565b6001600160a01b0316815260208082019290925260409081016000208351815490151560ff1991821617825592840151600182015590830151600282015560609092015160039092018054921515929091169190911790557fdece058cd7cd2ee12f875b0ca3fd9ace3c14e4a2c65c283511fe8d09be688c48610b49610d7a565b60046000610b55610d7a565b6001600160a01b03166001600160a01b0316815260200190815260200160002060020154604051610b87929190611307565b60405180910390a1565b6001600160a01b031660009081526004602052604090206002015490565b6000610bb9610d7a565b6001600160a01b0316610bca610a7a565b6001600160a01b031614610bf05760405162461bcd60e51b81526004016103589061145e565b60405163a9059cbb60e01b81526001600160a01b0384169063a9059cbb90610c1e9033908690600401611307565b602060405180830381600087803b158015610c3857600080fd5b505af1158015610c4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c709190611208565b9392505050565b610c7f610d7a565b6001600160a01b0316610c90610a7a565b6001600160a01b031614610cb65760405162461bcd60e51b81526004016103589061145e565b600255565b610cc3610d7a565b6001600160a01b0316610cd4610a7a565b6001600160a01b031614610cfa5760405162461bcd60e51b81526004016103589061145e565b6001600160a01b038116610d205760405162461bcd60e51b815260040161035890611361565b610d2981610f22565b50565b610d34610d7a565b6001600160a01b0316610d45610a7a565b6001600160a01b031614610d6b5760405162461bcd60e51b81526004016103589061145e565b6001805460ff60a81b19169055565b3390565b6001600160a01b03811660009081526004602090815260408083208151608081018352815460ff90811615158083526001840154958301959095526002830154938201939093526003909101549091161515606082015290610df25760405162461bcd60e51b8152600401610358906113d5565b600154600160a81b900460ff16610e1b5760405162461bcd60e51b815260040161035890611403565b600160009054906101000a90046001600160a01b03166001600160a01b0316630b29d0666040518163ffffffff1660e01b815260040160206040518083038186803b158015610e6957600080fd5b505afa158015610e7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea19190611208565b610ebd5760405162461bcd60e51b815260040161035890611431565b806060015115610edf5760405162461bcd60e51b8152600401610358906113a7565b610c708382602001515b600080610ef68484610833565b600254909150610f0861271083611599565b1015610f18576001915050610427565b6000915050610427565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000610c708284611566565b600154600160a01b900460ff16610fa75760405162461bcd60e51b815260040161035890611403565b6000610fb1610d7a565b6001600160a01b03161415610fd85760405162461bcd60e51b815260040161035890611493565b60046000610fe4610d7a565b6001600160a01b0316815260208101919091526040016000205460ff161561101e5760405162461bcd60e51b815260040161035890611530565b600160009054906101000a90046001600160a01b03166001600160a01b0316630b29d0666040518163ffffffff1660e01b815260040160206040518083038186803b15801561106c57600080fd5b505afa158015611080573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a49190611208565b6107c75760405162461bcd60e51b815260040161035890611431565b60006001600360008282546110d59190611566565b9091555050600354905090565b80356001600160a01b038116811461039057600080fd5b60006020828403121561110a578081fd5b610c70826110e2565b60008060008060808587031215611128578283fd5b611131856110e2565b935060206111408187016110e2565b935060408601359250606086013567ffffffffffffffff80821115611163578384fd5b818801915088601f830112611176578384fd5b813581811115611188576111886115cf565b604051601f8201601f19168101850183811182821017156111ab576111ab6115cf565b60405281815283820185018b10156111c1578586fd5b81858501868301379081019093019390935250939692955090935050565b600080604083850312156111f1578182fd5b6111fa836110e2565b946020939093013593505050565b600060208284031215611219578081fd5b81518015158114610c70578182fd5b600060208284031215611239578081fd5b5035919050565b600060208284031215611251578081fd5b5051919050565b60609190911b6bffffffffffffffffffffffff1916815260140190565b6001600160a01b0391909116815260200190565b600060018060a01b03808816835260208188168185015286604085015260a06060850152855191508160a0850152825b828110156112d55786810182015185820160c0015281016112b9565b828111156112e6578360c084870101525b5050608083019390935250601f91909101601f19160160c001949350505050565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039390931683526020830191909152604082015260600190565b901515815260200190565b6001600160e01b031991909116815260200190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b602080825260149082015273141b185e525d195b4e881417d3919517d4d1539560621b604082015260600190565b60208082526014908201527310995d14995cdd5b1d0e881393d517d1561254d560621b604082015260600190565b602080825260149082015273506c61794974656d3a204e4f545f41435449564560601b604082015260600190565b602080825260139082015272506c61794974656d3a204e4f5f505f4e46545360681b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526019908201527f506c61794974656d3a20494e56414c49445f4144445245535300000000000000604082015260600190565b602080825260159082015274466163746f72793a205a45524f5f4144445245535360581b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b602080825260139082015272506c61794974656d3a204f4e4c595f4f4e434560681b604082015260600190565b90815260200190565b60008219821115611579576115796115b9565b500190565b6000600019821415611592576115926115b9565b5060010190565b6000826115b457634e487b7160e01b81526012600452602481fd5b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220da72d89c7e701d7f7ccd9f60e8e62e96986c1c310460422847dbec0b401b2d0b64736f6c634300080000330000000000000000000000000c0bd4fc0a9079f0d410d6cd952f1dd479f13344
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061014d5760003560e01c8063715018a6116100c357806393e84cd91161007c57806393e84cd91461025b5780639735d85d146102635780639e281a9814610276578063c0b044dc14610289578063f2fde38b1461029c578063ff6c9bc9146102af5761014d565b8063715018a6146102205780637fc278031461022857806382e78a89146102305780638802255f146102385780638a6b114b146102405780638da5cb5b146102535761014d565b8063446a37e011610115578063446a37e0146101c057806345767b53146101d35780634586d8f0146101e85780634e71d92d146101fb5780634f62e7961461020357806350a2ce931461020b5761014d565b8063150b7a021461015257806322f3e2d41461017b5780632c4a0875146101905780633626fa1a1461019a578063430c5141146101ad575b600080fd5b610165610160366004611113565b6102b7565b604051610172919061134c565b60405180910390f35b610183610309565b6040516101729190611341565b610198610319565b005b6101836101a83660046110f9565b610370565b6101986101bb3660046110f9565b610395565b6101836101ce3660046110f9565b61041c565b6101db61042d565b604051610172919061155d565b6101836101f63660046110f9565b610433565b610198610451565b61019861071b565b61021361076f565b6040516101729190611275565b61019861077e565b6101836107c9565b6101986107d9565b6101db61082d565b6101db61024e3660046111df565b610833565b610213610a7a565b610198610a89565b6101db6102713660046110f9565b610b91565b6101836102843660046111df565b610baf565b610198610297366004611228565b610c77565b6101986102aa3660046110f9565b610cbb565b610198610d2c565b60007f28fa6e16458f9c24aa59ddd4085264573006dbe30304837873c7deafc702b038858585855a6040516102f0959493929190611289565b60405180910390a150630a85bd0160e11b949350505050565b600154600160a01b900460ff1690565b610321610d7a565b6001600160a01b0316610332610a7a565b6001600160a01b0316146103615760405162461bcd60e51b81526004016103589061145e565b60405180910390fd5b6001805460ff60a01b19169055565b6001600160a01b03811660009081526004602052604090206003015460ff165b919050565b61039d610d7a565b6001600160a01b03166103ae610a7a565b6001600160a01b0316146103d45760405162461bcd60e51b81526004016103589061145e565b6001600160a01b0381166103fa5760405162461bcd60e51b8152600401610358906114ca565b600180546001600160a01b0319166001600160a01b0392909216919091179055565b600061042782610d7e565b92915050565b60025481565b6001600160a01b031660009081526004602052604090205460ff1690565b60055460ff166104735760405162461bcd60e51b8152600401610358906114f9565b6005805460ff191690556000610487610d7a565b6001600160a01b0381166000908152600460209081526040918290208251608081018452815460ff908116151580835260018401549483019490945260028301549482019490945260039091015490921615156060830152919250906104ff5760405162461bcd60e51b8152600401610358906113d5565b600154600160a81b900460ff166105285760405162461bcd60e51b815260040161035890611403565b600160009054906101000a90046001600160a01b03166001600160a01b0316630b29d0666040518163ffffffff1660e01b815260040160206040518083038186803b15801561057657600080fd5b505afa15801561058a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105ae9190611208565b6105ca5760405162461bcd60e51b815260040161035890611431565b8060600151156105ec5760405162461bcd60e51b8152600401610358906113a7565b6001600160a01b03821660009081526004602090815260408220600301805460ff19166001179055820151610622908490610ee9565b9050801561070957600154604051631c795e3760e21b81526000916001600160a01b0316906371e578dc9061065b908790600401611275565b602060405180830381600087803b15801561067557600080fd5b505af1158015610689573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106ad9190611240565b6001600160a01b038516600090815260046020526040908190206002015490519192507ffdc49939175858b2bb557093a7d52fa6b6f3aad917d282d61758fab4805f102a916106ff9187918590611320565b60405180910390a1505b50506005805460ff1916600117905550565b610723610d7a565b6001600160a01b0316610734610a7a565b6001600160a01b03161461075a5760405162461bcd60e51b81526004016103589061145e565b6001805460ff60a01b1916600160a01b179055565b6001546001600160a01b031681565b610786610d7a565b6001600160a01b0316610797610a7a565b6001600160a01b0316146107bd5760405162461bcd60e51b81526004016103589061145e565b6107c76000610f22565b565b600154600160a81b900460ff1690565b6107e1610d7a565b6001600160a01b03166107f2610a7a565b6001600160a01b0316146108185760405162461bcd60e51b81526004016103589061145e565b6001805460ff60a81b1916600160a81b179055565b60035481565b6001600160a01b03821660009081526004602090815260408083208151608081018352815460ff908116151580835260018401549583019590955260028301549382019390935260039091015490911615156060820152906108a75760405162461bcd60e51b8152600401610358906113d5565b82804060006108b7836001610f72565b60408051602080825281830190925291409250600091906020820181803683370190505090506000886040516020016108f09190611258565b604051602081830303815290604052905060005b600f8110156109845784610919826007611566565b6020811061093757634e487b7160e01b600052603260045260246000fd5b1a60f81b83828151811061095b57634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a9053508061097c8161157e565b915050610904565b50806007815181106109a657634e487b7160e01b600052603260045260246000fd5b602001015160f81c60f81b82600f815181106109d257634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535060105b6020811015610a6257838160208110610a1557634e487b7160e01b600052603260045260246000fd5b1a60f81b838281518110610a3957634e487b7160e01b600052603260045260246000fd5b60200101906001600160f81b031916908160001a90535080610a5a8161157e565b9150506109ec565b5050805160209091012060101c979650505050505050565b6000546001600160a01b031690565b610a91610f7e565b6040805160808101825260018152436020820152908101610ab06110c0565b81526020016000151581525060046000610ac8610d7a565b6001600160a01b0316815260208082019290925260409081016000208351815490151560ff1991821617825592840151600182015590830151600282015560609092015160039092018054921515929091169190911790557fdece058cd7cd2ee12f875b0ca3fd9ace3c14e4a2c65c283511fe8d09be688c48610b49610d7a565b60046000610b55610d7a565b6001600160a01b03166001600160a01b0316815260200190815260200160002060020154604051610b87929190611307565b60405180910390a1565b6001600160a01b031660009081526004602052604090206002015490565b6000610bb9610d7a565b6001600160a01b0316610bca610a7a565b6001600160a01b031614610bf05760405162461bcd60e51b81526004016103589061145e565b60405163a9059cbb60e01b81526001600160a01b0384169063a9059cbb90610c1e9033908690600401611307565b602060405180830381600087803b158015610c3857600080fd5b505af1158015610c4c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c709190611208565b9392505050565b610c7f610d7a565b6001600160a01b0316610c90610a7a565b6001600160a01b031614610cb65760405162461bcd60e51b81526004016103589061145e565b600255565b610cc3610d7a565b6001600160a01b0316610cd4610a7a565b6001600160a01b031614610cfa5760405162461bcd60e51b81526004016103589061145e565b6001600160a01b038116610d205760405162461bcd60e51b815260040161035890611361565b610d2981610f22565b50565b610d34610d7a565b6001600160a01b0316610d45610a7a565b6001600160a01b031614610d6b5760405162461bcd60e51b81526004016103589061145e565b6001805460ff60a81b19169055565b3390565b6001600160a01b03811660009081526004602090815260408083208151608081018352815460ff90811615158083526001840154958301959095526002830154938201939093526003909101549091161515606082015290610df25760405162461bcd60e51b8152600401610358906113d5565b600154600160a81b900460ff16610e1b5760405162461bcd60e51b815260040161035890611403565b600160009054906101000a90046001600160a01b03166001600160a01b0316630b29d0666040518163ffffffff1660e01b815260040160206040518083038186803b158015610e6957600080fd5b505afa158015610e7d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea19190611208565b610ebd5760405162461bcd60e51b815260040161035890611431565b806060015115610edf5760405162461bcd60e51b8152600401610358906113a7565b610c708382602001515b600080610ef68484610833565b600254909150610f0861271083611599565b1015610f18576001915050610427565b6000915050610427565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000610c708284611566565b600154600160a01b900460ff16610fa75760405162461bcd60e51b815260040161035890611403565b6000610fb1610d7a565b6001600160a01b03161415610fd85760405162461bcd60e51b815260040161035890611493565b60046000610fe4610d7a565b6001600160a01b0316815260208101919091526040016000205460ff161561101e5760405162461bcd60e51b815260040161035890611530565b600160009054906101000a90046001600160a01b03166001600160a01b0316630b29d0666040518163ffffffff1660e01b815260040160206040518083038186803b15801561106c57600080fd5b505afa158015611080573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110a49190611208565b6107c75760405162461bcd60e51b815260040161035890611431565b60006001600360008282546110d59190611566565b9091555050600354905090565b80356001600160a01b038116811461039057600080fd5b60006020828403121561110a578081fd5b610c70826110e2565b60008060008060808587031215611128578283fd5b611131856110e2565b935060206111408187016110e2565b935060408601359250606086013567ffffffffffffffff80821115611163578384fd5b818801915088601f830112611176578384fd5b813581811115611188576111886115cf565b604051601f8201601f19168101850183811182821017156111ab576111ab6115cf565b60405281815283820185018b10156111c1578586fd5b81858501868301379081019093019390935250939692955090935050565b600080604083850312156111f1578182fd5b6111fa836110e2565b946020939093013593505050565b600060208284031215611219578081fd5b81518015158114610c70578182fd5b600060208284031215611239578081fd5b5035919050565b600060208284031215611251578081fd5b5051919050565b60609190911b6bffffffffffffffffffffffff1916815260140190565b6001600160a01b0391909116815260200190565b600060018060a01b03808816835260208188168185015286604085015260a06060850152855191508160a0850152825b828110156112d55786810182015185820160c0015281016112b9565b828111156112e6578360c084870101525b5050608083019390935250601f91909101601f19160160c001949350505050565b6001600160a01b03929092168252602082015260400190565b6001600160a01b039390931683526020830191909152604082015260600190565b901515815260200190565b6001600160e01b031991909116815260200190565b60208082526026908201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160408201526564647265737360d01b606082015260800190565b602080825260149082015273141b185e525d195b4e881417d3919517d4d1539560621b604082015260600190565b60208082526014908201527310995d14995cdd5b1d0e881393d517d1561254d560621b604082015260600190565b602080825260149082015273506c61794974656d3a204e4f545f41435449564560601b604082015260600190565b602080825260139082015272506c61794974656d3a204e4f5f505f4e46545360681b604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526019908201527f506c61794974656d3a20494e56414c49445f4144445245535300000000000000604082015260600190565b602080825260159082015274466163746f72793a205a45524f5f4144445245535360581b604082015260600190565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b602080825260139082015272506c61794974656d3a204f4e4c595f4f4e434560681b604082015260600190565b90815260200190565b60008219821115611579576115796115b9565b500190565b6000600019821415611592576115926115b9565b5060010190565b6000826115b457634e487b7160e01b81526012600452602481fd5b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052604160045260246000fdfea2646970667358221220da72d89c7e701d7f7ccd9f60e8e62e96986c1c310460422847dbec0b401b2d0b64736f6c63430008000033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000c0bd4fc0a9079f0d410d6cd952f1dd479f13344
-----Decoded View---------------
Arg [0] : _PNFTToken (address): 0x0c0bD4fC0A9079F0d410D6cd952f1dD479F13344
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000000c0bd4fc0a9079f0d410d6cd952f1dd479f13344
Deployed Bytecode Sourcemap
64023:5148:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;63292:271;;;;;;:::i;:::-;;:::i;:::-;;;;;;;:::i;:::-;;;;;;;;65804:78;;;:::i;:::-;;;;;;;:::i;65443:70::-;;;:::i;:::-;;66227:115;;;;;;:::i;:::-;;:::i;65092:161::-;;;;;;:::i;:::-;;:::i;65690:106::-;;;;;;:::i;:::-;;:::i;64290:30::-;;;:::i;:::-;;;;;;;:::i;65984:111::-;;;;;;:::i;:::-;;:::i;66566:624::-;;;:::i;65362:73::-;;;:::i;64218:24::-;;;:::i;:::-;;;;;;;:::i;2616:105::-;;;:::i;65890:88::-;;;:::i;65521:78::-;;;:::i;64325:30::-;;;:::i;67507:705::-;;;;;;:::i;:::-;;:::i;1965:87::-;;;:::i;66350:208::-;;;:::i;66103:116::-;;;;;;:::i;:::-;;:::i;68890:155::-;;;;;;:::i;:::-;;:::i;65261:93::-;;;;;;:::i;:::-;;:::i;2876:203::-;;;;;;:::i;:::-;;:::i;65607:75::-;;;:::i;63292:271::-;63456:6;63480:50;63489:8;63499:4;63505:7;63514:4;63520:9;63480:50;;;;;;;;;;:::i;:::-;;;;;;;;-1:-1:-1;;;;;63292:271:0;-1:-1:-1;;;;63292:271:0:o;65804:78::-;65867:9;;-1:-1:-1;;;65867:9:0;;;;;65804:78::o;65443:70::-;2196:12;:10;:12::i;:::-;-1:-1:-1;;;;;2185:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2185:23:0;;2177:68;;;;-1:-1:-1;;;2177:68:0;;;;;;;:::i;:::-;;;;;;;;;65490:9:::1;:17:::0;;-1:-1:-1;;;;65490:17:0::1;::::0;;65443:70::o;66227:115::-;-1:-1:-1;;;;;66312:16:0;;66292:4;66312:16;;;:7;:16;;;;;:24;;;;;66227:115;;;;:::o;65092:161::-;2196:12;:10;:12::i;:::-;-1:-1:-1;;;;;2185:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2185:23:0;;2177:68;;;;-1:-1:-1;;;2177:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;65168:24:0;::::1;65160:58;;;::::0;-1:-1:-1;;;65160:58:0;;::::1;::::0;::::1;;;:::i;:::-;65225:9;:22:::0;;-1:-1:-1;;;;;;65225:22:0::1;-1:-1:-1::0;;;;;65225:22:0;;;::::1;::::0;;;::::1;::::0;;65092:161::o;65690:106::-;65749:4;65769:21;65782:7;65769:12;:21::i;:::-;65762:28;65690:106;-1:-1:-1;;65690:106:0:o;64290:30::-;;;;:::o;65984:111::-;-1:-1:-1;;;;;66067:16:0;66047:4;66067:16;;;:7;:16;;;;;:22;;;;65984:111::o;66566:624::-;64612:11;;;;64604:55;;;;-1:-1:-1;;;64604:55:0;;;;;;;:::i;:::-;64729:11;:19;;-1:-1:-1;;64729:19:0;;;-1:-1:-1;66629:12:0::1;:10;:12::i;:::-;-1:-1:-1::0;;;;;66678:15:0;::::1;66648:27;66678:15:::0;;;:7:::1;:15;::::0;;;;;;;;66648:45;;::::1;::::0;::::1;::::0;;;;::::1;::::0;;::::1;;;::::0;;;-1:-1:-1;66648:45:0;::::1;::::0;;;::::1;::::0;;;;::::1;::::0;::::1;::::0;;;;;;;;::::1;::::0;;::::1;::::0;;;::::1;;;::::0;;;;66678:15;;-1:-1:-1;66648:45:0;66700:52:::1;;;::::0;-1:-1:-1;;;66700:52:0;;::::1;::::0;::::1;;;:::i;:::-;66771:14;::::0;-1:-1:-1;;;66771:14:0;::::1;;;66763:47;;;::::0;-1:-1:-1;;;66763:47:0;;::::1;::::0;::::1;;;:::i;:::-;66831:9;::::0;66825:28:::1;::::0;;-1:-1:-1;;;66825:28:0;;;;-1:-1:-1;;;;;66831:9:0;;::::1;::::0;66825:26:::1;::::0;:28:::1;::::0;;::::1;::::0;::::1;::::0;;;;;;;;;66831:9;66825:28;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;66817:60;;;::::0;-1:-1:-1;;;66817:60:0;;::::1;::::0;::::1;;;:::i;:::-;66893:13;:21;;;66892:22;66884:55;;;::::0;-1:-1:-1;;;66884:55:0;;::::1;::::0;::::1;;;:::i;:::-;-1:-1:-1::0;;;;;66946:15:0;::::1;;::::0;;;:7:::1;:15;::::0;;;;;;:23:::1;;:30:::0;;-1:-1:-1;;66946:30:0::1;-1:-1:-1::0;66946:30:0::1;::::0;;67017:19;::::1;::::0;67000:37:::1;::::0;66946:15;;67000:8:::1;:37::i;:::-;66983:54;;67048:9;67044:142;;;67092:9;::::0;67086:32:::1;::::0;-1:-1:-1;;;67086:32:0;;67068:15:::1;::::0;-1:-1:-1;;;;;67092:9:0::1;::::0;67086:24:::1;::::0;:32:::1;::::0;67111:6;;67086:32:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;-1:-1:-1::0;;;;;67144:15:0;::::1;;::::0;;;:7:::1;:15;::::0;;;;;;:24:::1;;::::0;67132:46;;67068:50;;-1:-1:-1;67132:46:0::1;::::0;::::1;::::0;67144:15;;67068:50;;67132:46:::1;:::i;:::-;;;;;;;;67044:142;;-1:-1:-1::0;;64893:11:0;:18;;-1:-1:-1;;64893:18:0;64907:4;64893:18;;;-1:-1:-1;66566:624:0:o;65362:73::-;2196:12;:10;:12::i;:::-;-1:-1:-1;;;;;2185:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2185:23:0;;2177:68;;;;-1:-1:-1;;;2177:68:0;;;;;;;:::i;:::-;65425:4:::1;65413:16:::0;;-1:-1:-1;;;;65413:16:0::1;-1:-1:-1::0;;;65413:16:0::1;::::0;;65362:73::o;64218:24::-;;;-1:-1:-1;;;;;64218:24:0;;:::o;2616:105::-;2196:12;:10;:12::i;:::-;-1:-1:-1;;;;;2185:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2185:23:0;;2177:68;;;;-1:-1:-1;;;2177:68:0;;;;;;;:::i;:::-;2683:30:::1;2710:1;2683:18;:30::i;:::-;2616:105::o:0;65890:88::-;65958:14;;-1:-1:-1;;;65958:14:0;;;;;65890:88::o;65521:78::-;2196:12;:10;:12::i;:::-;-1:-1:-1;;;;;2185:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2185:23:0;;2177:68;;;;-1:-1:-1;;;2177:68:0;;;;;;;:::i;:::-;65589:4:::1;65572:21:::0;;-1:-1:-1;;;;65572:21:0::1;-1:-1:-1::0;;;65572:21:0::1;::::0;;65521:78::o;64325:30::-;;;;:::o;67507:705::-;-1:-1:-1;;;;;67621:16:0;;67577:7;67621:16;;;:7;:16;;;;;;;;67591:46;;;;;;;;;;;;;;;;;;-1:-1:-1;67591:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;67644:52;;;;-1:-1:-1;;;67644:52:0;;;;;;;:::i;:::-;67726:6;67760:20;;67706:17;67819:16;67726:6;67833:1;67819:13;:16::i;:::-;67869:13;;;67879:2;67869:13;;;;;;;;;67809:27;;;-1:-1:-1;67843:23:0;;67869:13;;;;;;;;;;;-1:-1:-1;67869:13:0;67843:39;;67889:19;67928:7;67911:25;;;;;;;;:::i;:::-;;;;;;;;;;;;;67889:47;;67950:9;67945:83;67969:2;67965:1;:6;67945:83;;;68003:10;68014:5;68018:1;68014;:5;:::i;:::-;68003:17;;;;;-1:-1:-1;;;68003:17:0;;;;;;;;;;;;67987:10;67998:1;67987:13;;;;;;-1:-1:-1;;;67987:13:0;;;;;;;;;-1:-1:-1;;;;;;67987:33:0;;;;;;;;;:13;;;:33;-1:-1:-1;67973:3:0;;;;:::i;:::-;;;;67945:83;;;;68053:6;68060:1;68053:9;;;;;;-1:-1:-1;;;68053:9:0;;;;;;;;;;;;;;;;;68036:10;68047:2;68036:14;;;;;;-1:-1:-1;;;68036:14:0;;;;;;;;;-1:-1:-1;;;;;;68036:26:0;;;;;;;;;:14;;;:26;-1:-1:-1;68092:2:0;68075:81;68100:2;68096:1;:6;68075:81;;;68134:11;68146:1;68134:14;;;;;-1:-1:-1;;;68134:14:0;;;;;;;;;;;;68118:10;68129:1;68118:13;;;;;;-1:-1:-1;;;68118:13:0;;;;;;;;;-1:-1:-1;;;;;;68118:30:0;;;;;;;;;:13;;;:30;-1:-1:-1;68104:3:0;;;;:::i;:::-;;;;68075:81;;;-1:-1:-1;;68176:23:0;;;;;;;68204:2;68171:35;;67507:705;-1:-1:-1;;;;;;;67507:705:0:o;1965:87::-;2011:7;2038:6;-1:-1:-1;;;;;2038:6:0;;1965:87::o;66350:208::-;66382:20;:18;:20::i;:::-;66433:52;;;;;;;;66440:4;66433:52;;66446:12;66433:52;;;;;;;66460:17;:15;:17::i;:::-;66433:52;;;;66479:5;66433:52;;;;;66409:7;:21;66417:12;:10;:12::i;:::-;-1:-1:-1;;;;;66409:21:0;;;;;;;;;;;;;;;-1:-1:-1;66409:21:0;:76;;;;;;;-1:-1:-1;;66409:76:0;;;;;;;;;;-1:-1:-1;66409:76:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;66497:55;66507:12;:10;:12::i;:::-;66521:7;:21;66529:12;:10;:12::i;:::-;-1:-1:-1;;;;;66521:21:0;;;;;;;;;;;;;;-1:-1:-1;66521:21:0;:30;;;66497:55;;;;;66521:30;66497:55;:::i;:::-;;;;;;;;66350:208::o;66103:116::-;-1:-1:-1;;;;;66188:16:0;66165:7;66188:16;;;:7;:16;;;;;:25;;;;66103:116::o;68890:155::-;68975:4;2196:12;:10;:12::i;:::-;-1:-1:-1;;;;;2185:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2185:23:0;;2177:68;;;;-1:-1:-1;;;2177:68:0;;;;;;;:::i;:::-;68995:44:::1;::::0;-1:-1:-1;;;68995:44:0;;-1:-1:-1;;;;;68995:23:0;::::1;::::0;-1:-1:-1;;68995:44:0::1;::::0;69019:10:::1;::::0;69031:7;;68995:44:::1;;;:::i;:::-;;;;;;;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;68988:51:::0;68890:155;-1:-1:-1;;;68890:155:0:o;65261:93::-;2196:12;:10;:12::i;:::-;-1:-1:-1;;;;;2185:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2185:23:0;;2177:68;;;;-1:-1:-1;;;2177:68:0;;;;;;;:::i;:::-;65328:8:::1;:20:::0;65261:93::o;2876:203::-;2196:12;:10;:12::i;:::-;-1:-1:-1;;;;;2185:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2185:23:0;;2177:68;;;;-1:-1:-1;;;2177:68:0;;;;;;;:::i;:::-;-1:-1:-1;;;;;2967:22:0;::::1;2959:73;;;::::0;-1:-1:-1;;;2959:73:0;;::::1;::::0;::::1;;;:::i;:::-;3043:28;3062:8;3043:18;:28::i;:::-;2876:203:::0;:::o;65607:75::-;2196:12;:10;:12::i;:::-;-1:-1:-1;;;;;2185:23:0;:7;:5;:7::i;:::-;-1:-1:-1;;;;;2185:23:0;;2177:68;;;;-1:-1:-1;;;2177:68:0;;;;;;;:::i;:::-;65654:14:::1;:22:::0;;-1:-1:-1;;;;65654:22:0::1;::::0;;65607:75::o;702:98::-;782:10;702:98;:::o;68220:430::-;-1:-1:-1;;;;;68324:16:0;;68281:4;68324:16;;;:7;:16;;;;;;;;68294:46;;;;;;;;;;;;;;;;;;-1:-1:-1;68294:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;68347:52;;;;-1:-1:-1;;;68347:52:0;;;;;;;:::i;:::-;68418:14;;-1:-1:-1;;;68418:14:0;;;;68410:47;;;;-1:-1:-1;;;68410:47:0;;;;;;;:::i;:::-;68478:9;;68472:28;;;-1:-1:-1;;;68472:28:0;;;;-1:-1:-1;;;;;68478:9:0;;;;68472:26;;:28;;;;;;;;;;;;;;;68478:9;68472:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;68464:60;;;;-1:-1:-1;;;68464:60:0;;;;;;;:::i;:::-;68540:13;:21;;;68539:22;68531:55;;;;-1:-1:-1;;;68531:55:0;;;;;;;:::i;:::-;68606:38;68615:7;68624:13;:19;;;68656:228;68729:4;68742:12;68757:23;68764:7;68773:6;68757;:23::i;:::-;68806:8;;68742:38;;-1:-1:-1;68791:12:0;68798:5;68742:38;68791:12;:::i;:::-;:23;68787:92;;;68832:4;68825:11;;;;;68787:92;68866:5;68859:12;;;;;3239:191;3313:16;3332:6;;-1:-1:-1;;;;;;3349:17:0;;-1:-1:-1;;;;;3349:17:0;;;;;;;;3382:40;;3332:6;;;3349:17;;3332:6;;3382:40;;;3239:191;;:::o;6286:98::-;6344:7;6371:5;6375:1;6371;:5;:::i;67198:303::-;67256:9;;-1:-1:-1;;;67256:9:0;;;;67248:42;;;;-1:-1:-1;;;67248:42:0;;;;;;;:::i;:::-;67329:1;67305:12;:10;:12::i;:::-;-1:-1:-1;;;;;67305:26:0;;;67297:64;;;;-1:-1:-1;;;67297:64:0;;;;;;;:::i;:::-;67377:7;:21;67385:12;:10;:12::i;:::-;-1:-1:-1;;;;;67377:21:0;;;;;;;;;;;;-1:-1:-1;67377:21:0;:27;;;67376:28;67368:60;;;;-1:-1:-1;;;67368:60:0;;;;;;;:::i;:::-;67449:9;;67443:28;;;-1:-1:-1;;;67443:28:0;;;;-1:-1:-1;;;;;67449:9:0;;;;67443:26;;:28;;;;;;;;;;;;;;;67449:9;67443:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;:::-;67435:60;;;;-1:-1:-1;;;67435:60:0;;;;;;;:::i;69053:115::-;69097:7;69132:1;69113:15;;:20;;;;;;;:::i;:::-;;;;-1:-1:-1;;69147:15:0;;;-1:-1:-1;69053:115:0;:::o;14:175:1:-;84:20;;-1:-1:-1;;;;;133:31:1;;123:42;;113:2;;179:1;176;169:12;194:198;;306:2;294:9;285:7;281:23;277:32;274:2;;;327:6;319;312:22;274:2;355:31;376:9;355:31;:::i;397:1178::-;;;;;569:3;557:9;548:7;544:23;540:33;537:2;;;591:6;583;576:22;537:2;619:31;640:9;619:31;:::i;:::-;609:41;;669:2;690:40;726:2;715:9;711:18;690:40;:::i;:::-;680:50;;777:2;766:9;762:18;749:32;739:42;;832:2;821:9;817:18;804:32;855:18;896:2;888:6;885:14;882:2;;;917:6;909;902:22;882:2;960:6;949:9;945:22;935:32;;1005:7;998:4;994:2;990:13;986:27;976:2;;1032:6;1024;1017:22;976:2;1073;1060:16;1095:2;1091;1088:10;1085:2;;;1101:18;;:::i;:::-;1150:2;1144:9;-1:-1:-1;;1219:2:1;1200:13;;1196:27;1184:40;;1180:49;;1264:22;;;1244:18;;;1241:46;1238:2;;;1290:18;;:::i;:::-;1326:2;1319:22;1350:18;;;1387:11;;;1383:20;;1380:33;-1:-1:-1;1377:2:1;;;1431:6;1423;1416:22;1377:2;1492;1487;1483;1479:11;1474:2;1466:6;1462:15;1449:46;1515:15;;;1511:24;;;1504:40;;;;-1:-1:-1;527:1048:1;;;;-1:-1:-1;527:1048:1;;-1:-1:-1;;527:1048:1:o;1580:266::-;;;1709:2;1697:9;1688:7;1684:23;1680:32;1677:2;;;1730:6;1722;1715:22;1677:2;1758:31;1779:9;1758:31;:::i;:::-;1748:41;1836:2;1821:18;;;;1808:32;;-1:-1:-1;;;1667:179:1:o;1851:297::-;;1971:2;1959:9;1950:7;1946:23;1942:32;1939:2;;;1992:6;1984;1977:22;1939:2;2029:9;2023:16;2082:5;2075:13;2068:21;2061:5;2058:32;2048:2;;2109:6;2101;2094:22;2153:190;;2265:2;2253:9;2244:7;2240:23;2236:32;2233:2;;;2286:6;2278;2271:22;2233:2;-1:-1:-1;2314:23:1;;2223:120;-1:-1:-1;2223:120:1:o;2348:194::-;;2471:2;2459:9;2450:7;2446:23;2442:32;2439:2;;;2492:6;2484;2477:22;2439:2;-1:-1:-1;2520:16:1;;2429:113;-1:-1:-1;2429:113:1:o;2547:229::-;2696:2;2692:15;;;;-1:-1:-1;;2688:53:1;2676:66;;2767:2;2758:12;;2666:110::o;2781:203::-;-1:-1:-1;;;;;2945:32:1;;;;2927:51;;2915:2;2900:18;;2882:102::o;2989:947::-;;3257:1;3253;3248:3;3244:11;3240:19;3298:2;3290:6;3286:15;3275:9;3268:34;3321:2;3371;3363:6;3359:15;3354:2;3343:9;3339:18;3332:43;3411:6;3406:2;3395:9;3391:18;3384:34;3454:3;3449:2;3438:9;3434:18;3427:31;3487:6;3481:13;3467:27;;3531:6;3525:3;3514:9;3510:19;3503:35;3556:4;3569:141;3583:6;3580:1;3577:13;3569:141;;;3679:14;;;3675:23;;3669:30;3644:17;;;3663:3;3640:27;3633:67;3598:10;;3569:141;;;3728:6;3725:1;3722:13;3719:2;;;3799:4;3793:3;3784:6;3773:9;3769:22;3765:32;3758:46;3719:2;-1:-1:-1;;3917:3:1;3902:19;;3895:35;;;;-1:-1:-1;3875:2:1;3854:15;;;;-1:-1:-1;;3850:29:1;3835:45;3882:3;3831:55;;3220:716;-1:-1:-1;;;;3220:716:1:o;3941:274::-;-1:-1:-1;;;;;4133:32:1;;;;4115:51;;4197:2;4182:18;;4175:34;4103:2;4088:18;;4070:145::o;4220:345::-;-1:-1:-1;;;;;4440:32:1;;;;4422:51;;4504:2;4489:18;;4482:34;;;;4547:2;4532:18;;4525:34;4410:2;4395:18;;4377:188::o;4570:187::-;4735:14;;4728:22;4710:41;;4698:2;4683:18;;4665:92::o;4762:202::-;-1:-1:-1;;;;;;4924:33:1;;;;4906:52;;4894:2;4879:18;;4861:103::o;4969:402::-;5171:2;5153:21;;;5210:2;5190:18;;;5183:30;5249:34;5244:2;5229:18;;5222:62;-1:-1:-1;;;5315:2:1;5300:18;;5293:36;5361:3;5346:19;;5143:228::o;5376:344::-;5578:2;5560:21;;;5617:2;5597:18;;;5590:30;-1:-1:-1;;;5651:2:1;5636:18;;5629:50;5711:2;5696:18;;5550:170::o;5725:344::-;5927:2;5909:21;;;5966:2;5946:18;;;5939:30;-1:-1:-1;;;6000:2:1;5985:18;;5978:50;6060:2;6045:18;;5899:170::o;6074:344::-;6276:2;6258:21;;;6315:2;6295:18;;;6288:30;-1:-1:-1;;;6349:2:1;6334:18;;6327:50;-1:-1:-1;6394:18:1;;6248:170::o;6423:343::-;6625:2;6607:21;;;6664:2;6644:18;;;6637:30;-1:-1:-1;;;6698:2:1;6683:18;;6676:49;6757:2;6742:18;;6597:169::o;6771:356::-;6973:2;6955:21;;;6992:18;;;6985:30;7051:34;7046:2;7031:18;;7024:62;7118:2;7103:18;;6945:182::o;7132:349::-;7334:2;7316:21;;;7373:2;7353:18;;;7346:30;7412:27;7407:2;7392:18;;7385:55;7472:2;7457:18;;7306:175::o;7486:345::-;7688:2;7670:21;;;7727:2;7707:18;;;7700:30;-1:-1:-1;;;7761:2:1;7746:18;;7739:51;7822:2;7807:18;;7660:171::o;7836:355::-;8038:2;8020:21;;;8077:2;8057:18;;;8050:30;8116:33;8111:2;8096:18;;8089:61;8182:2;8167:18;;8010:181::o;8196:343::-;8398:2;8380:21;;;8437:2;8417:18;;;8410:30;-1:-1:-1;;;8471:2:1;8456:18;;8449:49;8530:2;8515:18;;8370:169::o;8544:177::-;8690:25;;;8678:2;8663:18;;8645:76::o;8726:128::-;;8797:1;8793:6;8790:1;8787:13;8784:2;;;8803:18;;:::i;:::-;-1:-1:-1;8839:9:1;;8774:80::o;8859:135::-;;-1:-1:-1;;8919:17:1;;8916:2;;;8939:18;;:::i;:::-;-1:-1:-1;8986:1:1;8975:13;;8906:88::o;8999:209::-;;9057:1;9047:2;;-1:-1:-1;;;9082:31:1;;9136:4;9133:1;9126:15;9164:4;9082:31;9154:15;9047:2;-1:-1:-1;9193:9:1;;9037:171::o;9213:127::-;9274:10;9269:3;9265:20;9262:1;9255:31;9305:4;9302:1;9295:15;9329:4;9326:1;9319:15;9345:127;9406:10;9401:3;9397:20;9394:1;9387:31;9437:4;9434:1;9427:15;9461:4;9458:1;9451:15
Swarm Source
ipfs://da72d89c7e701d7f7ccd9f60e8e62e96986c1c310460422847dbec0b401b2d0b
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 27 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.