Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
IkaniV1_1
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; import { PausableUpgradeable } from "../deps/PausableUpgradeable.sol"; import { IIkaniV1_1 } from "./interfaces/IIkaniV1_1.sol"; import { IIkaniV1MetadataController } from "./interfaces/IIkaniV1MetadataController.sol"; import { ContractUriUpgradeable } from "./lib/ContractUriUpgradeable.sol"; import { ERC721SequentialUpgradeable } from "./lib/ERC721SequentialUpgradeable.sol"; import { PersonalSign } from "./lib/PersonalSign.sol"; import { WithdrawableUpgradeable } from "./lib/WithdrawableUpgradeable.sol"; /** * @title IkaniV1_1 * @author Cyborg Labs, LLC * * @notice The IKANI.AI ERC-721 NFT. */ contract IkaniV1_1 is ERC721SequentialUpgradeable, ContractUriUpgradeable, WithdrawableUpgradeable, PausableUpgradeable, IIkaniV1_1 { //---------------- Constants ----------------// uint256 public constant STARTING_INDEX_ADD_BLOCKS = 10; uint256 public immutable MAX_SUPPLY; // e.g. 8888 //---------------- Storage V1 ----------------// IIkaniV1MetadataController internal _METADATA_CONTROLLER_; address internal _MINT_SIGNER_; /// @dev The set of message digests signed and consumed for minting. mapping(bytes32 => bool) internal _USED_MINT_DIGESTS_; /// @dev DEPRECATED: Poem text and metadata by token ID. mapping(uint256 => bytes) internal __DEPRECATED_POEM_INFO_; /// @dev Series information by index. mapping(uint256 => IIkaniV1_1.Series) internal _SERIES_INFO_; /// @dev Index of the current series available for minting. uint256 internal _CURRENT_SERIES_INDEX_; //---------------- Storage V1_1 ----------------// /// @dev Poem text by token ID. mapping(uint256 => string) internal _POEM_TEXT_; /// @dev Metadata traits by token ID. mapping(uint256 => IIkaniV1_1.PoemTraits) internal _POEM_TRAITS_; //---------------- Constructor & Initializer ----------------// constructor( uint256 maxSupply ) initializer { MAX_SUPPLY = maxSupply; } //---------------- Owner-Only External Functions ----------------// function pause() external onlyOwner { _pause(); } function unpause() external onlyOwner { _unpause(); } function setContractUri( string memory contractUri ) external onlyOwner { _setContractUri(contractUri); } function setMetadataController( IIkaniV1MetadataController metadataController ) external onlyOwner { _METADATA_CONTROLLER_ = metadataController; } function setMintSigner( address mintSigner ) external onlyOwner { _MINT_SIGNER_ = mintSigner; } function setPoemText( uint256[] calldata tokenIds, string[] calldata poemText ) external onlyOwner { // Note: To save gas, we don't check that the token was minted; however, // the owner should only call this function with minted token IDs. uint256 n = tokenIds.length; require( poemText.length == n, "Params length mismatch" ); for (uint256 i = 0; i < n;) { _POEM_TEXT_[tokenIds[i]] = poemText[i]; unchecked { ++i; } } } function setPoemTraits( uint256[] calldata tokenIds, IIkaniV1_1.PoemTraits[] calldata poemTraits ) external onlyOwner { // Note: To save gas, we don't check that the token was minted; however, // the owner should only call this function with minted token IDs. uint256 n = tokenIds.length; require( poemTraits.length == n, "Params length mismatch" ); for (uint256 i = 0; i < n;) { uint256 tokenId = tokenIds[i]; IIkaniV1_1.PoemTraits memory traits = poemTraits[i]; require( traits.theme != IIkaniV1_1.Theme.NULL, "Theme cannot be null" ); require( traits.fabric != IIkaniV1_1.Fabric.NULL, "Fabric cannot be null" ); _POEM_TRAITS_[tokenId] = traits; emit FinishedPoem(tokenId); unchecked { ++i; } } } function setSeriesInfo( uint256 seriesIndex, string calldata name, bytes32 provenanceHash ) external onlyOwner { IIkaniV1_1.Series storage series = _SERIES_INFO_[seriesIndex]; series.name = name; series.provenanceHash = provenanceHash; emit SetSeriesInfo( seriesIndex, name, provenanceHash ); } function endCurrentSeries( uint256 poemCreationDeadline ) external onlyOwner { uint256 seriesIndex = _CURRENT_SERIES_INDEX_++; IIkaniV1_1.Series storage series = _SERIES_INFO_[seriesIndex]; uint256 maxTokenIdExclusive = getNextTokenId(); uint256 startingIndexBlockNumber = block.number + STARTING_INDEX_ADD_BLOCKS; series.poemCreationDeadline = poemCreationDeadline; series.maxTokenIdExclusive = maxTokenIdExclusive; series.startingIndexBlockNumber = startingIndexBlockNumber; emit EndedSeries( seriesIndex, poemCreationDeadline, maxTokenIdExclusive, startingIndexBlockNumber ); } function advancePoemCreationDeadline( uint256 seriesIndex, uint256 poemCreationDeadline ) external onlyOwner { IIkaniV1_1.Series storage series = _SERIES_INFO_[seriesIndex]; require( poemCreationDeadline > series.poemCreationDeadline, "Can only move the deadline forward" ); series.poemCreationDeadline = poemCreationDeadline; emit AdvancedPoemCreationDeadline( seriesIndex, poemCreationDeadline ); } function mintByOwner( address[] calldata recipients ) external onlyOwner { uint256 n = recipients.length; for (uint256 i = 0; i < n; i++) { // Note: Intentionally not using _safeMint(). _mint(recipients[i]); } require( getNextTokenId() <= MAX_SUPPLY, "Global max supply exceeded" ); } function expire( uint256 tokenId ) external onlyOwner { require( !isPoemFinished(tokenId), "Cannot expire a finished poem" ); uint256 seriesIndex = getPoemSeriesIndex(tokenId); IIkaniV1_1.Series storage series = _SERIES_INFO_[seriesIndex]; require( series.startingIndexBlockNumber != 0, "Series not ended" ); require( block.timestamp > series.poemCreationDeadline, "Token has not expired" ); _burn(tokenId); } function expireBatch( uint256[] calldata tokenIds, uint256 seriesIndex ) external onlyOwner { require( seriesIndex <= _CURRENT_SERIES_INDEX_, "Invalid series index" ); IIkaniV1_1.Series storage series = _SERIES_INFO_[seriesIndex]; require( series.startingIndexBlockNumber != 0, "Series not ended" ); require( block.timestamp > series.poemCreationDeadline, "Series has not expired" ); uint256 n = tokenIds.length; uint256 maxTokenIdExclusive = series.maxTokenIdExclusive; for (uint256 i = 0; i < n; i++) { require( tokenIds[i] < maxTokenIdExclusive, "Token ID not part of the series" ); } if (seriesIndex > 0) { uint256 startTokenId = _SERIES_INFO_[seriesIndex - 1].maxTokenIdExclusive; for (uint256 i = 0; i < n; i++) { require( tokenIds[i] >= startTokenId, "Token ID not part of the series" ); } } for (uint256 i = 0; i < n; i++) { require( !isPoemFinished(tokenIds[i]), "Cannot expire a finished poem" ); _burn(tokenIds[i]); } } //---------------- Other State-Changing External Functions ----------------// function mint( IIkaniV1_1.MintArgs calldata mintArgs, bytes calldata signature ) external payable whenNotPaused { require( mintArgs.seriesIndex == _CURRENT_SERIES_INDEX_, "Not the current series" ); require( msg.value == mintArgs.mintPrice, "Wrong msg.value" ); address sender = msg.sender; bytes memory message = abi.encode( sender, mintArgs ); bytes32 messageDigest = keccak256(message); // Only allow one mint per message/digest/signature. require( !_USED_MINT_DIGESTS_[messageDigest], "Mint digest already used" ); _USED_MINT_DIGESTS_[messageDigest] = true; // Note: Since the only signer is our admin, we don't need EIP-712. require( PersonalSign.isValidSignature(messageDigest, signature, _MINT_SIGNER_), "Invalid signature" ); // Note: Intentionally not using _safeMint(). uint256 tokenId = _mint(sender); require( tokenId < mintArgs.maxTokenIdExclusive, "Series max supply exceeded" ); require( tokenId < MAX_SUPPLY, "Global max supply exceeded" ); } function trySetSeriesStartingIndex( uint256 seriesIndex ) external whenNotPaused { IIkaniV1_1.Series storage series = _SERIES_INFO_[seriesIndex]; require( !series.startingIndexWasSet, "Starting index already set" ); uint256 targetBlockNumber = series.startingIndexBlockNumber; require( targetBlockNumber != 0, "Series not ended" ); require( block.number >= targetBlockNumber, "Starting index block not reached" ); // If the hash for the target block is not available, set a new block number and exit. if (block.number - targetBlockNumber > 256) { uint256 newStartingIndexBlockNumber = block.number + STARTING_INDEX_ADD_BLOCKS; series.startingIndexBlockNumber = newStartingIndexBlockNumber; emit ResetSeriesStartingIndexBlockNumber( seriesIndex, newStartingIndexBlockNumber ); return; } uint256 seriesSupply = getSeriesSupply(seriesIndex); uint256 startingIndex = uint256(blockhash(targetBlockNumber)) % seriesSupply; series.startingIndex = startingIndex; series.startingIndexWasSet = true; emit SetSeriesStartingIndex( seriesIndex, startingIndex ); } //---------------- View-Only External Functions ----------------// function getMetadataController() external view returns (IIkaniV1MetadataController) { return _METADATA_CONTROLLER_; } function getMintSigner() external view returns (address) { return _MINT_SIGNER_; } function isUsedMintDigest( bytes32 digest ) external view returns (bool) { return _USED_MINT_DIGESTS_[digest]; } function getSeriesInfo( uint256 seriesIndex ) external view returns (IIkaniV1_1.Series memory) { return _SERIES_INFO_[seriesIndex]; } function getCurrentSeriesIndex() external view returns (uint256) { return _CURRENT_SERIES_INDEX_; } function exists( uint256 tokenId ) external view returns (bool) { return _exists(tokenId); } //---------------- Public Functions ----------------// function getPoemSeriesIndex( uint256 tokenId ) public view returns (uint256) { uint256 currentSeriesIndex = _CURRENT_SERIES_INDEX_; uint256 seriesIndex; for (seriesIndex = 0; seriesIndex < currentSeriesIndex; seriesIndex++) { IIkaniV1_1.Series storage series = _SERIES_INFO_[seriesIndex]; if (tokenId < series.maxTokenIdExclusive) { break; } } return seriesIndex; } function getSeriesSupply( uint256 seriesIndex ) public view returns (uint256) { IIkaniV1_1.Series storage series = _SERIES_INFO_[seriesIndex]; require( series.startingIndexBlockNumber != 0, "Series not ended" ); uint256 maxTokenIdExclusive = series.maxTokenIdExclusive; if (seriesIndex == 0) { return maxTokenIdExclusive; } IIkaniV1_1.Series storage previousSeries = _SERIES_INFO_[seriesIndex - 1]; return maxTokenIdExclusive - previousSeries.maxTokenIdExclusive; } function getPoemText( uint256 tokenId ) public view returns (string memory) { return _POEM_TEXT_[tokenId]; } function getPoemTraits( uint256 tokenId ) public view returns (IIkaniV1_1.PoemTraits memory) { return _POEM_TRAITS_[tokenId]; } function isPoemFinished( uint256 tokenId ) public view returns (bool) { return _POEM_TRAITS_[tokenId].theme != IIkaniV1_1.Theme.NULL; } function tokenURI( uint256 tokenId ) public view override returns (string memory) { return _METADATA_CONTROLLER_.tokenURI(tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "./ContextUpgradeable.sol"; import "./Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; /** * @title IIkaniV1_1 * @author Cyborg Labs, LLC * * @notice Interface for the IkaniV1 ERC-721 NFT contract. */ interface IIkaniV1_1 { //---------------- Enums ----------------// enum Theme { NULL, SKY, OCEAN, MOUNTAIN, FLOWERS, TBA_THEME_5, TBA_THEME_6, TBA_THEME_7, TBA_THEME_8 } enum Season { NONE, SPRING, SUMMER, AUTUMN, WINTER } enum Fabric { NULL, KOYAMAKI, SEIGAIHA, NAMI, KUMO, TBA_FABRIC_5, TBA_FABRIC_6, TBA_FABRIC_7, TBA_FABRIC_8 } enum Foil { NONE, GOLD, PLATINUM, SUI_GENERIS } //---------------- Structs ----------------// /** * @notice The poem metadata traits. */ struct PoemTraits { Theme theme; Season season; Fabric fabric; Foil foil; } /** * @notice Information about a series within the collection. */ struct Series { string name; bytes32 provenanceHash; uint256 poemCreationDeadline; uint256 maxTokenIdExclusive; uint256 startingIndexBlockNumber; uint256 startingIndex; bool startingIndexWasSet; } /** * @notice Arguments to be signed by the mint authority to authorize a mint. */ struct MintArgs { uint256 seriesIndex; uint256 mintPrice; uint256 maxTokenIdExclusive; uint256 nonce; } //---------------- Events ----------------// event SetSeriesInfo( uint256 indexed seriesIndex, string name, bytes32 provenanceHash ); event EndedSeries( uint256 indexed seriesIndex, uint256 poemCreationDeadline, uint256 maxTokenIdExclusive, uint256 startingIndexBlockNumber ); event AdvancedPoemCreationDeadline( uint256 indexed seriesIndex, uint256 poemCreationDeadline ); event ResetSeriesStartingIndexBlockNumber( uint256 indexed seriesIndex, uint256 startingIndexBlockNumber ); event SetSeriesStartingIndex( uint256 indexed seriesIndex, uint256 startingIndex ); event FinishedPoem( uint256 indexed tokenId ); }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; /** * @title IIkaniV1MetadataController * @author Cyborg Labs, LLC * * @notice Interface for a contract that provides token metadata via tokenURI(). */ interface IIkaniV1MetadataController { function tokenURI( uint256 tokenId ) external view returns (string memory); }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; import { Initializable } from "../../deps/Initializable.sol"; /** * @title ContractUriUpgradeable * @author Cyborg Labs, LLC * * @dev Simple base contract supporting the contractURI() function used by OpenSea. */ abstract contract ContractUriUpgradeable is Initializable { string private _CONTRACT_URI_; uint256[49] private __gap; event SetContractUri( string contractUri ); function __ContractUri_init() internal onlyInitializing {} function __ContractUri_init_unchained() internal onlyInitializing {} function contractURI() external view returns (string memory) { return _CONTRACT_URI_; } function _setContractUri( string memory contractUri ) internal { _CONTRACT_URI_ = contractUri; emit SetContractUri(contractUri); } }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; import { ERC721Upgradeable } from "../../deps/ERC721Upgradeable.sol"; /** * @title ERC721SequentialUpgradeable * @author Cyborg Labs, LLC * * @dev Base contract for an ERC-721 that is minted sequentially. Supports totalSupply(). */ abstract contract ERC721SequentialUpgradeable is ERC721Upgradeable { uint256 internal _NEXT_TOKEN_ID_; uint256 internal _BURNED_COUNT_; uint256[48] private __gap; function __ERC721Sequential_init( string memory name, string memory symbol ) internal onlyInitializing { __ERC721_init(name, symbol); } function __ERC721Sequential_init_unchained() internal onlyInitializing {} function getNextTokenId() public view returns (uint256) { return _NEXT_TOKEN_ID_; } function getBurnedCount() public view returns (uint256) { return _BURNED_COUNT_; } function totalSupply() public view returns (uint256) { return _NEXT_TOKEN_ID_ - _BURNED_COUNT_; } function _mint( address recipient ) internal returns (uint256) { uint256 tokenId = _NEXT_TOKEN_ID_++; ERC721Upgradeable._mint(recipient, tokenId); return tokenId; } function _burn( uint256 tokenId ) internal override { _BURNED_COUNT_++; ERC721Upgradeable._burn(tokenId); } }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; /** * @title PersonalSign * @author Cyborg Labs, LLC * * @dev Helper function to verify messages signed with personal_sign. * * IMPORTANT: Use cases which require users to sign some data (i.e. most signing use cases) * should NOT use this. They should instead follow EIP-712, for security reasons. * * NOTE: For our puroses, we assume that the message is hashed before being signed. * The message length is therefore fixed at 32 bytes. * * Signing example using ethers.js: * * ``` * const encodedDataString = ethers.utils.defaultAbiCoder.encode( * [ * // types * ], * [ * // values * ], * ); * const encodedData = Buffer.from(encodedDataString.slice(2), "hex"); * const innerDigestString = ethers.utils.keccak256(encodedData); * const innerDigest = Buffer.from(innerDigestString.slice(2), "hex"); * const signature = await signer.signMessage(innerDigest); * ``` */ library PersonalSign { bytes constant private PERSONAL_SIGN_HEADER = "\x19Ethereum Signed Message:\n32"; function isValidSignature( bytes32 messageDigest, bytes memory signature, address expectedSigner ) internal pure returns (bool) { // Parse the signature into (v, r, s) components. require( signature.length == 65, "Bad signature length" ); uint8 v; bytes32 r; bytes32 s; assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } // Construct the digest hash which is signed within the `personal_sign` operation. bytes32 digest = keccak256( abi.encodePacked( PERSONAL_SIGN_HEADER, messageDigest ) ); // Check whether the recovered address is the required address. address recovered = ecrecover(digest, v, r, s); return recovered == expectedSigner; } function isValidSignature( bytes memory message, bytes memory signature, address expectedSigner ) internal pure returns (bool) { return isValidSignature( keccak256(message), signature, expectedSigner ); } }
// SPDX-License-Identifier: Apache-2.0 pragma solidity ^0.8.0; import { OwnableUpgradeable } from "../../deps/OwnableUpgradeable.sol"; /** * @title WithdrawableUpgradeable * @author Cyborg Labs, LLC * * @dev Supports ETH withdrawals by the owner. */ abstract contract WithdrawableUpgradeable is OwnableUpgradeable { event Withdrawal( address recipient, uint256 balance ); function __Withdrawable_init() internal onlyInitializing { __Ownable_init(); } function __Withdrawable_init_unchained() internal onlyInitializing {} function withdrawTo( address recipient ) external onlyOwner returns (uint256) { uint256 balance = address(this).balance; payable(recipient).transfer(balance); emit Withdrawal(recipient, balance); return balance; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "./Initializable.sol"; /** * @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 ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; import "./AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721Upgradeable.sol"; import "./IERC721ReceiverUpgradeable.sol"; import "./IERC721MetadataUpgradeable.sol"; import "./AddressUpgradeable.sol"; import "./ContextUpgradeable.sol"; import "./StringsUpgradeable.sol"; import "./ERC165Upgradeable.sol"; import "./Initializable.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721Upgradeable.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721Upgradeable.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721Upgradeable.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[44] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 IERC721ReceiverUpgradeable { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "./IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "./Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "./ContextUpgradeable.sol"; import "./Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
{ "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "berlin", "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"uint256","name":"maxSupply","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"seriesIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"poemCreationDeadline","type":"uint256"}],"name":"AdvancedPoemCreationDeadline","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"seriesIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"poemCreationDeadline","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"maxTokenIdExclusive","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startingIndexBlockNumber","type":"uint256"}],"name":"EndedSeries","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"FinishedPoem","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":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"seriesIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startingIndexBlockNumber","type":"uint256"}],"name":"ResetSeriesStartingIndexBlockNumber","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"contractUri","type":"string"}],"name":"SetContractUri","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"seriesIndex","type":"uint256"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"bytes32","name":"provenanceHash","type":"bytes32"}],"name":"SetSeriesInfo","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"seriesIndex","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"startingIndex","type":"uint256"}],"name":"SetSeriesStartingIndex","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"balance","type":"uint256"}],"name":"Withdrawal","type":"event"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"STARTING_INDEX_ADD_BLOCKS","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"seriesIndex","type":"uint256"},{"internalType":"uint256","name":"poemCreationDeadline","type":"uint256"}],"name":"advancePoemCreationDeadline","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"poemCreationDeadline","type":"uint256"}],"name":"endCurrentSeries","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"expire","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"uint256","name":"seriesIndex","type":"uint256"}],"name":"expireBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBurnedCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentSeriesIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMetadataController","outputs":[{"internalType":"contract IIkaniV1MetadataController","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMintSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNextTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getPoemSeriesIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getPoemText","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getPoemTraits","outputs":[{"components":[{"internalType":"enum IIkaniV1_1.Theme","name":"theme","type":"uint8"},{"internalType":"enum IIkaniV1_1.Season","name":"season","type":"uint8"},{"internalType":"enum IIkaniV1_1.Fabric","name":"fabric","type":"uint8"},{"internalType":"enum IIkaniV1_1.Foil","name":"foil","type":"uint8"}],"internalType":"struct IIkaniV1_1.PoemTraits","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"seriesIndex","type":"uint256"}],"name":"getSeriesInfo","outputs":[{"components":[{"internalType":"string","name":"name","type":"string"},{"internalType":"bytes32","name":"provenanceHash","type":"bytes32"},{"internalType":"uint256","name":"poemCreationDeadline","type":"uint256"},{"internalType":"uint256","name":"maxTokenIdExclusive","type":"uint256"},{"internalType":"uint256","name":"startingIndexBlockNumber","type":"uint256"},{"internalType":"uint256","name":"startingIndex","type":"uint256"},{"internalType":"bool","name":"startingIndexWasSet","type":"bool"}],"internalType":"struct IIkaniV1_1.Series","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"seriesIndex","type":"uint256"}],"name":"getSeriesSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"isPoemFinished","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"digest","type":"bytes32"}],"name":"isUsedMintDigest","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"seriesIndex","type":"uint256"},{"internalType":"uint256","name":"mintPrice","type":"uint256"},{"internalType":"uint256","name":"maxTokenIdExclusive","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"}],"internalType":"struct IIkaniV1_1.MintArgs","name":"mintArgs","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address[]","name":"recipients","type":"address[]"}],"name":"mintByOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"contractUri","type":"string"}],"name":"setContractUri","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IIkaniV1MetadataController","name":"metadataController","type":"address"}],"name":"setMetadataController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"mintSigner","type":"address"}],"name":"setMintSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"string[]","name":"poemText","type":"string[]"}],"name":"setPoemText","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"components":[{"internalType":"enum IIkaniV1_1.Theme","name":"theme","type":"uint8"},{"internalType":"enum IIkaniV1_1.Season","name":"season","type":"uint8"},{"internalType":"enum IIkaniV1_1.Fabric","name":"fabric","type":"uint8"},{"internalType":"enum IIkaniV1_1.Foil","name":"foil","type":"uint8"}],"internalType":"struct IIkaniV1_1.PoemTraits[]","name":"poemTraits","type":"tuple[]"}],"name":"setPoemTraits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"seriesIndex","type":"uint256"},{"internalType":"string","name":"name","type":"string"},{"internalType":"bytes32","name":"provenanceHash","type":"bytes32"}],"name":"setSeriesInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"seriesIndex","type":"uint256"}],"name":"trySetSeriesStartingIndex","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"withdrawTo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b5060405162003b9638038062003b96833981016040819052620000349162000133565b600054610100900460ff16620000515760005460ff16156200005b565b6200005b62000106565b620000c35760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff16158015620000e6576000805461ffff19166101011790555b60808290528015620000fe576000805461ff00191690555b50506200014d565b60006200011e306200012460201b620023cc1760201c565b15905090565b6001600160a01b03163b151590565b6000602082840312156200014657600080fd5b5051919050565b608051613a1f62000177600039600081816104540152818161105601526122720152613a1f6000f3fe6080604052600436106102c95760003560e01c8063715018a611610175578063bf81bf43116100dc578063e84a972811610095578063ebb3a6821161006f578063ebb3a682146108b1578063f2fde38b146108d0578063fb4d81fc146108f0578063ff95bca81461091057600080fd5b8063e84a972814610833578063e8a3d48514610853578063e985e9c51461086857600080fd5b8063bf81bf4314610789578063c87b56dd146107a9578063caa0f92a146107c9578063cbfdb482146107de578063ccb4807b146107f3578063cce014061461081357600080fd5b806395d89b411161012e57806395d89b41146106ce5780639cae668c146106e3578063a22cb46514610714578063a4f359be14610734578063b0fc77ff14610754578063b88d4fde1461076957600080fd5b8063715018a6146106275780637277beca1461063c57806372b0d90c1461065c57806373e996531461067c5780638456cb591461069b5780638da5cb5b146106b057600080fd5b806342842e0e116102345780635aa464c6116101ed578063616eb255116101c7578063616eb2551461059a5780636352211e146105c75780636fc11022146105e757806370a082311461060757600080fd5b80635aa464c6146105415780635c975abb146105615780635f429f811461057a57600080fd5b806342842e0e1461048b57806344d76d93146104ab578063450f53d2146104cb5780634a344a79146104eb5780634f558e791461050157806350090ea81461052157600080fd5b80630ef8fb2e116102865780630ef8fb2e146103cd57806318160ddd146103e057806323b872dd146103f5578063269f5cb91461041557806332cb6b0c146104425780633f4ba83a1461047657600080fd5b806301ffc9a7146102ce57806305dd7ffb1461030357806306fdde03146103315780630797f88b14610353578063081812fc14610375578063095ea7b3146103ad575b600080fd5b3480156102da57600080fd5b506102ee6102e9366004612ef3565b610930565b60405190151581526020015b60405180910390f35b34801561030f57600080fd5b5061032361031e366004612f10565b610982565b6040519081526020016102fa565b34801561033d57600080fd5b506103466109ce565b6040516102fa9190612f81565b34801561035f57600080fd5b5061037361036e366004612f10565b610a60565b005b34801561038157600080fd5b50610395610390366004612f10565b610c3f565b6040516001600160a01b0390911681526020016102fa565b3480156103b957600080fd5b506103736103c8366004612fa9565b610cd4565b6103736103db36600461301d565b610dea565b3480156103ec57600080fd5b506103236110cc565b34801561040157600080fd5b50610373610410366004613077565b6110e3565b34801561042157600080fd5b50610435610430366004612f10565b611114565b6040516102fa91906130de565b34801561044e57600080fd5b506103237f000000000000000000000000000000000000000000000000000000000000000081565b34801561048257600080fd5b5061037361122a565b34801561049757600080fd5b506103736104a6366004613077565b61125e565b3480156104b757600080fd5b506103736104c636600461313f565b611279565b3480156104d757600080fd5b506103236104e6366004612f10565b6112c6565b3480156104f757600080fd5b5061016454610323565b34801561050d57600080fd5b506102ee61051c366004612f10565b611341565b34801561052d57600080fd5b5061037361053c36600461315c565b611360565b34801561054d57600080fd5b506102ee61055c366004612f10565b6113e2565b34801561056d57600080fd5b5061012d5460ff166102ee565b34801561058657600080fd5b50610346610595366004612f10565b611411565b3480156105a657600080fd5b506105ba6105b5366004612f10565b6114b4565b6040516102fa91906131ae565b3480156105d357600080fd5b506103956105e2366004612f10565b6115ec565b3480156105f357600080fd5b50610373610602366004613259565b611663565b34801561061357600080fd5b5061032361062236600461313f565b6118d5565b34801561063357600080fd5b5061037361195c565b34801561064857600080fd5b506103736106573660046132f2565b611990565b34801561066857600080fd5b5061032361067736600461313f565b611c6b565b34801561068857600080fd5b50610160546001600160a01b0316610395565b3480156106a757600080fd5b50610373611d19565b3480156106bc57600080fd5b5060fb546001600160a01b0316610395565b3480156106da57600080fd5b50610346611d4b565b3480156106ef57600080fd5b506102ee6106fe366004612f10565b6000908152610161602052604090205460ff1690565b34801561072057600080fd5b5061037361072f36600461333d565b611d5a565b34801561074057600080fd5b5061037361074f36600461337b565b611d69565b34801561076057600080fd5b50609854610323565b34801561077557600080fd5b50610373610784366004613448565b611e41565b34801561079557600080fd5b506103736107a4366004612f10565b611e79565b3480156107b557600080fd5b506103466107c4366004612f10565b611f8c565b3480156107d557600080fd5b50609754610323565b3480156107ea57600080fd5b50610323600a81565b3480156107ff57600080fd5b5061037361080e3660046134c7565b61200e565b34801561081f57600080fd5b5061037361082e366004612f10565b612041565b34801561083f57600080fd5b5061037361084e36600461313f565b612103565b34801561085f57600080fd5b50610346612150565b34801561087457600080fd5b506102ee61088336600461350f565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b3480156108bd57600080fd5b5061015f546001600160a01b0316610395565b3480156108dc57600080fd5b506103736108eb36600461313f565b61215f565b3480156108fc57600080fd5b5061037361090b36600461353d565b6121f7565b34801561091c57600080fd5b5061037361092b36600461357e565b6122e8565b60006001600160e01b031982166380ac58cd60e01b148061096157506001600160e01b03198216635b5e139f60e01b145b8061097c57506301ffc9a760e01b6001600160e01b03198316145b92915050565b61016454600090815b818110156109c75760008181526101636020526040902060038101548510156109b457506109c7565b50806109bf816135ff565b91505061098b565b9392505050565b6060606580546109dd9061361a565b80601f0160208091040260200160405190810160405280929190818152602001828054610a099061361a565b8015610a565780601f10610a2b57610100808354040283529160200191610a56565b820191906000526020600020905b815481529060010190602001808311610a3957829003601f168201915b5050505050905090565b61012d5460ff1615610a8d5760405162461bcd60e51b8152600401610a8490613655565b60405180910390fd5b600081815261016360205260409020600681015460ff1615610af15760405162461bcd60e51b815260206004820152601a60248201527f5374617274696e6720696e64657820616c7265616479207365740000000000006044820152606401610a84565b600481015480610b135760405162461bcd60e51b8152600401610a849061367f565b80431015610b635760405162461bcd60e51b815260206004820181905260248201527f5374617274696e6720696e64657820626c6f636b206e6f7420726561636865646044820152606401610a84565b610100610b7082436136a9565b1115610bc8576000610b83600a436136c0565b6004840181905560405181815290915084907f5807bcf904312e5c2a005c1037eb781ea23ebff31da8672f732107e7005a7ce79060200160405180910390a250505050565b6000610bd3846112c6565b90506000610be28284406136d8565b6005850181905560068501805460ff1916600117905560405190915085907ff3419c3109e1f0182075e465873bc785265e39e1b3881470c7a1f124a064dbf690610c2f9084815260200190565b60405180910390a2505050505b50565b6000818152606760205260408120546001600160a01b0316610cb85760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a84565b506000908152606960205260409020546001600160a01b031690565b6000610cdf826115ec565b9050806001600160a01b0316836001600160a01b03161415610d4d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a84565b336001600160a01b0382161480610d695750610d698133610883565b610ddb5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a84565b610de583836123db565b505050565b61012d5460ff1615610e0e5760405162461bcd60e51b8152600401610a8490613655565b61016454833514610e5a5760405162461bcd60e51b81526020600482015260166024820152754e6f74207468652063757272656e742073657269657360501b6044820152606401610a84565b82602001353414610e9f5760405162461bcd60e51b815260206004820152600f60248201526e57726f6e67206d73672e76616c756560881b6044820152606401610a84565b604080513360208083018290528635838501528681013560608085019190915287850135608085015287013560a0808501919091528451808503909101815260c0909301845282518382012060008181526101619092529390205490929060ff1615610f4d5760405162461bcd60e51b815260206004820152601860248201527f4d696e742064696765737420616c7265616479207573656400000000000000006044820152606401610a84565b60008181526101616020908152604091829020805460ff191660011790558151601f8701829004820281018201909252858252610fb4918391889088908190840183828082843760009201919091525050610160546001600160a01b031691506124499050565b610ff45760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610a84565b6000610fff84612580565b9050866040013581106110545760405162461bcd60e51b815260206004820152601a60248201527f536572696573206d617820737570706c792065786365656465640000000000006044820152606401610a84565b7f000000000000000000000000000000000000000000000000000000000000000081106110c35760405162461bcd60e51b815260206004820152601a60248201527f476c6f62616c206d617820737570706c792065786365656465640000000000006044820152606401610a84565b50505050505050565b60006098546097546110de91906136a9565b905090565b6110ed33826125a4565b6111095760405162461bcd60e51b8152600401610a84906136fa565b610de583838361269b565b61113f6040805160808101909152806000815260200160008152602001600081526020016000905290565b60008281526101666020526040908190208151608081019092528054829060ff166008811115611171576111716130b8565b6008811115611182576111826130b8565b81528154602090910190610100900460ff1660048111156111a5576111a56130b8565b60048111156111b6576111b66130b8565b8152815460209091019062010000900460ff1660088111156111da576111da6130b8565b60088111156111eb576111eb6130b8565b815281546020909101906301000000900460ff166003811115611210576112106130b8565b6003811115611221576112216130b8565b90525092915050565b60fb546001600160a01b031633146112545760405162461bcd60e51b8152600401610a849061374b565b61125c612837565b565b610de583838360405180602001604052806000815250611e41565b60fb546001600160a01b031633146112a35760405162461bcd60e51b8152600401610a849061374b565b61015f80546001600160a01b0319166001600160a01b0392909216919091179055565b60008181526101636020526040812060048101546112f65760405162461bcd60e51b8152600401610a849061367f565b600381015483611307579392505050565b6000610163816113186001886136a9565b8152602001908152602001600020905080600301548261133891906136a9565b95945050505050565b6000818152606760205260408120546001600160a01b0316151561097c565b60fb546001600160a01b0316331461138a5760405162461bcd60e51b8152600401610a849061374b565b6000848152610163602052604090206113a4818585612dd0565b50818160010181905550847f93fd3282dfea150b3f1cd6058f255f4f3d61fba5f14a9c922ca755c84afbdb0e858585604051610c2f93929190613780565b6000806000838152610166602052604090205460ff166008811115611409576114096130b8565b141592915050565b60008181526101656020526040902080546060919061142f9061361a565b80601f016020809104026020016040519081016040528092919081815260200182805461145b9061361a565b80156114a85780601f1061147d576101008083540402835291602001916114a8565b820191906000526020600020905b81548152906001019060200180831161148b57829003601f168201915b50505050509050919050565b6114f96040518060e001604052806060815260200160008019168152602001600081526020016000815260200160008152602001600081526020016000151581525090565b6000828152610163602052604090819020815160e081019092528054829082906115229061361a565b80601f016020809104026020016040519081016040528092919081815260200182805461154e9061361a565b801561159b5780601f106115705761010080835404028352916020019161159b565b820191906000526020600020905b81548152906001019060200180831161157e57829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a082015260069091015460ff16151560c09091015292915050565b6000818152606760205260408120546001600160a01b03168061097c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a84565b60fb546001600160a01b0316331461168d5760405162461bcd60e51b8152600401610a849061374b565b828181146116d65760405162461bcd60e51b81526020600482015260166024820152750a0c2e4c2dae640d8cadccee8d040dad2e6dac2e8c6d60531b6044820152606401610a84565b60005b818110156118cd5760008686838181106116f5576116f56137b9565b9050602002013590506000858584818110611712576117126137b9565b90506080020180360381019061172891906137dc565b905060008151600881111561173f5761173f6130b8565b14156117845760405162461bcd60e51b8152602060048201526014602482015273151a195b594818d85b9b9bdd081899481b9d5b1b60621b6044820152606401610a84565b60008160400151600881111561179c5761179c6130b8565b14156117e25760405162461bcd60e51b81526020600482015260156024820152741198589c9a58c818d85b9b9bdd081899481b9d5b1b605a1b6044820152606401610a84565b6000828152610166602052604090208151815483929190829060ff19166001836008811115611813576118136130b8565b021790555060208201518154829061ff00191661010083600481111561183b5761183b6130b8565b021790555060408201518154829062ff0000191662010000836008811115611865576118656130b8565b021790555060608201518154829063ff00000019166301000000836003811115611891576118916130b8565b0217905550506040518391507f7391db9d22dc83fb42a3a98ee967dfbcf6586517d40aec1e1245201d6a5e4a5690600090a250506001016116d9565b505050505050565b60006001600160a01b0382166119405760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a84565b506001600160a01b031660009081526068602052604090205490565b60fb546001600160a01b031633146119865760405162461bcd60e51b8152600401610a849061374b565b61125c60006128cc565b60fb546001600160a01b031633146119ba5760405162461bcd60e51b8152600401610a849061374b565b61016454811115611a045760405162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c840e6cae4d2cae640d2dcc8caf60631b6044820152606401610a84565b6000818152610163602052604090206004810154611a345760405162461bcd60e51b8152600401610a849061367f565b80600201544211611a805760405162461bcd60e51b815260206004820152601660248201527514d95c9a595cc81a185cc81b9bdd08195e1c1a5c995960521b6044820152606401610a84565b6003810154839060005b82811015611b0b5781878783818110611aa557611aa56137b9565b9050602002013510611af95760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e204944206e6f742070617274206f662074686520736572696573006044820152606401610a84565b80611b03816135ff565b915050611a8a565b508315611bbf57600061016381611b236001886136a9565b815260200190815260200160002060030154905060005b83811015611bbc5781888883818110611b5557611b556137b9565b905060200201351015611baa5760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e204944206e6f742070617274206f662074686520736572696573006044820152606401610a84565b80611bb4816135ff565b915050611b3a565b50505b60005b828110156110c357611beb878783818110611bdf57611bdf6137b9565b905060200201356113e2565b15611c385760405162461bcd60e51b815260206004820152601d60248201527f43616e6e6f742065787069726520612066696e697368656420706f656d0000006044820152606401610a84565b611c59878783818110611c4d57611c4d6137b9565b9050602002013561291e565b80611c63816135ff565b915050611bc2565b60fb546000906001600160a01b03163314611c985760405162461bcd60e51b8152600401610a849061374b565b60405147906001600160a01b0384169082156108fc029083906000818181858888f19350505050158015611cd0573d6000803e3d6000fd5b50604080516001600160a01b0385168152602081018390527f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65910160405180910390a192915050565b60fb546001600160a01b03163314611d435760405162461bcd60e51b8152600401610a849061374b565b61125c61293c565b6060606680546109dd9061361a565b611d65338383612996565b5050565b60fb546001600160a01b03163314611d935760405162461bcd60e51b8152600401610a849061374b565b60008281526101636020526040902060028101548211611e005760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c79206d6f76652074686520646561646c696e6520666f7277616044820152611c9960f21b6064820152608401610a84565b6002810182905560405182815283907f76df3c72ee4713481bfc89a7216c119ee4cd3d3eabdae88fb9b1a8ecaf14588b9060200160405180910390a2505050565b611e4b33836125a4565b611e675760405162461bcd60e51b8152600401610a84906136fa565b611e7384848484612a65565b50505050565b60fb546001600160a01b03163314611ea35760405162461bcd60e51b8152600401610a849061374b565b611eac816113e2565b15611ef95760405162461bcd60e51b815260206004820152601d60248201527f43616e6e6f742065787069726520612066696e697368656420706f656d0000006044820152606401610a84565b6000611f0482610982565b600081815261016360205260409020600481015491925090611f385760405162461bcd60e51b8152600401610a849061367f565b80600201544211611f835760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881a185cc81b9bdd08195e1c1a5c9959605a1b6044820152606401610a84565b610de58361291e565b61015f5460405163c87b56dd60e01b8152600481018390526060916001600160a01b03169063c87b56dd9060240160006040518083038186803b158015611fd257600080fd5b505afa158015611fe6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261097c9190810190613868565b60fb546001600160a01b031633146120385760405162461bcd60e51b8152600401610a849061374b565b610c3c81612a98565b60fb546001600160a01b0316331461206b5760405162461bcd60e51b8152600401610a849061374b565b61016480546000918261207d836135ff565b9091555060008181526101636020526040812091925061209c60975490565b905060006120ab600a436136c0565b600284018690556003840183905560048401819055604080518781526020810185905290810182905290915084907fc3f8e8a27040de6cd1a99b2a08d8370d065da37f5cc59c63b4f900e5e38e998490606001610c2f565b60fb546001600160a01b0316331461212d5760405162461bcd60e51b8152600401610a849061374b565b61016080546001600160a01b0319166001600160a01b0392909216919091179055565b606060c980546109dd9061361a565b60fb546001600160a01b031633146121895760405162461bcd60e51b8152600401610a849061374b565b6001600160a01b0381166121ee5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a84565b610c3c816128cc565b60fb546001600160a01b031633146122215760405162461bcd60e51b8152600401610a849061374b565b8060005b8181101561226f5761225c848483818110612242576122426137b9565b9050602002016020810190612257919061313f565b612580565b5080612267816135ff565b915050612225565b507f000000000000000000000000000000000000000000000000000000000000000061229a60975490565b1115610de55760405162461bcd60e51b815260206004820152601a60248201527f476c6f62616c206d617820737570706c792065786365656465640000000000006044820152606401610a84565b60fb546001600160a01b031633146123125760405162461bcd60e51b8152600401610a849061374b565b8281811461235b5760405162461bcd60e51b81526020600482015260166024820152750a0c2e4c2dae640d8cadccee8d040dad2e6dac2e8c6d60531b6044820152606401610a84565b60005b818110156118cd57838382818110612378576123786137b9565b905060200281019061238a91906138d5565b61016560008989868181106123a1576123a16137b9565b90506020020135815260200190815260200160002091906123c3929190612dd0565b5060010161235e565b6001600160a01b03163b151590565b600081815260696020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612410826115ec565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600082516041146124935760405162461bcd60e51b8152602060048201526014602482015273084c2c840e6d2cedcc2e8eae4ca40d8cadccee8d60631b6044820152606401610a84565b602083810151604080860151606087015182518084018452601c81527f19457468657265756d205369676e6564204d6573736167653a0a333200000000818701529251600091821a95929391926124ed92918b910161391b565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015612558573d6000803e3d6000fd5b5050604051601f1901516001600160a01b039081169089161496505050505050509392505050565b6097805460009182919082612594836135ff565b91905055905061097c8382612ae6565b6000818152606760205260408120546001600160a01b031661261d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a84565b6000612628836115ec565b9050806001600160a01b0316846001600160a01b031614806126635750836001600160a01b031661265884610c3f565b6001600160a01b0316145b8061269357506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b03166126ae826115ec565b6001600160a01b0316146127125760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610a84565b6001600160a01b0382166127745760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a84565b61277f6000826123db565b6001600160a01b03831660009081526068602052604081208054600192906127a89084906136a9565b90915550506001600160a01b03821660009081526068602052604081208054600192906127d69084906136c0565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b61012d5460ff166128815760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a84565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60fb80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6098805490600061292e836135ff565b9190505550610c3c81612c28565b61012d5460ff16156129605760405162461bcd60e51b8152600401610a8490613655565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586128af3390565b816001600160a01b0316836001600160a01b031614156129f85760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a84565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612a7084848461269b565b612a7c84848484612cc3565b611e735760405162461bcd60e51b8152600401610a849061393d565b8051612aab9060c9906020840190612e54565b507f327e598ddafdfdc05677b3a9b2a050a730de4658ffb77bd4699c6eeac6cf70ed81604051612adb9190612f81565b60405180910390a150565b6001600160a01b038216612b3c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a84565b6000818152606760205260409020546001600160a01b031615612ba15760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a84565b6001600160a01b0382166000908152606860205260408120805460019290612bca9084906136c0565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000612c33826115ec565b9050612c406000836123db565b6001600160a01b0381166000908152606860205260408120805460019290612c699084906136a9565b909155505060008281526067602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006001600160a01b0384163b15612dc557604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612d0790339089908890889060040161398f565b602060405180830381600087803b158015612d2157600080fd5b505af1925050508015612d51575060408051601f3d908101601f19168201909252612d4e918101906139cc565b60015b612dab573d808015612d7f576040519150601f19603f3d011682016040523d82523d6000602084013e612d84565b606091505b508051612da35760405162461bcd60e51b8152600401610a849061393d565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612693565b506001949350505050565b828054612ddc9061361a565b90600052602060002090601f016020900481019282612dfe5760008555612e44565b82601f10612e175782800160ff19823516178555612e44565b82800160010185558215612e44579182015b82811115612e44578235825591602001919060010190612e29565b50612e50929150612ec8565b5090565b828054612e609061361a565b90600052602060002090601f016020900481019282612e825760008555612e44565b82601f10612e9b57805160ff1916838001178555612e44565b82800160010185558215612e44579182015b82811115612e44578251825591602001919060010190612ead565b5b80821115612e505760008155600101612ec9565b6001600160e01b031981168114610c3c57600080fd5b600060208284031215612f0557600080fd5b81356109c781612edd565b600060208284031215612f2257600080fd5b5035919050565b60005b83811015612f44578181015183820152602001612f2c565b83811115611e735750506000910152565b60008151808452612f6d816020860160208601612f29565b601f01601f19169290920160200192915050565b6020815260006109c76020830184612f55565b6001600160a01b0381168114610c3c57600080fd5b60008060408385031215612fbc57600080fd5b8235612fc781612f94565b946020939093013593505050565b60008083601f840112612fe757600080fd5b5081356001600160401b03811115612ffe57600080fd5b60208301915083602082850101111561301657600080fd5b9250929050565b600080600083850360a081121561303357600080fd5b608081121561304157600080fd5b5083925060808401356001600160401b0381111561305e57600080fd5b61306a86828701612fd5565b9497909650939450505050565b60008060006060848603121561308c57600080fd5b833561309781612f94565b925060208401356130a781612f94565b929592945050506040919091013590565b634e487b7160e01b600052602160045260246000fd5b60098110610c3c57610c3c6130b8565b815160808201906130ee816130ce565b8252602083015160058110613105576131056130b8565b60208301526040830151613118816130ce565b6040830152606083015160048110613132576131326130b8565b8060608401525092915050565b60006020828403121561315157600080fd5b81356109c781612f94565b6000806000806060858703121561317257600080fd5b8435935060208501356001600160401b0381111561318f57600080fd5b61319b87828801612fd5565b9598909750949560400135949350505050565b602081526000825160e060208401526131cb610100840182612f55565b9050602084015160408401526040840151606084015260608401516080840152608084015160a084015260a084015160c084015260c0840151151560e08401528091505092915050565b60008083601f84011261322757600080fd5b5081356001600160401b0381111561323e57600080fd5b6020830191508360208260051b850101111561301657600080fd5b6000806000806040858703121561326f57600080fd5b84356001600160401b038082111561328657600080fd5b61329288838901613215565b909650945060208701359150808211156132ab57600080fd5b818701915087601f8301126132bf57600080fd5b8135818111156132ce57600080fd5b8860208260071b85010111156132e357600080fd5b95989497505060200194505050565b60008060006040848603121561330757600080fd5b83356001600160401b0381111561331d57600080fd5b61332986828701613215565b909790965060209590950135949350505050565b6000806040838503121561335057600080fd5b823561335b81612f94565b91506020830135801515811461337057600080fd5b809150509250929050565b6000806040838503121561338e57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156133db576133db61339d565b604052919050565b60006001600160401b038211156133fc576133fc61339d565b50601f01601f191660200190565b600061341d613418846133e3565b6133b3565b905082815283838301111561343157600080fd5b828260208301376000602084830101529392505050565b6000806000806080858703121561345e57600080fd5b843561346981612f94565b9350602085013561347981612f94565b92506040850135915060608501356001600160401b0381111561349b57600080fd5b8501601f810187136134ac57600080fd5b6134bb8782356020840161340a565b91505092959194509250565b6000602082840312156134d957600080fd5b81356001600160401b038111156134ef57600080fd5b8201601f8101841361350057600080fd5b6126938482356020840161340a565b6000806040838503121561352257600080fd5b823561352d81612f94565b9150602083013561337081612f94565b6000806020838503121561355057600080fd5b82356001600160401b0381111561356657600080fd5b61357285828601613215565b90969095509350505050565b6000806000806040858703121561359457600080fd5b84356001600160401b03808211156135ab57600080fd5b6135b788838901613215565b909650945060208701359150808211156135d057600080fd5b506135dd87828801613215565b95989497509550505050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415613613576136136135e9565b5060010190565b600181811c9082168061362e57607f821691505b6020821081141561364f57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526010908201526f14d95c9a595cc81b9bdd08195b99195960821b604082015260600190565b6000828210156136bb576136bb6135e9565b500390565b600082198211156136d3576136d36135e9565b500190565b6000826136f557634e487b7160e01b600052601260045260246000fd5b500690565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604081528260408201528284606083013760006060848301015260006060601f19601f8601168301019050826020830152949350505050565b634e487b7160e01b600052603260045260246000fd5b60098110610c3c57600080fd5b6000608082840312156137ee57600080fd5b604051608081018181106001600160401b03821117156138105761381061339d565b604052823561381e816137cf565b815260208301356005811061383257600080fd5b60208201526040830135613845816137cf565b604082015260608301356004811061385c57600080fd5b60608201529392505050565b60006020828403121561387a57600080fd5b81516001600160401b0381111561389057600080fd5b8201601f810184136138a157600080fd5b80516138af613418826133e3565b8181528560208385010111156138c457600080fd5b611338826020830160208601612f29565b6000808335601e198436030181126138ec57600080fd5b8301803591506001600160401b0382111561390657600080fd5b60200191503681900382131561301657600080fd5b6000835161392d818460208801612f29565b9190910191825250602001919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906139c290830184612f55565b9695505050505050565b6000602082840312156139de57600080fd5b81516109c781612edd56fea2646970667358221220c8384c71d5f679b56ad8654c90814fa6671f76a358b01d28d07440a4f80c330b64736f6c6343000809003300000000000000000000000000000000000000000000000000000000000022b8
Deployed Bytecode
0x6080604052600436106102c95760003560e01c8063715018a611610175578063bf81bf43116100dc578063e84a972811610095578063ebb3a6821161006f578063ebb3a682146108b1578063f2fde38b146108d0578063fb4d81fc146108f0578063ff95bca81461091057600080fd5b8063e84a972814610833578063e8a3d48514610853578063e985e9c51461086857600080fd5b8063bf81bf4314610789578063c87b56dd146107a9578063caa0f92a146107c9578063cbfdb482146107de578063ccb4807b146107f3578063cce014061461081357600080fd5b806395d89b411161012e57806395d89b41146106ce5780639cae668c146106e3578063a22cb46514610714578063a4f359be14610734578063b0fc77ff14610754578063b88d4fde1461076957600080fd5b8063715018a6146106275780637277beca1461063c57806372b0d90c1461065c57806373e996531461067c5780638456cb591461069b5780638da5cb5b146106b057600080fd5b806342842e0e116102345780635aa464c6116101ed578063616eb255116101c7578063616eb2551461059a5780636352211e146105c75780636fc11022146105e757806370a082311461060757600080fd5b80635aa464c6146105415780635c975abb146105615780635f429f811461057a57600080fd5b806342842e0e1461048b57806344d76d93146104ab578063450f53d2146104cb5780634a344a79146104eb5780634f558e791461050157806350090ea81461052157600080fd5b80630ef8fb2e116102865780630ef8fb2e146103cd57806318160ddd146103e057806323b872dd146103f5578063269f5cb91461041557806332cb6b0c146104425780633f4ba83a1461047657600080fd5b806301ffc9a7146102ce57806305dd7ffb1461030357806306fdde03146103315780630797f88b14610353578063081812fc14610375578063095ea7b3146103ad575b600080fd5b3480156102da57600080fd5b506102ee6102e9366004612ef3565b610930565b60405190151581526020015b60405180910390f35b34801561030f57600080fd5b5061032361031e366004612f10565b610982565b6040519081526020016102fa565b34801561033d57600080fd5b506103466109ce565b6040516102fa9190612f81565b34801561035f57600080fd5b5061037361036e366004612f10565b610a60565b005b34801561038157600080fd5b50610395610390366004612f10565b610c3f565b6040516001600160a01b0390911681526020016102fa565b3480156103b957600080fd5b506103736103c8366004612fa9565b610cd4565b6103736103db36600461301d565b610dea565b3480156103ec57600080fd5b506103236110cc565b34801561040157600080fd5b50610373610410366004613077565b6110e3565b34801561042157600080fd5b50610435610430366004612f10565b611114565b6040516102fa91906130de565b34801561044e57600080fd5b506103237f00000000000000000000000000000000000000000000000000000000000022b881565b34801561048257600080fd5b5061037361122a565b34801561049757600080fd5b506103736104a6366004613077565b61125e565b3480156104b757600080fd5b506103736104c636600461313f565b611279565b3480156104d757600080fd5b506103236104e6366004612f10565b6112c6565b3480156104f757600080fd5b5061016454610323565b34801561050d57600080fd5b506102ee61051c366004612f10565b611341565b34801561052d57600080fd5b5061037361053c36600461315c565b611360565b34801561054d57600080fd5b506102ee61055c366004612f10565b6113e2565b34801561056d57600080fd5b5061012d5460ff166102ee565b34801561058657600080fd5b50610346610595366004612f10565b611411565b3480156105a657600080fd5b506105ba6105b5366004612f10565b6114b4565b6040516102fa91906131ae565b3480156105d357600080fd5b506103956105e2366004612f10565b6115ec565b3480156105f357600080fd5b50610373610602366004613259565b611663565b34801561061357600080fd5b5061032361062236600461313f565b6118d5565b34801561063357600080fd5b5061037361195c565b34801561064857600080fd5b506103736106573660046132f2565b611990565b34801561066857600080fd5b5061032361067736600461313f565b611c6b565b34801561068857600080fd5b50610160546001600160a01b0316610395565b3480156106a757600080fd5b50610373611d19565b3480156106bc57600080fd5b5060fb546001600160a01b0316610395565b3480156106da57600080fd5b50610346611d4b565b3480156106ef57600080fd5b506102ee6106fe366004612f10565b6000908152610161602052604090205460ff1690565b34801561072057600080fd5b5061037361072f36600461333d565b611d5a565b34801561074057600080fd5b5061037361074f36600461337b565b611d69565b34801561076057600080fd5b50609854610323565b34801561077557600080fd5b50610373610784366004613448565b611e41565b34801561079557600080fd5b506103736107a4366004612f10565b611e79565b3480156107b557600080fd5b506103466107c4366004612f10565b611f8c565b3480156107d557600080fd5b50609754610323565b3480156107ea57600080fd5b50610323600a81565b3480156107ff57600080fd5b5061037361080e3660046134c7565b61200e565b34801561081f57600080fd5b5061037361082e366004612f10565b612041565b34801561083f57600080fd5b5061037361084e36600461313f565b612103565b34801561085f57600080fd5b50610346612150565b34801561087457600080fd5b506102ee61088336600461350f565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b3480156108bd57600080fd5b5061015f546001600160a01b0316610395565b3480156108dc57600080fd5b506103736108eb36600461313f565b61215f565b3480156108fc57600080fd5b5061037361090b36600461353d565b6121f7565b34801561091c57600080fd5b5061037361092b36600461357e565b6122e8565b60006001600160e01b031982166380ac58cd60e01b148061096157506001600160e01b03198216635b5e139f60e01b145b8061097c57506301ffc9a760e01b6001600160e01b03198316145b92915050565b61016454600090815b818110156109c75760008181526101636020526040902060038101548510156109b457506109c7565b50806109bf816135ff565b91505061098b565b9392505050565b6060606580546109dd9061361a565b80601f0160208091040260200160405190810160405280929190818152602001828054610a099061361a565b8015610a565780601f10610a2b57610100808354040283529160200191610a56565b820191906000526020600020905b815481529060010190602001808311610a3957829003601f168201915b5050505050905090565b61012d5460ff1615610a8d5760405162461bcd60e51b8152600401610a8490613655565b60405180910390fd5b600081815261016360205260409020600681015460ff1615610af15760405162461bcd60e51b815260206004820152601a60248201527f5374617274696e6720696e64657820616c7265616479207365740000000000006044820152606401610a84565b600481015480610b135760405162461bcd60e51b8152600401610a849061367f565b80431015610b635760405162461bcd60e51b815260206004820181905260248201527f5374617274696e6720696e64657820626c6f636b206e6f7420726561636865646044820152606401610a84565b610100610b7082436136a9565b1115610bc8576000610b83600a436136c0565b6004840181905560405181815290915084907f5807bcf904312e5c2a005c1037eb781ea23ebff31da8672f732107e7005a7ce79060200160405180910390a250505050565b6000610bd3846112c6565b90506000610be28284406136d8565b6005850181905560068501805460ff1916600117905560405190915085907ff3419c3109e1f0182075e465873bc785265e39e1b3881470c7a1f124a064dbf690610c2f9084815260200190565b60405180910390a2505050505b50565b6000818152606760205260408120546001600160a01b0316610cb85760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a84565b506000908152606960205260409020546001600160a01b031690565b6000610cdf826115ec565b9050806001600160a01b0316836001600160a01b03161415610d4d5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a84565b336001600160a01b0382161480610d695750610d698133610883565b610ddb5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a84565b610de583836123db565b505050565b61012d5460ff1615610e0e5760405162461bcd60e51b8152600401610a8490613655565b61016454833514610e5a5760405162461bcd60e51b81526020600482015260166024820152754e6f74207468652063757272656e742073657269657360501b6044820152606401610a84565b82602001353414610e9f5760405162461bcd60e51b815260206004820152600f60248201526e57726f6e67206d73672e76616c756560881b6044820152606401610a84565b604080513360208083018290528635838501528681013560608085019190915287850135608085015287013560a0808501919091528451808503909101815260c0909301845282518382012060008181526101619092529390205490929060ff1615610f4d5760405162461bcd60e51b815260206004820152601860248201527f4d696e742064696765737420616c7265616479207573656400000000000000006044820152606401610a84565b60008181526101616020908152604091829020805460ff191660011790558151601f8701829004820281018201909252858252610fb4918391889088908190840183828082843760009201919091525050610160546001600160a01b031691506124499050565b610ff45760405162461bcd60e51b8152602060048201526011602482015270496e76616c6964207369676e617475726560781b6044820152606401610a84565b6000610fff84612580565b9050866040013581106110545760405162461bcd60e51b815260206004820152601a60248201527f536572696573206d617820737570706c792065786365656465640000000000006044820152606401610a84565b7f00000000000000000000000000000000000000000000000000000000000022b881106110c35760405162461bcd60e51b815260206004820152601a60248201527f476c6f62616c206d617820737570706c792065786365656465640000000000006044820152606401610a84565b50505050505050565b60006098546097546110de91906136a9565b905090565b6110ed33826125a4565b6111095760405162461bcd60e51b8152600401610a84906136fa565b610de583838361269b565b61113f6040805160808101909152806000815260200160008152602001600081526020016000905290565b60008281526101666020526040908190208151608081019092528054829060ff166008811115611171576111716130b8565b6008811115611182576111826130b8565b81528154602090910190610100900460ff1660048111156111a5576111a56130b8565b60048111156111b6576111b66130b8565b8152815460209091019062010000900460ff1660088111156111da576111da6130b8565b60088111156111eb576111eb6130b8565b815281546020909101906301000000900460ff166003811115611210576112106130b8565b6003811115611221576112216130b8565b90525092915050565b60fb546001600160a01b031633146112545760405162461bcd60e51b8152600401610a849061374b565b61125c612837565b565b610de583838360405180602001604052806000815250611e41565b60fb546001600160a01b031633146112a35760405162461bcd60e51b8152600401610a849061374b565b61015f80546001600160a01b0319166001600160a01b0392909216919091179055565b60008181526101636020526040812060048101546112f65760405162461bcd60e51b8152600401610a849061367f565b600381015483611307579392505050565b6000610163816113186001886136a9565b8152602001908152602001600020905080600301548261133891906136a9565b95945050505050565b6000818152606760205260408120546001600160a01b0316151561097c565b60fb546001600160a01b0316331461138a5760405162461bcd60e51b8152600401610a849061374b565b6000848152610163602052604090206113a4818585612dd0565b50818160010181905550847f93fd3282dfea150b3f1cd6058f255f4f3d61fba5f14a9c922ca755c84afbdb0e858585604051610c2f93929190613780565b6000806000838152610166602052604090205460ff166008811115611409576114096130b8565b141592915050565b60008181526101656020526040902080546060919061142f9061361a565b80601f016020809104026020016040519081016040528092919081815260200182805461145b9061361a565b80156114a85780601f1061147d576101008083540402835291602001916114a8565b820191906000526020600020905b81548152906001019060200180831161148b57829003601f168201915b50505050509050919050565b6114f96040518060e001604052806060815260200160008019168152602001600081526020016000815260200160008152602001600081526020016000151581525090565b6000828152610163602052604090819020815160e081019092528054829082906115229061361a565b80601f016020809104026020016040519081016040528092919081815260200182805461154e9061361a565b801561159b5780601f106115705761010080835404028352916020019161159b565b820191906000526020600020905b81548152906001019060200180831161157e57829003601f168201915b505050918352505060018201546020820152600282015460408201526003820154606082015260048201546080820152600582015460a082015260069091015460ff16151560c09091015292915050565b6000818152606760205260408120546001600160a01b03168061097c5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a84565b60fb546001600160a01b0316331461168d5760405162461bcd60e51b8152600401610a849061374b565b828181146116d65760405162461bcd60e51b81526020600482015260166024820152750a0c2e4c2dae640d8cadccee8d040dad2e6dac2e8c6d60531b6044820152606401610a84565b60005b818110156118cd5760008686838181106116f5576116f56137b9565b9050602002013590506000858584818110611712576117126137b9565b90506080020180360381019061172891906137dc565b905060008151600881111561173f5761173f6130b8565b14156117845760405162461bcd60e51b8152602060048201526014602482015273151a195b594818d85b9b9bdd081899481b9d5b1b60621b6044820152606401610a84565b60008160400151600881111561179c5761179c6130b8565b14156117e25760405162461bcd60e51b81526020600482015260156024820152741198589c9a58c818d85b9b9bdd081899481b9d5b1b605a1b6044820152606401610a84565b6000828152610166602052604090208151815483929190829060ff19166001836008811115611813576118136130b8565b021790555060208201518154829061ff00191661010083600481111561183b5761183b6130b8565b021790555060408201518154829062ff0000191662010000836008811115611865576118656130b8565b021790555060608201518154829063ff00000019166301000000836003811115611891576118916130b8565b0217905550506040518391507f7391db9d22dc83fb42a3a98ee967dfbcf6586517d40aec1e1245201d6a5e4a5690600090a250506001016116d9565b505050505050565b60006001600160a01b0382166119405760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a84565b506001600160a01b031660009081526068602052604090205490565b60fb546001600160a01b031633146119865760405162461bcd60e51b8152600401610a849061374b565b61125c60006128cc565b60fb546001600160a01b031633146119ba5760405162461bcd60e51b8152600401610a849061374b565b61016454811115611a045760405162461bcd60e51b8152602060048201526014602482015273092dcecc2d8d2c840e6cae4d2cae640d2dcc8caf60631b6044820152606401610a84565b6000818152610163602052604090206004810154611a345760405162461bcd60e51b8152600401610a849061367f565b80600201544211611a805760405162461bcd60e51b815260206004820152601660248201527514d95c9a595cc81a185cc81b9bdd08195e1c1a5c995960521b6044820152606401610a84565b6003810154839060005b82811015611b0b5781878783818110611aa557611aa56137b9565b9050602002013510611af95760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e204944206e6f742070617274206f662074686520736572696573006044820152606401610a84565b80611b03816135ff565b915050611a8a565b508315611bbf57600061016381611b236001886136a9565b815260200190815260200160002060030154905060005b83811015611bbc5781888883818110611b5557611b556137b9565b905060200201351015611baa5760405162461bcd60e51b815260206004820152601f60248201527f546f6b656e204944206e6f742070617274206f662074686520736572696573006044820152606401610a84565b80611bb4816135ff565b915050611b3a565b50505b60005b828110156110c357611beb878783818110611bdf57611bdf6137b9565b905060200201356113e2565b15611c385760405162461bcd60e51b815260206004820152601d60248201527f43616e6e6f742065787069726520612066696e697368656420706f656d0000006044820152606401610a84565b611c59878783818110611c4d57611c4d6137b9565b9050602002013561291e565b80611c63816135ff565b915050611bc2565b60fb546000906001600160a01b03163314611c985760405162461bcd60e51b8152600401610a849061374b565b60405147906001600160a01b0384169082156108fc029083906000818181858888f19350505050158015611cd0573d6000803e3d6000fd5b50604080516001600160a01b0385168152602081018390527f7fcf532c15f0a6db0bd6d0e038bea71d30d808c7d98cb3bf7268a95bf5081b65910160405180910390a192915050565b60fb546001600160a01b03163314611d435760405162461bcd60e51b8152600401610a849061374b565b61125c61293c565b6060606680546109dd9061361a565b611d65338383612996565b5050565b60fb546001600160a01b03163314611d935760405162461bcd60e51b8152600401610a849061374b565b60008281526101636020526040902060028101548211611e005760405162461bcd60e51b815260206004820152602260248201527f43616e206f6e6c79206d6f76652074686520646561646c696e6520666f7277616044820152611c9960f21b6064820152608401610a84565b6002810182905560405182815283907f76df3c72ee4713481bfc89a7216c119ee4cd3d3eabdae88fb9b1a8ecaf14588b9060200160405180910390a2505050565b611e4b33836125a4565b611e675760405162461bcd60e51b8152600401610a84906136fa565b611e7384848484612a65565b50505050565b60fb546001600160a01b03163314611ea35760405162461bcd60e51b8152600401610a849061374b565b611eac816113e2565b15611ef95760405162461bcd60e51b815260206004820152601d60248201527f43616e6e6f742065787069726520612066696e697368656420706f656d0000006044820152606401610a84565b6000611f0482610982565b600081815261016360205260409020600481015491925090611f385760405162461bcd60e51b8152600401610a849061367f565b80600201544211611f835760405162461bcd60e51b8152602060048201526015602482015274151bdad95b881a185cc81b9bdd08195e1c1a5c9959605a1b6044820152606401610a84565b610de58361291e565b61015f5460405163c87b56dd60e01b8152600481018390526060916001600160a01b03169063c87b56dd9060240160006040518083038186803b158015611fd257600080fd5b505afa158015611fe6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405261097c9190810190613868565b60fb546001600160a01b031633146120385760405162461bcd60e51b8152600401610a849061374b565b610c3c81612a98565b60fb546001600160a01b0316331461206b5760405162461bcd60e51b8152600401610a849061374b565b61016480546000918261207d836135ff565b9091555060008181526101636020526040812091925061209c60975490565b905060006120ab600a436136c0565b600284018690556003840183905560048401819055604080518781526020810185905290810182905290915084907fc3f8e8a27040de6cd1a99b2a08d8370d065da37f5cc59c63b4f900e5e38e998490606001610c2f565b60fb546001600160a01b0316331461212d5760405162461bcd60e51b8152600401610a849061374b565b61016080546001600160a01b0319166001600160a01b0392909216919091179055565b606060c980546109dd9061361a565b60fb546001600160a01b031633146121895760405162461bcd60e51b8152600401610a849061374b565b6001600160a01b0381166121ee5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610a84565b610c3c816128cc565b60fb546001600160a01b031633146122215760405162461bcd60e51b8152600401610a849061374b565b8060005b8181101561226f5761225c848483818110612242576122426137b9565b9050602002016020810190612257919061313f565b612580565b5080612267816135ff565b915050612225565b507f00000000000000000000000000000000000000000000000000000000000022b861229a60975490565b1115610de55760405162461bcd60e51b815260206004820152601a60248201527f476c6f62616c206d617820737570706c792065786365656465640000000000006044820152606401610a84565b60fb546001600160a01b031633146123125760405162461bcd60e51b8152600401610a849061374b565b8281811461235b5760405162461bcd60e51b81526020600482015260166024820152750a0c2e4c2dae640d8cadccee8d040dad2e6dac2e8c6d60531b6044820152606401610a84565b60005b818110156118cd57838382818110612378576123786137b9565b905060200281019061238a91906138d5565b61016560008989868181106123a1576123a16137b9565b90506020020135815260200190815260200160002091906123c3929190612dd0565b5060010161235e565b6001600160a01b03163b151590565b600081815260696020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612410826115ec565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600082516041146124935760405162461bcd60e51b8152602060048201526014602482015273084c2c840e6d2cedcc2e8eae4ca40d8cadccee8d60631b6044820152606401610a84565b602083810151604080860151606087015182518084018452601c81527f19457468657265756d205369676e6564204d6573736167653a0a333200000000818701529251600091821a95929391926124ed92918b910161391b565b60408051601f198184030181528282528051602091820120600080855291840180845281905260ff88169284019290925260608301869052608083018590529092509060019060a0016020604051602081039080840390855afa158015612558573d6000803e3d6000fd5b5050604051601f1901516001600160a01b039081169089161496505050505050509392505050565b6097805460009182919082612594836135ff565b91905055905061097c8382612ae6565b6000818152606760205260408120546001600160a01b031661261d5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a84565b6000612628836115ec565b9050806001600160a01b0316846001600160a01b031614806126635750836001600160a01b031661265884610c3f565b6001600160a01b0316145b8061269357506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b03166126ae826115ec565b6001600160a01b0316146127125760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610a84565b6001600160a01b0382166127745760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a84565b61277f6000826123db565b6001600160a01b03831660009081526068602052604081208054600192906127a89084906136a9565b90915550506001600160a01b03821660009081526068602052604081208054600192906127d69084906136c0565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b61012d5460ff166128815760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a84565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b60fb80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6098805490600061292e836135ff565b9190505550610c3c81612c28565b61012d5460ff16156129605760405162461bcd60e51b8152600401610a8490613655565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586128af3390565b816001600160a01b0316836001600160a01b031614156129f85760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a84565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612a7084848461269b565b612a7c84848484612cc3565b611e735760405162461bcd60e51b8152600401610a849061393d565b8051612aab9060c9906020840190612e54565b507f327e598ddafdfdc05677b3a9b2a050a730de4658ffb77bd4699c6eeac6cf70ed81604051612adb9190612f81565b60405180910390a150565b6001600160a01b038216612b3c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a84565b6000818152606760205260409020546001600160a01b031615612ba15760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a84565b6001600160a01b0382166000908152606860205260408120805460019290612bca9084906136c0565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000612c33826115ec565b9050612c406000836123db565b6001600160a01b0381166000908152606860205260408120805460019290612c699084906136a9565b909155505060008281526067602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006001600160a01b0384163b15612dc557604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612d0790339089908890889060040161398f565b602060405180830381600087803b158015612d2157600080fd5b505af1925050508015612d51575060408051601f3d908101601f19168201909252612d4e918101906139cc565b60015b612dab573d808015612d7f576040519150601f19603f3d011682016040523d82523d6000602084013e612d84565b606091505b508051612da35760405162461bcd60e51b8152600401610a849061393d565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612693565b506001949350505050565b828054612ddc9061361a565b90600052602060002090601f016020900481019282612dfe5760008555612e44565b82601f10612e175782800160ff19823516178555612e44565b82800160010185558215612e44579182015b82811115612e44578235825591602001919060010190612e29565b50612e50929150612ec8565b5090565b828054612e609061361a565b90600052602060002090601f016020900481019282612e825760008555612e44565b82601f10612e9b57805160ff1916838001178555612e44565b82800160010185558215612e44579182015b82811115612e44578251825591602001919060010190612ead565b5b80821115612e505760008155600101612ec9565b6001600160e01b031981168114610c3c57600080fd5b600060208284031215612f0557600080fd5b81356109c781612edd565b600060208284031215612f2257600080fd5b5035919050565b60005b83811015612f44578181015183820152602001612f2c565b83811115611e735750506000910152565b60008151808452612f6d816020860160208601612f29565b601f01601f19169290920160200192915050565b6020815260006109c76020830184612f55565b6001600160a01b0381168114610c3c57600080fd5b60008060408385031215612fbc57600080fd5b8235612fc781612f94565b946020939093013593505050565b60008083601f840112612fe757600080fd5b5081356001600160401b03811115612ffe57600080fd5b60208301915083602082850101111561301657600080fd5b9250929050565b600080600083850360a081121561303357600080fd5b608081121561304157600080fd5b5083925060808401356001600160401b0381111561305e57600080fd5b61306a86828701612fd5565b9497909650939450505050565b60008060006060848603121561308c57600080fd5b833561309781612f94565b925060208401356130a781612f94565b929592945050506040919091013590565b634e487b7160e01b600052602160045260246000fd5b60098110610c3c57610c3c6130b8565b815160808201906130ee816130ce565b8252602083015160058110613105576131056130b8565b60208301526040830151613118816130ce565b6040830152606083015160048110613132576131326130b8565b8060608401525092915050565b60006020828403121561315157600080fd5b81356109c781612f94565b6000806000806060858703121561317257600080fd5b8435935060208501356001600160401b0381111561318f57600080fd5b61319b87828801612fd5565b9598909750949560400135949350505050565b602081526000825160e060208401526131cb610100840182612f55565b9050602084015160408401526040840151606084015260608401516080840152608084015160a084015260a084015160c084015260c0840151151560e08401528091505092915050565b60008083601f84011261322757600080fd5b5081356001600160401b0381111561323e57600080fd5b6020830191508360208260051b850101111561301657600080fd5b6000806000806040858703121561326f57600080fd5b84356001600160401b038082111561328657600080fd5b61329288838901613215565b909650945060208701359150808211156132ab57600080fd5b818701915087601f8301126132bf57600080fd5b8135818111156132ce57600080fd5b8860208260071b85010111156132e357600080fd5b95989497505060200194505050565b60008060006040848603121561330757600080fd5b83356001600160401b0381111561331d57600080fd5b61332986828701613215565b909790965060209590950135949350505050565b6000806040838503121561335057600080fd5b823561335b81612f94565b91506020830135801515811461337057600080fd5b809150509250929050565b6000806040838503121561338e57600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156133db576133db61339d565b604052919050565b60006001600160401b038211156133fc576133fc61339d565b50601f01601f191660200190565b600061341d613418846133e3565b6133b3565b905082815283838301111561343157600080fd5b828260208301376000602084830101529392505050565b6000806000806080858703121561345e57600080fd5b843561346981612f94565b9350602085013561347981612f94565b92506040850135915060608501356001600160401b0381111561349b57600080fd5b8501601f810187136134ac57600080fd5b6134bb8782356020840161340a565b91505092959194509250565b6000602082840312156134d957600080fd5b81356001600160401b038111156134ef57600080fd5b8201601f8101841361350057600080fd5b6126938482356020840161340a565b6000806040838503121561352257600080fd5b823561352d81612f94565b9150602083013561337081612f94565b6000806020838503121561355057600080fd5b82356001600160401b0381111561356657600080fd5b61357285828601613215565b90969095509350505050565b6000806000806040858703121561359457600080fd5b84356001600160401b03808211156135ab57600080fd5b6135b788838901613215565b909650945060208701359150808211156135d057600080fd5b506135dd87828801613215565b95989497509550505050565b634e487b7160e01b600052601160045260246000fd5b6000600019821415613613576136136135e9565b5060010190565b600181811c9082168061362e57607f821691505b6020821081141561364f57634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526010908201526f14d95c9a595cc81b9bdd08195b99195960821b604082015260600190565b6000828210156136bb576136bb6135e9565b500390565b600082198211156136d3576136d36135e9565b500190565b6000826136f557634e487b7160e01b600052601260045260246000fd5b500690565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b604081528260408201528284606083013760006060848301015260006060601f19601f8601168301019050826020830152949350505050565b634e487b7160e01b600052603260045260246000fd5b60098110610c3c57600080fd5b6000608082840312156137ee57600080fd5b604051608081018181106001600160401b03821117156138105761381061339d565b604052823561381e816137cf565b815260208301356005811061383257600080fd5b60208201526040830135613845816137cf565b604082015260608301356004811061385c57600080fd5b60608201529392505050565b60006020828403121561387a57600080fd5b81516001600160401b0381111561389057600080fd5b8201601f810184136138a157600080fd5b80516138af613418826133e3565b8181528560208385010111156138c457600080fd5b611338826020830160208601612f29565b6000808335601e198436030181126138ec57600080fd5b8301803591506001600160401b0382111561390657600080fd5b60200191503681900382131561301657600080fd5b6000835161392d818460208801612f29565b9190910191825250602001919050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906139c290830184612f55565b9695505050505050565b6000602082840312156139de57600080fd5b81516109c781612edd56fea2646970667358221220c8384c71d5f679b56ad8654c90814fa6671f76a358b01d28d07440a4f80c330b64736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000022b8
-----Decoded View---------------
Arg [0] : maxSupply (uint256): 8888
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000022b8
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.