ERC-721
Overview
Max Total Supply
0 AIYOKAI
Holders
47
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
1 AIYOKAILoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
aiyokai
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.13; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/utils/cryptography/draft-EIP712.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "operator-filter-registry/src/DefaultOperatorFilterer.sol"; contract aiyokai is ERC721, EIP712, ReentrancyGuard, Ownable, DefaultOperatorFilterer { using ECDSA for bytes32; uint256 public constant PRICE = 0.05 ether; struct Attribute { uint256 tokenId; string metadataUrl; } bytes32 private constant _TYPEHASH = keccak256("Attribute(uint256 tokenId,string metadataUrl)"); address public artist; bool public isOnSale = true; bool public isMetadataFrozen; mapping(uint256 => string) public tokenIdToMetadataUrl; uint256[] private _mintedTokenIdList; address private _verifyAddress; constructor(address verifyAddress, address artistAddress) ERC721("AI Yokai", "AIYOKAI") EIP712("AI Yokai", "1.0.0") { _verifyAddress = verifyAddress; artist = artistAddress; } modifier onlyOwnerOrArtist() { require( msg.sender == owner() || msg.sender == artist, "AI Yokai: Only the owner or artist can call this function." ); _; } function verifyParams(Attribute calldata params, bytes calldata signature) public view returns (bool) { bytes memory b = abi.encode( _TYPEHASH, params.tokenId, keccak256(bytes(params.metadataUrl)) ); address signer = _hashTypedDataV4(keccak256(b)).recover(signature); return signer == _verifyAddress; } function mintedTokenIdList() external view returns (uint256[] memory) { return _mintedTokenIdList; } function tokenURI(uint256 tokenId) public view override returns (string memory) { require(_exists(tokenId), "AI Yokai: URI query for nonexistent token"); return tokenIdToMetadataUrl[tokenId]; } function mint(Attribute calldata params, bytes calldata signature) external payable nonReentrant { require(isOnSale, "AI Yokai: Not on sale"); require(verifyParams(params, signature), "AI Yokai: Invalid signature"); require(msg.value == PRICE, "AI Yokai: Invalid value"); _mintAndTransfer(_msgSender(), params.tokenId, params.metadataUrl); } function mintForFree( address to, uint256[] memory tokenId, string[] memory metadataUrl ) external onlyOwnerOrArtist { require( tokenId.length == metadataUrl.length, "AI Yokai: Invalid array length" ); uint256 count = tokenId.length; for (uint256 i; i < count; i++) { uint256 _tokenId = tokenId[i]; string memory _metadataUrl = metadataUrl[i]; _mintAndTransfer(to, _tokenId, _metadataUrl); } } function setIsOnSale(bool _isOnSale) external onlyOwner { isOnSale = _isOnSale; } function setMetadataUrl(uint256 tokenId, string memory metadataUrl) external onlyOwner { require(!isMetadataFrozen, "AI Yokai: Metadata is already frozen"); require(_exists(tokenId), "AI Yokai: Invalid tokenId"); tokenIdToMetadataUrl[tokenId] = metadataUrl; } function setIsMetadataFrozen(bool _isMetadataFrozen) external onlyOwner { require(!isMetadataFrozen, "AI Yokai: isMetadataFrozen cannot be changed"); isMetadataFrozen = _isMetadataFrozen; } function withdraw() external onlyOwner { Address.sendValue(payable(msg.sender), address(this).balance); } function _mintAndTransfer( address to, uint256 tokenId, string memory metadataUrl ) internal { tokenIdToMetadataUrl[tokenId] = metadataUrl; _mintedTokenIdList.push(tokenId); _safeMint(artist, tokenId); _safeTransfer(artist, to, tokenId, ""); } /** * Operator Filter Registry */ function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) { super.approve(operator, tokenId); } function transferFrom( address from, address to, uint256 tokenId ) public override onlyAllowedOperator(from) { super.transferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId ) public override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId); } function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory data ) public override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, data); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-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.7.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: address zero is not a valid owner"); 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: invalid token ID"); 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) { _requireMinted(tokenId); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not token owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); 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: caller is not token 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: caller is not token 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) { address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits an {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {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 Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { /// @solidity memory-safe-assembly assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol) pragma solidity ^0.8.0; import "./ECDSA.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding * they need in their contracts using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * _Available since v3.4._ */ abstract contract EIP712 { /* solhint-disable var-name-mixedcase */ // Cache the domain separator as an immutable value, but also store the chain id that it corresponds to, in order to // invalidate the cached domain separator if the chain id changes. bytes32 private immutable _CACHED_DOMAIN_SEPARATOR; uint256 private immutable _CACHED_CHAIN_ID; address private immutable _CACHED_THIS; bytes32 private immutable _HASHED_NAME; bytes32 private immutable _HASHED_VERSION; bytes32 private immutable _TYPE_HASH; /* solhint-enable var-name-mixedcase */ /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ constructor(string memory name, string memory version) { bytes32 hashedName = keccak256(bytes(name)); bytes32 hashedVersion = keccak256(bytes(version)); bytes32 typeHash = keccak256( "EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)" ); _HASHED_NAME = hashedName; _HASHED_VERSION = hashedVersion; _CACHED_CHAIN_ID = block.chainid; _CACHED_DOMAIN_SEPARATOR = _buildDomainSeparator(typeHash, hashedName, hashedVersion); _CACHED_THIS = address(this); _TYPE_HASH = typeHash; } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { if (address(this) == _CACHED_THIS && block.chainid == _CACHED_CHAIN_ID) { return _CACHED_DOMAIN_SEPARATOR; } else { return _buildDomainSeparator(_TYPE_HASH, _HASHED_NAME, _HASHED_VERSION); } } function _buildDomainSeparator( bytes32 typeHash, bytes32 nameHash, bytes32 versionHash ) private view returns (bytes32) { return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return ECDSA.toTypedDataHash(_domainSeparatorV4(), structHash); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @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); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {OperatorFilterer} from "./OperatorFilterer.sol"; /** * @title DefaultOperatorFilterer * @notice Inherits from OperatorFilterer and automatically subscribes to the default OpenSea subscription. */ abstract contract DefaultOperatorFilterer is OperatorFilterer { address constant DEFAULT_SUBSCRIPTION = address(0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6); constructor() OperatorFilterer(DEFAULT_SUBSCRIPTION, true) {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol"; /** * @title OperatorFilterer * @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another * registrant's entries in the OperatorFilterRegistry. * @dev This smart contract is meant to be inherited by token contracts so they can use the following: * - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods. * - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods. */ abstract contract OperatorFilterer { error OperatorNotAllowed(address operator); IOperatorFilterRegistry public constant OPERATOR_FILTER_REGISTRY = IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E); constructor(address subscriptionOrRegistrantToCopy, bool subscribe) { // If an inheriting token contract is deployed to a network without the registry deployed, the modifier // will not revert, but the contract will need to be registered with the registry once it is deployed in // order for the modifier to filter addresses. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (subscribe) { OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy); } else { if (subscriptionOrRegistrantToCopy != address(0)) { OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy); } else { OPERATOR_FILTER_REGISTRY.register(address(this)); } } } } modifier onlyAllowedOperator(address from) virtual { // Allow spending tokens from addresses with balance // Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred // from an EOA. if (from != msg.sender) { _checkFilterOperator(msg.sender); } _; } modifier onlyAllowedOperatorApproval(address operator) virtual { _checkFilterOperator(operator); _; } function _checkFilterOperator(address operator) internal view virtual { // Check registry code length to facilitate testing in environments without a deployed registry. if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) { if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) { revert OperatorNotAllowed(operator); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; interface IOperatorFilterRegistry { function isOperatorAllowed(address registrant, address operator) external view returns (bool); function register(address registrant) external; function registerAndSubscribe(address registrant, address subscription) external; function registerAndCopyEntries(address registrant, address registrantToCopy) external; function unregister(address addr) external; function updateOperator(address registrant, address operator, bool filtered) external; function updateOperators(address registrant, address[] calldata operators, bool filtered) external; function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external; function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external; function subscribe(address registrant, address registrantToSubscribe) external; function unsubscribe(address registrant, bool copyExistingEntries) external; function subscriptionOf(address addr) external returns (address registrant); function subscribers(address registrant) external returns (address[] memory); function subscriberAt(address registrant, uint256 index) external returns (address); function copyEntriesOf(address registrant, address registrantToCopy) external; function isOperatorFiltered(address registrant, address operator) external returns (bool); function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool); function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool); function filteredOperators(address addr) external returns (address[] memory); function filteredCodeHashes(address addr) external returns (bytes32[] memory); function filteredOperatorAt(address registrant, uint256 index) external returns (address); function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32); function isRegistered(address addr) external returns (bool); function codeHashOf(address addr) external returns (bytes32); }
{ "optimizer": { "enabled": true, "runs": 1000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"verifyAddress","type":"address"},{"internalType":"address","name":"artistAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"OPERATOR_FILTER_REGISTRY","outputs":[{"internalType":"contract IOperatorFilterRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"artist","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMetadataFrozen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isOnSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"metadataUrl","type":"string"}],"internalType":"struct aiyokai.Attribute","name":"params","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenId","type":"uint256[]"},{"internalType":"string[]","name":"metadataUrl","type":"string[]"}],"name":"mintForFree","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintedTokenIdList","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","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":"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":"bool","name":"_isMetadataFrozen","type":"bool"}],"name":"setIsMetadataFrozen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isOnSale","type":"bool"}],"name":"setIsOnSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"metadataUrl","type":"string"}],"name":"setMetadataUrl","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":"","type":"uint256"}],"name":"tokenIdToMetadataUrl","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"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":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"metadataUrl","type":"string"}],"internalType":"struct aiyokai.Attribute","name":"params","type":"tuple"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"verifyParams","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6101406040526008805460ff60a01b1916600160a01b1790553480156200002557600080fd5b50604051620030d2380380620030d283398101604081905262000048916200043d565b733cc6cdda760b79bafa08df41ecfa224f810dceb6600160405180604001604052806008815260200167414920596f6b616960c01b815250604051806040016040528060058152602001640312e302e360dc1b81525060405180604001604052806008815260200167414920596f6b616960c01b815250604051806040016040528060078152602001664149594f4b414960c81b8152508160009080519060200190620000f79291906200037a565b5080516200010d9060019060208401906200037a565b5050825160209384012082519284019290922060e08390526101008190524660a0818152604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818901819052818301979097526060810194909452608080850193909352308483018190528151808603909301835260c09485019091528151919096012090529290925261012052506001600655620001af3362000328565b6daaeb6d7670e522a718067333cd4e3b15620002f45780156200024257604051633e9f1edf60e11b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b1580156200022357600080fd5b505af115801562000238573d6000803e3d6000fd5b50505050620002f4565b6001600160a01b03821615620002935760405163a0af290360e01b81523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af29039060440162000208565b604051632210724360e11b81523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b158015620002da57600080fd5b505af1158015620002ef573d6000803e3d6000fd5b505050505b5050600b80546001600160a01b039384166001600160a01b03199182161790915560088054929093169116179055620004b1565b600780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b828054620003889062000475565b90600052602060002090601f016020900481019282620003ac5760008555620003f7565b82601f10620003c757805160ff1916838001178555620003f7565b82800160010185558215620003f7579182015b82811115620003f7578251825591602001919060010190620003da565b506200040592915062000409565b5090565b5b808211156200040557600081556001016200040a565b80516001600160a01b03811681146200043857600080fd5b919050565b600080604083850312156200045157600080fd5b6200045c8362000420565b91506200046c6020840162000420565b90509250929050565b600181811c908216806200048a57607f821691505b602082108103620004ab57634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c05160e0516101005161012051612bd162000501600039600061194b0152600061199a01526000611975015260006118ce015260006118f8015260006119220152612bd16000f3fe6080604052600436106101cd5760003560e01c806360509936116100f75780638da5cb5b11610095578063c87b56dd11610064578063c87b56dd14610522578063e985e9c514610542578063f2fde38b1461058b578063fd57fca5146105ab57600080fd5b80638da5cb5b146104af57806395d89b41146104cd578063a22cb465146104e2578063b88d4fde1461050257600080fd5b8063715018a6116100d1578063715018a61461043e5780637c419a7d14610453578063890e839f146104735780638d859f3e1461049457600080fd5b806360509936146103d05780636352211e146103f057806370a082311461041057600080fd5b80632d1db4c61161016f57806342842e0e1161013e57806342842e0e1461034e57806342aa16051461036e57806343bc16121461038e57806348ba8ef4146103ae57600080fd5b80632d1db4c6146102e45780633ccfd60b146103045780633da302a61461031957806341f434341461032c57600080fd5b8063095ea7b3116101ab578063095ea7b3146102615780630e24495e146102835780631141a9fa146102a457806323b872dd146102c457600080fd5b806301ffc9a7146101d257806306fdde0314610207578063081812fc14610229575b600080fd5b3480156101de57600080fd5b506101f26101ed366004612457565b6105cb565b60405190151581526020015b60405180910390f35b34801561021357600080fd5b5061021c610668565b6040516101fe91906124c8565b34801561023557600080fd5b506102496102443660046124db565b6106fa565b6040516001600160a01b0390911681526020016101fe565b34801561026d57600080fd5b5061028161027c366004612510565b610721565b005b34801561028f57600080fd5b506008546101f290600160a81b900460ff1681565b3480156102b057600080fd5b506101f26102bf36600461253a565b61073a565b3480156102d057600080fd5b506102816102df3660046125d9565b61081a565b3480156102f057600080fd5b506102816102ff366004612623565b610845565b34801561031057600080fd5b5061028161090b565b61028161032736600461253a565b61091f565b34801561033857600080fd5b506102496daaeb6d7670e522a718067333cd4e81565b34801561035a57600080fd5b506102816103693660046125d9565b610ad3565b34801561037a57600080fd5b5061021c6103893660046124db565b610af8565b34801561039a57600080fd5b50600854610249906001600160a01b031681565b3480156103ba57600080fd5b506103c3610b92565b6040516101fe9190612640565b3480156103dc57600080fd5b506102816103eb366004612743565b610be9565b3480156103fc57600080fd5b5061024961040b3660046124db565b610cf3565b34801561041c57600080fd5b5061043061042b36600461278a565b610d58565b6040519081526020016101fe565b34801561044a57600080fd5b50610281610df2565b34801561045f57600080fd5b5061028161046e366004612859565b610e04565b34801561047f57600080fd5b506008546101f290600160a01b900460ff1681565b3480156104a057600080fd5b5061043066b1a2bc2ec5000081565b3480156104bb57600080fd5b506007546001600160a01b0316610249565b3480156104d957600080fd5b5061021c610f5a565b3480156104ee57600080fd5b506102816104fd366004612924565b610f69565b34801561050e57600080fd5b5061028161051d36600461295b565b610f7d565b34801561052e57600080fd5b5061021c61053d3660046124db565b610fa3565b34801561054e57600080fd5b506101f261055d3660046129d7565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561059757600080fd5b506102816105a636600461278a565b6110ce565b3480156105b757600080fd5b506102816105c6366004612623565b61115e565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061062e57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061066257507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b60606000805461067790612a0a565b80601f01602080910402602001604051908101604052809291908181526020018280546106a390612a0a565b80156106f05780601f106106c5576101008083540402835291602001916106f0565b820191906000526020600020905b8154815290600101906020018083116106d357829003601f168201915b5050505050905090565b60006107058261119f565b506000908152600460205260409020546001600160a01b031690565b8161072b81611203565b61073583836112ee565b505050565b6000807f18c5034584be7338bc504de884b16b5ad19ad1157619c63bd37f0a5d7de6454e853561076d6020880188612a44565b60405161077b929190612a8b565b6040519081900381206107a39392916020019283526020830191909152604082015260600190565b60408051601f198184030181526020601f870181900481028401810190925285835292506000916107ff91879087908190840183828082843760009201919091525050855160208701206107f99250905061141a565b90611483565b600b546001600160a01b039081169116149695505050505050565b826001600160a01b03811633146108345761083433611203565b61083f8484846114a7565b50505050565b61084d61152e565b600854600160a81b900460ff16156108d25760405162461bcd60e51b815260206004820152602c60248201527f414920596f6b61693a2069734d6574616461746146726f7a656e2063616e6e6f60448201527f74206265206368616e676564000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60088054911515600160a81b027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff909216919091179055565b61091361152e565b61091d3347611588565b565b6002600654036109715760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108c9565b6002600655600854600160a01b900460ff166109cf5760405162461bcd60e51b815260206004820152601560248201527f414920596f6b61693a204e6f74206f6e2073616c65000000000000000000000060448201526064016108c9565b6109da83838361073a565b610a265760405162461bcd60e51b815260206004820152601b60248201527f414920596f6b61693a20496e76616c6964207369676e6174757265000000000060448201526064016108c9565b66b1a2bc2ec500003414610a7c5760405162461bcd60e51b815260206004820152601760248201527f414920596f6b61693a20496e76616c69642076616c756500000000000000000060448201526064016108c9565b610ac9338435610a8f6020870187612a44565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506116a192505050565b5050600160065550565b826001600160a01b0381163314610aed57610aed33611203565b61083f848484611735565b60096020526000908152604090208054610b1190612a0a565b80601f0160208091040260200160405190810160405280929190818152602001828054610b3d90612a0a565b8015610b8a5780601f10610b5f57610100808354040283529160200191610b8a565b820191906000526020600020905b815481529060010190602001808311610b6d57829003601f168201915b505050505081565b6060600a8054806020026020016040519081016040528092919081815260200182805480156106f057602002820191906000526020600020905b815481526020019060010190808311610bcc575050505050905090565b610bf161152e565b600854600160a81b900460ff1615610c705760405162461bcd60e51b8152602060048201526024808201527f414920596f6b61693a204d6574616461746120697320616c726561647920667260448201527f6f7a656e0000000000000000000000000000000000000000000000000000000060648201526084016108c9565b6000828152600260205260409020546001600160a01b0316610cd45760405162461bcd60e51b815260206004820152601960248201527f414920596f6b61693a20496e76616c696420746f6b656e49640000000000000060448201526064016108c9565b60008281526009602090815260409091208251610735928401906123a8565b6000818152600260205260408120546001600160a01b0316806106625760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e204944000000000000000060448201526064016108c9565b60006001600160a01b038216610dd65760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e6572000000000000000000000000000000000000000000000060648201526084016108c9565b506001600160a01b031660009081526003602052604090205490565b610dfa61152e565b61091d6000611750565b6007546001600160a01b0316331480610e2757506008546001600160a01b031633145b610e995760405162461bcd60e51b815260206004820152603a60248201527f414920596f6b61693a204f6e6c7920746865206f776e6572206f72206172746960448201527f73742063616e2063616c6c20746869732066756e6374696f6e2e00000000000060648201526084016108c9565b8051825114610eea5760405162461bcd60e51b815260206004820152601e60248201527f414920596f6b61693a20496e76616c6964206172726179206c656e677468000060448201526064016108c9565b815160005b81811015610f53576000848281518110610f0b57610f0b612a9b565b602002602001015190506000848381518110610f2957610f29612a9b565b60200260200101519050610f3e8783836116a1565b50508080610f4b90612ac7565b915050610eef565b5050505050565b60606001805461067790612a0a565b81610f7381611203565b61073583836117af565b836001600160a01b0381163314610f9757610f9733611203565b610f53858585856117be565b6000818152600260205260409020546060906001600160a01b03166110305760405162461bcd60e51b815260206004820152602960248201527f414920596f6b61693a2055524920717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e000000000000000000000000000000000000000000000060648201526084016108c9565b6000828152600960205260409020805461104990612a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461107590612a0a565b80156110c25780601f10611097576101008083540402835291602001916110c2565b820191906000526020600020905b8154815290600101906020018083116110a557829003601f168201915b50505050509050919050565b6110d661152e565b6001600160a01b0381166111525760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108c9565b61115b81611750565b50565b61116661152e565b60088054911515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b6000818152600260205260409020546001600160a01b031661115b5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e204944000000000000000060448201526064016108c9565b6daaeb6d7670e522a718067333cd4e3b1561115b576040517fc61711340000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611289573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ad9190612ae0565b61115b576040517fede71dcc0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016108c9565b60006112f982610cf3565b9050806001600160a01b0316836001600160a01b0316036113825760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084016108c9565b336001600160a01b038216148061139e575061139e813361055d565b6114105760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016108c9565b6107358383611846565b60006106626114276118c1565b836040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061149285856119e8565b9150915061149f81611a2d565b509392505050565b6114b13382611be3565b6115235760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f76656400000000000000000000000000000000000060648201526084016108c9565b610735838383611c62565b6007546001600160a01b0316331461091d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108c9565b804710156115d85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016108c9565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611625576040519150601f19603f3d011682016040523d82523d6000602084013e61162a565b606091505b50509050806107355760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016108c9565b600082815260096020908152604090912082516116c0928401906123a8565b50600a80546001810182556000919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80182905560085461170c906001600160a01b031683611e3c565b600854604080516020810190915260008152610735916001600160a01b03169085908590611e56565b61073583838360405180602001604052806000815250610f7d565b600780546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6117ba338383611ed4565b5050565b6117c83383611be3565b61183a5760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f76656400000000000000000000000000000000000060648201526084016108c9565b61083f84848484611e56565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416908117909155819061188882610cf3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000306001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001614801561191a57507f000000000000000000000000000000000000000000000000000000000000000046145b1561194457507f000000000000000000000000000000000000000000000000000000000000000090565b50604080517f00000000000000000000000000000000000000000000000000000000000000006020808301919091527f0000000000000000000000000000000000000000000000000000000000000000828401527f000000000000000000000000000000000000000000000000000000000000000060608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000808251604103611a1e5760208301516040840151606085015160001a611a1287828585611fa2565b94509450505050611a26565b506000905060025b9250929050565b6000816004811115611a4157611a41612afd565b03611a495750565b6001816004811115611a5d57611a5d612afd565b03611aaa5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108c9565b6002816004811115611abe57611abe612afd565b03611b0b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108c9565b6003816004811115611b1f57611b1f612afd565b03611b775760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108c9565b6004816004811115611b8b57611b8b612afd565b0361115b5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016108c9565b600080611bef83610cf3565b9050806001600160a01b0316846001600160a01b03161480611c3657506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80611c5a5750836001600160a01b0316611c4f846106fa565b6001600160a01b0316145b949350505050565b826001600160a01b0316611c7582610cf3565b6001600160a01b031614611cf15760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e657200000000000000000000000000000000000000000000000000000060648201526084016108c9565b6001600160a01b038216611d6c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016108c9565b611d77600082611846565b6001600160a01b0383166000908152600360205260408120805460019290611da0908490612b13565b90915550506001600160a01b0382166000908152600360205260408120805460019290611dce908490612b2a565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6117ba82826040518060200160405280600081525061208f565b611e61848484611c62565b611e6d8484848461210d565b61083f5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016108c9565b816001600160a01b0316836001600160a01b031603611f355760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108c9565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611fd95750600090506003612086565b8460ff16601b14158015611ff157508460ff16601c14155b156120025750600090506004612086565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612056573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661207f57600060019250925050612086565b9150600090505b94509492505050565b6120998383612259565b6120a6600084848461210d565b6107355760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016108c9565b60006001600160a01b0384163b1561224e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612151903390899088908890600401612b42565b6020604051808303816000875af192505050801561218c575060408051601f3d908101601f1916820190925261218991810190612b7e565b60015b612234573d8080156121ba576040519150601f19603f3d011682016040523d82523d6000602084013e6121bf565b606091505b50805160000361222c5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016108c9565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611c5a565b506001949350505050565b6001600160a01b0382166122af5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108c9565b6000818152600260205260409020546001600160a01b0316156123145760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108c9565b6001600160a01b038216600090815260036020526040812080546001929061233d908490612b2a565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546123b490612a0a565b90600052602060002090601f0160209004810192826123d6576000855561241c565b82601f106123ef57805160ff191683800117855561241c565b8280016001018555821561241c579182015b8281111561241c578251825591602001919060010190612401565b5061242892915061242c565b5090565b5b80821115612428576000815560010161242d565b6001600160e01b03198116811461115b57600080fd5b60006020828403121561246957600080fd5b813561247481612441565b9392505050565b6000815180845260005b818110156124a157602081850181015186830182015201612485565b818111156124b3576000602083870101525b50601f01601f19169290920160200192915050565b602081526000612474602083018461247b565b6000602082840312156124ed57600080fd5b5035919050565b80356001600160a01b038116811461250b57600080fd5b919050565b6000806040838503121561252357600080fd5b61252c836124f4565b946020939093013593505050565b60008060006040848603121561254f57600080fd5b833567ffffffffffffffff8082111561256757600080fd5b908501906040828803121561257b57600080fd5b9093506020850135908082111561259157600080fd5b818601915086601f8301126125a557600080fd5b8135818111156125b457600080fd5b8760208285010111156125c657600080fd5b6020830194508093505050509250925092565b6000806000606084860312156125ee57600080fd5b6125f7846124f4565b9250612605602085016124f4565b9150604084013590509250925092565b801515811461115b57600080fd5b60006020828403121561263557600080fd5b813561247481612615565b6020808252825182820181905260009190848201906040850190845b818110156126785783518352928401929184019160010161265c565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156126c3576126c3612684565b604052919050565b600067ffffffffffffffff8311156126e5576126e5612684565b6126f8601f8401601f191660200161269a565b905082815283838301111561270c57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261273457600080fd5b612474838335602085016126cb565b6000806040838503121561275657600080fd5b82359150602083013567ffffffffffffffff81111561277457600080fd5b61278085828601612723565b9150509250929050565b60006020828403121561279c57600080fd5b612474826124f4565b600067ffffffffffffffff8211156127bf576127bf612684565b5060051b60200190565b600082601f8301126127da57600080fd5b813560206127ef6127ea836127a5565b61269a565b82815260059290921b8401810191818101908684111561280e57600080fd5b8286015b8481101561284e57803567ffffffffffffffff8111156128325760008081fd5b6128408986838b0101612723565b845250918301918301612812565b509695505050505050565b60008060006060848603121561286e57600080fd5b612877846124f4565b925060208085013567ffffffffffffffff8082111561289557600080fd5b818701915087601f8301126128a957600080fd5b81356128b76127ea826127a5565b81815260059190911b8301840190848101908a8311156128d657600080fd5b938501935b828510156128f4578435825293850193908501906128db565b96505050604087013592508083111561290c57600080fd5b505061291a868287016127c9565b9150509250925092565b6000806040838503121561293757600080fd5b612940836124f4565b9150602083013561295081612615565b809150509250929050565b6000806000806080858703121561297157600080fd5b61297a856124f4565b9350612988602086016124f4565b925060408501359150606085013567ffffffffffffffff8111156129ab57600080fd5b8501601f810187136129bc57600080fd5b6129cb878235602084016126cb565b91505092959194509250565b600080604083850312156129ea57600080fd5b6129f3836124f4565b9150612a01602084016124f4565b90509250929050565b600181811c90821680612a1e57607f821691505b602082108103612a3e57634e487b7160e01b600052602260045260246000fd5b50919050565b6000808335601e19843603018112612a5b57600080fd5b83018035915067ffffffffffffffff821115612a7657600080fd5b602001915036819003821315611a2657600080fd5b8183823760009101908152919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201612ad957612ad9612ab1565b5060010190565b600060208284031215612af257600080fd5b815161247481612615565b634e487b7160e01b600052602160045260246000fd5b600082821015612b2557612b25612ab1565b500390565b60008219821115612b3d57612b3d612ab1565b500190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612b74608083018461247b565b9695505050505050565b600060208284031215612b9057600080fd5b81516124748161244156fea26469706673582212209c701253d7ed417be91db535d9a0a29e29f7a27d254e72487b76030ab02b11db64736f6c634300080d00330000000000000000000000000f0a7b3346dd84739701d597e035f38be6c85b7b000000000000000000000000d046c0b2bb977b4443b2dad0575b0aff2487db1c
Deployed Bytecode
0x6080604052600436106101cd5760003560e01c806360509936116100f75780638da5cb5b11610095578063c87b56dd11610064578063c87b56dd14610522578063e985e9c514610542578063f2fde38b1461058b578063fd57fca5146105ab57600080fd5b80638da5cb5b146104af57806395d89b41146104cd578063a22cb465146104e2578063b88d4fde1461050257600080fd5b8063715018a6116100d1578063715018a61461043e5780637c419a7d14610453578063890e839f146104735780638d859f3e1461049457600080fd5b806360509936146103d05780636352211e146103f057806370a082311461041057600080fd5b80632d1db4c61161016f57806342842e0e1161013e57806342842e0e1461034e57806342aa16051461036e57806343bc16121461038e57806348ba8ef4146103ae57600080fd5b80632d1db4c6146102e45780633ccfd60b146103045780633da302a61461031957806341f434341461032c57600080fd5b8063095ea7b3116101ab578063095ea7b3146102615780630e24495e146102835780631141a9fa146102a457806323b872dd146102c457600080fd5b806301ffc9a7146101d257806306fdde0314610207578063081812fc14610229575b600080fd5b3480156101de57600080fd5b506101f26101ed366004612457565b6105cb565b60405190151581526020015b60405180910390f35b34801561021357600080fd5b5061021c610668565b6040516101fe91906124c8565b34801561023557600080fd5b506102496102443660046124db565b6106fa565b6040516001600160a01b0390911681526020016101fe565b34801561026d57600080fd5b5061028161027c366004612510565b610721565b005b34801561028f57600080fd5b506008546101f290600160a81b900460ff1681565b3480156102b057600080fd5b506101f26102bf36600461253a565b61073a565b3480156102d057600080fd5b506102816102df3660046125d9565b61081a565b3480156102f057600080fd5b506102816102ff366004612623565b610845565b34801561031057600080fd5b5061028161090b565b61028161032736600461253a565b61091f565b34801561033857600080fd5b506102496daaeb6d7670e522a718067333cd4e81565b34801561035a57600080fd5b506102816103693660046125d9565b610ad3565b34801561037a57600080fd5b5061021c6103893660046124db565b610af8565b34801561039a57600080fd5b50600854610249906001600160a01b031681565b3480156103ba57600080fd5b506103c3610b92565b6040516101fe9190612640565b3480156103dc57600080fd5b506102816103eb366004612743565b610be9565b3480156103fc57600080fd5b5061024961040b3660046124db565b610cf3565b34801561041c57600080fd5b5061043061042b36600461278a565b610d58565b6040519081526020016101fe565b34801561044a57600080fd5b50610281610df2565b34801561045f57600080fd5b5061028161046e366004612859565b610e04565b34801561047f57600080fd5b506008546101f290600160a01b900460ff1681565b3480156104a057600080fd5b5061043066b1a2bc2ec5000081565b3480156104bb57600080fd5b506007546001600160a01b0316610249565b3480156104d957600080fd5b5061021c610f5a565b3480156104ee57600080fd5b506102816104fd366004612924565b610f69565b34801561050e57600080fd5b5061028161051d36600461295b565b610f7d565b34801561052e57600080fd5b5061021c61053d3660046124db565b610fa3565b34801561054e57600080fd5b506101f261055d3660046129d7565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b34801561059757600080fd5b506102816105a636600461278a565b6110ce565b3480156105b757600080fd5b506102816105c6366004612623565b61115e565b60006001600160e01b031982167f80ac58cd00000000000000000000000000000000000000000000000000000000148061062e57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061066257507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b60606000805461067790612a0a565b80601f01602080910402602001604051908101604052809291908181526020018280546106a390612a0a565b80156106f05780601f106106c5576101008083540402835291602001916106f0565b820191906000526020600020905b8154815290600101906020018083116106d357829003601f168201915b5050505050905090565b60006107058261119f565b506000908152600460205260409020546001600160a01b031690565b8161072b81611203565b61073583836112ee565b505050565b6000807f18c5034584be7338bc504de884b16b5ad19ad1157619c63bd37f0a5d7de6454e853561076d6020880188612a44565b60405161077b929190612a8b565b6040519081900381206107a39392916020019283526020830191909152604082015260600190565b60408051601f198184030181526020601f870181900481028401810190925285835292506000916107ff91879087908190840183828082843760009201919091525050855160208701206107f99250905061141a565b90611483565b600b546001600160a01b039081169116149695505050505050565b826001600160a01b03811633146108345761083433611203565b61083f8484846114a7565b50505050565b61084d61152e565b600854600160a81b900460ff16156108d25760405162461bcd60e51b815260206004820152602c60248201527f414920596f6b61693a2069734d6574616461746146726f7a656e2063616e6e6f60448201527f74206265206368616e676564000000000000000000000000000000000000000060648201526084015b60405180910390fd5b60088054911515600160a81b027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff909216919091179055565b61091361152e565b61091d3347611588565b565b6002600654036109715760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016108c9565b6002600655600854600160a01b900460ff166109cf5760405162461bcd60e51b815260206004820152601560248201527f414920596f6b61693a204e6f74206f6e2073616c65000000000000000000000060448201526064016108c9565b6109da83838361073a565b610a265760405162461bcd60e51b815260206004820152601b60248201527f414920596f6b61693a20496e76616c6964207369676e6174757265000000000060448201526064016108c9565b66b1a2bc2ec500003414610a7c5760405162461bcd60e51b815260206004820152601760248201527f414920596f6b61693a20496e76616c69642076616c756500000000000000000060448201526064016108c9565b610ac9338435610a8f6020870187612a44565b8080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506116a192505050565b5050600160065550565b826001600160a01b0381163314610aed57610aed33611203565b61083f848484611735565b60096020526000908152604090208054610b1190612a0a565b80601f0160208091040260200160405190810160405280929190818152602001828054610b3d90612a0a565b8015610b8a5780601f10610b5f57610100808354040283529160200191610b8a565b820191906000526020600020905b815481529060010190602001808311610b6d57829003601f168201915b505050505081565b6060600a8054806020026020016040519081016040528092919081815260200182805480156106f057602002820191906000526020600020905b815481526020019060010190808311610bcc575050505050905090565b610bf161152e565b600854600160a81b900460ff1615610c705760405162461bcd60e51b8152602060048201526024808201527f414920596f6b61693a204d6574616461746120697320616c726561647920667260448201527f6f7a656e0000000000000000000000000000000000000000000000000000000060648201526084016108c9565b6000828152600260205260409020546001600160a01b0316610cd45760405162461bcd60e51b815260206004820152601960248201527f414920596f6b61693a20496e76616c696420746f6b656e49640000000000000060448201526064016108c9565b60008281526009602090815260409091208251610735928401906123a8565b6000818152600260205260408120546001600160a01b0316806106625760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e204944000000000000000060448201526064016108c9565b60006001600160a01b038216610dd65760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f74206120766160448201527f6c6964206f776e6572000000000000000000000000000000000000000000000060648201526084016108c9565b506001600160a01b031660009081526003602052604090205490565b610dfa61152e565b61091d6000611750565b6007546001600160a01b0316331480610e2757506008546001600160a01b031633145b610e995760405162461bcd60e51b815260206004820152603a60248201527f414920596f6b61693a204f6e6c7920746865206f776e6572206f72206172746960448201527f73742063616e2063616c6c20746869732066756e6374696f6e2e00000000000060648201526084016108c9565b8051825114610eea5760405162461bcd60e51b815260206004820152601e60248201527f414920596f6b61693a20496e76616c6964206172726179206c656e677468000060448201526064016108c9565b815160005b81811015610f53576000848281518110610f0b57610f0b612a9b565b602002602001015190506000848381518110610f2957610f29612a9b565b60200260200101519050610f3e8783836116a1565b50508080610f4b90612ac7565b915050610eef565b5050505050565b60606001805461067790612a0a565b81610f7381611203565b61073583836117af565b836001600160a01b0381163314610f9757610f9733611203565b610f53858585856117be565b6000818152600260205260409020546060906001600160a01b03166110305760405162461bcd60e51b815260206004820152602960248201527f414920596f6b61693a2055524920717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e000000000000000000000000000000000000000000000060648201526084016108c9565b6000828152600960205260409020805461104990612a0a565b80601f016020809104026020016040519081016040528092919081815260200182805461107590612a0a565b80156110c25780601f10611097576101008083540402835291602001916110c2565b820191906000526020600020905b8154815290600101906020018083116110a557829003601f168201915b50505050509050919050565b6110d661152e565b6001600160a01b0381166111525760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016108c9565b61115b81611750565b50565b61116661152e565b60088054911515600160a01b027fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff909216919091179055565b6000818152600260205260409020546001600160a01b031661115b5760405162461bcd60e51b815260206004820152601860248201527f4552433732313a20696e76616c696420746f6b656e204944000000000000000060448201526064016108c9565b6daaeb6d7670e522a718067333cd4e3b1561115b576040517fc61711340000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611289573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112ad9190612ae0565b61115b576040517fede71dcc0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016108c9565b60006112f982610cf3565b9050806001600160a01b0316836001600160a01b0316036113825760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084016108c9565b336001600160a01b038216148061139e575061139e813361055d565b6114105760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c000060648201526084016108c9565b6107358383611846565b60006106626114276118c1565b836040517f19010000000000000000000000000000000000000000000000000000000000006020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061149285856119e8565b9150915061149f81611a2d565b509392505050565b6114b13382611be3565b6115235760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f76656400000000000000000000000000000000000060648201526084016108c9565b610735838383611c62565b6007546001600160a01b0316331461091d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108c9565b804710156115d85760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e636500000060448201526064016108c9565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611625576040519150601f19603f3d011682016040523d82523d6000602084013e61162a565b606091505b50509050806107355760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d6179206861766520726576657274656400000000000060648201526084016108c9565b600082815260096020908152604090912082516116c0928401906123a8565b50600a80546001810182556000919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80182905560085461170c906001600160a01b031683611e3c565b600854604080516020810190915260008152610735916001600160a01b03169085908590611e56565b61073583838360405180602001604052806000815250610f7d565b600780546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6117ba338383611ed4565b5050565b6117c83383611be3565b61183a5760405162461bcd60e51b815260206004820152602e60248201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560448201527f72206e6f7220617070726f76656400000000000000000000000000000000000060648201526084016108c9565b61083f84848484611e56565b6000818152600460205260409020805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b038416908117909155819061188882610cf3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000306001600160a01b037f00000000000000000000000090201cbf94a81fb145899a0c5ac606d8b0ab515f1614801561191a57507f000000000000000000000000000000000000000000000000000000000000000146145b1561194457507f4b3520a92818f87453d648fa0a80f2e937a35298793c4beaccd5071b01009d7090565b50604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6020808301919091527fe610ca498d03d0d0c3fcabb6a8e9b1d5e45aecddbcd37c5a0f60927c40f6b21a828401527f06c015bd22b4c69690933c1058878ebdfef31f9aaae40bbe86d8a09fe1b2972c60608301524660808301523060a0808401919091528351808403909101815260c0909201909252805191012090565b6000808251604103611a1e5760208301516040840151606085015160001a611a1287828585611fa2565b94509450505050611a26565b506000905060025b9250929050565b6000816004811115611a4157611a41612afd565b03611a495750565b6001816004811115611a5d57611a5d612afd565b03611aaa5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016108c9565b6002816004811115611abe57611abe612afd565b03611b0b5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016108c9565b6003816004811115611b1f57611b1f612afd565b03611b775760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016108c9565b6004816004811115611b8b57611b8b612afd565b0361115b5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016108c9565b600080611bef83610cf3565b9050806001600160a01b0316846001600160a01b03161480611c3657506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80611c5a5750836001600160a01b0316611c4f846106fa565b6001600160a01b0316145b949350505050565b826001600160a01b0316611c7582610cf3565b6001600160a01b031614611cf15760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201527f6f776e657200000000000000000000000000000000000000000000000000000060648201526084016108c9565b6001600160a01b038216611d6c5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016108c9565b611d77600082611846565b6001600160a01b0383166000908152600360205260408120805460019290611da0908490612b13565b90915550506001600160a01b0382166000908152600360205260408120805460019290611dce908490612b2a565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6117ba82826040518060200160405280600081525061208f565b611e61848484611c62565b611e6d8484848461210d565b61083f5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016108c9565b816001600160a01b0316836001600160a01b031603611f355760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016108c9565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611fd95750600090506003612086565b8460ff16601b14158015611ff157508460ff16601c14155b156120025750600090506004612086565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015612056573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661207f57600060019250925050612086565b9150600090505b94509492505050565b6120998383612259565b6120a6600084848461210d565b6107355760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016108c9565b60006001600160a01b0384163b1561224e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612151903390899088908890600401612b42565b6020604051808303816000875af192505050801561218c575060408051601f3d908101601f1916820190925261218991810190612b7e565b60015b612234573d8080156121ba576040519150601f19603f3d011682016040523d82523d6000602084013e6121bf565b606091505b50805160000361222c5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084016108c9565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611c5a565b506001949350505050565b6001600160a01b0382166122af5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016108c9565b6000818152600260205260409020546001600160a01b0316156123145760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016108c9565b6001600160a01b038216600090815260036020526040812080546001929061233d908490612b2a565b9091555050600081815260026020526040808220805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546123b490612a0a565b90600052602060002090601f0160209004810192826123d6576000855561241c565b82601f106123ef57805160ff191683800117855561241c565b8280016001018555821561241c579182015b8281111561241c578251825591602001919060010190612401565b5061242892915061242c565b5090565b5b80821115612428576000815560010161242d565b6001600160e01b03198116811461115b57600080fd5b60006020828403121561246957600080fd5b813561247481612441565b9392505050565b6000815180845260005b818110156124a157602081850181015186830182015201612485565b818111156124b3576000602083870101525b50601f01601f19169290920160200192915050565b602081526000612474602083018461247b565b6000602082840312156124ed57600080fd5b5035919050565b80356001600160a01b038116811461250b57600080fd5b919050565b6000806040838503121561252357600080fd5b61252c836124f4565b946020939093013593505050565b60008060006040848603121561254f57600080fd5b833567ffffffffffffffff8082111561256757600080fd5b908501906040828803121561257b57600080fd5b9093506020850135908082111561259157600080fd5b818601915086601f8301126125a557600080fd5b8135818111156125b457600080fd5b8760208285010111156125c657600080fd5b6020830194508093505050509250925092565b6000806000606084860312156125ee57600080fd5b6125f7846124f4565b9250612605602085016124f4565b9150604084013590509250925092565b801515811461115b57600080fd5b60006020828403121561263557600080fd5b813561247481612615565b6020808252825182820181905260009190848201906040850190845b818110156126785783518352928401929184019160010161265c565b50909695505050505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156126c3576126c3612684565b604052919050565b600067ffffffffffffffff8311156126e5576126e5612684565b6126f8601f8401601f191660200161269a565b905082815283838301111561270c57600080fd5b828260208301376000602084830101529392505050565b600082601f83011261273457600080fd5b612474838335602085016126cb565b6000806040838503121561275657600080fd5b82359150602083013567ffffffffffffffff81111561277457600080fd5b61278085828601612723565b9150509250929050565b60006020828403121561279c57600080fd5b612474826124f4565b600067ffffffffffffffff8211156127bf576127bf612684565b5060051b60200190565b600082601f8301126127da57600080fd5b813560206127ef6127ea836127a5565b61269a565b82815260059290921b8401810191818101908684111561280e57600080fd5b8286015b8481101561284e57803567ffffffffffffffff8111156128325760008081fd5b6128408986838b0101612723565b845250918301918301612812565b509695505050505050565b60008060006060848603121561286e57600080fd5b612877846124f4565b925060208085013567ffffffffffffffff8082111561289557600080fd5b818701915087601f8301126128a957600080fd5b81356128b76127ea826127a5565b81815260059190911b8301840190848101908a8311156128d657600080fd5b938501935b828510156128f4578435825293850193908501906128db565b96505050604087013592508083111561290c57600080fd5b505061291a868287016127c9565b9150509250925092565b6000806040838503121561293757600080fd5b612940836124f4565b9150602083013561295081612615565b809150509250929050565b6000806000806080858703121561297157600080fd5b61297a856124f4565b9350612988602086016124f4565b925060408501359150606085013567ffffffffffffffff8111156129ab57600080fd5b8501601f810187136129bc57600080fd5b6129cb878235602084016126cb565b91505092959194509250565b600080604083850312156129ea57600080fd5b6129f3836124f4565b9150612a01602084016124f4565b90509250929050565b600181811c90821680612a1e57607f821691505b602082108103612a3e57634e487b7160e01b600052602260045260246000fd5b50919050565b6000808335601e19843603018112612a5b57600080fd5b83018035915067ffffffffffffffff821115612a7657600080fd5b602001915036819003821315611a2657600080fd5b8183823760009101908152919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b600060018201612ad957612ad9612ab1565b5060010190565b600060208284031215612af257600080fd5b815161247481612615565b634e487b7160e01b600052602160045260246000fd5b600082821015612b2557612b25612ab1565b500390565b60008219821115612b3d57612b3d612ab1565b500190565b60006001600160a01b03808716835280861660208401525083604083015260806060830152612b74608083018461247b565b9695505050505050565b600060208284031215612b9057600080fd5b81516124748161244156fea26469706673582212209c701253d7ed417be91db535d9a0a29e29f7a27d254e72487b76030ab02b11db64736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000000f0a7b3346dd84739701d597e035f38be6c85b7b000000000000000000000000d046c0b2bb977b4443b2dad0575b0aff2487db1c
-----Decoded View---------------
Arg [0] : verifyAddress (address): 0x0F0A7b3346DD84739701d597e035f38Be6C85b7B
Arg [1] : artistAddress (address): 0xD046C0b2bB977b4443b2DaD0575B0afF2487DB1c
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000000f0a7b3346dd84739701d597e035f38be6c85b7b
Arg [1] : 000000000000000000000000d046c0b2bb977b4443b2dad0575b0aff2487db1c
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.