- Contract name:
- ERC721RaribleMinimal
- Optimization enabled
- true
- Compiler version
- v0.7.6+commit.7338295f
- Optimization runs
- 200
- EVM Version
- istanbul
- Verified at
- 2023-11-23T15:04:08.484434Z
@rarible/tokens/contracts/erc-721-minimal/ERC721RaribleMinimal.sol
// SPDX-License-Identifier: MIT pragma solidity 0.7.6; pragma abicoder v2; import "./ERC721BaseMinimal.sol"; import "../IsPrivateCollection.sol"; import "../access/MinterAccessControl.sol"; contract ERC721RaribleMinimal is ERC721BaseMinimal, IsPrivateCollection, MinterAccessControl { event CreateERC721Rarible(address owner, string name, string symbol); event CreateERC721RaribleUser(address owner, string name, string symbol); function __ERC721RaribleUser_init(string memory _name, string memory _symbol, string memory baseURI, string memory contractURI, address[] memory operators, address transferProxy, address lazyTransferProxy) external virtual { __ERC721Rarible_init_unchained(_name, _symbol, baseURI, contractURI, transferProxy, lazyTransferProxy); isPrivate = true; emit CreateERC721RaribleUser(_msgSender(), _name, _symbol); } function __ERC721Rarible_init(string memory _name, string memory _symbol, string memory baseURI, string memory contractURI, address transferProxy, address lazyTransferProxy) external virtual { __ERC721Rarible_init_unchained(_name, _symbol, baseURI, contractURI, transferProxy, lazyTransferProxy); isPrivate = false; emit CreateERC721Rarible(_msgSender(), _name, _symbol); } function __ERC721Rarible_init_unchained(string memory _name, string memory _symbol, string memory baseURI, string memory contractURI, address transferProxy, address lazyTransferProxy) internal initializer { _setBaseURI(baseURI); __ERC721Lazy_init_unchained(); __RoyaltiesV2Upgradeable_init_unchained(); __Context_init_unchained(); __ERC165_init_unchained(); __Ownable_init_unchained(); __ERC721Burnable_init_unchained(); __Mint721Validator_init_unchained(); __MinterAccessControl_init_unchained(); __HasContractURI_init_unchained(contractURI); __ERC721_init_unchained(_name, _symbol); //setting default approver for transferProxies _setDefaultApproval(transferProxy, true); _setDefaultApproval(lazyTransferProxy, true); } function mintAndTransfer(LibERC721LazyMint.Mint721Data memory data, address to) public override virtual { if (isPrivate){ require(owner() == data.creators[0].account || isMinter(data.creators[0].account), "not owner or minter"); } super.mintAndTransfer(data, to); } }
@rarible/tokens/contracts/Mint721Validator.sol
// SPDX-License-Identifier: MIT pragma solidity 0.7.6; import "./erc-1271/ERC1271Validator.sol"; import "@rarible/lazy-mint/contracts/erc-721/LibERC721LazyMint.sol"; contract Mint721Validator is ERC1271Validator { function __Mint721Validator_init_unchained() internal initializer { __EIP712_init_unchained("Mint721", "1"); } function validate(address account, bytes32 hash, bytes memory signature) internal view { validate1271(account, hash, signature); } uint256[50] private __gap; }
@rarible/tokens/contracts/erc-721-minimal/ERC721UpgradeableMinimal.sol
// SPDX-License-Identifier: MIT pragma solidity 0.7.6; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721MetadataUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/introspection/ERC165Upgradeable.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721UpgradeableMinimal is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /* * bytes4(keccak256('balanceOf(address)')) == 0x70a08231 * bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e * bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3 * bytes4(keccak256('getApproved(uint256)')) == 0x081812fc * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465 * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5 * bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd * bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e * bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde * * => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^ * 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd */ bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd; /* * bytes4(keccak256('name()')) == 0x06fdde03 * bytes4(keccak256('symbol()')) == 0x95d89b41 * bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd * * => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f */ bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; // Mapping from token ID to flag == true, means token already burned mapping(uint256 => bool) private _burnedTokens; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init(string memory name_, string memory symbol_) internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal initializer { _name = name_; _symbol = symbol_; // register the supported interfaces to conform to ERC721 via ERC165 _registerInterface(_INTERFACE_ID_ERC721); _registerInterface(_INTERFACE_ID_ERC721_METADATA); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721UpgradeableMinimal.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721UpgradeableMinimal.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_burnedTokens[tokenId], "token already burned"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; _emitMintEvent(to, tokenId); } function _emitMintEvent(address to, uint tokenId) internal virtual { emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721UpgradeableMinimal.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _clearMetadata(tokenId); _balances[owner] -= 1; delete _owners[tokenId]; //set token is burned _setBurned(tokenId); emit Transfer(owner, address(0), tokenId); } /*Set token with tokenId burned*/ function _setBurned(uint256 tokenId) internal { _burnedTokens[tokenId] = true; } function _clearMetadata(uint256 tokenId) internal virtual { } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721UpgradeableMinimal.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721UpgradeableMinimal.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} uint256[43] private __gap; }
@rarible/lib-part/contracts/LibPart.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; library LibPart { bytes32 public constant TYPE_HASH = keccak256("Part(address account,uint96 value)"); struct Part { address payable account; uint96 value; } function hash(Part memory part) internal pure returns (bytes32) { return keccak256(abi.encode(TYPE_HASH, part.account, part.value)); } }
@rarible/lazy-mint/contracts/erc-721/IERC721LazyMint.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; pragma abicoder v2; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol"; import "./LibERC721LazyMint.sol"; import "@rarible/lib-part/contracts/LibPart.sol"; interface IERC721LazyMint is IERC721Upgradeable { event Creators( uint256 tokenId, LibPart.Part[] creators ); function mintAndTransfer( LibERC721LazyMint.Mint721Data memory data, address to ) external; function transferFromOrMint( LibERC721LazyMint.Mint721Data memory data, address from, address to ) external; }
@rarible/tokens/contracts/HasContractURI.sol
// SPDX-License-Identifier: MIT pragma solidity 0.7.6; import "@openzeppelin/contracts-upgradeable/introspection/ERC165Upgradeable.sol"; abstract contract HasContractURI is ERC165Upgradeable { string public contractURI; /* * bytes4(keccak256('contractURI()')) == 0xe8a3d485 */ bytes4 private constant _INTERFACE_ID_CONTRACT_URI = 0xe8a3d485; function __HasContractURI_init_unchained(string memory _contractURI) internal initializer { contractURI = _contractURI; _registerInterface(_INTERFACE_ID_CONTRACT_URI); } /** * @dev Internal function to set the contract URI * @param _contractURI string URI prefix to assign */ function _setContractURI(string memory _contractURI) internal { contractURI = _contractURI; } uint256[49] private __gap; }
@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
@rarible/lib-signature/contracts/ERC1271.sol
// SPDX-License-Identifier: MIT pragma solidity 0.7.6; abstract contract ERC1271 { bytes4 constant public ERC1271_INTERFACE_ID = 0xfb855dc9; // this.isValidSignature.selector bytes4 constant public ERC1271_RETURN_VALID_SIGNATURE = 0x1626ba7e; bytes4 constant public ERC1271_RETURN_INVALID_SIGNATURE = 0x00000000; /** * @dev Function must be implemented by deriving contract * @param _hash Arbitrary length data signed on the behalf of address(this) * @param _signature Signature byte array associated with _data * @return A bytes4 magic value 0x1626ba7e if the signature check passes, 0x00000000 if not * * MUST NOT modify state (using STATICCALL for solc < 0.5, view modifier for solc > 0.5) * MUST allow external calls */ function isValidSignature(bytes32 _hash, bytes memory _signature) public virtual view returns (bytes4); function returnIsValidSignatureMagicNumber(bool isValid) internal pure returns (bytes4) { return isValid ? ERC1271_RETURN_VALID_SIGNATURE : ERC1271_RETURN_INVALID_SIGNATURE; } }
@rarible/royalties-upgradeable/contracts/RoyaltiesV2Upgradeable.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; pragma abicoder v2; import "@openzeppelin/contracts-upgradeable/introspection/ERC165Upgradeable.sol"; import "@rarible/royalties/contracts/LibRoyaltiesV2.sol"; import "@rarible/royalties/contracts/RoyaltiesV2.sol"; abstract contract RoyaltiesV2Upgradeable is ERC165Upgradeable, RoyaltiesV2 { function __RoyaltiesV2Upgradeable_init_unchained() internal initializer { _registerInterface(LibRoyaltiesV2._INTERFACE_ID_ROYALTIES); } }
@rarible/tokens/contracts/erc-721-minimal/ERC721BurnableUpgradeableMinimal.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol"; import "./ERC721UpgradeableMinimal.sol"; /** * @title ERC721 Burnable Token * @dev ERC721 Token that can be irreversibly burned (destroyed). */ abstract contract ERC721BurnableUpgradeableMinimal is Initializable, ContextUpgradeable, ERC721UpgradeableMinimal { function __ERC721Burnable_init() internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __ERC721Burnable_init_unchained(); } function __ERC721Burnable_init_unchained() internal initializer { } /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { if(!_exists(tokenId)) { address owner = address(tokenId >> 96); require(owner == _msgSender(), "ERC721Burnable: caller is not owner, not burn"); _setBurned(tokenId); } else { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved"); _burn(tokenId); } } uint256[50] private __gap; }
@openzeppelin/contracts-upgradeable/token/ERC721/IERC721ReceiverUpgradeable.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721ReceiverUpgradeable { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received(address operator, address from, uint256 tokenId, bytes calldata data) external returns (bytes4); }
@rarible/tokens/contracts/erc-721-minimal/ERC721LazyMinimal.sol
// SPDX-License-Identifier: MIT pragma solidity 0.7.6; pragma abicoder v2; import "./ERC721UpgradeableMinimal.sol"; import "@rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol"; import "@rarible/royalties-upgradeable/contracts/RoyaltiesV2Upgradeable.sol"; import "@rarible/lazy-mint/contracts/erc-721/IERC721LazyMint.sol"; import "../Mint721Validator.sol"; import "@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol"; import "./ERC721URI.sol"; abstract contract ERC721LazyMinimal is IERC721LazyMint, ERC721UpgradeableMinimal, Mint721Validator, RoyaltiesV2Upgradeable, RoyaltiesV2Impl, ERC721URI { using SafeMathUpgradeable for uint; bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd; bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f; bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63; // tokenId => creators mapping(uint256 => LibPart.Part[]) private creators; function __ERC721Lazy_init_unchained() internal initializer { } function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC165Upgradeable) returns (bool) { return interfaceId == LibERC721LazyMint._INTERFACE_ID_MINT_AND_TRANSFER || interfaceId == LibRoyaltiesV2._INTERFACE_ID_ROYALTIES || interfaceId == LibRoyalties2981._INTERFACE_ID_ROYALTIES || interfaceId == _INTERFACE_ID_ERC165 || interfaceId == _INTERFACE_ID_ERC721 || interfaceId == _INTERFACE_ID_ERC721_METADATA || interfaceId == _INTERFACE_ID_ERC721_ENUMERABLE; } function transferFromOrMint( LibERC721LazyMint.Mint721Data memory data, address from, address to ) override external { if (_exists(data.tokenId)) { safeTransferFrom(from, to, data.tokenId); } else { require(from == data.creators[0].account, "wrong order maker"); mintAndTransfer(data, to); } } function mintAndTransfer(LibERC721LazyMint.Mint721Data memory data, address to) public override virtual { address minter = address(data.tokenId >> 96); address sender = _msgSender(); require(minter == data.creators[0].account, "tokenId incorrect"); require(data.creators.length == data.signatures.length); require(minter == sender || isApprovedForAll(minter, sender), "ERC721: transfer caller is not owner nor approved"); bytes32 hash = LibERC721LazyMint.hash(data); for (uint i = 0; i < data.creators.length; ++i) { address creator = data.creators[i].account; if (creator != sender) { validate(creator, hash, data.signatures[i]); } } _safeMint(to, data.tokenId); _saveRoyalties(data.tokenId, data.royalties); _saveCreators(data.tokenId, data.creators); _setTokenURI(data.tokenId, data.tokenURI); } function _emitMintEvent(address to, uint tokenId) internal override virtual { address minter = address(tokenId >> 96); if (minter != to) { emit Transfer(address(0), minter, tokenId); emit Transfer(minter, to, tokenId); } else { emit Transfer(address(0), to, tokenId); } } function _saveCreators(uint tokenId, LibPart.Part[] memory _creators) internal { LibPart.Part[] storage creatorsOfToken = creators[tokenId]; uint total = 0; for (uint i = 0; i < _creators.length; ++i) { require(_creators[i].account != address(0x0), "Account should be present"); require(_creators[i].value != 0, "Creator share should be positive"); creatorsOfToken.push(_creators[i]); total = total.add(_creators[i].value); } require(total == 10000, "total amount of creators share should be 10000"); emit Creators(tokenId, _creators); } function updateAccount(uint256 _id, address _from, address _to) external { require(_msgSender() == _from, "not allowed"); super._updateAccount(_id, _from, _to); } function getCreators(uint256 _id) external view returns (LibPart.Part[] memory) { return creators[_id]; } function tokenURI(uint256 tokenId) public view virtual override(ERC721UpgradeableMinimal, ERC721URI) returns (string memory) { return ERC721URI.tokenURI(tokenId); } function _clearMetadata(uint256 tokenId) internal override(ERC721UpgradeableMinimal, ERC721URI) virtual { return ERC721URI._clearMetadata(tokenId); } uint256[50] private __gap; }
@openzeppelin/contracts-upgradeable/introspection/ERC165Upgradeable.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC165Upgradeable.sol"; import "../proxy/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts may inherit from this and call {_registerInterface} to declare * their support of an interface. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { /* * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7 */ bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; /** * @dev Mapping of interface ids to whether or not it's supported. */ mapping(bytes4 => bool) private _supportedInterfaces; function __ERC165_init() internal initializer { __ERC165_init_unchained(); } function __ERC165_init_unchained() internal initializer { // Derived contracts need only register support for their own interfaces, // we register support for ERC165 itself here _registerInterface(_INTERFACE_ID_ERC165); } /** * @dev See {IERC165-supportsInterface}. * * Time complexity O(1), guaranteed to always use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return _supportedInterfaces[interfaceId]; } /** * @dev Registers the contract as an implementer of the interface defined by * `interfaceId`. Support of the actual ERC165 interface is automatic and * registering its interface id is not required. * * See {IERC165-supportsInterface}. * * Requirements: * * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). */ function _registerInterface(bytes4 interfaceId) internal virtual { require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); _supportedInterfaces[interfaceId] = true; } uint256[49] private __gap; }
@openzeppelin/contracts-upgradeable/proxy/Initializable.sol
// SPDX-License-Identifier: MIT // solhint-disable-next-line compiler-version pragma solidity >=0.4.24 <0.8.0; import "../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-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. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
@rarible/tokens/contracts/IsPrivateCollection.sol
// SPDX-License-Identifier: MIT pragma solidity 0.7.6; contract IsPrivateCollection { /// @dev true if collection is private, false if public bool isPrivate; uint256[49] private __gap; }
@rarible/lib-signature/contracts/LibSignature.sol
// SPDX-License-Identifier: MIT pragma solidity ^0.7.0; library LibSignature { /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { // Check the signature length if (signature.length != 65) { revert("ECDSA: invalid signature length"); } // Divide the signature in r, s and v variables bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. // solhint-disable-next-line no-inline-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return recover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover-bytes32-bytes-} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. require( uint256(s) <= 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0, "ECDSA: invalid signature 's' value" ); // If the signature is valid (and not malleable), return the signer address // v > 30 is a special case, we need to adjust hash with "\x19Ethereum Signed Message:\n32" // and v = v - 4 address signer; if (v > 30) { require( v - 4 == 27 || v - 4 == 28, "ECDSA: invalid signature 'v' value" ); signer = ecrecover(toEthSignedMessageHash(hash), v - 4, r, s); } else { require(v == 27 || v == 28, "ECDSA: invalid signature 'v' value"); signer = ecrecover(hash, v, r, s); } require(signer != address(0), "ECDSA: invalid signature"); return signer; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * replicates the behavior of the * https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`] * JSON-RPC method. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256( abi.encodePacked("\x19Ethereum Signed Message:\n32", hash) ); } }
@rarible/royalties/contracts/impl/AbstractRoyalties.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; import "@rarible/lib-part/contracts/LibPart.sol"; abstract contract AbstractRoyalties { mapping (uint256 => LibPart.Part[]) internal royalties; function _saveRoyalties(uint256 id, LibPart.Part[] memory _royalties) internal { uint256 totalValue; for (uint i = 0; i < _royalties.length; ++i) { require(_royalties[i].account != address(0x0), "Recipient should be present"); require(_royalties[i].value != 0, "Royalty value should be positive"); totalValue += _royalties[i].value; royalties[id].push(_royalties[i]); } require(totalValue < 10000, "Royalty total value should be < 10000"); _onRoyaltiesSet(id, _royalties); } function _updateAccount(uint256 _id, address _from, address _to) internal { uint length = royalties[_id].length; for(uint i = 0; i < length; ++i) { if (royalties[_id][i].account == _from) { royalties[_id][i].account = payable(address(uint160(_to))); } } } function _onRoyaltiesSet(uint256 id, LibPart.Part[] memory _royalties) virtual internal; }
@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev String operations. */ library StringsUpgradeable { /** * @dev Converts a `uint256` to its ASCII `string` 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); uint256 index = digits - 1; temp = value; while (temp != 0) { buffer[index--] = bytes1(uint8(48 + temp % 10)); temp /= 10; } return string(buffer); } }
@openzeppelin/contracts-upgradeable/drafts/EIP712Upgradeable.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../proxy/Initializable.sol"; /** * @dev https://eips.ethereum.org/EIPS/eip-712[EIP 712] is a standard for hashing and signing of typed structured data. * * The encoding specified in the EIP is very generic, and such a generic implementation in Solidity is not feasible, * thus this contract does not implement the encoding itself. Protocols need to implement the type-specific encoding * they need in their contracts using a combination of `abi.encode` and `keccak256`. * * This contract implements the EIP 712 domain separator ({_domainSeparatorV4}) that is used as part of the encoding * scheme, and the final step of the encoding to obtain the message digest that is then signed via ECDSA * ({_hashTypedDataV4}). * * The implementation of the domain separator was designed to be as efficient as possible while still properly updating * the chain id to protect against replay attacks on an eventual fork of the chain. * * NOTE: This contract implements the version of the encoding known as "v4", as implemented by the JSON RPC method * https://docs.metamask.io/guide/signing-data.html[`eth_signTypedDataV4` in MetaMask]. * * _Available since v3.4._ */ abstract contract EIP712Upgradeable is Initializable { /* solhint-disable var-name-mixedcase */ bytes32 private _HASHED_NAME; bytes32 private _HASHED_VERSION; bytes32 private constant _TYPE_HASH = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"); /* solhint-enable var-name-mixedcase */ /** * @dev Initializes the domain separator and parameter caches. * * The meaning of `name` and `version` is specified in * https://eips.ethereum.org/EIPS/eip-712#definition-of-domainseparator[EIP 712]: * * - `name`: the user readable name of the signing domain, i.e. the name of the DApp or the protocol. * - `version`: the current major version of the signing domain. * * NOTE: These parameters cannot be changed except through a xref:learn::upgrading-smart-contracts.adoc[smart * contract upgrade]. */ function __EIP712_init(string memory name, string memory version) internal initializer { __EIP712_init_unchained(name, version); } function __EIP712_init_unchained(string memory name, string memory version) internal initializer { bytes32 hashedName = keccak256(bytes(name)); bytes32 hashedVersion = keccak256(bytes(version)); _HASHED_NAME = hashedName; _HASHED_VERSION = hashedVersion; } /** * @dev Returns the domain separator for the current chain. */ function _domainSeparatorV4() internal view returns (bytes32) { return _buildDomainSeparator(_TYPE_HASH, _EIP712NameHash(), _EIP712VersionHash()); } function _buildDomainSeparator(bytes32 typeHash, bytes32 name, bytes32 version) private view returns (bytes32) { return keccak256( abi.encode( typeHash, name, version, _getChainId(), address(this) ) ); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", _domainSeparatorV4(), structHash)); } function _getChainId() private view returns (uint256 chainId) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 // solhint-disable-next-line no-inline-assembly assembly { chainId := chainid() } } /** * @dev The hash of the name parameter for the EIP712 domain. * * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs * are a concern. */ function _EIP712NameHash() internal virtual view returns (bytes32) { return _HASHED_NAME; } /** * @dev The hash of the version parameter for the EIP712 domain. * * NOTE: This function reads from storage by default, but can be redefined to return a constant value if gas costs * are a concern. */ function _EIP712VersionHash() internal virtual view returns (bytes32) { return _HASHED_VERSION; } uint256[50] private __gap; }
@rarible/tokens/contracts/erc-721-minimal/ERC721URI.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "@openzeppelin/contracts-upgradeable/proxy/Initializable.sol"; import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol"; import "./ERC721UpgradeableMinimal.sol"; import "@openzeppelin/contracts-upgradeable/utils/StringsUpgradeable.sol"; import "../LibURI.sol"; /** * @title ERC721 Burnable Token * @dev ERC721 Token that can be irreversibly burned (destroyed). */ abstract contract ERC721URI is ContextUpgradeable, ERC721UpgradeableMinimal { using StringsUpgradeable for uint256; // Optional mapping for token URIs mapping (uint256 => string) private _tokenURIs; // Base URI string private _baseURI; /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token"); _tokenURIs[tokenId] = _tokenURI; } /** * @dev Internal function to set the base URI for all token IDs. It is * automatically added as a prefix to the value returned in {tokenURI}, * or to the token ID if {tokenURI} is empty. */ function _setBaseURI(string memory baseURI_) internal virtual { _baseURI = baseURI_; } /** * @dev Returns the base URI set via {_setBaseURI}. This will be * automatically added as a prefix in {tokenURI} to each token's URI, or * to the token ID if no specific URI is set for that token ID. */ function baseURI() public view virtual returns (string memory) { return _baseURI; } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _clearMetadata(uint256 tokenId) internal override virtual { // Clear metadata (if any) if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory _tokenURI = _tokenURIs[tokenId]; string memory base = baseURI(); // If there is no base URI, return the token URI. if (bytes(base).length == 0) { return _tokenURI; } // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). if (bytes(_tokenURI).length > 0) { return LibURI.checkPrefix(base, _tokenURI); } // If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI. return string(abi.encodePacked(base, tokenId.toString())); } uint256[50] private __gap; }
@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } }
@rarible/royalties/contracts/impl/RoyaltiesV2Impl.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; pragma abicoder v2; import "./AbstractRoyalties.sol"; import "../RoyaltiesV2.sol"; import "../IERC2981.sol"; import "../LibRoyalties2981.sol"; contract RoyaltiesV2Impl is AbstractRoyalties, RoyaltiesV2, IERC2981 { function getRaribleV2Royalties(uint256 id) override external view returns (LibPart.Part[] memory) { return royalties[id]; } function _onRoyaltiesSet(uint256 id, LibPart.Part[] memory _royalties) override internal { emit RoyaltiesSet(id, _royalties); } /* *Token (ERC721, ERC721Minimal, ERC721MinimalMeta, ERC1155 ) can have a number of different royalties beneficiaries *calculate sum all royalties, but royalties beneficiary will be only one royalties[0].account, according to rules of IERC2981 */ function royaltyInfo(uint256 id, uint256 _salePrice) override external view returns (address receiver, uint256 royaltyAmount) { if (royalties[id].length == 0) { receiver = address(0); royaltyAmount = 0; return(receiver, royaltyAmount); } LibPart.Part[] memory _royalties = royalties[id]; receiver = _royalties[0].account; uint percent; for (uint i = 0; i < _royalties.length; ++i) { percent += _royalties[i].value; } //don`t need require(percent < 10000, "Token royalty > 100%"); here, because check later in calculateRoyalties royaltyAmount = percent * _salePrice / 10000; } }
@rarible/lazy-mint/contracts/erc-721/LibERC721LazyMint.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; import "@rarible/lib-part/contracts/LibPart.sol"; library LibERC721LazyMint { bytes4 constant public ERC721_LAZY_ASSET_CLASS = bytes4(keccak256("ERC721_LAZY")); bytes4 constant _INTERFACE_ID_MINT_AND_TRANSFER = 0x8486f69f; struct Mint721Data { uint tokenId; string tokenURI; LibPart.Part[] creators; LibPart.Part[] royalties; bytes[] signatures; } bytes32 public constant MINT_AND_TRANSFER_TYPEHASH = keccak256("Mint721(uint256 tokenId,string tokenURI,Part[] creators,Part[] royalties)Part(address account,uint96 value)"); function hash(Mint721Data memory data) internal pure returns (bytes32) { bytes32[] memory royaltiesBytes = new bytes32[](data.royalties.length); for (uint i = 0; i < data.royalties.length; ++i) { royaltiesBytes[i] = LibPart.hash(data.royalties[i]); } bytes32[] memory creatorsBytes = new bytes32[](data.creators.length); for (uint i = 0; i < data.creators.length; ++i) { creatorsBytes[i] = LibPart.hash(data.creators[i]); } return keccak256(abi.encode( MINT_AND_TRANSFER_TYPEHASH, data.tokenId, keccak256(bytes(data.tokenURI)), keccak256(abi.encodePacked(creatorsBytes)), keccak256(abi.encodePacked(royaltiesBytes)) )); } }
@rarible/royalties/contracts/LibRoyalties2981.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; import "@rarible/lib-part/contracts/LibPart.sol"; library LibRoyalties2981 { /* * https://eips.ethereum.org/EIPS/eip-2981: bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a; */ bytes4 constant _INTERFACE_ID_ROYALTIES = 0x2a55205a; uint96 constant _WEIGHT_VALUE = 1000000; /*Method for converting amount to percent and forming LibPart*/ function calculateRoyalties(address to, uint256 amount) internal view returns (LibPart.Part[] memory) { LibPart.Part[] memory result; if (amount == 0) { return result; } uint256 percent = amount * 10000 / _WEIGHT_VALUE; require(percent < 10000, "Royalties 2981 exceeds 100%"); result = new LibPart.Part[](1); result[0].account = payable(to); result[0].value = uint96(percent); return result; } }
@rarible/tokens/contracts/access/MinterAccessControl.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; abstract contract MinterAccessControl is OwnableUpgradeable { mapping(address => bool) private _minters; event MinterStatusChanged(address indexed minter, bool indexed status); function __MinterAccessControl_init() internal initializer { __Ownable_init_unchained(); __MinterAccessControl_init_unchained(); } function __MinterAccessControl_init_unchained() internal initializer { } /** * @dev Add `minter` to the list of allowed minters. */ function addMinter(address minter) external onlyOwner { _minters[minter] = true; emit MinterStatusChanged(minter, true); } /** * @dev Add `minters` to the list of allowed minters. */ function addMinters(address[] memory minters) external onlyOwner { for (uint i = 0; i < minters.length; ++i) { address minter = minters[i]; _minters[minter] = true; emit MinterStatusChanged(minter, true); } } /** * @dev Revoke `_minter` from the list of allowed minters. */ function removeMinter(address _minter) external onlyOwner { _minters[_minter] = false; emit MinterStatusChanged(_minter, false); } /** * @dev Returns `true` if `account` has been granted to minters. */ function isMinter(address account) public view returns (bool) { return _minters[account]; } uint256[50] private __gap; }
@rarible/tokens/contracts/erc-721-minimal/ERC721DefaultApprovalMinimal.sol
// SPDX-License-Identifier: MIT pragma solidity 0.7.6; import "./ERC721UpgradeableMinimal.sol"; abstract contract ERC721DefaultApprovalMinimal is ERC721UpgradeableMinimal { mapping(address => bool) private defaultApprovals; event DefaultApproval(address indexed operator, bool hasApproval); function _setDefaultApproval(address operator, bool hasApproval) internal { defaultApprovals[operator] = hasApproval; emit DefaultApproval(operator, hasApproval); } function _isApprovedOrOwner(address spender, uint256 tokenId) internal virtual override view returns (bool) { return defaultApprovals[spender] || super._isApprovedOrOwner(spender, tokenId); } function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return defaultApprovals[operator] || super.isApprovedForAll(owner, operator); } uint256[50] private __gap; }
@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; import "../../introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 tokenId) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom(address from, address to, uint256 tokenId, bytes calldata data) external; }
@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } uint256[49] private __gap; }
@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../proxy/Initializable.sol"; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } uint256[50] private __gap; }
@rarible/royalties/contracts/IERC2981.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; import "@rarible/lib-part/contracts/LibPart.sol"; /// /// @dev Interface for the NFT Royalty Standard /// //interface IERC2981 is IERC165 { interface IERC2981 { /// ERC165 bytes to add to interface array - set in parent contract /// implementing this standard /// /// bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a /// bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a; /// _registerInterface(_INTERFACE_ID_ERC2981); /// @notice Called with the sale price to determine how much royalty // is owed and to whom. /// @param _tokenId - the NFT asset queried for royalty information /// @param _salePrice - the sale price of the NFT asset specified by _tokenId /// @return receiver - address of who should be sent the royalty payment /// @return royaltyAmount - the royalty payment amount for _salePrice function royaltyInfo( uint256 _tokenId, uint256 _salePrice ) external view returns ( address receiver, uint256 royaltyAmount ); }
@rarible/royalties/contracts/LibRoyaltiesV2.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; library LibRoyaltiesV2 { /* * bytes4(keccak256('getRaribleV2Royalties(uint256)')) == 0xcad96cca */ bytes4 constant _INTERFACE_ID_ROYALTIES = 0xcad96cca; }
@rarible/tokens/contracts/erc-721-minimal/ERC721BaseMinimal.sol
// SPDX-License-Identifier: MIT pragma solidity 0.7.6; pragma abicoder v2; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "./ERC721BurnableUpgradeableMinimal.sol"; import "./ERC721DefaultApprovalMinimal.sol"; import "./ERC721LazyMinimal.sol"; import "../HasContractURI.sol"; abstract contract ERC721BaseMinimal is OwnableUpgradeable, ERC721DefaultApprovalMinimal, ERC721BurnableUpgradeableMinimal, ERC721LazyMinimal, HasContractURI { event BaseUriChanged(string newBaseURI); function _isApprovedOrOwner(address spender, uint256 tokenId) internal virtual override(ERC721UpgradeableMinimal, ERC721DefaultApprovalMinimal) view returns (bool) { return ERC721DefaultApprovalMinimal._isApprovedOrOwner(spender, tokenId); } function isApprovedForAll(address owner, address operator) public view virtual override(ERC721DefaultApprovalMinimal, ERC721UpgradeableMinimal, IERC721Upgradeable) returns (bool) { return ERC721DefaultApprovalMinimal.isApprovedForAll(owner, operator); } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, ERC721LazyMinimal) returns (bool) { return super.supportsInterface(interfaceId); } function tokenURI(uint256 tokenId) public view virtual override(ERC721UpgradeableMinimal, ERC721LazyMinimal) returns (string memory) { return ERC721LazyMinimal.tokenURI(tokenId); } function _clearMetadata(uint256 tokenId) internal override(ERC721UpgradeableMinimal, ERC721LazyMinimal) virtual { return ERC721LazyMinimal._clearMetadata(tokenId); } function _emitMintEvent(address to, uint tokenId) internal override(ERC721UpgradeableMinimal, ERC721LazyMinimal) virtual { return ERC721LazyMinimal._emitMintEvent(to, tokenId); } function setBaseURI(string memory newBaseURI) external onlyOwner { super._setBaseURI(newBaseURI); emit BaseUriChanged(newBaseURI); } uint256[50] private __gap; }
@rarible/tokens/contracts/erc-1271/ERC1271Validator.sol
// SPDX-License-Identifier: MIT pragma solidity 0.7.6; import "@rarible/lib-signature/contracts/ERC1271.sol"; import "@openzeppelin/contracts-upgradeable/drafts/EIP712Upgradeable.sol"; import "@rarible/lib-signature/contracts/LibSignature.sol"; abstract contract ERC1271Validator is EIP712Upgradeable { using AddressUpgradeable for address; using LibSignature for bytes32; string constant SIGNATURE_ERROR = "signature verification error"; bytes4 constant internal MAGICVALUE = 0x1626ba7e; function validate1271(address signer, bytes32 structHash, bytes memory signature) internal view { bytes32 hash = _hashTypedDataV4(structHash); address signerFromSig; if (signature.length == 65) { signerFromSig = hash.recover(signature); } if (signerFromSig != signer) { if (signer.isContract()) { require( ERC1271(signer).isValidSignature(hash, signature) == MAGICVALUE, SIGNATURE_ERROR ); } else { revert(SIGNATURE_ERROR); } } } uint256[50] private __gap; }
@rarible/tokens/contracts/LibURI.sol
// SPDX-License-Identifier: MIT pragma solidity 0.7.6; library LibURI { /// @dev checks if _tokenURI starts with base. if true returns _tokenURI, else base + _tokenURI function checkPrefix(string memory base, string memory _tokenURI) internal pure returns (string memory) { bytes memory whatBytes = bytes(base); bytes memory whereBytes = bytes(_tokenURI); if (whatBytes.length > whereBytes.length) { return string(abi.encodePacked(base, _tokenURI)); } for (uint256 j = 0; j < whatBytes.length; j++) { if (whereBytes[j] != whatBytes[j]) { return string(abi.encodePacked(base, _tokenURI)); } } return _tokenURI; } }
@rarible/royalties/contracts/RoyaltiesV2.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; pragma abicoder v2; import "@rarible/lib-part/contracts/LibPart.sol"; interface RoyaltiesV2 { event RoyaltiesSet(uint256 tokenId, LibPart.Part[] royalties); function getRaribleV2Royalties(uint256 id) external view returns (LibPart.Part[] memory); }
@openzeppelin/contracts-upgradeable/token/ERC721/IERC721MetadataUpgradeable.sol
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; import "./IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
Contract ABI
[{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"__ERC721RaribleUser_init","inputs":[{"type":"string","name":"_name","internalType":"string"},{"type":"string","name":"_symbol","internalType":"string"},{"type":"string","name":"baseURI","internalType":"string"},{"type":"string","name":"contractURI","internalType":"string"},{"type":"address[]","name":"operators","internalType":"address[]"},{"type":"address","name":"transferProxy","internalType":"address"},{"type":"address","name":"lazyTransferProxy","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"__ERC721Rarible_init","inputs":[{"type":"string","name":"_name","internalType":"string"},{"type":"string","name":"_symbol","internalType":"string"},{"type":"string","name":"baseURI","internalType":"string"},{"type":"string","name":"contractURI","internalType":"string"},{"type":"address","name":"transferProxy","internalType":"address"},{"type":"address","name":"lazyTransferProxy","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addMinter","inputs":[{"type":"address","name":"minter","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addMinters","inputs":[{"type":"address[]","name":"minters","internalType":"address[]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"approve","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"baseURI","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"burn","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"contractURI","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"getApproved","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct LibPart.Part[]","components":[{"type":"address"},{"type":"uint96"}]}],"name":"getCreators","inputs":[{"type":"uint256","name":"_id","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"tuple[]","name":"","internalType":"struct LibPart.Part[]","components":[{"type":"address"},{"type":"uint96"}]}],"name":"getRaribleV2Royalties","inputs":[{"type":"uint256","name":"id","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isApprovedForAll","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"operator","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isMinter","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"mintAndTransfer","inputs":[{"type":"tuple","name":"data","internalType":"struct LibERC721LazyMint.Mint721Data","components":[{"type":"uint256"},{"type":"string"},{"type":"tuple[]","components":[{"type":"address"},{"type":"uint96"}]},{"type":"tuple[]","components":[{"type":"address"},{"type":"uint96"}]},{"type":"bytes[]"}]},{"type":"address","name":"to","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"ownerOf","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeMinter","inputs":[{"type":"address","name":"_minter","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"receiver","internalType":"address"},{"type":"uint256","name":"royaltyAmount","internalType":"uint256"}],"name":"royaltyInfo","inputs":[{"type":"uint256","name":"id","internalType":"uint256"},{"type":"uint256","name":"_salePrice","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"safeTransferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"},{"type":"bytes","name":"_data","internalType":"bytes"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setApprovalForAll","inputs":[{"type":"address","name":"operator","internalType":"address"},{"type":"bool","name":"approved","internalType":"bool"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setBaseURI","inputs":[{"type":"string","name":"newBaseURI","internalType":"string"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"supportsInterface","inputs":[{"type":"bytes4","name":"interfaceId","internalType":"bytes4"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"tokenURI","inputs":[{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"tokenId","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferFromOrMint","inputs":[{"type":"tuple","name":"data","internalType":"struct LibERC721LazyMint.Mint721Data","components":[{"type":"uint256"},{"type":"string"},{"type":"tuple[]","components":[{"type":"address"},{"type":"uint96"}]},{"type":"tuple[]","components":[{"type":"address"},{"type":"uint96"}]},{"type":"bytes[]"}]},{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"updateAccount","inputs":[{"type":"uint256","name":"_id","internalType":"uint256"},{"type":"address","name":"_from","internalType":"address"},{"type":"address","name":"_to","internalType":"address"}]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","indexed":true},{"type":"address","name":"approved","indexed":true},{"type":"uint256","name":"tokenId","indexed":true}],"anonymous":false},{"type":"event","name":"ApprovalForAll","inputs":[{"type":"address","name":"owner","indexed":true},{"type":"address","name":"operator","indexed":true},{"type":"bool","name":"approved","indexed":false}],"anonymous":false},{"type":"event","name":"BaseUriChanged","inputs":[{"type":"string","name":"newBaseURI","indexed":false}],"anonymous":false},{"type":"event","name":"CreateERC721Rarible","inputs":[{"type":"address","name":"owner","indexed":false},{"type":"string","name":"name","indexed":false},{"type":"string","name":"symbol","indexed":false}],"anonymous":false},{"type":"event","name":"CreateERC721RaribleUser","inputs":[{"type":"address","name":"owner","indexed":false},{"type":"string","name":"name","indexed":false},{"type":"string","name":"symbol","indexed":false}],"anonymous":false},{"type":"event","name":"Creators","inputs":[{"type":"uint256","name":"tokenId","indexed":false},{"type":"tuple[]","name":"creators","indexed":false,"components":[{"type":"address"},{"type":"uint96"}]}],"anonymous":false},{"type":"event","name":"DefaultApproval","inputs":[{"type":"address","name":"operator","indexed":true},{"type":"bool","name":"hasApproval","indexed":false}],"anonymous":false},{"type":"event","name":"MinterStatusChanged","inputs":[{"type":"address","name":"minter","indexed":true},{"type":"bool","name":"status","indexed":true}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","indexed":true},{"type":"address","name":"newOwner","indexed":true}],"anonymous":false},{"type":"event","name":"RoyaltiesSet","inputs":[{"type":"uint256","name":"tokenId","indexed":false},{"type":"tuple[]","name":"royalties","indexed":false,"components":[{"type":"address"},{"type":"uint96"}]}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","indexed":true},{"type":"address","name":"to","indexed":true},{"type":"uint256","name":"tokenId","indexed":true}],"anonymous":false}]
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106101f05760003560e01c8063715018a61161010f578063aa271e1a116100a2578063e07f231911610071578063e07f23191461042c578063e8a3d4851461043f578063e985e9c514610447578063f2fde38b1461045a576101f0565b8063aa271e1a146103e0578063b88d4fde146103f3578063c87b56dd14610406578063cad96cca14610419576101f0565b80638da5cb5b116100de5780638da5cb5b146103aa57806395d89b41146103b2578063983b2d56146103ba578063a22cb465146103cd576101f0565b8063715018a61461035c57806371e2a65714610364578063832fbb2914610377578063891be9741461038a576101f0565b80633db397c61161018757806355f804b31161015657806355f804b31461030e5780636352211e146103215780636c0360eb1461033457806370a082311461033c576101f0565b80633db397c6146102c257806342842e0e146102d557806342966c68146102e85780634648eb9d146102fb576101f0565b806322a775b6116101c357806322a775b61461026857806323b872dd1461027b5780632a55205a1461028e5780633092afd5146102af576101f0565b806301ffc9a7146101f557806306fdde031461021e578063081812fc14610233578063095ea7b314610253575b600080fd5b610208610203366004613f7b565b61046d565b60405161021591906143a4565b60405180910390f35b610226610480565b60405161021591906143af565b61024661024136600461422d565b610516565b604051610215919061432e565b610266610261366004613f1e565b610579565b005b610266610276366004614188565b61064f565b610266610289366004613e44565b6106f1565b6102a161029c36600461426b565b610748565b604051610215929190614378565b6102666102bd366004613df0565b610856565b6102666102d0366004613fd5565b610906565b6102666102e3366004613e44565b610969565b6102666102f636600461422d565b610984565b61026661030936600461409c565b610a4e565b61026661031c366004613fa3565b610ab5565b61024661032f36600461422d565b610b5a565b610226610bae565b61034f61034a366004613df0565b610c10565b6040516102159190614575565b610266610c74565b610266610372366004613f49565b610d20565b6102666103853660046141cc565b610e05565b61039d61039836600461422d565b610e80565b6040516102159190614391565b610246610f10565b610226610f1f565b6102666103c8366004613df0565b610f80565b6102666103db366004613eed565b611035565b6102086103ee366004613df0565b61113b565b610266610401366004613e84565b61115a565b61022661041436600461422d565b6111b8565b61039d61042736600461422d565b6111c3565b61026661043a366004614245565b61123e565b610226611281565b610208610455366004613e0c565b611310565b610266610468366004613df0565b611325565b600061047882611428565b90505b919050565b60fd8054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561050c5780601f106104e15761010080835404028352916020019161050c565b820191906000526020600020905b8154815290600101906020018083116104ef57829003601f168201915b5050505050905090565b6000610521826114e2565b61055c5760405162461bcd60e51b815260040180806020018281038252602c8152602001806147bf602c913960400191505060405180910390fd5b50600090815261010160205260409020546001600160a01b031690565b600061058482610b5a565b9050806001600160a01b0316836001600160a01b031614156105d75760405162461bcd60e51b81526004018080602001828103825260218152602001806148af6021913960400191505060405180910390fd5b806001600160a01b03166105e96114ff565b6001600160a01b031614806106055750610605816104556114ff565b6106405760405162461bcd60e51b81526004018080602001828103825260388152602001806146b76038913960400191505060405180910390fd5b61064a8383611503565b505050565b6102925460ff16156106e357816040015160008151811061066c57fe5b6020026020010151600001516001600160a01b0316610689610f10565b6001600160a01b031614806106be57506106be82604001516000815181106106ad57fe5b60200260200101516000015161113b565b6106e35760405162461bcd60e51b81526004016106da906143ed565b60405180910390fd5b6106ed8282611572565b5050565b6107026106fc6114ff565b826116f4565b61073d5760405162461bcd60e51b81526004018080602001828103825260318152602001806148d06031913960400191505060405180910390fd5b61064a838383611700565b60008281526101c6602052604081205481906107695750600090508061084f565b60008481526101c66020908152604080832080548251818502810185019093528083529192909190849084015b828210156107e557600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b90046001600160601b031681830152825260019092019101610796565b505050509050806000815181106107f857fe5b60209081029190910101515192506000805b82518110156108435782818151811061081f57fe5b6020026020010151602001516001600160601b03168201915080600101905061080a565b50612710908502049150505b9250929050565b61085e6114ff565b6001600160a01b031661086f610f10565b6001600160a01b0316146108b8576040805162461bcd60e51b81526020600482018190526024820152600080516020614817833981519152604482015290519081900360640190fd5b6001600160a01b03811660008181526102c46020526040808220805460ff19169055519091907f3042b80e435ae46c334b2cfec51a66d64c9a8a8af4cd0c279a124c35a09e91dd908390a350565b61091486868686868661181f565b610292805460ff191690557ff05e55f0a9d205977ca8cc02236338b6a361376f404cf0b3019b2111964a01fd6109486114ff565b878760405161095993929190614342565b60405180910390a1505050505050565b61064a8383836040518060200160405280600081525061115a565b61098d816114e2565b6109fc57606081901c61099e6114ff565b6001600160a01b0316816001600160a01b0316146109ed5760405162461bcd60e51b815260040180806020018281038252602d815260200180614792602d913960400191505060405180910390fd5b6109f682611939565b50610a4b565b610a076106fc6114ff565b610a425760405162461bcd60e51b81526004018080602001828103825260308152602001806149266030913960400191505060405180910390fd5b610a4b81611955565b50565b610a5c87878787868661181f565b610292805460ff191660011790557fd901a467fa419f379a67636a1de44cc2ed772beb43a0c05fa1ddcad5d59e9913610a936114ff565b8888604051610aa493929190614342565b60405180910390a150505050505050565b610abd6114ff565b6001600160a01b0316610ace610f10565b6001600160a01b031614610b17576040805162461bcd60e51b81526020600482018190526024820152600080516020614817833981519152604482015290519081900360640190fd5b610b20816119f1565b7f87cdeaffd8e70903d6ce7cc983fac3b09ca79e83818124c98e47a1d70f8027d681604051610b4f91906143af565b60405180910390a150565b600081815260ff60205260408120546001600160a01b0316806104785760405162461bcd60e51b81526004018080602001828103825260298152602001806147196029913960400191505060405180910390fd5b6101c88054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561050c5780601f106104e15761010080835404028352916020019161050c565b60006001600160a01b038216610c575760405162461bcd60e51b815260040180806020018281038252602a8152602001806146ef602a913960400191505060405180910390fd5b506001600160a01b03166000908152610100602052604090205490565b610c7c6114ff565b6001600160a01b0316610c8d610f10565b6001600160a01b031614610cd6576040805162461bcd60e51b81526020600482018190526024820152600080516020614817833981519152604482015290519081900360640190fd5b6033546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3603380546001600160a01b0319169055565b610d286114ff565b6001600160a01b0316610d39610f10565b6001600160a01b031614610d82576040805162461bcd60e51b81526020600482018190526024820152600080516020614817833981519152604482015290519081900360640190fd5b60005b81518110156106ed576000828281518110610d9c57fe5b6020908102919091018101516001600160a01b03811660008181526102c49093526040808420805460ff1916600190811790915590519294509290917f3042b80e435ae46c334b2cfec51a66d64c9a8a8af4cd0c279a124c35a09e91dd9190a350600101610d85565b8251610e10906114e2565b15610e2957610e2482828560000151610969565b61064a565b8260400151600081518110610e3a57fe5b6020026020010151600001516001600160a01b0316826001600160a01b031614610e765760405162461bcd60e51b81526004016106da906143c2565b61064a838261064f565b60606101fb6000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015610f0557600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b90046001600160601b031681830152825260019092019101610eb6565b505050509050919050565b6033546001600160a01b031690565b60fe8054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561050c5780601f106104e15761010080835404028352916020019161050c565b610f886114ff565b6001600160a01b0316610f99610f10565b6001600160a01b031614610fe2576040805162461bcd60e51b81526020600482018190526024820152600080516020614817833981519152604482015290519081900360640190fd5b6001600160a01b03811660008181526102c46020526040808220805460ff1916600190811790915590519092917f3042b80e435ae46c334b2cfec51a66d64c9a8a8af4cd0c279a124c35a09e91dd91a350565b61103d6114ff565b6001600160a01b0316826001600160a01b031614156110a3576040805162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015290519081900360640190fd5b8061010260006110b16114ff565b6001600160a01b03908116825260208083019390935260409182016000908120918716808252919093529120805460ff1916921515929092179091556110f56114ff565b6001600160a01b03167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b6001600160a01b031660009081526102c4602052604090205460ff1690565b61116b6111656114ff565b836116f4565b6111a65760405162461bcd60e51b81526004018080602001828103825260318152602001806148d06031913960400191505060405180910390fd5b6111b284848484611a05565b50505050565b606061047882611a57565b60008181526101c660209081526040808320805482518185028101850190935280835260609492939192909184018215610f0557600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b90046001600160601b031681830152825260019092019101610eb6565b816001600160a01b03166112506114ff565b6001600160a01b0316146112765760405162461bcd60e51b81526004016106da9061447a565b61064a838383611a62565b61022e805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156113085780601f106112dd57610100808354040283529160200191611308565b820191906000526020600020905b8154815290600101906020018083116112eb57829003601f168201915b505050505081565b600061131c8383611b0e565b90505b92915050565b61132d6114ff565b6001600160a01b031661133e610f10565b6001600160a01b031614611387576040805162461bcd60e51b81526020600482018190526024820152600080516020614817833981519152604482015290519081900360640190fd5b6001600160a01b0381166113cc5760405162461bcd60e51b815260040180806020018281038252602681526020018061461f6026913960400191505060405180910390fd5b6033546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b60006001600160e01b03198216638486f69f60e01b148061145957506001600160e01b0319821663656cb66560e11b145b8061147457506001600160e01b0319821663152a902d60e11b145b8061148f57506001600160e01b031982166301ffc9a760e01b145b806114aa57506001600160e01b031982166380ac58cd60e01b145b806114c557506001600160e01b03198216635b5e139f60e01b145b806104785750506001600160e01b03191663780e9d6360e01b1490565b600090815260ff60205260409020546001600160a01b0316151590565b3390565b60008181526101016020526040902080546001600160a01b0319166001600160a01b038416908117909155819061153982610b5a565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b815160601c60006115816114ff565b9050836040015160008151811061159457fe5b6020026020010151600001516001600160a01b0316826001600160a01b0316146115d05760405162461bcd60e51b81526004016106da9061444f565b836080015151846040015151146115e657600080fd5b806001600160a01b0316826001600160a01b0316148061160b575061160b8282611310565b6116275760405162461bcd60e51b81526004016106da906144d6565b600061163285611b3b565b905060005b8560400151518110156116a85760008660400151828151811061165657fe5b6020026020010151600001519050836001600160a01b0316816001600160a01b03161461169f5761169f81848960800151858151811061169257fe5b6020026020010151611d82565b50600101611637565b506116b7848660000151611d8d565b6116c985600001518660600151611da7565b6116db85600001518660400151611f96565b6116ed85600001518660200151612145565b5050505050565b600061131c83836121a9565b826001600160a01b031661171382610b5a565b6001600160a01b0316146117585760405162461bcd60e51b81526004018080602001828103825260298152602001806148376029913960400191505060405180910390fd5b6001600160a01b03821661179d5760405162461bcd60e51b81526004018080602001828103825260248152602001806146456024913960400191505060405180910390fd5b6117a883838361064a565b6117b3600082611503565b6001600160a01b0380841660008181526101006020908152604080832080546000190190559386168083528483208054600101905585835260ff90915283822080546001600160a01b0319168217905592518493929160008051602061488f83398151915291a4505050565b600054610100900460ff168061183857506118386121d6565b80611846575060005460ff16155b6118815760405162461bcd60e51b815260040180806020018281038252602e815260200180614742602e913960400191505060405180910390fd5b600054610100900460ff161580156118ac576000805460ff1961ff0019909116610100171660011790555b6118b5856119f1565b6118bd6121e7565b6118c5612288565b6118cd6121e7565b6118d5612325565b6118dd6123c2565b6118e56121e7565b6118ed6124bb565b6118f56121e7565b6118fe8461258a565b6119088787612651565b61191383600161273c565b61191e82600161273c565b8015611930576000805461ff00191690555b50505050505050565b600090815261010360205260409020805460ff19166001179055565b600061196082610b5a565b905061196e8160008461064a565b611979600083611503565b6119828261279d565b6001600160a01b038116600090815261010060209081526040808320805460001901905584835260ff909152902080546001600160a01b03191690556119c782611939565b60405182906000906001600160a01b0384169060008051602061488f833981519152908390a45050565b80516106ed906101c8906020840190613a58565b611a10848484611700565b611a1c848484846127a6565b6111b25760405162461bcd60e51b81526004018080602001828103825260328152602001806145ed6032913960400191505060405180910390fd5b60606104788261295c565b60008381526101c66020526040812054905b818110156116ed5760008581526101c66020526040902080546001600160a01b038616919083908110611aa357fe5b6000918252602090912001546001600160a01b03161415611b065760008581526101c660205260409020805484919083908110611adc57fe5b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790555b600101611a74565b6001600160a01b038116600090815261012f602052604081205460ff168061131c575061131c8383612b37565b6000808260600151516001600160401b0381118015611b5957600080fd5b50604051908082528060200260200182016040528015611b83578160200160208202803683370190505b50905060005b836060015151811015611bd557611bb684606001518281518110611ba957fe5b6020026020010151612b66565b828281518110611bc257fe5b6020908102919091010152600101611b89565b5060008360400151516001600160401b0381118015611bf357600080fd5b50604051908082528060200260200182016040528015611c1d578160200160208202803683370190505b50905060005b846040015151811015611c6257611c4385604001518281518110611ba957fe5b828281518110611c4f57fe5b6020908102919091010152600101611c23565b507ff64326045af5fd7e15297ba939f85b550474d3899daa47d2bc1ffbdb9ced344e84600001518560200151805190602001208360405160200180828051906020019060200280838360005b83811015611cc6578181015183820152602001611cae565b50505050905001915050604051602081830303815290604052805190602001208560405160200180828051906020019060200280838360005b83811015611d17578181015183820152602001611cff565b505050509050019150506040516020818303038152906040528051906020012060405160200180868152602001858152602001848152602001838152602001828152602001955050505050506040516020818303038152906040528051906020012092505050919050565b61064a838383612bd3565b6106ed828260405180602001604052806000815250612e52565b6000805b8251811015611f4b5760006001600160a01b0316838281518110611dcb57fe5b6020026020010151600001516001600160a01b03161415611e33576040805162461bcd60e51b815260206004820152601b60248201527f526563697069656e742073686f756c642062652070726573656e740000000000604482015290519081900360640190fd5b828181518110611e3f57fe5b6020026020010151602001516001600160601b031660001415611ea9576040805162461bcd60e51b815260206004820181905260248201527f526f79616c74792076616c75652073686f756c6420626520706f736974697665604482015290519081900360640190fd5b828181518110611eb557fe5b6020026020010151602001516001600160601b0316820191506101c66000858152602001908152602001600020838281518110611eee57fe5b60209081029190910181015182546001818101855560009485529383902082519101805492909301516001600160601b0316600160a01b026001600160a01b039182166001600160a01b0319909316929092171617905501611dab565b506127108110611f8c5760405162461bcd60e51b81526004018080602001828103825260258152602001806149016025913960400191505060405180910390fd5b61064a8383612ea4565b60008281526101fb6020526040812090805b83518110156120e45760006001600160a01b0316848281518110611fc857fe5b6020026020010151600001516001600160a01b03161415611ffb5760405162461bcd60e51b81526004016106da9061449f565b83818151811061200757fe5b6020026020010151602001516001600160601b03166000141561203c5760405162461bcd60e51b81526004016106da9061441a565b8284828151811061204957fe5b602090810291909101810151825460018101845560009384529282902081519301805491909201516001600160601b0316600160a01b026001600160a01b039384166001600160a01b03199092169190911790921691909117905583516120da908590839081106120b657fe5b6020026020010151602001516001600160601b031683612ee190919063ffffffff16565b9150600101611fa8565b5080612710146121065760405162461bcd60e51b81526004016106da90614527565b7f841ffb90d4cabdd1f16034f3fa831d79060febbb8167bdd54a49269365bdf78f848460405161213792919061457e565b60405180910390a150505050565b61214e826114e2565b6121895760405162461bcd60e51b815260040180806020018281038252602c8152602001806147eb602c913960400191505060405180910390fd5b60008281526101c760209081526040909120825161064a92840190613a58565b6001600160a01b038216600090815261012f602052604081205460ff168061131c575061131c8383612f3b565b60006121e130612fd7565b15905090565b600054610100900460ff168061220057506122006121d6565b8061220e575060005460ff16155b6122495760405162461bcd60e51b815260040180806020018281038252602e815260200180614742602e913960400191505060405180910390fd5b600054610100900460ff16158015612274576000805460ff1961ff0019909116610100171660011790555b8015610a4b576000805461ff001916905550565b600054610100900460ff16806122a157506122a16121d6565b806122af575060005460ff16155b6122ea5760405162461bcd60e51b815260040180806020018281038252602e815260200180614742602e913960400191505060405180910390fd5b600054610100900460ff16158015612315576000805460ff1961ff0019909116610100171660011790555b61227463656cb66560e11b612fdd565b600054610100900460ff168061233e575061233e6121d6565b8061234c575060005460ff16155b6123875760405162461bcd60e51b815260040180806020018281038252602e815260200180614742602e913960400191505060405180910390fd5b600054610100900460ff161580156123b2576000805460ff1961ff0019909116610100171660011790555b6122746301ffc9a760e01b612fdd565b600054610100900460ff16806123db57506123db6121d6565b806123e9575060005460ff16155b6124245760405162461bcd60e51b815260040180806020018281038252602e815260200180614742602e913960400191505060405180910390fd5b600054610100900460ff1615801561244f576000805460ff1961ff0019909116610100171660011790555b60006124596114ff565b603380546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a3508015610a4b576000805461ff001916905550565b600054610100900460ff16806124d457506124d46121d6565b806124e2575060005460ff16155b61251d5760405162461bcd60e51b815260040180806020018281038252602e815260200180614742602e913960400191505060405180910390fd5b600054610100900460ff16158015612548576000805460ff1961ff0019909116610100171660011790555b612274604051806040016040528060078152602001664d696e7437323160c81b815250604051806040016040528060018152602001603160f81b815250613061565b600054610100900460ff16806125a357506125a36121d6565b806125b1575060005460ff16155b6125ec5760405162461bcd60e51b815260040180806020018281038252602e815260200180614742602e913960400191505060405180910390fd5b600054610100900460ff16158015612617576000805460ff1961ff0019909116610100171660011790555b815161262b9061022e906020850190613a58565b5061263c63e8a3d48560e01b612fdd565b80156106ed576000805461ff00191690555050565b600054610100900460ff168061266a575061266a6121d6565b80612678575060005460ff16155b6126b35760405162461bcd60e51b815260040180806020018281038252602e815260200180614742602e913960400191505060405180910390fd5b600054610100900460ff161580156126de576000805460ff1961ff0019909116610100171660011790555b82516126f19060fd906020860190613a58565b5081516127059060fe906020850190613a58565b506127166380ac58cd60e01b612fdd565b612726635b5e139f60e01b612fdd565b801561064a576000805461ff0019169055505050565b6001600160a01b038216600081815261012f6020908152604091829020805460ff1916851515908117909155825190815291517f270dbb8ba4292910ae92862466486be25c355c837270a3d8824b36a8bc7c653b9281900390910190a25050565b610a4b81613121565b60006127ba846001600160a01b0316612fd7565b1561295057836001600160a01b031663150b7a026127d66114ff565b8786866040518563ffffffff1660e01b815260040180856001600160a01b03168152602001846001600160a01b0316815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b83811015612849578181015183820152602001612831565b50505050905090810190601f1680156128765780820380516001836020036101000a031916815260200191505b5095505050505050602060405180830381600087803b15801561289857600080fd5b505af19250505080156128bd57506040513d60208110156128b857600080fd5b505160015b612936573d8080156128eb576040519150601f19603f3d011682016040523d82523d6000602084013e6128f0565b606091505b50805161292e5760405162461bcd60e51b81526004018080602001828103825260328152602001806145ed6032913960400191505060405180910390fd5b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050612954565b5060015b949350505050565b6060612967826114e2565b6129a25760405162461bcd60e51b815260040180806020018281038252602f815260200180614860602f913960400191505060405180910390fd5b60008281526101c7602090815260408083208054825160026001831615610100026000190190921691909104601f810185900485028201850190935282815292909190830182828015612a365780601f10612a0b57610100808354040283529160200191612a36565b820191906000526020600020905b815481529060010190602001808311612a1957829003601f168201915b505050505090506000612a47610bae565b9050805160001415612a5b5750905061047b565b815115612a7557612a6c818361312a565b9250505061047b565b80612a7f8561330f565b6040516020018083805190602001908083835b60208310612ab15780518252601f199092019160209182019101612a92565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b60208310612af95780518252601f199092019160209182019101612ada565b6001836020036101000a0380198251168184511680821785525050505050509050019250505060405160208183030381529060405292505050919050565b6001600160a01b0391821660009081526101026020908152604080832093909416825291909152205460ff1690565b8051602091820151604080517f397e04204c1e1a60ee8724b71f8244e10ab5f2e9009854d80f602bda21b59ebb818601526001600160a01b03909316838201526001600160601b039091166060808401919091528151808403909101815260809092019052805191012090565b6000612bde836133e9565b90506000825160411415612bf957612bf68284613435565b90505b846001600160a01b0316816001600160a01b0316146116ed57612c24856001600160a01b0316612fd7565b15612dda5760408051630b135d3f60e11b808252600482018581526024830193845286516044840152865191936001600160a01b038a1693631626ba7e9388938a9390929091606490910190602085019080838360005b83811015612c93578181015183820152602001612c7b565b50505050905090810190601f168015612cc05780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b158015612cde57600080fd5b505afa158015612cf2573d6000803e3d6000fd5b505050506040513d6020811015612d0857600080fd5b505160408051808201909152601c81527f7369676e617475726520766572696669636174696f6e206572726f72000000006020820152916001600160e01b031990911614612dd45760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612d99578181015183820152602001612d81565b50505050905090810190601f168015612dc65780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506116ed565b604080518082018252601c81527f7369676e617475726520766572696669636174696f6e206572726f72000000006020808301918252925162461bcd60e51b81526004810193845282516024820152825192939283926044909201919080838360008315612d99578181015183820152602001612d81565b612e5c83836134b5565b612e6960008484846127a6565b61064a5760405162461bcd60e51b81526004018080602001828103825260328152602001806145ed6032913960400191505060405180910390fd5b7f3fa96d7b6bcbfe71ef171666d84db3cf52fa2d1c8afdb1cc8e486177f208b7df8282604051612ed592919061457e565b60405180910390a15050565b60008282018381101561131c576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000612f46826114e2565b612f815760405162461bcd60e51b815260040180806020018281038252602c81526020018061468b602c913960400191505060405180910390fd5b6000612f8c83610b5a565b9050806001600160a01b0316846001600160a01b03161480612fc75750836001600160a01b0316612fbc84610516565b6001600160a01b0316145b8061295457506129548185611310565b3b151590565b6001600160e01b0319808216141561303c576040805162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015290519081900360640190fd5b6001600160e01b0319166000908152606560205260409020805460ff19166001179055565b600054610100900460ff168061307a575061307a6121d6565b80613088575060005460ff16155b6130c35760405162461bcd60e51b815260040180806020018281038252602e815260200180614742602e913960400191505060405180910390fd5b600054610100900460ff161580156130ee576000805460ff1961ff0019909116610100171660011790555b8251602080850191909120835191840191909120609791909155609855801561064a576000805461ff0019169055505050565b610a4b8161361b565b805182516060918491849110156131f55784846040516020018083805190602001908083835b6020831061316f5780518252601f199092019160209182019101613150565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106131b75780518252601f199092019160209182019101613198565b6001836020036101000a038019825116818451168082178552505050505050905001925050506040516020818303038152906040529250505061131f565b60005b82518110156133055782818151811061320d57fe5b602001015160f81c60f81b6001600160f81b03191682828151811061322e57fe5b01602001516001600160f81b031916146132fd5785856040516020018083805190602001908083835b602083106132765780518252601f199092019160209182019101613257565b51815160209384036101000a600019018019909216911617905285519190930192850191508083835b602083106132be5780518252601f19909201916020918201910161329f565b6001836020036101000a03801982511681845116808217855250505050505090500192505050604051602081830303815290604052935050505061131f565b6001016131f8565b5092949350505050565b60608161333457506040805180820190915260018152600360fc1b602082015261047b565b8160005b811561334c57600101600a82049150613338565b6000816001600160401b038111801561336457600080fd5b506040519080825280601f01601f19166020018201604052801561338f576020820181803683370190505b50859350905060001982015b83156133e057600a840660300160f81b828280600190039350815181106133be57fe5b60200101906001600160f81b031916908160001a905350600a8404935061339b565b50949350505050565b60006133f361365b565b82604051602001808061190160f01b81525060020183815260200182815260200192505050604051602081830303815290604052805190602001209050919050565b6000815160411461348d576040805162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015290519081900360640190fd5b60208201516040830151606084015160001a6134ab8682858561369b565b9695505050505050565b6001600160a01b038216613510576040805162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015290519081900360640190fd5b6000818152610103602052604090205460ff161561356c576040805162461bcd60e51b81526020600482015260146024820152731d1bdad95b88185b1c9958591e48189d5c9b995960621b604482015290519081900360640190fd5b613575816114e2565b156135c7576040805162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015290519081900360640190fd5b6135d36000838361064a565b6001600160a01b0382166000818152610100602090815260408083208054600101905584835260ff909152902080546001600160a01b03191690911790556106ed82826138f1565b60008181526101c760205260409020546002600019610100600184161502019091160415610a4b5760008181526101c760205260408120610a4b91613ae4565b60006136967f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6136896138fb565b613691613901565b613907565b905090565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156136fc5760405162461bcd60e51b81526004018080602001828103825260228152602001806146696022913960400191505060405180910390fd5b6000601e8560ff1611156137d6576004850360ff16601b148061372557506004850360ff16601c145b6137605760405162461bcd60e51b81526004018080602001828103825260228152602001806147706022913960400191505060405180910390fd5b600161376b87613969565b60048703868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa1580156137c5573d6000803e3d6000fd5b50505060206040510351905061388d565b8460ff16601b14806137eb57508460ff16601c145b6138265760405162461bcd60e51b81526004018080602001828103825260228152602001806147706022913960400191505060405180910390fd5b60018686868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015613880573d6000803e3d6000fd5b5050506020604051035190505b6001600160a01b0381166138e8576040805162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015290519081900360640190fd5b95945050505050565b6106ed82826139ba565b60975490565b60985490565b6000838383613914613a54565b3060405160200180868152602001858152602001848152602001838152602001826001600160a01b03168152602001955050505050506040516020818303038152906040528051906020012090509392505050565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b606081901c6001600160a01b0383168114613a295760405182906001600160a01b0383169060009060008051602061488f833981519152908290a481836001600160a01b0316826001600160a01b031660008051602061488f83398151915260405160405180910390a461064a565b60405182906001600160a01b0385169060009060008051602061488f833981519152908290a4505050565b4690565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282613a8e5760008555613ad4565b82601f10613aa757805160ff1916838001178555613ad4565b82800160010185558215613ad4579182015b82811115613ad4578251825591602001919060010190613ab9565b50613ae0929150613b24565b5090565b50805460018160011615610100020316600290046000825580601f10613b0a5750610a4b565b601f016020900490600052602060002090810190610a4b91905b5b80821115613ae05760008155600101613b25565b803561047b816145d7565b600082601f830112613b54578081fd5b81356020613b69613b64836145ba565b614597565b8281528181019085830183850287018401881015613b85578586fd5b855b85811015613bac578135613b9a816145d7565b84529284019290840190600101613b87565b5090979650505050505050565b600082601f830112613bc9578081fd5b81356020613bd9613b64836145ba565b82815281810190858301855b85811015613bac57613bfc898684358b0101613cc9565b84529284019290840190600101613be5565b600082601f830112613c1e578081fd5b81356020613c2e613b64836145ba565b82815281810190858301604080860288018501891015613c4c578687fd5b865b86811015613cbb5781838b031215613c64578788fd5b81518281018181106001600160401b0382111715613c7e57fe5b83528335613c8b816145d7565b8152838701356001600160601b0381168114613ca557898afd5b8188015285529385019391810191600101613c4e565b509198975050505050505050565b600082601f830112613cd9578081fd5b81356001600160401b03811115613cec57fe5b613cff601f8201601f1916602001614597565b818152846020838601011115613d13578283fd5b816020850160208301379081016020019190915292915050565b600060a08284031215613d3e578081fd5b613d4860a0614597565b90508135815260208201356001600160401b0380821115613d6857600080fd5b613d7485838601613cc9565b60208401526040840135915080821115613d8d57600080fd5b613d9985838601613c0e565b60408401526060840135915080821115613db257600080fd5b613dbe85838601613c0e565b60608401526080840135915080821115613dd757600080fd5b50613de484828501613bb9565b60808301525092915050565b600060208284031215613e01578081fd5b813561131c816145d7565b60008060408385031215613e1e578081fd5b8235613e29816145d7565b91506020830135613e39816145d7565b809150509250929050565b600080600060608486031215613e58578081fd5b8335613e63816145d7565b92506020840135613e73816145d7565b929592945050506040919091013590565b60008060008060808587031215613e99578081fd5b8435613ea4816145d7565b93506020850135613eb4816145d7565b92506040850135915060608501356001600160401b03811115613ed5578182fd5b613ee187828801613cc9565b91505092959194509250565b60008060408385031215613eff578182fd5b8235613f0a816145d7565b915060208301358015158114613e39578182fd5b60008060408385031215613f30578182fd5b8235613f3b816145d7565b946020939093013593505050565b600060208284031215613f5a578081fd5b81356001600160401b03811115613f6f578182fd5b61295484828501613b44565b600060208284031215613f8c578081fd5b81356001600160e01b03198116811461131c578182fd5b600060208284031215613fb4578081fd5b81356001600160401b03811115613fc9578182fd5b61295484828501613cc9565b60008060008060008060c08789031215613fed578384fd5b86356001600160401b0380821115614003578586fd5b61400f8a838b01613cc9565b97506020890135915080821115614024578586fd5b6140308a838b01613cc9565b96506040890135915080821115614045578586fd5b6140518a838b01613cc9565b95506060890135915080821115614066578384fd5b5061407389828a01613cc9565b93505061408260808801613b39565b915061409060a08801613b39565b90509295509295509295565b600080600080600080600060e0888a0312156140b6578485fd5b87356001600160401b03808211156140cc578687fd5b6140d88b838c01613cc9565b985060208a01359150808211156140ed578687fd5b6140f98b838c01613cc9565b975060408a013591508082111561410e578687fd5b61411a8b838c01613cc9565b965060608a013591508082111561412f578283fd5b61413b8b838c01613cc9565b955060808a0135915080821115614150578283fd5b5061415d8a828b01613b44565b93505061416c60a08901613b39565b915061417a60c08901613b39565b905092959891949750929550565b6000806040838503121561419a578182fd5b82356001600160401b038111156141af578283fd5b6141bb85828601613d2d565b9250506020830135613e39816145d7565b6000806000606084860312156141e0578081fd5b83356001600160401b038111156141f5578182fd5b61420186828701613d2d565b9350506020840135614212816145d7565b91506040840135614222816145d7565b809150509250925092565b60006020828403121561423e578081fd5b5035919050565b600080600060608486031215614259578081fd5b833592506020840135614212816145d7565b6000806040838503121561427d578182fd5b50508035926020909101359150565b6000815180845260208085019450808401835b838110156142d857815180516001600160a01b031688528301516001600160601b0316838801526040909601959082019060010161429f565b509495945050505050565b60008151808452815b81811015614308576020818501810151868301820152016142ec565b818111156143195782602083870101525b50601f01601f19169290920160200192915050565b6001600160a01b0391909116815260200190565b6001600160a01b0384168152606060208201819052600090614366908301856142e3565b82810360408401526134ab81856142e3565b6001600160a01b03929092168252602082015260400190565b60006020825261131c602083018461428c565b901515815260200190565b60006020825261131c60208301846142e3565b6020808252601190820152703bb937b7339037b93232b91036b0b5b2b960791b604082015260600190565b6020808252601390820152723737ba1037bbb732b91037b91036b4b73a32b960691b604082015260600190565b6020808252818101527f43726561746f722073686172652073686f756c6420626520706f736974697665604082015260600190565b6020808252601190820152701d1bdad95b9259081a5b98dbdc9c9958dd607a1b604082015260600190565b6020808252600b908201526a1b9bdd08185b1b1bddd95960aa1b604082015260600190565b60208082526019908201527f4163636f756e742073686f756c642062652070726573656e7400000000000000604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602e908201527f746f74616c20616d6f756e74206f662063726561746f7273207368617265207360408201526d0686f756c642062652031303030360941b606082015260800190565b90815260200190565b600083825260406020830152612954604083018461428c565b6040518181016001600160401b03811182821017156145b257fe5b604052919050565b60006001600160401b038211156145cd57fe5b5060209081020190565b6001600160a01b0381168114610a4b57600080fdfe4552433732313a207472616e7366657220746f206e6f6e20455243373231526563656976657220696d706c656d656e7465724f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573734552433732313a207472616e7366657220746f20746865207a65726f206164647265737345434453413a20696e76616c6964207369676e6174757265202773272076616c75654552433732313a206f70657261746f7220717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f76656420666f7220616c6c4552433732313a2062616c616e636520717565727920666f7220746865207a65726f20616464726573734552433732313a206f776e657220717565727920666f72206e6f6e6578697374656e7420746f6b656e496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a656445434453413a20696e76616c6964207369676e6174757265202776272076616c75654552433732314275726e61626c653a2063616c6c6572206973206e6f74206f776e65722c206e6f74206275726e4552433732313a20617070726f76656420717565727920666f72206e6f6e6578697374656e7420746f6b656e4552433732314d657461646174613a2055524920736574206f66206e6f6e6578697374656e7420746f6b656e4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65724552433732313a207472616e73666572206f6620746f6b656e2074686174206973206e6f74206f776e4552433732314d657461646174613a2055524920717565727920666f72206e6f6e6578697374656e7420746f6b656eddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef4552433732313a20617070726f76616c20746f2063757272656e74206f776e65724552433732313a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564526f79616c747920746f74616c2076616c75652073686f756c64206265203c2031303030304552433732314275726e61626c653a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564a26469706673582212206ea709dd630fa711afe0431f6ac1426d2151d36873b712067cce2ba55c11cd2464736f6c63430007060033