Overview
ETH Balance
0.00018075 ETH
Eth Value
$0.60 (@ $3,321.90/ETH)More Info
Private Name Tags
ContractCreator
Latest 8 from a total of 8 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Transfer | 20766815 | 126 days ago | IN | 0.0001 ETH | 0.00031459 | ||||
Transfer | 20766787 | 126 days ago | IN | 0.0001 ETH | 0.00020088 | ||||
Transfer | 20632618 | 145 days ago | IN | 0.0144 ETH | 0.0001699 | ||||
Transfer | 20632301 | 145 days ago | IN | 0.0144 ETH | 0.00014534 | ||||
Transfer | 20631430 | 145 days ago | IN | 0.0144 ETH | 0.00014335 | ||||
Transfer | 20623978 | 146 days ago | IN | 0.0144 ETH | 0.00014899 | ||||
Transfer | 20588332 | 151 days ago | IN | 0.0144 ETH | 0.00012131 | ||||
Transfer | 20430731 | 173 days ago | IN | 0.0001 ETH | 0.00055272 |
Latest 8 internal transactions
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
20766815 | 126 days ago | 0.00009975 ETH | ||||
20766787 | 126 days ago | 0.00009975 ETH | ||||
20632618 | 145 days ago | 0.014364 ETH | ||||
20632301 | 145 days ago | 0.014364 ETH | ||||
20631430 | 145 days ago | 0.014364 ETH | ||||
20623978 | 146 days ago | 0.014364 ETH | ||||
20588332 | 151 days ago | 0.014364 ETH | ||||
20430731 | 173 days ago | 0.00009975 ETH |
Loading...
Loading
Contract Name:
KurofuneNFTMarketplace
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0 pragma solidity >=0.7.0 <0.9.0; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./KurofuneNFT.sol"; contract KurofuneNFTMarketplace is ReentrancyGuard, Ownable { uint256 public serviceFeePercent = 25; // 2.5% bytes32 constant DOMAIN_TYPEHASH = keccak256("EIP712Domain(string name,string version,address verifyingContract)"); bytes32 constant ASSEST_TYPEHASH = keccak256("Assest(address assestClass,uint256 tokenId,uint256 amount,uint256 price,uint256 startDate,uint256 endDate,uint256 royalty,string salt)"); bytes32 constant LISTING_TYPEHASH = keccak256("Listing(address maker,Assest makeAssest)Assest(address assestClass,uint256 tokenId,uint256 amount,uint256 price,uint256 startDate,uint256 endDate,uint256 royalty,string salt)"); struct TransferParams { address nftOwner; address assestClass; uint256 tokenId; uint256 amount; uint256 amountTotal; uint256 price; uint256 startDate; uint256 endDate; uint96 royalty; uint tokenType; string salt; uint8 v; bytes32 r; bytes32 s; } function setServiceFeePercent(uint256 _serviceFeePercent) external onlyOwner { serviceFeePercent = _serviceFeePercent; } function hashTransferData(TransferParams memory params) external view returns(bytes32) { bytes32 eip712DomainHash = keccak256( abi.encode( DOMAIN_TYPEHASH, keccak256("Kurofune"), keccak256("1"), address(this) ) ); bytes32 listingHash = keccak256(abi.encode( LISTING_TYPEHASH, params.nftOwner, keccak256(abi.encode( ASSEST_TYPEHASH, params.assestClass, params.tokenId, params.amountTotal, params.price, params.startDate, params.endDate, params.royalty, keccak256(bytes(params.salt)) )) ) ); bytes32 hash = keccak256(abi.encodePacked( "\x19\x01", eip712DomainHash, listingHash )); return hash; } function validate(TransferParams memory params) internal view returns(bool) { bytes32 hash = this.hashTransferData(params); address signer = ecrecover(hash, params.v, params.r, params.s); if (signer == params.nftOwner) { return true; } signer = ecrecover(getEthSignedMessageHash(hash), params.v, params.r, params.s); return signer == params.nftOwner; } function transfer(TransferParams memory params) external payable nonReentrant { uint256 value = msg.value; require(value > 0, "Error-000: No value found"); require(msg.sender != address(0), "Error-002: invalid sender address"); require(validate(params), "Error-003: invalid sign parameters"); require(params.amount <= params.amountTotal, "Error-004: invalid amount"); require(value == params.amount * params.price, "Error-005: invalid value"); require(block.timestamp >= params.startDate && block.timestamp <= params.endDate, "Error-006: invalid date"); // Royalty uint256 royaltyFee = (value * params.royalty / 100) / 100; if (params.royalty > 0) { address royaltyReceiver = getRoyaltyReceiver(params.assestClass, params.tokenId); if(royaltyReceiver != address(0)) { (bool successRoyalty,) = payable(royaltyReceiver).call{value: royaltyFee}(""); require(successRoyalty, "Error-007: pay royalty fee to owner of the NFT error."); } } // Service fee uint256 serviceFee = (value * serviceFeePercent / 100) / 100; // seller = maker (bool success,) = payable(params.nftOwner).call{value: value - serviceFee - royaltyFee}(""); require(success, "Error-008: pay service fee to buyer error."); if (params.tokenType == 0) { IERC721(params.assestClass).transferFrom(params.nftOwner, msg.sender, params.tokenId); } else { IERC1155(params.assestClass).safeTransferFrom(params.nftOwner, msg.sender, params.tokenId, params.amount, ""); } emit Transfer( params.nftOwner, params.assestClass, params.tokenId, params.amount, params.price, msg.sender, params.salt, block.timestamp ); } event Transfer( address indexed owner, address assestClass, uint256 tokenId, uint256 amount, uint256 price, address indexed buyer, string salt, uint256 timestamp ); function getBalance(address account) public view returns(uint256) { return account.balance; } function withdraw() external nonReentrant onlyOwner { //Since the transfer method is no longer safe to use due to gas cost fluctiation, only sends 2300 gas //Call forwards all the gas, risk of reentrance attack, so use reentrance guard modifier (bool success, ) = payable(owner()).call{value: address(this).balance}(""); require(success, "Transfer failed!"); } // Royalty bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a; function checkRoyalty(address _contract) view public returns (bool) { (bool success) = IERC2981(_contract).supportsInterface(_INTERFACE_ID_ERC2981); return success; } function getRoyalty(address contractAddress, uint256 tokenId, uint256 grossSaleValue) view public returns (uint256) { if (checkRoyalty(contractAddress)) { (address royaltyReceiver, uint256 royaltyAmount) = IERC2981(contractAddress).royaltyInfo(tokenId, grossSaleValue); return royaltyAmount; } return 0; } function getRoyaltyReceiver(address contractAddress, uint256 tokenId) view public returns (address) { if (checkRoyalty(contractAddress)) { (address royaltyReceiver, uint256 royaltyAmount) = IERC2981(contractAddress).royaltyInfo(tokenId, 10000); return royaltyReceiver; } return address(0); } function getEthSignedMessageHash(bytes32 _messageHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", _messageHash)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.20; import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Burnable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/common/ERC2981.sol"; contract KurofuneNFT is Initializable, ERC1155Burnable, ERC2981, Ownable { string public baseURI = ""; string public name; string public symbol; mapping(uint256 => bool) public nftsMinted; constructor() ERC1155("") {} function initialize(address initialOwner, string memory _name, string memory _symbol, string memory _baseURI) external initializer { name = _name; symbol = _symbol; baseURI = _baseURI; _transferOwnership(initialOwner); } function uri(uint256 _tokenid) override public view returns (string memory) { return string( abi.encodePacked( baseURI, Strings.toString(_tokenid),".json" ) ); } function setBaseURI(string memory newBaseURI) external onlyOwner { baseURI = newBaseURI; } function mint(uint256 tokenId, uint256 amount, bytes memory data, uint96 feeNumerator) external onlyOwner returns(bool) { if (!nftsMinted[tokenId]) { _mint(msg.sender, tokenId, amount, data); _setTokenRoyalty(tokenId, msg.sender, feeNumerator); nftsMinted[tokenId] = true; emit MintNftEvent(msg.sender, tokenId, amount, feeNumerator, block.timestamp); return false; } return true; } /** @dev Override same interface function in different inheritance. * @param interfaceId Id of an interface to check whether the contract support */ function supportsInterface(bytes4 interfaceId) public view override(ERC1155, ERC2981) returns (bool) { return ERC1155.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId); } event MintNftEvent(address indexed sender, uint256 tokenId, uint256 amount, uint96 feeNumerator, uint256 timestamp); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) external; }
// 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) (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 (last updated v5.0.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.20; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ```solidity * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Storage of the initializable contract. * * It's implemented on a custom ERC-7201 namespace to reduce the risk of storage collisions * when using with upgradeable contracts. * * @custom:storage-location erc7201:openzeppelin.storage.Initializable */ struct InitializableStorage { /** * @dev Indicates that the contract has been initialized. */ uint64 _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool _initializing; } // keccak256(abi.encode(uint256(keccak256("openzeppelin.storage.Initializable")) - 1)) & ~bytes32(uint256(0xff)) bytes32 private constant INITIALIZABLE_STORAGE = 0xf0c57e16840df040f15088dc2f81fe391c3923bec73e23a9662efc9c229c6a00; /** * @dev The contract is already initialized. */ error InvalidInitialization(); /** * @dev The contract is not initializing. */ error NotInitializing(); /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint64 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. * * Similar to `reinitializer(1)`, except that in the context of a constructor an `initializer` may be invoked any * number of times. This behavior in the constructor can be useful during testing and is not expected to be used in * production. * * Emits an {Initialized} event. */ modifier initializer() { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); // Cache values to avoid duplicated sloads bool isTopLevelCall = !$._initializing; uint64 initialized = $._initialized; // Allowed calls: // - initialSetup: the contract is not in the initializing state and no previous version was // initialized // - construction: the contract is initialized at version 1 (no reininitialization) and the // current contract is just being deployed bool initialSetup = initialized == 0 && isTopLevelCall; bool construction = initialized == 1 && address(this).code.length == 0; if (!initialSetup && !construction) { revert InvalidInitialization(); } $._initialized = 1; if (isTopLevelCall) { $._initializing = true; } _; if (isTopLevelCall) { $._initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * A reinitializer may be used after the original initialization step. This is essential to configure modules that * are added through upgrades and that require initialization. * * When `version` is 1, this modifier is similar to `initializer`, except that functions marked with `reinitializer` * cannot be nested. If one is invoked in the context of another, execution will revert. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. * * WARNING: Setting the version to 2**64 - 1 will prevent any future reinitialization. * * Emits an {Initialized} event. */ modifier reinitializer(uint64 version) { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing || $._initialized >= version) { revert InvalidInitialization(); } $._initialized = version; $._initializing = true; _; $._initializing = false; emit Initialized(version); } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { _checkInitializing(); _; } /** * @dev Reverts if the contract is not in an initializing state. See {onlyInitializing}. */ function _checkInitializing() internal view virtual { if (!_isInitializing()) { revert NotInitializing(); } } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. * * Emits an {Initialized} event the first time it is successfully executed. */ function _disableInitializers() internal virtual { // solhint-disable-next-line var-name-mixedcase InitializableStorage storage $ = _getInitializableStorage(); if ($._initializing) { revert InvalidInitialization(); } if ($._initialized != type(uint64).max) { $._initialized = type(uint64).max; emit Initialized(type(uint64).max); } } /** * @dev Returns the highest version that has been initialized. See {reinitializer}. */ function _getInitializedVersion() internal view returns (uint64) { return _getInitializableStorage()._initialized; } /** * @dev Returns `true` if the contract is currently initializing. See {onlyInitializing}. */ function _isInitializing() internal view returns (bool) { return _getInitializableStorage()._initializing; } /** * @dev Returns a pointer to the storage namespace. */ // solhint-disable-next-line var-name-mixedcase function _getInitializableStorage() private pure returns (InitializableStorage storage $) { assembly { $.slot := INITIALIZABLE_STORAGE } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/extensions/ERC1155Burnable.sol) pragma solidity ^0.8.0; import "../ERC1155.sol"; /** * @dev Extension of {ERC1155} that allows token holders to destroy both their * own tokens and those that they have been approved to use. * * _Available since v3.1._ */ abstract contract ERC1155Burnable is ERC1155 { function burn( address account, uint256 id, uint256 value ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not token owner nor approved" ); _burn(account, id, value); } function burnBatch( address account, uint256[] memory ids, uint256[] memory values ) public virtual { require( account == _msgSender() || isApprovedForAll(account, _msgSender()), "ERC1155: caller is not token owner nor approved" ); _burnBatch(account, ids, values); } }
// 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 // 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) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981 is IERC2981, ERC165 { struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981 */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC1155/ERC1155.sol) pragma solidity ^0.8.0; import "./IERC1155.sol"; import "./IERC1155Receiver.sol"; import "./extensions/IERC1155MetadataURI.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using Address for address; // Mapping from token ID to account balances mapping(uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /** * @dev See {_setURI}. */ constructor(string memory uri_) { _setURI(uri_); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: address zero is not a valid owner"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] memory accounts, uint256[] memory ids) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner nor approved" ); _safeTransferFrom(from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not token owner nor approved" ); _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, to, ids, amounts, data); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; emit TransferSingle(operator, from, to, id, amount); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: insufficient balance for transfer"); unchecked { _balances[id][from] = fromBalance - amount; } _balances[id][to] += amount; } emit TransferBatch(operator, from, to, ids, amounts); _afterTokenTransfer(operator, from, to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); _balances[id][to] += amount; emit TransferSingle(operator, address(0), to, id, amount); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint256 i = 0; i < ids.length; i++) { _balances[ids[i]][to] += amounts[i]; } emit TransferBatch(operator, address(0), to, ids, amounts); _afterTokenTransfer(operator, address(0), to, ids, amounts, data); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `from` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have at least `amount` tokens of token type `id`. */ function _burn( address from, uint256 id, uint256 amount ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); uint256[] memory amounts = _asSingletonArray(amount); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } emit TransferSingle(operator, from, address(0), id, amount); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { require(from != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, from, address(0), ids, amounts, ""); for (uint256 i = 0; i < ids.length; i++) { uint256 id = ids[i]; uint256 amount = amounts[i]; uint256 fromBalance = _balances[id][from]; require(fromBalance >= amount, "ERC1155: burn amount exceeds balance"); unchecked { _balances[id][from] = fromBalance - amount; } } emit TransferBatch(operator, from, address(0), ids, amounts); _afterTokenTransfer(operator, from, address(0), ids, amounts, ""); } /** * @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, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `ids` and `amounts` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns ( bytes4 response ) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.0; import "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// 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 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 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 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * * _Available since v4.5._ */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"address","name":"assestClass","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":false,"internalType":"string","name":"salt","type":"string"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"_contract","type":"address"}],"name":"checkRoyalty","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"grossSaleValue","type":"uint256"}],"name":"getRoyalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"contractAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRoyaltyReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"nftOwner","type":"address"},{"internalType":"address","name":"assestClass","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"amountTotal","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"startDate","type":"uint256"},{"internalType":"uint256","name":"endDate","type":"uint256"},{"internalType":"uint96","name":"royalty","type":"uint96"},{"internalType":"uint256","name":"tokenType","type":"uint256"},{"internalType":"string","name":"salt","type":"string"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct KurofuneNFTMarketplace.TransferParams","name":"params","type":"tuple"}],"name":"hashTransferData","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"serviceFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_serviceFeePercent","type":"uint256"}],"name":"setServiceFeePercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"nftOwner","type":"address"},{"internalType":"address","name":"assestClass","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"amountTotal","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"startDate","type":"uint256"},{"internalType":"uint256","name":"endDate","type":"uint256"},{"internalType":"uint96","name":"royalty","type":"uint96"},{"internalType":"uint256","name":"tokenType","type":"uint256"},{"internalType":"string","name":"salt","type":"string"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"internalType":"struct KurofuneNFTMarketplace.TransferParams","name":"params","type":"tuple"}],"name":"transfer","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052601960025534801562000015575f80fd5b5060015f819055506200003d620000316200004360201b60201c565b6200004a60201b60201c565b6200010d565b5f33905090565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b612616806200011b5f395ff3fe6080604052600436106100a6575f3560e01c8063954e350311610063578063954e3503146101b4578063995bc51e146101d0578063e7f4e3f7146101fa578063f2fde38b14610222578063f533b8021461024a578063f8b2cb4f14610286576100a6565b806327071b5a146100aa5780632acf0bf0146100e65780633ccfd60b14610122578063579f048a14610138578063715018a6146101745780638da5cb5b1461018a575b5f80fd5b3480156100b5575f80fd5b506100d060048036038101906100cb91906111d2565b6102c2565b6040516100dd9190611217565b60405180910390f35b3480156100f1575f80fd5b5061010c600480360381019061010791906115b8565b61034e565b604051610119919061160e565b60405180910390f35b34801561012d575f80fd5b506101366104e6565b005b348015610143575f80fd5b5061015e60048036038101906101599190611627565b6105f2565b60405161016b9190611674565b60405180910390f35b34801561017f575f80fd5b50610188610696565b005b348015610195575f80fd5b5061019e6106a9565b6040516101ab9190611674565b60405180910390f35b6101ce60048036038101906101c991906115b8565b6106d1565b005b3480156101db575f80fd5b506101e4610cd7565b6040516101f1919061169c565b60405180910390f35b348015610205575f80fd5b50610220600480360381019061021b91906116b5565b610cdd565b005b34801561022d575f80fd5b50610248600480360381019061024391906111d2565b610cef565b005b348015610255575f80fd5b50610270600480360381019061026b91906116e0565b610d71565b60405161027d919061169c565b60405180910390f35b348015610291575f80fd5b506102ac60048036038101906102a791906111d2565b610e14565b6040516102b9919061169c565b60405180910390f35b5f808273ffffffffffffffffffffffffffffffffffffffff166301ffc9a7632a55205a60e01b6040518263ffffffff1660e01b8152600401610304919061176a565b602060405180830381865afa15801561031f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061034391906117ad565b905080915050919050565b5f807f91ab3d17e3a50a9d89e63fd30b92be7f5336b03b287bb946787a83a9d62a27667fb32ca38952914c59d7f5009eb2060b2f8430141ebc14aaf0ad3ad717a7ba328d7fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6306040516020016103c794939291906117d8565b6040516020818303038152906040528051906020012090505f7fe245029fd3e50504cc55a749b1a56e74467a25948fc89b4b75ab78f82dada782845f01517ffd2a254b9f67b333f944d7643c8d2b9f12151dc1996cff5a67036d36ada573bf8660200151876040015188608001518960a001518a60c001518b60e001518c61010001518d61014001518051906020012060405160200161046f9998979695949392919061182a565b60405160208183030381529060405280519060200120604051602001610497939291906118b5565b6040516020818303038152906040528051906020012090505f82826040516020016104c392919061195e565b604051602081830303815290604052805190602001209050809350505050919050565b60025f540361052a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610521906119ee565b60405180910390fd5b60025f81905550610539610e34565b5f6105426106a9565b73ffffffffffffffffffffffffffffffffffffffff164760405161056590611a39565b5f6040518083038185875af1925050503d805f811461059f576040519150601f19603f3d011682016040523d82523d5f602084013e6105a4565b606091505b50509050806105e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105df90611a97565b60405180910390fd5b5060015f81905550565b5f6105fc836102c2565b1561068c575f808473ffffffffffffffffffffffffffffffffffffffff16632a55205a856127106040518363ffffffff1660e01b8152600401610640929190611af7565b6040805180830381865afa15801561065a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061067e9190611b46565b915091508192505050610690565b5f90505b92915050565b61069e610e34565b6106a75f610eb2565b565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60025f5403610715576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161070c906119ee565b60405180910390fd5b60025f819055505f3490505f8111610762576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161075990611bce565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16036107d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c790611c5c565b60405180910390fd5b6107d982610f75565b610818576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161080f90611cea565b60405180910390fd5b816080015182606001511115610863576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a90611d52565b60405180910390fd5b8160a0015182606001516108779190611d9d565b81146108b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108af90611e28565b60405180910390fd5b8160c0015142101580156108d057508160e001514211155b61090f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161090690611e90565b60405180910390fd5b5f6064808461010001516bffffffffffffffffffffffff16846109329190611d9d565b61093c9190611edb565b6109469190611edb565b90505f8361010001516bffffffffffffffffffffffff161115610a57575f610976846020015185604001516105f2565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610a55575f8173ffffffffffffffffffffffffffffffffffffffff16836040516109d090611a39565b5f6040518083038185875af1925050503d805f8114610a0a576040519150601f19603f3d011682016040523d82523d5f602084013e610a0f565b606091505b5050905080610a53576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4a90611f7b565b60405180910390fd5b505b505b5f60648060025485610a699190611d9d565b610a739190611edb565b610a7d9190611edb565b90505f845f015173ffffffffffffffffffffffffffffffffffffffff16838386610aa79190611f99565b610ab19190611f99565b604051610abd90611a39565b5f6040518083038185875af1925050503d805f8114610af7576040519150601f19603f3d011682016040523d82523d5f602084013e610afc565b606091505b5050905080610b40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b379061203c565b60405180910390fd5b5f85610120015103610bc657846020015173ffffffffffffffffffffffffffffffffffffffff166323b872dd865f01513388604001516040518463ffffffff1660e01b8152600401610b949392919061205a565b5f604051808303815f87803b158015610bab575f80fd5b505af1158015610bbd573d5f803e3d5ffd5b50505050610c42565b846020015173ffffffffffffffffffffffffffffffffffffffff1663f242432a865f015133886040015189606001516040518563ffffffff1660e01b8152600401610c1494939291906120bf565b5f604051808303815f87803b158015610c2b575f80fd5b505af1158015610c3d573d5f803e3d5ffd5b505050505b3373ffffffffffffffffffffffffffffffffffffffff16855f015173ffffffffffffffffffffffffffffffffffffffff167fc87347a396230cce4f71e03f038d79ecd0a94e72d7fbc83bc66bfc6740b4ef3e8760200151886040015189606001518a60a001518b610140015142604051610cc19695949392919061217f565b60405180910390a35050505060015f8190555050565b60025481565b610ce5610e34565b8060028190555050565b610cf7610e34565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610d65576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5c90612255565b60405180910390fd5b610d6e81610eb2565b50565b5f610d7b846102c2565b15610e09575f808573ffffffffffffffffffffffffffffffffffffffff16632a55205a86866040518363ffffffff1660e01b8152600401610dbd929190612273565b6040805180830381865afa158015610dd7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610dfb9190611b46565b915091508092505050610e0d565b5f90505b9392505050565b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b610e3c611131565b73ffffffffffffffffffffffffffffffffffffffff16610e5a6106a9565b73ffffffffffffffffffffffffffffffffffffffff1614610eb0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea7906122e4565b60405180910390fd5b565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f803073ffffffffffffffffffffffffffffffffffffffff16632acf0bf0846040518263ffffffff1660e01b8152600401610fb091906124c0565b602060405180830381865afa158015610fcb573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fef91906124f4565b90505f600182856101600151866101800151876101a001516040515f8152602001604052604051611023949392919061252e565b6020604051602081039080840390855afa158015611043573d5f803e3d5ffd5b505050602060405103519050835f015173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036110905760019250505061112c565b600161109b83611138565b856101600151866101800151876101a001516040515f81526020016040526040516110c9949392919061252e565b6020604051602081039080840390855afa1580156110e9573d5f803e3d5ffd5b505050602060405103519050835f015173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614925050505b919050565b5f33905090565b5f8160405160200161114a91906125bb565b604051602081830303815290604052805190602001209050919050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6111a182611178565b9050919050565b6111b181611197565b81146111bb575f80fd5b50565b5f813590506111cc816111a8565b92915050565b5f602082840312156111e7576111e6611170565b5b5f6111f4848285016111be565b91505092915050565b5f8115159050919050565b611211816111fd565b82525050565b5f60208201905061122a5f830184611208565b92915050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61127a82611234565b810181811067ffffffffffffffff8211171561129957611298611244565b5b80604052505050565b5f6112ab611167565b90506112b78282611271565b919050565b5f80fd5b5f819050919050565b6112d2816112c0565b81146112dc575f80fd5b50565b5f813590506112ed816112c9565b92915050565b5f6bffffffffffffffffffffffff82169050919050565b611313816112f3565b811461131d575f80fd5b50565b5f8135905061132e8161130a565b92915050565b5f80fd5b5f80fd5b5f67ffffffffffffffff82111561135657611355611244565b5b61135f82611234565b9050602081019050919050565b828183375f83830152505050565b5f61138c6113878461133c565b6112a2565b9050828152602081018484840111156113a8576113a7611338565b5b6113b384828561136c565b509392505050565b5f82601f8301126113cf576113ce611334565b5b81356113df84826020860161137a565b91505092915050565b5f60ff82169050919050565b6113fd816113e8565b8114611407575f80fd5b50565b5f81359050611418816113f4565b92915050565b5f819050919050565b6114308161141e565b811461143a575f80fd5b50565b5f8135905061144b81611427565b92915050565b5f6101c0828403121561146757611466611230565b5b6114726101c06112a2565b90505f611481848285016111be565b5f830152506020611494848285016111be565b60208301525060406114a8848285016112df565b60408301525060606114bc848285016112df565b60608301525060806114d0848285016112df565b60808301525060a06114e4848285016112df565b60a08301525060c06114f8848285016112df565b60c08301525060e061150c848285016112df565b60e08301525061010061152184828501611320565b61010083015250610120611537848285016112df565b6101208301525061014082013567ffffffffffffffff81111561155d5761155c6112bc565b5b611569848285016113bb565b6101408301525061016061157f8482850161140a565b610160830152506101806115958482850161143d565b610180830152506101a06115ab8482850161143d565b6101a08301525092915050565b5f602082840312156115cd576115cc611170565b5b5f82013567ffffffffffffffff8111156115ea576115e9611174565b5b6115f684828501611451565b91505092915050565b6116088161141e565b82525050565b5f6020820190506116215f8301846115ff565b92915050565b5f806040838503121561163d5761163c611170565b5b5f61164a858286016111be565b925050602061165b858286016112df565b9150509250929050565b61166e81611197565b82525050565b5f6020820190506116875f830184611665565b92915050565b611696816112c0565b82525050565b5f6020820190506116af5f83018461168d565b92915050565b5f602082840312156116ca576116c9611170565b5b5f6116d7848285016112df565b91505092915050565b5f805f606084860312156116f7576116f6611170565b5b5f611704868287016111be565b9350506020611715868287016112df565b9250506040611726868287016112df565b9150509250925092565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61176481611730565b82525050565b5f60208201905061177d5f83018461175b565b92915050565b61178c816111fd565b8114611796575f80fd5b50565b5f815190506117a781611783565b92915050565b5f602082840312156117c2576117c1611170565b5b5f6117cf84828501611799565b91505092915050565b5f6080820190506117eb5f8301876115ff565b6117f860208301866115ff565b61180560408301856115ff565b6118126060830184611665565b95945050505050565b611824816112f3565b82525050565b5f6101208201905061183e5f83018c6115ff565b61184b602083018b611665565b611858604083018a61168d565b611865606083018961168d565b611872608083018861168d565b61187f60a083018761168d565b61188c60c083018661168d565b61189960e083018561181b565b6118a76101008301846115ff565b9a9950505050505050505050565b5f6060820190506118c85f8301866115ff565b6118d56020830185611665565b6118e260408301846115ff565b949350505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f6119286002836118ea565b9150611933826118f4565b600282019050919050565b5f819050919050565b6119586119538261141e565b61193e565b82525050565b5f6119688261191c565b91506119748285611947565b6020820191506119848284611947565b6020820191508190509392505050565b5f82825260208201905092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c005f82015250565b5f6119d8601f83611994565b91506119e3826119a4565b602082019050919050565b5f6020820190508181035f830152611a05816119cc565b9050919050565b5f81905092915050565b50565b5f611a245f83611a0c565b9150611a2f82611a16565b5f82019050919050565b5f611a4382611a19565b9150819050919050565b7f5472616e73666572206661696c656421000000000000000000000000000000005f82015250565b5f611a81601083611994565b9150611a8c82611a4d565b602082019050919050565b5f6020820190508181035f830152611aae81611a75565b9050919050565b5f819050919050565b5f819050919050565b5f611ae1611adc611ad784611ab5565b611abe565b6112c0565b9050919050565b611af181611ac7565b82525050565b5f604082019050611b0a5f83018561168d565b611b176020830184611ae8565b9392505050565b5f81519050611b2c816111a8565b92915050565b5f81519050611b40816112c9565b92915050565b5f8060408385031215611b5c57611b5b611170565b5b5f611b6985828601611b1e565b9250506020611b7a85828601611b32565b9150509250929050565b7f4572726f722d3030303a204e6f2076616c756520666f756e64000000000000005f82015250565b5f611bb8601983611994565b9150611bc382611b84565b602082019050919050565b5f6020820190508181035f830152611be581611bac565b9050919050565b7f4572726f722d3030323a20696e76616c69642073656e646572206164647265735f8201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b5f611c46602183611994565b9150611c5182611bec565b604082019050919050565b5f6020820190508181035f830152611c7381611c3a565b9050919050565b7f4572726f722d3030333a20696e76616c6964207369676e20706172616d6574655f8201527f7273000000000000000000000000000000000000000000000000000000000000602082015250565b5f611cd4602283611994565b9150611cdf82611c7a565b604082019050919050565b5f6020820190508181035f830152611d0181611cc8565b9050919050565b7f4572726f722d3030343a20696e76616c696420616d6f756e74000000000000005f82015250565b5f611d3c601983611994565b9150611d4782611d08565b602082019050919050565b5f6020820190508181035f830152611d6981611d30565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611da7826112c0565b9150611db2836112c0565b9250828202611dc0816112c0565b91508282048414831517611dd757611dd6611d70565b5b5092915050565b7f4572726f722d3030353a20696e76616c69642076616c756500000000000000005f82015250565b5f611e12601883611994565b9150611e1d82611dde565b602082019050919050565b5f6020820190508181035f830152611e3f81611e06565b9050919050565b7f4572726f722d3030363a20696e76616c696420646174650000000000000000005f82015250565b5f611e7a601783611994565b9150611e8582611e46565b602082019050919050565b5f6020820190508181035f830152611ea781611e6e565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f611ee5826112c0565b9150611ef0836112c0565b925082611f0057611eff611eae565b5b828204905092915050565b7f4572726f722d3030373a2070617920726f79616c74792066656520746f206f775f8201527f6e6572206f6620746865204e4654206572726f722e0000000000000000000000602082015250565b5f611f65603583611994565b9150611f7082611f0b565b604082019050919050565b5f6020820190508181035f830152611f9281611f59565b9050919050565b5f611fa3826112c0565b9150611fae836112c0565b9250828203905081811115611fc657611fc5611d70565b5b92915050565b7f4572726f722d3030383a2070617920736572766963652066656520746f2062755f8201527f796572206572726f722e00000000000000000000000000000000000000000000602082015250565b5f612026602a83611994565b915061203182611fcc565b604082019050919050565b5f6020820190508181035f8301526120538161201a565b9050919050565b5f60608201905061206d5f830186611665565b61207a6020830185611665565b612087604083018461168d565b949350505050565b5f82825260208201905092915050565b5f6120aa5f8361208f565b91506120b582611a16565b5f82019050919050565b5f60a0820190506120d25f830187611665565b6120df6020830186611665565b6120ec604083018561168d565b6120f9606083018461168d565b818103608083015261210a8161209f565b905095945050505050565b5f81519050919050565b5f5b8381101561213c578082015181840152602081019050612121565b5f8484015250505050565b5f61215182612115565b61215b8185611994565b935061216b81856020860161211f565b61217481611234565b840191505092915050565b5f60c0820190506121925f830189611665565b61219f602083018861168d565b6121ac604083018761168d565b6121b9606083018661168d565b81810360808301526121cb8185612147565b90506121da60a083018461168d565b979650505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f61223f602683611994565b915061224a826121e5565b604082019050919050565b5f6020820190508181035f83015261226c81612233565b9050919050565b5f6040820190506122865f83018561168d565b612293602083018461168d565b9392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6122ce602083611994565b91506122d98261229a565b602082019050919050565b5f6020820190508181035f8301526122fb816122c2565b9050919050565b61230b81611197565b82525050565b61231a816112c0565b82525050565b612329816112f3565b82525050565b5f82825260208201905092915050565b5f61234982612115565b612353818561232f565b935061236381856020860161211f565b61236c81611234565b840191505092915050565b612380816113e8565b82525050565b61238f8161141e565b82525050565b5f6101c083015f8301516123ab5f860182612302565b5060208301516123be6020860182612302565b5060408301516123d16040860182612311565b5060608301516123e46060860182612311565b5060808301516123f76080860182612311565b5060a083015161240a60a0860182612311565b5060c083015161241d60c0860182612311565b5060e083015161243060e0860182612311565b50610100830151612445610100860182612320565b5061012083015161245a610120860182612311565b50610140830151848203610140860152612474828261233f565b91505061016083015161248b610160860182612377565b506101808301516124a0610180860182612386565b506101a08301516124b56101a0860182612386565b508091505092915050565b5f6020820190508181035f8301526124d88184612395565b905092915050565b5f815190506124ee81611427565b92915050565b5f6020828403121561250957612508611170565b5b5f612516848285016124e0565b91505092915050565b612528816113e8565b82525050565b5f6080820190506125415f8301876115ff565b61254e602083018661251f565b61255b60408301856115ff565b61256860608301846115ff565b95945050505050565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000005f82015250565b5f6125a5601c836118ea565b91506125b082612571565b601c82019050919050565b5f6125c582612599565b91506125d18284611947565b6020820191508190509291505056fea2646970667358221220e894ed17fb09272355cba100f6cbdc78f6afb395aad1dbed7222f4c1e785de5d64736f6c63430008140033
Deployed Bytecode
0x6080604052600436106100a6575f3560e01c8063954e350311610063578063954e3503146101b4578063995bc51e146101d0578063e7f4e3f7146101fa578063f2fde38b14610222578063f533b8021461024a578063f8b2cb4f14610286576100a6565b806327071b5a146100aa5780632acf0bf0146100e65780633ccfd60b14610122578063579f048a14610138578063715018a6146101745780638da5cb5b1461018a575b5f80fd5b3480156100b5575f80fd5b506100d060048036038101906100cb91906111d2565b6102c2565b6040516100dd9190611217565b60405180910390f35b3480156100f1575f80fd5b5061010c600480360381019061010791906115b8565b61034e565b604051610119919061160e565b60405180910390f35b34801561012d575f80fd5b506101366104e6565b005b348015610143575f80fd5b5061015e60048036038101906101599190611627565b6105f2565b60405161016b9190611674565b60405180910390f35b34801561017f575f80fd5b50610188610696565b005b348015610195575f80fd5b5061019e6106a9565b6040516101ab9190611674565b60405180910390f35b6101ce60048036038101906101c991906115b8565b6106d1565b005b3480156101db575f80fd5b506101e4610cd7565b6040516101f1919061169c565b60405180910390f35b348015610205575f80fd5b50610220600480360381019061021b91906116b5565b610cdd565b005b34801561022d575f80fd5b50610248600480360381019061024391906111d2565b610cef565b005b348015610255575f80fd5b50610270600480360381019061026b91906116e0565b610d71565b60405161027d919061169c565b60405180910390f35b348015610291575f80fd5b506102ac60048036038101906102a791906111d2565b610e14565b6040516102b9919061169c565b60405180910390f35b5f808273ffffffffffffffffffffffffffffffffffffffff166301ffc9a7632a55205a60e01b6040518263ffffffff1660e01b8152600401610304919061176a565b602060405180830381865afa15801561031f573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061034391906117ad565b905080915050919050565b5f807f91ab3d17e3a50a9d89e63fd30b92be7f5336b03b287bb946787a83a9d62a27667fb32ca38952914c59d7f5009eb2060b2f8430141ebc14aaf0ad3ad717a7ba328d7fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc6306040516020016103c794939291906117d8565b6040516020818303038152906040528051906020012090505f7fe245029fd3e50504cc55a749b1a56e74467a25948fc89b4b75ab78f82dada782845f01517ffd2a254b9f67b333f944d7643c8d2b9f12151dc1996cff5a67036d36ada573bf8660200151876040015188608001518960a001518a60c001518b60e001518c61010001518d61014001518051906020012060405160200161046f9998979695949392919061182a565b60405160208183030381529060405280519060200120604051602001610497939291906118b5565b6040516020818303038152906040528051906020012090505f82826040516020016104c392919061195e565b604051602081830303815290604052805190602001209050809350505050919050565b60025f540361052a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610521906119ee565b60405180910390fd5b60025f81905550610539610e34565b5f6105426106a9565b73ffffffffffffffffffffffffffffffffffffffff164760405161056590611a39565b5f6040518083038185875af1925050503d805f811461059f576040519150601f19603f3d011682016040523d82523d5f602084013e6105a4565b606091505b50509050806105e8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105df90611a97565b60405180910390fd5b5060015f81905550565b5f6105fc836102c2565b1561068c575f808473ffffffffffffffffffffffffffffffffffffffff16632a55205a856127106040518363ffffffff1660e01b8152600401610640929190611af7565b6040805180830381865afa15801561065a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061067e9190611b46565b915091508192505050610690565b5f90505b92915050565b61069e610e34565b6106a75f610eb2565b565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60025f5403610715576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161070c906119ee565b60405180910390fd5b60025f819055505f3490505f8111610762576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161075990611bce565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16036107d0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107c790611c5c565b60405180910390fd5b6107d982610f75565b610818576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161080f90611cea565b60405180910390fd5b816080015182606001511115610863576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161085a90611d52565b60405180910390fd5b8160a0015182606001516108779190611d9d565b81146108b8576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108af90611e28565b60405180910390fd5b8160c0015142101580156108d057508160e001514211155b61090f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161090690611e90565b60405180910390fd5b5f6064808461010001516bffffffffffffffffffffffff16846109329190611d9d565b61093c9190611edb565b6109469190611edb565b90505f8361010001516bffffffffffffffffffffffff161115610a57575f610976846020015185604001516105f2565b90505f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614610a55575f8173ffffffffffffffffffffffffffffffffffffffff16836040516109d090611a39565b5f6040518083038185875af1925050503d805f8114610a0a576040519150601f19603f3d011682016040523d82523d5f602084013e610a0f565b606091505b5050905080610a53576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a4a90611f7b565b60405180910390fd5b505b505b5f60648060025485610a699190611d9d565b610a739190611edb565b610a7d9190611edb565b90505f845f015173ffffffffffffffffffffffffffffffffffffffff16838386610aa79190611f99565b610ab19190611f99565b604051610abd90611a39565b5f6040518083038185875af1925050503d805f8114610af7576040519150601f19603f3d011682016040523d82523d5f602084013e610afc565b606091505b5050905080610b40576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b379061203c565b60405180910390fd5b5f85610120015103610bc657846020015173ffffffffffffffffffffffffffffffffffffffff166323b872dd865f01513388604001516040518463ffffffff1660e01b8152600401610b949392919061205a565b5f604051808303815f87803b158015610bab575f80fd5b505af1158015610bbd573d5f803e3d5ffd5b50505050610c42565b846020015173ffffffffffffffffffffffffffffffffffffffff1663f242432a865f015133886040015189606001516040518563ffffffff1660e01b8152600401610c1494939291906120bf565b5f604051808303815f87803b158015610c2b575f80fd5b505af1158015610c3d573d5f803e3d5ffd5b505050505b3373ffffffffffffffffffffffffffffffffffffffff16855f015173ffffffffffffffffffffffffffffffffffffffff167fc87347a396230cce4f71e03f038d79ecd0a94e72d7fbc83bc66bfc6740b4ef3e8760200151886040015189606001518a60a001518b610140015142604051610cc19695949392919061217f565b60405180910390a35050505060015f8190555050565b60025481565b610ce5610e34565b8060028190555050565b610cf7610e34565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610d65576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5c90612255565b60405180910390fd5b610d6e81610eb2565b50565b5f610d7b846102c2565b15610e09575f808573ffffffffffffffffffffffffffffffffffffffff16632a55205a86866040518363ffffffff1660e01b8152600401610dbd929190612273565b6040805180830381865afa158015610dd7573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610dfb9190611b46565b915091508092505050610e0d565b5f90505b9392505050565b5f8173ffffffffffffffffffffffffffffffffffffffff16319050919050565b610e3c611131565b73ffffffffffffffffffffffffffffffffffffffff16610e5a6106a9565b73ffffffffffffffffffffffffffffffffffffffff1614610eb0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ea7906122e4565b60405180910390fd5b565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b5f803073ffffffffffffffffffffffffffffffffffffffff16632acf0bf0846040518263ffffffff1660e01b8152600401610fb091906124c0565b602060405180830381865afa158015610fcb573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fef91906124f4565b90505f600182856101600151866101800151876101a001516040515f8152602001604052604051611023949392919061252e565b6020604051602081039080840390855afa158015611043573d5f803e3d5ffd5b505050602060405103519050835f015173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16036110905760019250505061112c565b600161109b83611138565b856101600151866101800151876101a001516040515f81526020016040526040516110c9949392919061252e565b6020604051602081039080840390855afa1580156110e9573d5f803e3d5ffd5b505050602060405103519050835f015173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614925050505b919050565b5f33905090565b5f8160405160200161114a91906125bb565b604051602081830303815290604052805190602001209050919050565b5f604051905090565b5f80fd5b5f80fd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f6111a182611178565b9050919050565b6111b181611197565b81146111bb575f80fd5b50565b5f813590506111cc816111a8565b92915050565b5f602082840312156111e7576111e6611170565b5b5f6111f4848285016111be565b91505092915050565b5f8115159050919050565b611211816111fd565b82525050565b5f60208201905061122a5f830184611208565b92915050565b5f80fd5b5f601f19601f8301169050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b61127a82611234565b810181811067ffffffffffffffff8211171561129957611298611244565b5b80604052505050565b5f6112ab611167565b90506112b78282611271565b919050565b5f80fd5b5f819050919050565b6112d2816112c0565b81146112dc575f80fd5b50565b5f813590506112ed816112c9565b92915050565b5f6bffffffffffffffffffffffff82169050919050565b611313816112f3565b811461131d575f80fd5b50565b5f8135905061132e8161130a565b92915050565b5f80fd5b5f80fd5b5f67ffffffffffffffff82111561135657611355611244565b5b61135f82611234565b9050602081019050919050565b828183375f83830152505050565b5f61138c6113878461133c565b6112a2565b9050828152602081018484840111156113a8576113a7611338565b5b6113b384828561136c565b509392505050565b5f82601f8301126113cf576113ce611334565b5b81356113df84826020860161137a565b91505092915050565b5f60ff82169050919050565b6113fd816113e8565b8114611407575f80fd5b50565b5f81359050611418816113f4565b92915050565b5f819050919050565b6114308161141e565b811461143a575f80fd5b50565b5f8135905061144b81611427565b92915050565b5f6101c0828403121561146757611466611230565b5b6114726101c06112a2565b90505f611481848285016111be565b5f830152506020611494848285016111be565b60208301525060406114a8848285016112df565b60408301525060606114bc848285016112df565b60608301525060806114d0848285016112df565b60808301525060a06114e4848285016112df565b60a08301525060c06114f8848285016112df565b60c08301525060e061150c848285016112df565b60e08301525061010061152184828501611320565b61010083015250610120611537848285016112df565b6101208301525061014082013567ffffffffffffffff81111561155d5761155c6112bc565b5b611569848285016113bb565b6101408301525061016061157f8482850161140a565b610160830152506101806115958482850161143d565b610180830152506101a06115ab8482850161143d565b6101a08301525092915050565b5f602082840312156115cd576115cc611170565b5b5f82013567ffffffffffffffff8111156115ea576115e9611174565b5b6115f684828501611451565b91505092915050565b6116088161141e565b82525050565b5f6020820190506116215f8301846115ff565b92915050565b5f806040838503121561163d5761163c611170565b5b5f61164a858286016111be565b925050602061165b858286016112df565b9150509250929050565b61166e81611197565b82525050565b5f6020820190506116875f830184611665565b92915050565b611696816112c0565b82525050565b5f6020820190506116af5f83018461168d565b92915050565b5f602082840312156116ca576116c9611170565b5b5f6116d7848285016112df565b91505092915050565b5f805f606084860312156116f7576116f6611170565b5b5f611704868287016111be565b9350506020611715868287016112df565b9250506040611726868287016112df565b9150509250925092565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b61176481611730565b82525050565b5f60208201905061177d5f83018461175b565b92915050565b61178c816111fd565b8114611796575f80fd5b50565b5f815190506117a781611783565b92915050565b5f602082840312156117c2576117c1611170565b5b5f6117cf84828501611799565b91505092915050565b5f6080820190506117eb5f8301876115ff565b6117f860208301866115ff565b61180560408301856115ff565b6118126060830184611665565b95945050505050565b611824816112f3565b82525050565b5f6101208201905061183e5f83018c6115ff565b61184b602083018b611665565b611858604083018a61168d565b611865606083018961168d565b611872608083018861168d565b61187f60a083018761168d565b61188c60c083018661168d565b61189960e083018561181b565b6118a76101008301846115ff565b9a9950505050505050505050565b5f6060820190506118c85f8301866115ff565b6118d56020830185611665565b6118e260408301846115ff565b949350505050565b5f81905092915050565b7f19010000000000000000000000000000000000000000000000000000000000005f82015250565b5f6119286002836118ea565b9150611933826118f4565b600282019050919050565b5f819050919050565b6119586119538261141e565b61193e565b82525050565b5f6119688261191c565b91506119748285611947565b6020820191506119848284611947565b6020820191508190509392505050565b5f82825260208201905092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c005f82015250565b5f6119d8601f83611994565b91506119e3826119a4565b602082019050919050565b5f6020820190508181035f830152611a05816119cc565b9050919050565b5f81905092915050565b50565b5f611a245f83611a0c565b9150611a2f82611a16565b5f82019050919050565b5f611a4382611a19565b9150819050919050565b7f5472616e73666572206661696c656421000000000000000000000000000000005f82015250565b5f611a81601083611994565b9150611a8c82611a4d565b602082019050919050565b5f6020820190508181035f830152611aae81611a75565b9050919050565b5f819050919050565b5f819050919050565b5f611ae1611adc611ad784611ab5565b611abe565b6112c0565b9050919050565b611af181611ac7565b82525050565b5f604082019050611b0a5f83018561168d565b611b176020830184611ae8565b9392505050565b5f81519050611b2c816111a8565b92915050565b5f81519050611b40816112c9565b92915050565b5f8060408385031215611b5c57611b5b611170565b5b5f611b6985828601611b1e565b9250506020611b7a85828601611b32565b9150509250929050565b7f4572726f722d3030303a204e6f2076616c756520666f756e64000000000000005f82015250565b5f611bb8601983611994565b9150611bc382611b84565b602082019050919050565b5f6020820190508181035f830152611be581611bac565b9050919050565b7f4572726f722d3030323a20696e76616c69642073656e646572206164647265735f8201527f7300000000000000000000000000000000000000000000000000000000000000602082015250565b5f611c46602183611994565b9150611c5182611bec565b604082019050919050565b5f6020820190508181035f830152611c7381611c3a565b9050919050565b7f4572726f722d3030333a20696e76616c6964207369676e20706172616d6574655f8201527f7273000000000000000000000000000000000000000000000000000000000000602082015250565b5f611cd4602283611994565b9150611cdf82611c7a565b604082019050919050565b5f6020820190508181035f830152611d0181611cc8565b9050919050565b7f4572726f722d3030343a20696e76616c696420616d6f756e74000000000000005f82015250565b5f611d3c601983611994565b9150611d4782611d08565b602082019050919050565b5f6020820190508181035f830152611d6981611d30565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611da7826112c0565b9150611db2836112c0565b9250828202611dc0816112c0565b91508282048414831517611dd757611dd6611d70565b5b5092915050565b7f4572726f722d3030353a20696e76616c69642076616c756500000000000000005f82015250565b5f611e12601883611994565b9150611e1d82611dde565b602082019050919050565b5f6020820190508181035f830152611e3f81611e06565b9050919050565b7f4572726f722d3030363a20696e76616c696420646174650000000000000000005f82015250565b5f611e7a601783611994565b9150611e8582611e46565b602082019050919050565b5f6020820190508181035f830152611ea781611e6e565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f611ee5826112c0565b9150611ef0836112c0565b925082611f0057611eff611eae565b5b828204905092915050565b7f4572726f722d3030373a2070617920726f79616c74792066656520746f206f775f8201527f6e6572206f6620746865204e4654206572726f722e0000000000000000000000602082015250565b5f611f65603583611994565b9150611f7082611f0b565b604082019050919050565b5f6020820190508181035f830152611f9281611f59565b9050919050565b5f611fa3826112c0565b9150611fae836112c0565b9250828203905081811115611fc657611fc5611d70565b5b92915050565b7f4572726f722d3030383a2070617920736572766963652066656520746f2062755f8201527f796572206572726f722e00000000000000000000000000000000000000000000602082015250565b5f612026602a83611994565b915061203182611fcc565b604082019050919050565b5f6020820190508181035f8301526120538161201a565b9050919050565b5f60608201905061206d5f830186611665565b61207a6020830185611665565b612087604083018461168d565b949350505050565b5f82825260208201905092915050565b5f6120aa5f8361208f565b91506120b582611a16565b5f82019050919050565b5f60a0820190506120d25f830187611665565b6120df6020830186611665565b6120ec604083018561168d565b6120f9606083018461168d565b818103608083015261210a8161209f565b905095945050505050565b5f81519050919050565b5f5b8381101561213c578082015181840152602081019050612121565b5f8484015250505050565b5f61215182612115565b61215b8185611994565b935061216b81856020860161211f565b61217481611234565b840191505092915050565b5f60c0820190506121925f830189611665565b61219f602083018861168d565b6121ac604083018761168d565b6121b9606083018661168d565b81810360808301526121cb8185612147565b90506121da60a083018461168d565b979650505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f61223f602683611994565b915061224a826121e5565b604082019050919050565b5f6020820190508181035f83015261226c81612233565b9050919050565b5f6040820190506122865f83018561168d565b612293602083018461168d565b9392505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6122ce602083611994565b91506122d98261229a565b602082019050919050565b5f6020820190508181035f8301526122fb816122c2565b9050919050565b61230b81611197565b82525050565b61231a816112c0565b82525050565b612329816112f3565b82525050565b5f82825260208201905092915050565b5f61234982612115565b612353818561232f565b935061236381856020860161211f565b61236c81611234565b840191505092915050565b612380816113e8565b82525050565b61238f8161141e565b82525050565b5f6101c083015f8301516123ab5f860182612302565b5060208301516123be6020860182612302565b5060408301516123d16040860182612311565b5060608301516123e46060860182612311565b5060808301516123f76080860182612311565b5060a083015161240a60a0860182612311565b5060c083015161241d60c0860182612311565b5060e083015161243060e0860182612311565b50610100830151612445610100860182612320565b5061012083015161245a610120860182612311565b50610140830151848203610140860152612474828261233f565b91505061016083015161248b610160860182612377565b506101808301516124a0610180860182612386565b506101a08301516124b56101a0860182612386565b508091505092915050565b5f6020820190508181035f8301526124d88184612395565b905092915050565b5f815190506124ee81611427565b92915050565b5f6020828403121561250957612508611170565b5b5f612516848285016124e0565b91505092915050565b612528816113e8565b82525050565b5f6080820190506125415f8301876115ff565b61254e602083018661251f565b61255b60408301856115ff565b61256860608301846115ff565b95945050505050565b7f19457468657265756d205369676e6564204d6573736167653a0a3332000000005f82015250565b5f6125a5601c836118ea565b91506125b082612571565b601c82019050919050565b5f6125c582612599565b91506125d18284611947565b6020820191508190509291505056fea2646970667358221220e894ed17fb09272355cba100f6cbdc78f6afb395aad1dbed7222f4c1e785de5d64736f6c63430008140033
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.