Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
ERC721Orderinbox
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC721Base.sol"; contract ERC721Orderinbox is ERC721Base { /// @dev true if collection is private, false if public bool isPrivate; event CreateERC721Orderinbox(address owner, string name, string symbol); event CreateERC721OrderinboxPrivate(address owner, string name, string symbol); function __ERC721Orderinbox_init(string memory _name, string memory _symbol, string memory baseURI, string memory contractURI, address[] memory defaultOperators) external initializer { __ERC721Orderinbox_init_unchained(_name, _symbol, baseURI, contractURI, defaultOperators); isPrivate = false; emit CreateERC721Orderinbox(_msgSender(), _name, _symbol); } function __ERC721OrderinboxPrivate_init(string memory _name, string memory _symbol, string memory baseURI, string memory contractURI, address[] memory defaultOperators, address[] memory operators) external initializer { __ERC721Orderinbox_init_unchained(_name, _symbol, baseURI, contractURI, defaultOperators); for(uint i = 0; i < operators.length; i++) { setApprovalForAll(operators[i], true); } isPrivate = true; emit CreateERC721OrderinboxPrivate(_msgSender(), _name, _symbol); } function __ERC721Orderinbox_init_unchained(string memory _name, string memory _symbol, string memory baseURI, string memory contractURI, address[] memory defaultOperators) internal onlyInitializing { _setBaseURI(baseURI); __ERC721Mint_init_unchained(); __RoyaltiesUpgradeable_init_unchained(); __Context_init_unchained(); __ERC165_init_unchained(); __Ownable_init_unchained(); __ERC721Burnable_init_unchained(); __ERC721URIStorage_init_unchained(); __Mint721Validator_init_unchained(); __HasContractURI_init_unchained(contractURI); __ERC721_init_unchained(_name, _symbol); //setting default approver for transferProxy for(uint i = 0; i < defaultOperators.length; i++) { _setDefaultApproval(defaultOperators[i], true); } // Start from 1 AutoTokenId._increment(); } function mintAndTransfer(Mint721AutoIdData memory data, address to) public virtual { if (isPrivate){ require(owner() == data.creators[0].account, "minter is not the owner"); } _mintAndTransfer(data, to); } uint256[255] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../erc-1271/ERC1271Validator.sol"; import "@orderinbox/mint/contracts/erc-721/LibERC721Mint.sol"; contract Mint721Validator is ERC1271Validator { function __Mint721Validator_init_unchained() internal onlyInitializing { __EIP712_init("Mint721", "1"); } function validate(address account, bytes32 hash, bytes memory signature) internal view { validate1271(account, hash, signature); } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/utils/math/SafeMathUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol"; import "@orderinbox/royalties/contracts/impl/RoyaltiesImpl.sol"; import "@orderinbox/royalties/contracts/RoyaltiesUpgradeable.sol"; import "@orderinbox/mint/contracts/erc-721/IERC721Mint.sol"; import "./Mint721Validator.sol"; abstract contract ERC721Mint is IERC721Mint, ERC721URIStorageUpgradeable, Mint721Validator, RoyaltiesUpgradeable, RoyaltiesImpl { using SafeMathUpgradeable for uint; event Creators(uint256 tokenId, LibPart.Part[] creators); // tokenId => creators mapping(uint256 => LibPart.Part[]) private creators; function __ERC721Mint_init_unchained() internal onlyInitializing { _registerInterface(0x8486f69f); } function transferFromOrMint( LibERC721Mint.Mint721Data memory data, address from, address to ) override external { if (_exists(data.tokenId)) { safeTransferFrom(from, to, data.tokenId); } else { _mintAndTransfer(data, to); } } function _mintAndTransfer(LibERC721Mint.Mint721Data memory data, address to) internal { address minter = data.creators[0].account; address sender = _msgSender(); require(data.creators.length == data.signatures.length); require(minter == sender || isApprovedForAll(minter, sender), "ERC721: transfer caller is not minter nor approved"); bytes32 hash = LibERC721Mint.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 _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 payable _to) external { require(_msgSender() == _from, "not allowed"); super._updateAccount(_id, _from, _to); } function getCreators(uint256 _id) public view returns (LibPart.Part[] memory) { return creators[_id]; } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165StorageUpgradeable, ERC721Upgradeable, IERC165Upgradeable) returns (bool) { return super.supportsInterface(interfaceId); } modifier onlyCreators(uint256 _id) { LibPart.Part[] memory creatorsOfToken = creators[_id]; bool isCreator = false; for (uint i = 0; i < creatorsOfToken.length; i++) { address creator = creatorsOfToken[i].account; if (creator == _msgSender()) { isCreator = true; break; } } require(isCreator, "ERC721Mint: not creator"); _; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; abstract contract ERC721DefaultApproval is ERC721Upgradeable { 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[256] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721EnumerableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol"; import "./ERC721Mint.sol"; import "../HasContractURI.sol"; abstract contract ERC721Core is OwnableUpgradeable, ERC721BurnableUpgradeable, ERC721EnumerableUpgradeable, ERC721URIStorageUpgradeable, ERC721Mint, HasContractURI { // Base URI string public baseURI; function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165StorageUpgradeable, ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721Mint) returns (bool) { return super.supportsInterface(interfaceId); } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721Upgradeable, ERC721EnumerableUpgradeable) { return super._beforeTokenTransfer(from, to, tokenId); } // These should be set by the Orderinbox admin only function _baseURI() internal view virtual override(ERC721Upgradeable) returns (string memory) { return baseURI; } function _setBaseURI(string memory baseUri) internal { baseURI = baseUri; } function tokenURI(uint256 tokenId) public view virtual override(ERC721URIStorageUpgradeable, ERC721Upgradeable) returns (string memory) { return super.tokenURI(tokenId); } function _burn(uint256 tokenId) internal virtual override(ERC721URIStorageUpgradeable, ERC721Upgradeable) onlyCreators(tokenId) { return super._burn(tokenId); } uint256[256] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; // import "./ERC721Core.sol"; import "./ERC721DefaultApproval.sol"; import "../AutoTokenId.sol"; abstract contract ERC721Base is ERC721Core, ERC721DefaultApproval, AutoTokenId { struct Mint721AutoIdData { string uri; LibPart.Part[] creators; LibPart.Part[] royalties; bytes[] signatures; } function setDefaultApproval(address operator, bool hasApproval) external onlyOwner { _setDefaultApproval(operator, hasApproval); } function _isApprovedOrOwner(address spender, uint256 tokenId) internal virtual override(ERC721Upgradeable, ERC721DefaultApproval) view returns (bool) { return ERC721DefaultApproval._isApprovedOrOwner(spender, tokenId); } function isApprovedForAll(address owner, address operator) public view virtual override(ERC721Upgradeable, ERC721DefaultApproval) returns (bool) { return ERC721DefaultApproval.isApprovedForAll(owner, operator); } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Upgradeable, ERC721Core) returns (bool) { return super.supportsInterface(interfaceId); } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual override(ERC721Upgradeable, ERC721Core) { return super._beforeTokenTransfer(from, to, tokenId); } // These should be set by the Orderinbox admin only function _baseURI() internal view virtual override(ERC721Upgradeable, ERC721Core) returns (string memory) { return super._baseURI(); } function tokenURI(uint256 tokenId) public view virtual override(ERC721Upgradeable, ERC721Core) returns (string memory) { return super.tokenURI(tokenId); } function _burn(uint256 tokenId) internal virtual override(ERC721Upgradeable, ERC721Core) onlyCreators(tokenId) { return super._burn(tokenId); } function _mintAndTransfer(Mint721AutoIdData memory data, address to) internal virtual { super._mintAndTransfer( LibERC721Mint.Mint721Data( getNextTokenId(), data.uri, data.creators, data.royalties, data.signatures, true), // We mark it with auto id so the signature validation is either skipped or ignored on the token id to); AutoTokenId._increment(); } uint256[256] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./ERC1271.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/cryptography/draft-EIP712Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/cryptography/ECDSAUpgradeable.sol"; abstract contract ERC1271Validator is EIP712Upgradeable { using AddressUpgradeable for address; using ECDSAUpgradeable 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); if (signer.isContract()) { require( ERC1271(signer).isValidSignature(hash, signature) == MAGICVALUE, SIGNATURE_ERROR ); } else { require( hash.recover(signature) == signer, SIGNATURE_ERROR ); } } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; 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; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol"; abstract contract HasContractURI is ERC165StorageUpgradeable { string public contractURI; /* * bytes4(keccak256('contractURI()')) == 0xe8a3d485 */ bytes4 private constant _INTERFACE_ID_CONTRACT_URI = 0xe8a3d485; function __HasContractURI_init_unchained(string memory _contractURI) internal onlyInitializing { 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[256] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; abstract contract AutoTokenId { using CountersUpgradeable for CountersUpgradeable.Counter; // We cannot just use balanceOf to create the new tokenId because tokens // can be burned (destroyed), so we need a separate counter. CountersUpgradeable.Counter private _tokenIdTracker; function getNextTokenId() public view returns (uint256) { return _tokenIdTracker.current(); } function _increment() internal { return _tokenIdTracker.increment(); } uint256[256] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./AbstractRoyalties.sol"; import "../IRoyalties.sol"; import "../IManifoldRoyalties.sol"; import "../IRaribleRoyalties.sol"; contract RoyaltiesImpl is AbstractRoyalties, IRoyalties, IManifoldRoyalties, IRaribleV2Royalties { function getOrderinboxRoyalties(uint256 tokenId) override external view returns (LibPart.Part[] memory) { return royalties[tokenId]; } function _onRoyaltiesSet(uint256 id, LibPart.Part[] memory _royalties) override internal { emit RoyaltiesSet(id, _royalties); } /** * @dev * This is added so that we support Rarible Royalties spec so that our royalties can be recognized by the royalties engine implementations */ function getRaribleV2Royalties(uint256 tokenId) override external view returns (Part[] memory parts) { parts = new Part[](royalties[tokenId].length); for (uint i = 0; i < royalties[tokenId].length; i++) { parts[i].account = royalties[tokenId][i].account; parts[i].value = royalties[tokenId][i].value; } } /** * @dev * This is added so that we support Manifold.xyz Royalties spec so that our royalties can be recognized by the royalties engine implementation */ function getRoyalties(uint256 tokenId) override external view returns (address payable[] memory recipients, uint256[] memory bps) { recipients = new address payable[](royalties[tokenId].length); bps = new uint256[](royalties[tokenId].length); for (uint i = 0; i < royalties[tokenId].length; i++) { recipients[i] = royalties[tokenId][i].account; bps[i] = royalties[tokenId][i].value; } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../LibPart.sol"; abstract contract AbstractRoyalties { mapping (uint256 => LibPart.Part[]) public 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 payable _to) internal { uint length = royalties[_id].length; for(uint i = 0; i < length; i++) { if (royalties[_id][i].account == _from) { royalties[_id][i].account = _to; } } } function _onRoyaltiesSet(uint256 id, LibPart.Part[] memory _royalties) virtual internal; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/utils/introspection/ERC165StorageUpgradeable.sol"; import "./LibRoyalties.sol"; import "./IRoyalties.sol"; abstract contract RoyaltiesUpgradeable is ERC165StorageUpgradeable, IRoyalties { function __RoyaltiesUpgradeable_init_unchained() internal onlyInitializing { _registerInterface(LibRoyalties._INTERFACE_ID_ROYALTIES); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library LibRoyalties { /* * bytes4(keccak256('getOrderinboxRoyalties(LibAsset.AssetType)')) == 0xc4926806 * bytes4(keccak256('getRoyalties(LibAsset.AssetType)')) == 0xbb3bafd6 */ bytes4 constant _INTERFACE_ID_ROYALTIES = 0xc4926806; // 0xbb3bafd6 }
// SPDX-License-Identifier: MIT pragma solidity ^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)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./LibPart.sol"; interface IRoyalties { event RoyaltiesSet(uint256 tokenId, LibPart.Part[] royalties); function getOrderinboxRoyalties(uint256 id) external view returns (LibPart.Part[] memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IRaribleV1Royalties { /* * bytes4(keccak256('getFeeBps(uint256)')) == 0x0ebd4c7f * bytes4(keccak256('getFeeRecipients(uint256)')) == 0xb9c4d9fb * * => 0x0ebd4c7f ^ 0xb9c4d9fb == 0xb7799584 */ function getFeeBps(uint256 id) external view returns (uint[] memory); function getFeeRecipients(uint256 id) external view returns (address payable[] memory); } interface IRaribleV2Royalties { /* * bytes4(keccak256('getRaribleV2Royalties(uint256)')) == 0xcad96cca */ struct Part { address payable account; uint96 value; } function getRaribleV2Royalties(uint256 id) external view returns (Part[] memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /// @author: manifold.xyz /** * @dev Royalty interface for creator core classes */ interface IManifoldRoyalties { /** * @dev Get royalites of a token. Returns list of receivers and basisPoints * * bytes4(keccak256('getRoyalties(uint256)')) == 0xbb3bafd6 * * => 0xbb3bafd6 = 0xbb3bafd6 */ function getRoyalties(uint256 tokenId) external view returns (address payable[] memory, uint256[] memory); }
// SPDX-License-Identifier: MIT pragma solidity >=0.8.6 <0.9.0; import "@orderinbox/royalties/contracts/LibPart.sol"; library LibERC721Mint { struct Mint721Data { uint tokenId; string tokenURI; LibPart.Part[] creators; LibPart.Part[] royalties; bytes[] signatures; bool autoId; } 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.autoId ? 0 : data.tokenId, keccak256(bytes(data.tokenURI)), keccak256(abi.encodePacked(creatorsBytes)), keccak256(abi.encodePacked(royaltiesBytes)) )); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol"; import "./LibERC721Mint.sol"; import "@orderinbox/royalties/contracts/LibPart.sol"; interface IERC721Mint is IERC721Upgradeable { function transferFromOrMint( LibERC721Mint.Mint721Data memory data, address from, address to ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/math/SafeMath.sol) pragma solidity ^0.8.0; // CAUTION // This version of SafeMath should only be used with Solidity 0.8 or later, // because it relies on the compiler's built in overflow checks. /** * @dev Wrappers over Solidity's arithmetic operations. * * NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler * now has built in overflow checking. */ library 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) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { return a + b; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { return a * b; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b <= a, errorMessage); return a - b; } } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a / b; } } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { unchecked { require(b > 0, errorMessage); return a % b; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { __ERC165_init_unchained(); } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165Storage.sol) pragma solidity ^0.8.0; import "./ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Storage based implementation of the {IERC165} interface. * * Contracts may inherit from this and call {_registerInterface} to declare * their support of an interface. */ abstract contract ERC165StorageUpgradeable is Initializable, ERC165Upgradeable { function __ERC165Storage_init() internal onlyInitializing { __ERC165_init_unchained(); __ERC165Storage_init_unchained(); } function __ERC165Storage_init_unchained() internal onlyInitializing { } /** * @dev Mapping of interface ids to whether or not it's supported. */ mapping(bytes4 => bool) private _supportedInterfaces; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return super.supportsInterface(interfaceId) || _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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/draft-EIP712.sol) pragma solidity ^0.8.0; import "./ECDSAUpgradeable.sol"; import "../../proxy/utils/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 onlyInitializing { __EIP712_init_unchained(name, version); } function __EIP712_init_unchained(string memory name, string memory version) internal onlyInitializing { 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 nameHash, bytes32 versionHash ) private view returns (bytes32) { return keccak256(abi.encode(typeHash, nameHash, versionHash, block.chainid, address(this))); } /** * @dev Given an already https://eips.ethereum.org/EIPS/eip-712#definition-of-hashstruct[hashed struct], this * function returns the hash of the fully encoded EIP712 message for this domain. * * This hash can be used together with {ECDSA-recover} to obtain the signer of a message. For example: * * ```solidity * bytes32 digest = _hashTypedDataV4(keccak256(abi.encode( * keccak256("Mail(address to,string contents)"), * mailTo, * keccak256(bytes(mailContents)) * ))); * address signer = ECDSA.recover(digest, signature); * ``` */ function _hashTypedDataV4(bytes32 structHash) internal view virtual returns (bytes32) { return ECDSAUpgradeable.toTypedDataHash(_domainSeparatorV4(), structHash); } /** * @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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../StringsUpgradeable.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSAUpgradeable { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", StringsUpgradeable.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library CountersUpgradeable { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { __Context_init_unchained(); } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^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; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721EnumerableUpgradeable is IERC721Upgradeable { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721URIStorage.sol) pragma solidity ^0.8.0; import "../ERC721Upgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev ERC721 token with storage based token URI management. */ abstract contract ERC721URIStorageUpgradeable is Initializable, ERC721Upgradeable { function __ERC721URIStorage_init() internal onlyInitializing { __Context_init_unchained(); __ERC165_init_unchained(); __ERC721URIStorage_init_unchained(); } function __ERC721URIStorage_init_unchained() internal onlyInitializing { } using StringsUpgradeable for uint256; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721URIStorage: 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 string(abi.encodePacked(base, _tokenURI)); } return super.tokenURI(tokenId); } /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token"); _tokenURIs[tokenId] = _tokenURI; } /** * @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 override { super._burn(tokenId); if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721Upgradeable.sol"; import "./IERC721EnumerableUpgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721EnumerableUpgradeable is Initializable, ERC721Upgradeable, IERC721EnumerableUpgradeable { function __ERC721Enumerable_init() internal onlyInitializing { __Context_init_unchained(); __ERC165_init_unchained(); __ERC721Enumerable_init_unchained(); } function __ERC721Enumerable_init_unchained() internal onlyInitializing { } // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC721Upgradeable) returns (bool) { return interfaceId == type(IERC721EnumerableUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721Upgradeable.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721EnumerableUpgradeable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` cannot be the zero address. * - `to` cannot be the zero address. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721Upgradeable.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721Upgradeable.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } uint256[46] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Burnable.sol) pragma solidity ^0.8.0; import "../ERC721Upgradeable.sol"; import "../../../utils/ContextUpgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @title ERC721 Burnable Token * @dev ERC721 Token that can be irreversibly burned (destroyed). */ abstract contract ERC721BurnableUpgradeable is Initializable, ContextUpgradeable, ERC721Upgradeable { function __ERC721Burnable_init() internal onlyInitializing { __Context_init_unchained(); __ERC165_init_unchained(); __ERC721Burnable_init_unchained(); } function __ERC721Burnable_init_unchained() internal onlyInitializing { } /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved"); _burn(tokenId); } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/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; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721ReceiverUpgradeable { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721Upgradeable.sol"; import "./IERC721ReceiverUpgradeable.sol"; import "./extensions/IERC721MetadataUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/StringsUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { __Context_init_unchained(); __ERC165_init_unchained(); __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721Upgradeable.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721Upgradeable.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721Upgradeable.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer 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(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} uint256[44] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol) pragma solidity ^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 {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } uint256[49] private __gap; }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"}],"name":"CreateERC721Orderinbox","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"string","name":"name","type":"string"},{"indexed":false,"internalType":"string","name":"symbol","type":"string"}],"name":"CreateERC721OrderinboxPrivate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"address payable","name":"account","type":"address"},{"internalType":"uint96","name":"value","type":"uint96"}],"indexed":false,"internalType":"struct LibPart.Part[]","name":"creators","type":"tuple[]"}],"name":"Creators","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"hasApproval","type":"bool"}],"name":"DefaultApproval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"address payable","name":"account","type":"address"},{"internalType":"uint96","name":"value","type":"uint96"}],"indexed":false,"internalType":"struct LibPart.Part[]","name":"royalties","type":"tuple[]"}],"name":"RoyaltiesSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"string","name":"contractURI","type":"string"},{"internalType":"address[]","name":"defaultOperators","type":"address[]"},{"internalType":"address[]","name":"operators","type":"address[]"}],"name":"__ERC721OrderinboxPrivate_init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"baseURI","type":"string"},{"internalType":"string","name":"contractURI","type":"string"},{"internalType":"address[]","name":"defaultOperators","type":"address[]"}],"name":"__ERC721Orderinbox_init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"}],"name":"getCreators","outputs":[{"components":[{"internalType":"address payable","name":"account","type":"address"},{"internalType":"uint96","name":"value","type":"uint96"}],"internalType":"struct LibPart.Part[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNextTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getOrderinboxRoyalties","outputs":[{"components":[{"internalType":"address payable","name":"account","type":"address"},{"internalType":"uint96","name":"value","type":"uint96"}],"internalType":"struct LibPart.Part[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRaribleV2Royalties","outputs":[{"components":[{"internalType":"address payable","name":"account","type":"address"},{"internalType":"uint96","name":"value","type":"uint96"}],"internalType":"struct IRaribleV2Royalties.Part[]","name":"parts","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRoyalties","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"bps","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"components":[{"internalType":"string","name":"uri","type":"string"},{"components":[{"internalType":"address payable","name":"account","type":"address"},{"internalType":"uint96","name":"value","type":"uint96"}],"internalType":"struct LibPart.Part[]","name":"creators","type":"tuple[]"},{"components":[{"internalType":"address payable","name":"account","type":"address"},{"internalType":"uint96","name":"value","type":"uint96"}],"internalType":"struct LibPart.Part[]","name":"royalties","type":"tuple[]"},{"internalType":"bytes[]","name":"signatures","type":"bytes[]"}],"internalType":"struct ERC721Base.Mint721AutoIdData","name":"data","type":"tuple"},{"internalType":"address","name":"to","type":"address"}],"name":"mintAndTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"royalties","outputs":[{"internalType":"address payable","name":"account","type":"address"},{"internalType":"uint96","name":"value","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"hasApproval","type":"bool"}],"name":"setDefaultApproval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"components":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"tokenURI","type":"string"},{"components":[{"internalType":"address payable","name":"account","type":"address"},{"internalType":"uint96","name":"value","type":"uint96"}],"internalType":"struct LibPart.Part[]","name":"creators","type":"tuple[]"},{"components":[{"internalType":"address payable","name":"account","type":"address"},{"internalType":"uint96","name":"value","type":"uint96"}],"internalType":"struct LibPart.Part[]","name":"royalties","type":"tuple[]"},{"internalType":"bytes[]","name":"signatures","type":"bytes[]"},{"internalType":"bool","name":"autoId","type":"bool"}],"internalType":"struct LibERC721Mint.Mint721Data","name":"data","type":"tuple"},{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"transferFromOrMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_id","type":"uint256"},{"internalType":"address","name":"_from","type":"address"},{"internalType":"address payable","name":"_to","type":"address"}],"name":"updateAccount","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506148aa806100206000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c8063715018a61161011a578063c4926806116100ad578063e07f23191161007c578063e07f231914610483578063e8a3d48514610496578063e985e9c51461049e578063f059efa0146104b1578063f2fde38b146104c457600080fd5b8063c492680614610435578063c87b56dd14610448578063caa0f92a1461045b578063cad96cca1461046357600080fd5b806395d89b41116100e957806395d89b41146103e6578063a22cb465146103ee578063b88d4fde14610401578063bb3bafd61461041457600080fd5b8063715018a614610373578063891be9741461037b5780638924af741461039b5780638da5cb5b146103d557600080fd5b8063310ebf1b1161019d5780634f6ccce71161016c5780634f6ccce71461031f5780636352211e146103325780636c0360eb146103455780636ee5518e1461034d57806370a082311461036057600080fd5b8063310ebf1b146102d357806342842e0e146102e657806342966c68146102f95780634b68c7c11461030c57600080fd5b806318054c37116101d957806318054c371461028857806318160ddd1461029b57806323b872dd146102ad5780632f745c59146102c057600080fd5b806301ffc9a71461020b57806306fdde0314610233578063081812fc14610248578063095ea7b314610273575b600080fd5b61021e610219366004613a39565b6104d7565b60405190151581526020015b60405180910390f35b61023b6104e8565b60405161022a9190613aae565b61025b610256366004613ac1565b61057a565b6040516001600160a01b03909116815260200161022a565b610286610281366004613aff565b610607565b005b610286610296366004613b3b565b61071d565b60fd545b60405190815260200161022a565b6102866102bb366004613b70565b610755565b61029f6102ce366004613aff565b610787565b6102866102e1366004613d69565b61081d565b6102866102f4366004613b70565b610934565b610286610307366004613ac1565b61094f565b61028661031a366004613f7a565b6109c9565b61029f61032d366004613ac1565b610a73565b61025b610340366004613ac1565b610b06565b61023b610b7d565b61028661035b36600461405b565b610c0c565b61029f61036e366004614170565b610c35565b610286610cbc565b61038e610389366004613ac1565b610cf2565b60405161022a91906141ee565b6103ae6103a9366004614201565b610d82565b604080516001600160a01b0390931683526001600160601b0390911660208301520161022a565b6033546001600160a01b031661025b565b61023b610dcc565b6102866103fc366004613b3b565b610ddb565b61028661040f366004614223565b610de6565b610427610422366004613ac1565b610e1e565b60405161022a92919061428e565b61038e610443366004613ac1565b610fc8565b61023b610456366004613ac1565b611043565b61029f61104e565b610476610471366004613ac1565b61105f565b60405161022a9190614312565b61028661049136600461437b565b6111d8565b61023b611229565b61021e6104ac3660046143bd565b611237565b6102866104bf3660046143f6565b61124a565b6102866104d2366004614170565b611314565b60006104e2826113ac565b92915050565b6060609780546104f7906144c7565b80601f0160208091040260200160405190810160405280929190818152602001828054610523906144c7565b80156105705780601f1061054557610100808354040283529160200191610570565b820191906000526020600020905b81548152906001019060200180831161055357829003601f168201915b5050505050905090565b6000610585826113b7565b6105eb5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152609b60205260409020546001600160a01b031690565b600061061282610b06565b9050806001600160a01b0316836001600160a01b031614156106805760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016105e2565b336001600160a01b038216148061069c575061069c8133611237565b61070e5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016105e2565b61071883836113d4565b505050565b6033546001600160a01b031633146107475760405162461bcd60e51b81526004016105e2906144fc565b6107518282611442565b5050565b610760335b826114a2565b61077c5760405162461bcd60e51b81526004016105e290614531565b6107188383836114ae565b600061079283610c35565b82106107f45760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016105e2565b506001600160a01b0391909116600090815260fb60209081526040808320938352929052205490565b600054610100900460ff166108385760005460ff161561083c565b303b155b6108585760405162461bcd60e51b81526004016105e290614582565b600054610100900460ff1615801561087a576000805461ffff19166101011790555b6108878787878787611659565b60005b82518110156108c9576108b78382815181106108a8576108a86145d0565b60200260200101516001610ddb565b806108c1816145fc565b91505061088a565b50610761805460ff191660011790557f50ef895e69083fa73baa733f41b34ec2b4dd898a76639c235465168ff1c275416109003390565b888860405161091193929190614617565b60405180910390a1801561092b576000805461ff00191690555b50505050505050565b61071883838360405180602001604052806000815250610de6565b6109583361075a565b6109bd5760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b60648201526084016105e2565b6109c68161172e565b50565b6107615460ff1615610a695781602001516000815181106109ec576109ec6145d0565b6020026020010151600001516001600160a01b0316610a136033546001600160a01b031690565b6001600160a01b031614610a695760405162461bcd60e51b815260206004820152601760248201527f6d696e746572206973206e6f7420746865206f776e657200000000000000000060448201526064016105e2565b610751828261186b565b6000610a7e60fd5490565b8210610ae15760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016105e2565b60fd8281548110610af457610af46145d0565b90600052602060002001549050919050565b6000818152609960205260408120546001600160a01b0316806104e25760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016105e2565b61035e8054610b8b906144c7565b80601f0160208091040260200160405190810160405280929190818152602001828054610bb7906144c7565b8015610c045780601f10610bd957610100808354040283529160200191610c04565b820191906000526020600020905b815481529060010190602001808311610be757829003601f168201915b505050505081565b8251610c17906113b7565b15610c2b5761071882828560000151610934565b61071883826118c3565b60006001600160a01b038216610ca05760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016105e2565b506001600160a01b03166000908152609a602052604090205490565b6033546001600160a01b03163314610ce65760405162461bcd60e51b81526004016105e2906144fc565b610cf06000611a73565b565b606061022a6000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015610d7757600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b90046001600160601b031681830152825260019092019101610d28565b505050509050919050565b6102296020528160005260406000208181548110610d9f57600080fd5b6000918252602090912001546001600160a01b0381169250600160a01b90046001600160601b0316905082565b6060609880546104f7906144c7565b610751338383611ac5565b610df033836114a2565b610e0c5760405162461bcd60e51b81526004016105e290614531565b610e1884848484611b94565b50505050565b6000818152610229602052604090205460609081906001600160401b03811115610e4a57610e4a613bb1565b604051908082528060200260200182016040528015610e73578160200160208202803683370190505b50600084815261022960205260409020549092506001600160401b03811115610e9e57610e9e613bb1565b604051908082528060200260200182016040528015610ec7578160200160208202803683370190505b50905060005b60008481526102296020526040902054811015610fc257600084815261022960205260409020805482908110610f0557610f056145d0565b60009182526020909120015483516001600160a01b0390911690849083908110610f3157610f316145d0565b6001600160a01b03909216602092830291909101820152600085815261022990915260409020805482908110610f6957610f696145d0565b9060005260206000200160000160149054906101000a90046001600160601b03166001600160601b0316828281518110610fa557610fa56145d0565b602090810291909101015280610fba816145fc565b915050610ecd565b50915091565b600081815261022960209081526040808320805482518185028101850190935280835260609492939192909184018215610d7757600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b90046001600160601b031681830152825260019092019101610d28565b60606104e282611bc7565b600061105a6105605490565b905090565b600081815261022960205260409020546060906001600160401b0381111561108957611089613bb1565b6040519080825280602002602001820160405280156110ce57816020015b60408051808201909152600080825260208201528152602001906001900390816110a75790505b50905060005b600083815261022960205260409020548110156111d25760008381526102296020526040902080548290811061110c5761110c6145d0565b60009182526020909120015482516001600160a01b0390911690839083908110611138576111386145d0565b6020908102919091018101516001600160a01b03909216909152600084815261022990915260409020805482908110611173576111736145d0565b9060005260206000200160000160149054906101000a90046001600160601b03168282815181106111a6576111a66145d0565b6020908102919091018101516001600160601b03909216910152806111ca816145fc565b9150506110d4565b50919050565b336001600160a01b0383161461121e5760405162461bcd60e51b815260206004820152600b60248201526a1b9bdd08185b1b1bddd95960aa1b60448201526064016105e2565b610718838383611bd2565b61025d8054610b8b906144c7565b60006112438383611c94565b9392505050565b600054610100900460ff166112655760005460ff1615611269565b303b155b6112855760405162461bcd60e51b81526004016105e290614582565b600054610100900460ff161580156112a7576000805461ffff19166101011790555b6112b48686868686611659565b610761805460ff191690557f92a209d16801e9232ed8ac1da4d5fc4443d3bc1a083db0a79ad14141c06e469a3387876040516112f293929190614617565b60405180910390a1801561130c576000805461ff00191690555b505050505050565b6033546001600160a01b0316331461133e5760405162461bcd60e51b81526004016105e2906144fc565b6001600160a01b0381166113a35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105e2565b6109c681611a73565b60006104e282611ce5565b6000908152609960205260409020546001600160a01b0316151590565b6000818152609b6020526040902080546001600160a01b0319166001600160a01b038416908117909155819061140982610b06565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b038216600081815261045f6020908152604091829020805460ff191685151590811790915591519182527f270dbb8ba4292910ae92862466486be25c355c837270a3d8824b36a8bc7c653b910160405180910390a25050565b60006112438383611cf0565b826001600160a01b03166114c182610b06565b6001600160a01b0316146115295760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016105e2565b6001600160a01b03821661158b5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105e2565b611596838383611d1d565b6115a16000826113d4565b6001600160a01b0383166000908152609a602052604081208054600192906115ca908490614657565b90915550506001600160a01b0382166000908152609a602052604081208054600192906115f890849061466e565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600054610100900460ff166116805760405162461bcd60e51b81526004016105e290614686565b61168983611d28565b611691611d3c565b611699611d73565b6116a1611daa565b6116a9611daa565b6116b1611dd1565b6116b9611daa565b6116c1611daa565b6116c9611e01565b6116d282611e6a565b6116dc8585611eb6565b60005b815181101561171e5761170c8282815181106116fd576116fd6145d0565b60200260200101516001611442565b80611716816145fc565b9150506116df565b50611727611f04565b5050505050565b600081815261022a602090815260408083208054825181850281018501909352808352859493849084015b828210156117a857600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b90046001600160601b031681830152825260019092019101611759565b5050505090506000805b825181101561181a5760008382815181106117cf576117cf6145d0565b60200260200101516000015190506117e43390565b6001600160a01b0316816001600160a01b0316141561180757600192505061181a565b5080611812816145fc565b9150506117b2565b50806118625760405162461bcd60e51b815260206004820152601760248201527622a9219b9918a6b4b73a1d103737ba1031b932b0ba37b960491b60448201526064016105e2565b610e1884611f13565b6118bb6040518060c0016040528061188161104e565b81526020018460000151815260200184602001518152602001846040015181526020018460600151815260200160011515815250826118c3565b610751611f04565b600082604001516000815181106118dc576118dc6145d0565b602002602001015160000151905060006118f33390565b90508360800151518460400151511461190b57600080fd5b806001600160a01b0316826001600160a01b0316148061193057506119308282611237565b6119975760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206d6044820152711a5b9d195c881b9bdc88185c1c1c9bdd995960721b60648201526084016105e2565b60006119a285612050565b905060005b856040015151811015611a2e576000866040015182815181106119cc576119cc6145d0565b6020026020010151600001519050836001600160a01b0316816001600160a01b031614611a1b57611a1b818489608001518581518110611a0e57611a0e6145d0565b602002602001015161227a565b5080611a26816145fc565b9150506119a7565b50611a3d848660000151612285565b611a4f8560000151866060015161229f565b611a61856000015186604001516124bb565b6117278560000151866020015161271a565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03161415611b275760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105e2565b6001600160a01b038381166000818152609c6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611b9f8484846114ae565b611bab848484846127a6565b610e185760405162461bcd60e51b81526004016105e2906146d1565b60606104e2826128a5565b60008381526102296020526040812054905b818110156117275760008581526102296020526040902080546001600160a01b038616919083908110611c1957611c196145d0565b6000918252602090912001546001600160a01b03161415611c8257600085815261022960205260409020805484919083908110611c5857611c586145d0565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790555b80611c8c816145fc565b915050611be4565b6001600160a01b038116600090815261045f602052604081205460ff168061124357506001600160a01b038084166000908152609c602090815260408083209386168352929052205460ff16611243565b60006104e282612a08565b6001600160a01b038216600090815261045f602052604081205460ff168061124357506112438383612a3a565b610718838383612afc565b80516107519061035e906020840190613954565b600054610100900460ff16611d635760405162461bcd60e51b81526004016105e290614686565b610cf0638486f69f60e01b612b07565b600054610100900460ff16611d9a5760405162461bcd60e51b81526004016105e290614686565b610cf0636249340360e11b612b07565b600054610100900460ff16610cf05760405162461bcd60e51b81526004016105e290614686565b600054610100900460ff16611df85760405162461bcd60e51b81526004016105e290614686565b610cf033611a73565b600054610100900460ff16611e285760405162461bcd60e51b81526004016105e290614686565b610cf0604051806040016040528060078152602001664d696e7437323160c81b815250604051806040016040528060018152602001603160f81b815250612b87565b600054610100900460ff16611e915760405162461bcd60e51b81526004016105e290614686565b8051611ea59061025d906020840190613954565b506109c663e8a3d48560e01b612b07565b600054610100900460ff16611edd5760405162461bcd60e51b81526004016105e290614686565b8151611ef0906097906020850190613954565b508051610718906098906020840190613954565b610cf061056080546001019055565b600081815261022a602090815260408083208054825181850281018501909352808352859493849084015b82821015611f8d57600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b90046001600160601b031681830152825260019092019101611f3e565b5050505090506000805b8251811015611fff576000838281518110611fb457611fb46145d0565b6020026020010151600001519050611fc93390565b6001600160a01b0316816001600160a01b03161415611fec576001925050611fff565b5080611ff7816145fc565b915050611f97565b50806120475760405162461bcd60e51b815260206004820152601760248201527622a9219b9918a6b4b73a1d103737ba1031b932b0ba37b960491b60448201526064016105e2565b610e1884612bb8565b6000808260600151516001600160401b0381111561207057612070613bb1565b604051908082528060200260200182016040528015612099578160200160208202803683370190505b50905060005b836060015151811015612101576120d2846060015182815181106120c5576120c56145d0565b6020026020010151612bfa565b8282815181106120e4576120e46145d0565b6020908102919091010152806120f9816145fc565b91505061209f565b5060008360400151516001600160401b0381111561212157612121613bb1565b60405190808252806020026020018201604052801561214a578160200160208202803683370190505b50905060005b8460400151518110156121a557612176856040015182815181106120c5576120c56145d0565b828281518110612188576121886145d0565b60209081029190910101528061219d816145fc565b915050612150565b507ff64326045af5fd7e15297ba939f85b550474d3899daa47d2bc1ffbdb9ced344e8460a001516121d75784516121da565b60005b856020015180519060200120836040516020016121f79190614723565b604051602081830303815290604052805190602001208560405160200161221e9190614723565b60408051601f198184030181528282528051602091820120908301969096528101939093526060830191909152608082015260a081019190915260c0016040516020818303038152906040528051906020012092505050919050565b610718838383612c76565b610751828260405180602001604052806000815250612ddb565b6000805b82518110156124515760006001600160a01b03168382815181106122c9576122c96145d0565b6020026020010151600001516001600160a01b0316141561232c5760405162461bcd60e51b815260206004820152601b60248201527f526563697069656e742073686f756c642062652070726573656e74000000000060448201526064016105e2565b82818151811061233e5761233e6145d0565b6020026020010151602001516001600160601b0316600014156123a35760405162461bcd60e51b815260206004820181905260248201527f526f79616c74792076616c75652073686f756c6420626520706f73697469766560448201526064016105e2565b8281815181106123b5576123b56145d0565b6020026020010151602001516001600160601b0316826123d5919061466e565b915061022960008581526020019081526020016000208382815181106123fd576123fd6145d0565b6020908102919091018101518254600181018455600093845292829020815191909201516001600160601b0316600160a01b026001600160a01b039091161791015580612449816145fc565b9150506122a3565b5061271081106124b15760405162461bcd60e51b815260206004820152602560248201527f526f79616c747920746f74616c2076616c75652073686f756c64206265203c20604482015264031303030360dc1b60648201526084016105e2565b6107188383612e0e565b600082815261022a6020526040812090805b83518110156126725760006001600160a01b03168482815181106124f3576124f36145d0565b6020026020010151600001516001600160a01b031614156125565760405162461bcd60e51b815260206004820152601960248201527f4163636f756e742073686f756c642062652070726573656e740000000000000060448201526064016105e2565b838181518110612568576125686145d0565b6020026020010151602001516001600160601b0316600014156125cd5760405162461bcd60e51b815260206004820181905260248201527f43726561746f722073686172652073686f756c6420626520706f73697469766560448201526064016105e2565b828482815181106125e0576125e06145d0565b6020908102919091018101518254600181018455600093845292829020815191909201516001600160601b0316600160a01b026001600160a01b0390911617910155835161265e9085908390811061263a5761263a6145d0565b6020026020010151602001516001600160601b031683612e4b90919063ffffffff16565b91508061266a816145fc565b9150506124cd565b5080612710146126db5760405162461bcd60e51b815260206004820152602e60248201527f746f74616c20616d6f756e74206f662063726561746f7273207368617265207360448201526d0686f756c642062652031303030360941b60648201526084016105e2565b7f841ffb90d4cabdd1f16034f3fa831d79060febbb8167bdd54a49269365bdf78f848460405161270c929190614759565b60405180910390a150505050565b612723826113b7565b6127865760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b60648201526084016105e2565b600082815261012d60209081526040909120825161071892840190613954565b60006001600160a01b0384163b1561289957604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906127ea903390899088908890600401614772565b6020604051808303816000875af1925050508015612825575060408051601f3d908101601f19168201909252612822918101906147a5565b60015b61287f573d808015612853576040519150601f19603f3d011682016040523d82523d6000602084013e612858565b606091505b5080516128775760405162461bcd60e51b81526004016105e2906146d1565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061289d565b5060015b949350505050565b60606128b0826113b7565b6129165760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b60648201526084016105e2565b600082815261012d602052604081208054612930906144c7565b80601f016020809104026020016040519081016040528092919081815260200182805461295c906144c7565b80156129a95780601f1061297e576101008083540402835291602001916129a9565b820191906000526020600020905b81548152906001019060200180831161298c57829003601f168201915b5050505050905060006129ba612e57565b90508051600014156129cd575092915050565b8151156129ff5780826040516020016129e79291906147c2565b60405160208183030381529060405292505050919050565b61289d84612e61565b6000612a1382612f2b565b806104e25750506001600160e01b03191660009081526101f7602052604090205460ff1690565b6000612a45826113b7565b612aa65760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016105e2565b6000612ab183610b06565b9050806001600160a01b0316846001600160a01b03161480612aec5750836001600160a01b0316612ae18461057a565b6001600160a01b0316145b8061289d575061289d8185611237565b610718838383612f50565b6001600160e01b03198082161415612b615760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e746572666163652069640000000060448201526064016105e2565b6001600160e01b03191660009081526101f760205260409020805460ff19166001179055565b600054610100900460ff16612bae5760405162461bcd60e51b81526004016105e290614686565b6107518282613008565b612bc18161304b565b600081815261012d602052604090208054612bdb906144c7565b1590506109c657600081815261012d602052604081206109c6916139d8565b8051602080830151604051600093612c59937f397e04204c1e1a60ee8724b71f8244e10ab5f2e9009854d80f602bda21b59ebb939192019283526001600160a01b039190911660208301526001600160601b0316604082015260600190565b604051602081830303815290604052805190602001209050919050565b6000612c81836130f2565b90506001600160a01b0384163b15612d6957604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e90612cc390859087906004016147f1565b602060405180830381865afa158015612ce0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d0491906147a5565b6001600160e01b031916146040518060400160405280601c81526020017f7369676e617475726520766572696669636174696f6e206572726f720000000081525090612d635760405162461bcd60e51b81526004016105e29190613aae565b50610e18565b6001600160a01b038416612d7d8284613140565b6001600160a01b0316146040518060400160405280601c81526020017f7369676e617475726520766572696669636174696f6e206572726f7200000000815250906117275760405162461bcd60e51b81526004016105e29190613aae565b612de58383613164565b612df260008484846127a6565b6107185760405162461bcd60e51b81526004016105e2906146d1565b7f3fa96d7b6bcbfe71ef171666d84db3cf52fa2d1c8afdb1cc8e486177f208b7df8282604051612e3f929190614759565b60405180910390a15050565b6000611243828461466e565b606061105a6132a3565b6060612e6c826113b7565b612ed05760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016105e2565b6000612eda612e57565b90506000815111612efa5760405180602001604052806000815250611243565b80612f04846132b3565b604051602001612f159291906147c2565b6040516020818303038152906040529392505050565b60006001600160e01b0319821663780e9d6360e01b14806104e257506104e2826133b0565b6001600160a01b038316612fab57612fa68160fd8054600083815260fe60205260408120829055600182018355919091527f9346ac6dd7de6b96975fec380d4d994c4c12e6a8897544f22915316cc6cca2800155565b612fce565b816001600160a01b0316836001600160a01b031614612fce57612fce8382613400565b6001600160a01b038216612fe5576107188161349d565b826001600160a01b0316826001600160a01b03161461071857610718828261354c565b600054610100900460ff1661302f5760405162461bcd60e51b81526004016105e290614686565b81516020928301208151919092012061015f9190915561016055565b600061305682610b06565b905061306481600084611d1d565b61306f6000836113d4565b6001600160a01b0381166000908152609a60205260408120805460019290613098908490614657565b909155505060008281526099602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006104e26130ff613590565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061314f858561360d565b9150915061315c8161367d565b509392505050565b6001600160a01b0382166131ba5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105e2565b6131c3816113b7565b156132105760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105e2565b61321c60008383611d1d565b6001600160a01b0382166000908152609a6020526040812080546001929061324590849061466e565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b606061035e80546104f7906144c7565b6060816132d75750506040805180820190915260018152600360fc1b602082015290565b8160005b811561330157806132eb816145fc565b91506132fa9050600a83614820565b91506132db565b6000816001600160401b0381111561331b5761331b613bb1565b6040519080825280601f01601f191660200182016040528015613345576020820181803683370190505b5090505b841561289d5761335a600183614657565b9150613367600a86614834565b61337290603061466e565b60f81b818381518110613387576133876145d0565b60200101906001600160f81b031916908160001a9053506133a9600a86614820565b9450613349565b60006001600160e01b031982166380ac58cd60e01b14806133e157506001600160e01b03198216635b5e139f60e01b145b806104e257506301ffc9a760e01b6001600160e01b03198316146104e2565b6000600161340d84610c35565b6134179190614657565b600083815260fc602052604090205490915080821461346a576001600160a01b038416600090815260fb60209081526040808320858452825280832054848452818420819055835260fc90915290208190555b50600091825260fc602090815260408084208490556001600160a01b03909416835260fb81528383209183525290812055565b60fd546000906134af90600190614657565b600083815260fe602052604081205460fd80549394509092849081106134d7576134d76145d0565b906000526020600020015490508060fd83815481106134f8576134f86145d0565b600091825260208083209091019290925582815260fe909152604080822084905585825281205560fd80548061353057613530614848565b6001900381819060005260206000200160009055905550505050565b600061355783610c35565b6001600160a01b03909316600090815260fb60209081526040808320868452825280832085905593825260fc9052919091209190915550565b600061105a7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6135c061015f5490565b610160546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6000808251604114156136445760208301516040840151606085015160001a61363887828585613838565b94509450505050613676565b82516040141561366e5760208301516040840151613663868383613925565b935093505050613676565b506000905060025b9250929050565b60008160048111156136915761369161485e565b141561369a5750565b60018160048111156136ae576136ae61485e565b14156136fc5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016105e2565b60028160048111156137105761371061485e565b141561375e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016105e2565b60038160048111156137725761377261485e565b14156137cb5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016105e2565b60048160048111156137df576137df61485e565b14156109c65760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016105e2565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561386f575060009050600361391c565b8460ff16601b1415801561388757508460ff16601c14155b15613898575060009050600461391c565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156138ec573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166139155760006001925092505061391c565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b0161394687828885613838565b935093505050935093915050565b828054613960906144c7565b90600052602060002090601f01602090048101928261398257600085556139c8565b82601f1061399b57805160ff19168380011785556139c8565b828001600101855582156139c8579182015b828111156139c85782518255916020019190600101906139ad565b506139d4929150613a0e565b5090565b5080546139e4906144c7565b6000825580601f106139f4575050565b601f0160209004906000526020600020908101906109c691905b5b808211156139d45760008155600101613a0f565b6001600160e01b0319811681146109c657600080fd5b600060208284031215613a4b57600080fd5b813561124381613a23565b60005b83811015613a71578181015183820152602001613a59565b83811115610e185750506000910152565b60008151808452613a9a816020860160208601613a56565b601f01601f19169290920160200192915050565b6020815260006112436020830184613a82565b600060208284031215613ad357600080fd5b5035919050565b6001600160a01b03811681146109c657600080fd5b8035613afa81613ada565b919050565b60008060408385031215613b1257600080fd5b8235613b1d81613ada565b946020939093013593505050565b80358015158114613afa57600080fd5b60008060408385031215613b4e57600080fd5b8235613b5981613ada565b9150613b6760208401613b2b565b90509250929050565b600080600060608486031215613b8557600080fd5b8335613b9081613ada565b92506020840135613ba081613ada565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715613be957613be9613bb1565b60405290565b604051608081016001600160401b0381118282101715613be957613be9613bb1565b60405160c081016001600160401b0381118282101715613be957613be9613bb1565b604051601f8201601f191681016001600160401b0381118282101715613c5b57613c5b613bb1565b604052919050565b600082601f830112613c7457600080fd5b81356001600160401b03811115613c8d57613c8d613bb1565b613ca0601f8201601f1916602001613c33565b818152846020838601011115613cb557600080fd5b816020850160208301376000918101602001919091529392505050565b60006001600160401b03821115613ceb57613ceb613bb1565b5060051b60200190565b600082601f830112613d0657600080fd5b81356020613d1b613d1683613cd2565b613c33565b82815260059290921b84018101918181019086841115613d3a57600080fd5b8286015b84811015613d5e578035613d5181613ada565b8352918301918301613d3e565b509695505050505050565b60008060008060008060c08789031215613d8257600080fd5b86356001600160401b0380821115613d9957600080fd5b613da58a838b01613c63565b97506020890135915080821115613dbb57600080fd5b613dc78a838b01613c63565b96506040890135915080821115613ddd57600080fd5b613de98a838b01613c63565b95506060890135915080821115613dff57600080fd5b613e0b8a838b01613c63565b94506080890135915080821115613e2157600080fd5b613e2d8a838b01613cf5565b935060a0890135915080821115613e4357600080fd5b50613e5089828a01613cf5565b9150509295509295509295565b600082601f830112613e6e57600080fd5b81356020613e7e613d1683613cd2565b82815260069290921b84018101918181019086841115613e9d57600080fd5b8286015b84811015613d5e5760408189031215613eba5760008081fd5b613ec2613bc7565b8135613ecd81613ada565b8152818501356001600160601b0381168114613ee95760008081fd5b81860152835291830191604001613ea1565b600082601f830112613f0c57600080fd5b81356020613f1c613d1683613cd2565b82815260059290921b84018101918181019086841115613f3b57600080fd5b8286015b84811015613d5e5780356001600160401b03811115613f5e5760008081fd5b613f6c8986838b0101613c63565b845250918301918301613f3f565b60008060408385031215613f8d57600080fd5b82356001600160401b0380821115613fa457600080fd5b9084019060808287031215613fb857600080fd5b613fc0613bef565b823582811115613fcf57600080fd5b613fdb88828601613c63565b825250602083013582811115613ff057600080fd5b613ffc88828601613e5d565b60208301525060408301358281111561401457600080fd5b61402088828601613e5d565b60408301525060608301358281111561403857600080fd5b61404488828601613efb565b6060830152509350613b6791505060208401613aef565b60008060006060848603121561407057600080fd5b83356001600160401b038082111561408757600080fd5b9085019060c0828803121561409b57600080fd5b6140a3613c11565b823581526020830135828111156140b957600080fd5b6140c589828601613c63565b6020830152506040830135828111156140dd57600080fd5b6140e989828601613e5d565b60408301525060608301358281111561410157600080fd5b61410d89828601613e5d565b60608301525060808301358281111561412557600080fd5b61413189828601613efb565b60808301525061414360a08401613b2b565b60a0820152945061415991505060208501613aef565b915061416760408501613aef565b90509250925092565b60006020828403121561418257600080fd5b813561124381613ada565b600081518084526020808501945080840160005b838110156141e3576141d087835180516001600160a01b031682526020908101516001600160601b0316910152565b60409690960195908201906001016141a1565b509495945050505050565b602081526000611243602083018461418d565b6000806040838503121561421457600080fd5b50508035926020909101359150565b6000806000806080858703121561423957600080fd5b843561424481613ada565b9350602085013561425481613ada565b92506040850135915060608501356001600160401b0381111561427657600080fd5b61428287828801613c63565b91505092959194509250565b604080825283519082018190526000906020906060840190828701845b828110156142d05781516001600160a01b0316845292840192908401906001016142ab565b5050508381038285015284518082528583019183019060005b81811015614305578351835292840192918401916001016142e9565b5090979650505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561436e5761435e84835180516001600160a01b031682526020908101516001600160601b0316910152565b928401929085019060010161432f565b5091979650505050505050565b60008060006060848603121561439057600080fd5b8335925060208401356143a281613ada565b915060408401356143b281613ada565b809150509250925092565b600080604083850312156143d057600080fd5b82356143db81613ada565b915060208301356143eb81613ada565b809150509250929050565b600080600080600060a0868803121561440e57600080fd5b85356001600160401b038082111561442557600080fd5b61443189838a01613c63565b9650602088013591508082111561444757600080fd5b61445389838a01613c63565b9550604088013591508082111561446957600080fd5b61447589838a01613c63565b9450606088013591508082111561448b57600080fd5b61449789838a01613c63565b935060808801359150808211156144ad57600080fd5b506144ba88828901613cf5565b9150509295509295909350565b600181811c908216806144db57607f821691505b602082108114156111d257634e487b7160e01b600052602260045260246000fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415614610576146106145e6565b5060010190565b6001600160a01b038416815260606020820181905260009061463b90830185613a82565b828103604084015261464d8185613a82565b9695505050505050565b600082821015614669576146696145e6565b500390565b60008219821115614681576146816145e6565b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b815160009082906020808601845b8381101561474d57815185529382019390820190600101614731565b50929695505050505050565b82815260406020820152600061289d604083018461418d565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061464d90830184613a82565b6000602082840312156147b757600080fd5b815161124381613a23565b600083516147d4818460208801613a56565b8351908301906147e8818360208801613a56565b01949350505050565b82815260406020820152600061289d6040830184613a82565b634e487b7160e01b600052601260045260246000fd5b60008261482f5761482f61480a565b500490565b6000826148435761484361480a565b500690565b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052602160045260246000fdfea26469706673582212203653b2e40640a52881965c1b458175ecb5372dda5d23a1e58135d0b8ce37833064736f6c634300080b0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102065760003560e01c8063715018a61161011a578063c4926806116100ad578063e07f23191161007c578063e07f231914610483578063e8a3d48514610496578063e985e9c51461049e578063f059efa0146104b1578063f2fde38b146104c457600080fd5b8063c492680614610435578063c87b56dd14610448578063caa0f92a1461045b578063cad96cca1461046357600080fd5b806395d89b41116100e957806395d89b41146103e6578063a22cb465146103ee578063b88d4fde14610401578063bb3bafd61461041457600080fd5b8063715018a614610373578063891be9741461037b5780638924af741461039b5780638da5cb5b146103d557600080fd5b8063310ebf1b1161019d5780634f6ccce71161016c5780634f6ccce71461031f5780636352211e146103325780636c0360eb146103455780636ee5518e1461034d57806370a082311461036057600080fd5b8063310ebf1b146102d357806342842e0e146102e657806342966c68146102f95780634b68c7c11461030c57600080fd5b806318054c37116101d957806318054c371461028857806318160ddd1461029b57806323b872dd146102ad5780632f745c59146102c057600080fd5b806301ffc9a71461020b57806306fdde0314610233578063081812fc14610248578063095ea7b314610273575b600080fd5b61021e610219366004613a39565b6104d7565b60405190151581526020015b60405180910390f35b61023b6104e8565b60405161022a9190613aae565b61025b610256366004613ac1565b61057a565b6040516001600160a01b03909116815260200161022a565b610286610281366004613aff565b610607565b005b610286610296366004613b3b565b61071d565b60fd545b60405190815260200161022a565b6102866102bb366004613b70565b610755565b61029f6102ce366004613aff565b610787565b6102866102e1366004613d69565b61081d565b6102866102f4366004613b70565b610934565b610286610307366004613ac1565b61094f565b61028661031a366004613f7a565b6109c9565b61029f61032d366004613ac1565b610a73565b61025b610340366004613ac1565b610b06565b61023b610b7d565b61028661035b36600461405b565b610c0c565b61029f61036e366004614170565b610c35565b610286610cbc565b61038e610389366004613ac1565b610cf2565b60405161022a91906141ee565b6103ae6103a9366004614201565b610d82565b604080516001600160a01b0390931683526001600160601b0390911660208301520161022a565b6033546001600160a01b031661025b565b61023b610dcc565b6102866103fc366004613b3b565b610ddb565b61028661040f366004614223565b610de6565b610427610422366004613ac1565b610e1e565b60405161022a92919061428e565b61038e610443366004613ac1565b610fc8565b61023b610456366004613ac1565b611043565b61029f61104e565b610476610471366004613ac1565b61105f565b60405161022a9190614312565b61028661049136600461437b565b6111d8565b61023b611229565b61021e6104ac3660046143bd565b611237565b6102866104bf3660046143f6565b61124a565b6102866104d2366004614170565b611314565b60006104e2826113ac565b92915050565b6060609780546104f7906144c7565b80601f0160208091040260200160405190810160405280929190818152602001828054610523906144c7565b80156105705780601f1061054557610100808354040283529160200191610570565b820191906000526020600020905b81548152906001019060200180831161055357829003601f168201915b5050505050905090565b6000610585826113b7565b6105eb5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152609b60205260409020546001600160a01b031690565b600061061282610b06565b9050806001600160a01b0316836001600160a01b031614156106805760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084016105e2565b336001600160a01b038216148061069c575061069c8133611237565b61070e5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016105e2565b61071883836113d4565b505050565b6033546001600160a01b031633146107475760405162461bcd60e51b81526004016105e2906144fc565b6107518282611442565b5050565b610760335b826114a2565b61077c5760405162461bcd60e51b81526004016105e290614531565b6107188383836114ae565b600061079283610c35565b82106107f45760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b60648201526084016105e2565b506001600160a01b0391909116600090815260fb60209081526040808320938352929052205490565b600054610100900460ff166108385760005460ff161561083c565b303b155b6108585760405162461bcd60e51b81526004016105e290614582565b600054610100900460ff1615801561087a576000805461ffff19166101011790555b6108878787878787611659565b60005b82518110156108c9576108b78382815181106108a8576108a86145d0565b60200260200101516001610ddb565b806108c1816145fc565b91505061088a565b50610761805460ff191660011790557f50ef895e69083fa73baa733f41b34ec2b4dd898a76639c235465168ff1c275416109003390565b888860405161091193929190614617565b60405180910390a1801561092b576000805461ff00191690555b50505050505050565b61071883838360405180602001604052806000815250610de6565b6109583361075a565b6109bd5760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b60648201526084016105e2565b6109c68161172e565b50565b6107615460ff1615610a695781602001516000815181106109ec576109ec6145d0565b6020026020010151600001516001600160a01b0316610a136033546001600160a01b031690565b6001600160a01b031614610a695760405162461bcd60e51b815260206004820152601760248201527f6d696e746572206973206e6f7420746865206f776e657200000000000000000060448201526064016105e2565b610751828261186b565b6000610a7e60fd5490565b8210610ae15760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b60648201526084016105e2565b60fd8281548110610af457610af46145d0565b90600052602060002001549050919050565b6000818152609960205260408120546001600160a01b0316806104e25760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b60648201526084016105e2565b61035e8054610b8b906144c7565b80601f0160208091040260200160405190810160405280929190818152602001828054610bb7906144c7565b8015610c045780601f10610bd957610100808354040283529160200191610c04565b820191906000526020600020905b815481529060010190602001808311610be757829003601f168201915b505050505081565b8251610c17906113b7565b15610c2b5761071882828560000151610934565b61071883826118c3565b60006001600160a01b038216610ca05760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b60648201526084016105e2565b506001600160a01b03166000908152609a602052604090205490565b6033546001600160a01b03163314610ce65760405162461bcd60e51b81526004016105e2906144fc565b610cf06000611a73565b565b606061022a6000838152602001908152602001600020805480602002602001604051908101604052809291908181526020016000905b82821015610d7757600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b90046001600160601b031681830152825260019092019101610d28565b505050509050919050565b6102296020528160005260406000208181548110610d9f57600080fd5b6000918252602090912001546001600160a01b0381169250600160a01b90046001600160601b0316905082565b6060609880546104f7906144c7565b610751338383611ac5565b610df033836114a2565b610e0c5760405162461bcd60e51b81526004016105e290614531565b610e1884848484611b94565b50505050565b6000818152610229602052604090205460609081906001600160401b03811115610e4a57610e4a613bb1565b604051908082528060200260200182016040528015610e73578160200160208202803683370190505b50600084815261022960205260409020549092506001600160401b03811115610e9e57610e9e613bb1565b604051908082528060200260200182016040528015610ec7578160200160208202803683370190505b50905060005b60008481526102296020526040902054811015610fc257600084815261022960205260409020805482908110610f0557610f056145d0565b60009182526020909120015483516001600160a01b0390911690849083908110610f3157610f316145d0565b6001600160a01b03909216602092830291909101820152600085815261022990915260409020805482908110610f6957610f696145d0565b9060005260206000200160000160149054906101000a90046001600160601b03166001600160601b0316828281518110610fa557610fa56145d0565b602090810291909101015280610fba816145fc565b915050610ecd565b50915091565b600081815261022960209081526040808320805482518185028101850190935280835260609492939192909184018215610d7757600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b90046001600160601b031681830152825260019092019101610d28565b60606104e282611bc7565b600061105a6105605490565b905090565b600081815261022960205260409020546060906001600160401b0381111561108957611089613bb1565b6040519080825280602002602001820160405280156110ce57816020015b60408051808201909152600080825260208201528152602001906001900390816110a75790505b50905060005b600083815261022960205260409020548110156111d25760008381526102296020526040902080548290811061110c5761110c6145d0565b60009182526020909120015482516001600160a01b0390911690839083908110611138576111386145d0565b6020908102919091018101516001600160a01b03909216909152600084815261022990915260409020805482908110611173576111736145d0565b9060005260206000200160000160149054906101000a90046001600160601b03168282815181106111a6576111a66145d0565b6020908102919091018101516001600160601b03909216910152806111ca816145fc565b9150506110d4565b50919050565b336001600160a01b0383161461121e5760405162461bcd60e51b815260206004820152600b60248201526a1b9bdd08185b1b1bddd95960aa1b60448201526064016105e2565b610718838383611bd2565b61025d8054610b8b906144c7565b60006112438383611c94565b9392505050565b600054610100900460ff166112655760005460ff1615611269565b303b155b6112855760405162461bcd60e51b81526004016105e290614582565b600054610100900460ff161580156112a7576000805461ffff19166101011790555b6112b48686868686611659565b610761805460ff191690557f92a209d16801e9232ed8ac1da4d5fc4443d3bc1a083db0a79ad14141c06e469a3387876040516112f293929190614617565b60405180910390a1801561130c576000805461ff00191690555b505050505050565b6033546001600160a01b0316331461133e5760405162461bcd60e51b81526004016105e2906144fc565b6001600160a01b0381166113a35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105e2565b6109c681611a73565b60006104e282611ce5565b6000908152609960205260409020546001600160a01b0316151590565b6000818152609b6020526040902080546001600160a01b0319166001600160a01b038416908117909155819061140982610b06565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b038216600081815261045f6020908152604091829020805460ff191685151590811790915591519182527f270dbb8ba4292910ae92862466486be25c355c837270a3d8824b36a8bc7c653b910160405180910390a25050565b60006112438383611cf0565b826001600160a01b03166114c182610b06565b6001600160a01b0316146115295760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b60648201526084016105e2565b6001600160a01b03821661158b5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b60648201526084016105e2565b611596838383611d1d565b6115a16000826113d4565b6001600160a01b0383166000908152609a602052604081208054600192906115ca908490614657565b90915550506001600160a01b0382166000908152609a602052604081208054600192906115f890849061466e565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600054610100900460ff166116805760405162461bcd60e51b81526004016105e290614686565b61168983611d28565b611691611d3c565b611699611d73565b6116a1611daa565b6116a9611daa565b6116b1611dd1565b6116b9611daa565b6116c1611daa565b6116c9611e01565b6116d282611e6a565b6116dc8585611eb6565b60005b815181101561171e5761170c8282815181106116fd576116fd6145d0565b60200260200101516001611442565b80611716816145fc565b9150506116df565b50611727611f04565b5050505050565b600081815261022a602090815260408083208054825181850281018501909352808352859493849084015b828210156117a857600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b90046001600160601b031681830152825260019092019101611759565b5050505090506000805b825181101561181a5760008382815181106117cf576117cf6145d0565b60200260200101516000015190506117e43390565b6001600160a01b0316816001600160a01b0316141561180757600192505061181a565b5080611812816145fc565b9150506117b2565b50806118625760405162461bcd60e51b815260206004820152601760248201527622a9219b9918a6b4b73a1d103737ba1031b932b0ba37b960491b60448201526064016105e2565b610e1884611f13565b6118bb6040518060c0016040528061188161104e565b81526020018460000151815260200184602001518152602001846040015181526020018460600151815260200160011515815250826118c3565b610751611f04565b600082604001516000815181106118dc576118dc6145d0565b602002602001015160000151905060006118f33390565b90508360800151518460400151511461190b57600080fd5b806001600160a01b0316826001600160a01b0316148061193057506119308282611237565b6119975760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206d6044820152711a5b9d195c881b9bdc88185c1c1c9bdd995960721b60648201526084016105e2565b60006119a285612050565b905060005b856040015151811015611a2e576000866040015182815181106119cc576119cc6145d0565b6020026020010151600001519050836001600160a01b0316816001600160a01b031614611a1b57611a1b818489608001518581518110611a0e57611a0e6145d0565b602002602001015161227a565b5080611a26816145fc565b9150506119a7565b50611a3d848660000151612285565b611a4f8560000151866060015161229f565b611a61856000015186604001516124bb565b6117278560000151866020015161271a565b603380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b816001600160a01b0316836001600160a01b03161415611b275760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016105e2565b6001600160a01b038381166000818152609c6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611b9f8484846114ae565b611bab848484846127a6565b610e185760405162461bcd60e51b81526004016105e2906146d1565b60606104e2826128a5565b60008381526102296020526040812054905b818110156117275760008581526102296020526040902080546001600160a01b038616919083908110611c1957611c196145d0565b6000918252602090912001546001600160a01b03161415611c8257600085815261022960205260409020805484919083908110611c5857611c586145d0565b600091825260209091200180546001600160a01b0319166001600160a01b03929092169190911790555b80611c8c816145fc565b915050611be4565b6001600160a01b038116600090815261045f602052604081205460ff168061124357506001600160a01b038084166000908152609c602090815260408083209386168352929052205460ff16611243565b60006104e282612a08565b6001600160a01b038216600090815261045f602052604081205460ff168061124357506112438383612a3a565b610718838383612afc565b80516107519061035e906020840190613954565b600054610100900460ff16611d635760405162461bcd60e51b81526004016105e290614686565b610cf0638486f69f60e01b612b07565b600054610100900460ff16611d9a5760405162461bcd60e51b81526004016105e290614686565b610cf0636249340360e11b612b07565b600054610100900460ff16610cf05760405162461bcd60e51b81526004016105e290614686565b600054610100900460ff16611df85760405162461bcd60e51b81526004016105e290614686565b610cf033611a73565b600054610100900460ff16611e285760405162461bcd60e51b81526004016105e290614686565b610cf0604051806040016040528060078152602001664d696e7437323160c81b815250604051806040016040528060018152602001603160f81b815250612b87565b600054610100900460ff16611e915760405162461bcd60e51b81526004016105e290614686565b8051611ea59061025d906020840190613954565b506109c663e8a3d48560e01b612b07565b600054610100900460ff16611edd5760405162461bcd60e51b81526004016105e290614686565b8151611ef0906097906020850190613954565b508051610718906098906020840190613954565b610cf061056080546001019055565b600081815261022a602090815260408083208054825181850281018501909352808352859493849084015b82821015611f8d57600084815260209081902060408051808201909152908401546001600160a01b0381168252600160a01b90046001600160601b031681830152825260019092019101611f3e565b5050505090506000805b8251811015611fff576000838281518110611fb457611fb46145d0565b6020026020010151600001519050611fc93390565b6001600160a01b0316816001600160a01b03161415611fec576001925050611fff565b5080611ff7816145fc565b915050611f97565b50806120475760405162461bcd60e51b815260206004820152601760248201527622a9219b9918a6b4b73a1d103737ba1031b932b0ba37b960491b60448201526064016105e2565b610e1884612bb8565b6000808260600151516001600160401b0381111561207057612070613bb1565b604051908082528060200260200182016040528015612099578160200160208202803683370190505b50905060005b836060015151811015612101576120d2846060015182815181106120c5576120c56145d0565b6020026020010151612bfa565b8282815181106120e4576120e46145d0565b6020908102919091010152806120f9816145fc565b91505061209f565b5060008360400151516001600160401b0381111561212157612121613bb1565b60405190808252806020026020018201604052801561214a578160200160208202803683370190505b50905060005b8460400151518110156121a557612176856040015182815181106120c5576120c56145d0565b828281518110612188576121886145d0565b60209081029190910101528061219d816145fc565b915050612150565b507ff64326045af5fd7e15297ba939f85b550474d3899daa47d2bc1ffbdb9ced344e8460a001516121d75784516121da565b60005b856020015180519060200120836040516020016121f79190614723565b604051602081830303815290604052805190602001208560405160200161221e9190614723565b60408051601f198184030181528282528051602091820120908301969096528101939093526060830191909152608082015260a081019190915260c0016040516020818303038152906040528051906020012092505050919050565b610718838383612c76565b610751828260405180602001604052806000815250612ddb565b6000805b82518110156124515760006001600160a01b03168382815181106122c9576122c96145d0565b6020026020010151600001516001600160a01b0316141561232c5760405162461bcd60e51b815260206004820152601b60248201527f526563697069656e742073686f756c642062652070726573656e74000000000060448201526064016105e2565b82818151811061233e5761233e6145d0565b6020026020010151602001516001600160601b0316600014156123a35760405162461bcd60e51b815260206004820181905260248201527f526f79616c74792076616c75652073686f756c6420626520706f73697469766560448201526064016105e2565b8281815181106123b5576123b56145d0565b6020026020010151602001516001600160601b0316826123d5919061466e565b915061022960008581526020019081526020016000208382815181106123fd576123fd6145d0565b6020908102919091018101518254600181018455600093845292829020815191909201516001600160601b0316600160a01b026001600160a01b039091161791015580612449816145fc565b9150506122a3565b5061271081106124b15760405162461bcd60e51b815260206004820152602560248201527f526f79616c747920746f74616c2076616c75652073686f756c64206265203c20604482015264031303030360dc1b60648201526084016105e2565b6107188383612e0e565b600082815261022a6020526040812090805b83518110156126725760006001600160a01b03168482815181106124f3576124f36145d0565b6020026020010151600001516001600160a01b031614156125565760405162461bcd60e51b815260206004820152601960248201527f4163636f756e742073686f756c642062652070726573656e740000000000000060448201526064016105e2565b838181518110612568576125686145d0565b6020026020010151602001516001600160601b0316600014156125cd5760405162461bcd60e51b815260206004820181905260248201527f43726561746f722073686172652073686f756c6420626520706f73697469766560448201526064016105e2565b828482815181106125e0576125e06145d0565b6020908102919091018101518254600181018455600093845292829020815191909201516001600160601b0316600160a01b026001600160a01b0390911617910155835161265e9085908390811061263a5761263a6145d0565b6020026020010151602001516001600160601b031683612e4b90919063ffffffff16565b91508061266a816145fc565b9150506124cd565b5080612710146126db5760405162461bcd60e51b815260206004820152602e60248201527f746f74616c20616d6f756e74206f662063726561746f7273207368617265207360448201526d0686f756c642062652031303030360941b60648201526084016105e2565b7f841ffb90d4cabdd1f16034f3fa831d79060febbb8167bdd54a49269365bdf78f848460405161270c929190614759565b60405180910390a150505050565b612723826113b7565b6127865760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b60648201526084016105e2565b600082815261012d60209081526040909120825161071892840190613954565b60006001600160a01b0384163b1561289957604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906127ea903390899088908890600401614772565b6020604051808303816000875af1925050508015612825575060408051601f3d908101601f19168201909252612822918101906147a5565b60015b61287f573d808015612853576040519150601f19603f3d011682016040523d82523d6000602084013e612858565b606091505b5080516128775760405162461bcd60e51b81526004016105e2906146d1565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061289d565b5060015b949350505050565b60606128b0826113b7565b6129165760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b60648201526084016105e2565b600082815261012d602052604081208054612930906144c7565b80601f016020809104026020016040519081016040528092919081815260200182805461295c906144c7565b80156129a95780601f1061297e576101008083540402835291602001916129a9565b820191906000526020600020905b81548152906001019060200180831161298c57829003601f168201915b5050505050905060006129ba612e57565b90508051600014156129cd575092915050565b8151156129ff5780826040516020016129e79291906147c2565b60405160208183030381529060405292505050919050565b61289d84612e61565b6000612a1382612f2b565b806104e25750506001600160e01b03191660009081526101f7602052604090205460ff1690565b6000612a45826113b7565b612aa65760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016105e2565b6000612ab183610b06565b9050806001600160a01b0316846001600160a01b03161480612aec5750836001600160a01b0316612ae18461057a565b6001600160a01b0316145b8061289d575061289d8185611237565b610718838383612f50565b6001600160e01b03198082161415612b615760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e746572666163652069640000000060448201526064016105e2565b6001600160e01b03191660009081526101f760205260409020805460ff19166001179055565b600054610100900460ff16612bae5760405162461bcd60e51b81526004016105e290614686565b6107518282613008565b612bc18161304b565b600081815261012d602052604090208054612bdb906144c7565b1590506109c657600081815261012d602052604081206109c6916139d8565b8051602080830151604051600093612c59937f397e04204c1e1a60ee8724b71f8244e10ab5f2e9009854d80f602bda21b59ebb939192019283526001600160a01b039190911660208301526001600160601b0316604082015260600190565b604051602081830303815290604052805190602001209050919050565b6000612c81836130f2565b90506001600160a01b0384163b15612d6957604051630b135d3f60e11b808252906001600160a01b03861690631626ba7e90612cc390859087906004016147f1565b602060405180830381865afa158015612ce0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612d0491906147a5565b6001600160e01b031916146040518060400160405280601c81526020017f7369676e617475726520766572696669636174696f6e206572726f720000000081525090612d635760405162461bcd60e51b81526004016105e29190613aae565b50610e18565b6001600160a01b038416612d7d8284613140565b6001600160a01b0316146040518060400160405280601c81526020017f7369676e617475726520766572696669636174696f6e206572726f7200000000815250906117275760405162461bcd60e51b81526004016105e29190613aae565b612de58383613164565b612df260008484846127a6565b6107185760405162461bcd60e51b81526004016105e2906146d1565b7f3fa96d7b6bcbfe71ef171666d84db3cf52fa2d1c8afdb1cc8e486177f208b7df8282604051612e3f929190614759565b60405180910390a15050565b6000611243828461466e565b606061105a6132a3565b6060612e6c826113b7565b612ed05760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b60648201526084016105e2565b6000612eda612e57565b90506000815111612efa5760405180602001604052806000815250611243565b80612f04846132b3565b604051602001612f159291906147c2565b6040516020818303038152906040529392505050565b60006001600160e01b0319821663780e9d6360e01b14806104e257506104e2826133b0565b6001600160a01b038316612fab57612fa68160fd8054600083815260fe60205260408120829055600182018355919091527f9346ac6dd7de6b96975fec380d4d994c4c12e6a8897544f22915316cc6cca2800155565b612fce565b816001600160a01b0316836001600160a01b031614612fce57612fce8382613400565b6001600160a01b038216612fe5576107188161349d565b826001600160a01b0316826001600160a01b03161461071857610718828261354c565b600054610100900460ff1661302f5760405162461bcd60e51b81526004016105e290614686565b81516020928301208151919092012061015f9190915561016055565b600061305682610b06565b905061306481600084611d1d565b61306f6000836113d4565b6001600160a01b0381166000908152609a60205260408120805460019290613098908490614657565b909155505060008281526099602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b60006104e26130ff613590565b8360405161190160f01b6020820152602281018390526042810182905260009060620160405160208183030381529060405280519060200120905092915050565b600080600061314f858561360d565b9150915061315c8161367d565b509392505050565b6001600160a01b0382166131ba5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016105e2565b6131c3816113b7565b156132105760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016105e2565b61321c60008383611d1d565b6001600160a01b0382166000908152609a6020526040812080546001929061324590849061466e565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b606061035e80546104f7906144c7565b6060816132d75750506040805180820190915260018152600360fc1b602082015290565b8160005b811561330157806132eb816145fc565b91506132fa9050600a83614820565b91506132db565b6000816001600160401b0381111561331b5761331b613bb1565b6040519080825280601f01601f191660200182016040528015613345576020820181803683370190505b5090505b841561289d5761335a600183614657565b9150613367600a86614834565b61337290603061466e565b60f81b818381518110613387576133876145d0565b60200101906001600160f81b031916908160001a9053506133a9600a86614820565b9450613349565b60006001600160e01b031982166380ac58cd60e01b14806133e157506001600160e01b03198216635b5e139f60e01b145b806104e257506301ffc9a760e01b6001600160e01b03198316146104e2565b6000600161340d84610c35565b6134179190614657565b600083815260fc602052604090205490915080821461346a576001600160a01b038416600090815260fb60209081526040808320858452825280832054848452818420819055835260fc90915290208190555b50600091825260fc602090815260408084208490556001600160a01b03909416835260fb81528383209183525290812055565b60fd546000906134af90600190614657565b600083815260fe602052604081205460fd80549394509092849081106134d7576134d76145d0565b906000526020600020015490508060fd83815481106134f8576134f86145d0565b600091825260208083209091019290925582815260fe909152604080822084905585825281205560fd80548061353057613530614848565b6001900381819060005260206000200160009055905550505050565b600061355783610c35565b6001600160a01b03909316600090815260fb60209081526040808320868452825280832085905593825260fc9052919091209190915550565b600061105a7f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6135c061015f5490565b610160546040805160208101859052908101839052606081018290524660808201523060a082015260009060c0016040516020818303038152906040528051906020012090509392505050565b6000808251604114156136445760208301516040840151606085015160001a61363887828585613838565b94509450505050613676565b82516040141561366e5760208301516040840151613663868383613925565b935093505050613676565b506000905060025b9250929050565b60008160048111156136915761369161485e565b141561369a5750565b60018160048111156136ae576136ae61485e565b14156136fc5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016105e2565b60028160048111156137105761371061485e565b141561375e5760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016105e2565b60038160048111156137725761377261485e565b14156137cb5760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b60648201526084016105e2565b60048160048111156137df576137df61485e565b14156109c65760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b60648201526084016105e2565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561386f575060009050600361391c565b8460ff16601b1415801561388757508460ff16601c14155b15613898575060009050600461391c565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa1580156138ec573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166139155760006001925092505061391c565b9150600090505b94509492505050565b6000806001600160ff1b03831660ff84901c601b0161394687828885613838565b935093505050935093915050565b828054613960906144c7565b90600052602060002090601f01602090048101928261398257600085556139c8565b82601f1061399b57805160ff19168380011785556139c8565b828001600101855582156139c8579182015b828111156139c85782518255916020019190600101906139ad565b506139d4929150613a0e565b5090565b5080546139e4906144c7565b6000825580601f106139f4575050565b601f0160209004906000526020600020908101906109c691905b5b808211156139d45760008155600101613a0f565b6001600160e01b0319811681146109c657600080fd5b600060208284031215613a4b57600080fd5b813561124381613a23565b60005b83811015613a71578181015183820152602001613a59565b83811115610e185750506000910152565b60008151808452613a9a816020860160208601613a56565b601f01601f19169290920160200192915050565b6020815260006112436020830184613a82565b600060208284031215613ad357600080fd5b5035919050565b6001600160a01b03811681146109c657600080fd5b8035613afa81613ada565b919050565b60008060408385031215613b1257600080fd5b8235613b1d81613ada565b946020939093013593505050565b80358015158114613afa57600080fd5b60008060408385031215613b4e57600080fd5b8235613b5981613ada565b9150613b6760208401613b2b565b90509250929050565b600080600060608486031215613b8557600080fd5b8335613b9081613ada565b92506020840135613ba081613ada565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b604080519081016001600160401b0381118282101715613be957613be9613bb1565b60405290565b604051608081016001600160401b0381118282101715613be957613be9613bb1565b60405160c081016001600160401b0381118282101715613be957613be9613bb1565b604051601f8201601f191681016001600160401b0381118282101715613c5b57613c5b613bb1565b604052919050565b600082601f830112613c7457600080fd5b81356001600160401b03811115613c8d57613c8d613bb1565b613ca0601f8201601f1916602001613c33565b818152846020838601011115613cb557600080fd5b816020850160208301376000918101602001919091529392505050565b60006001600160401b03821115613ceb57613ceb613bb1565b5060051b60200190565b600082601f830112613d0657600080fd5b81356020613d1b613d1683613cd2565b613c33565b82815260059290921b84018101918181019086841115613d3a57600080fd5b8286015b84811015613d5e578035613d5181613ada565b8352918301918301613d3e565b509695505050505050565b60008060008060008060c08789031215613d8257600080fd5b86356001600160401b0380821115613d9957600080fd5b613da58a838b01613c63565b97506020890135915080821115613dbb57600080fd5b613dc78a838b01613c63565b96506040890135915080821115613ddd57600080fd5b613de98a838b01613c63565b95506060890135915080821115613dff57600080fd5b613e0b8a838b01613c63565b94506080890135915080821115613e2157600080fd5b613e2d8a838b01613cf5565b935060a0890135915080821115613e4357600080fd5b50613e5089828a01613cf5565b9150509295509295509295565b600082601f830112613e6e57600080fd5b81356020613e7e613d1683613cd2565b82815260069290921b84018101918181019086841115613e9d57600080fd5b8286015b84811015613d5e5760408189031215613eba5760008081fd5b613ec2613bc7565b8135613ecd81613ada565b8152818501356001600160601b0381168114613ee95760008081fd5b81860152835291830191604001613ea1565b600082601f830112613f0c57600080fd5b81356020613f1c613d1683613cd2565b82815260059290921b84018101918181019086841115613f3b57600080fd5b8286015b84811015613d5e5780356001600160401b03811115613f5e5760008081fd5b613f6c8986838b0101613c63565b845250918301918301613f3f565b60008060408385031215613f8d57600080fd5b82356001600160401b0380821115613fa457600080fd5b9084019060808287031215613fb857600080fd5b613fc0613bef565b823582811115613fcf57600080fd5b613fdb88828601613c63565b825250602083013582811115613ff057600080fd5b613ffc88828601613e5d565b60208301525060408301358281111561401457600080fd5b61402088828601613e5d565b60408301525060608301358281111561403857600080fd5b61404488828601613efb565b6060830152509350613b6791505060208401613aef565b60008060006060848603121561407057600080fd5b83356001600160401b038082111561408757600080fd5b9085019060c0828803121561409b57600080fd5b6140a3613c11565b823581526020830135828111156140b957600080fd5b6140c589828601613c63565b6020830152506040830135828111156140dd57600080fd5b6140e989828601613e5d565b60408301525060608301358281111561410157600080fd5b61410d89828601613e5d565b60608301525060808301358281111561412557600080fd5b61413189828601613efb565b60808301525061414360a08401613b2b565b60a0820152945061415991505060208501613aef565b915061416760408501613aef565b90509250925092565b60006020828403121561418257600080fd5b813561124381613ada565b600081518084526020808501945080840160005b838110156141e3576141d087835180516001600160a01b031682526020908101516001600160601b0316910152565b60409690960195908201906001016141a1565b509495945050505050565b602081526000611243602083018461418d565b6000806040838503121561421457600080fd5b50508035926020909101359150565b6000806000806080858703121561423957600080fd5b843561424481613ada565b9350602085013561425481613ada565b92506040850135915060608501356001600160401b0381111561427657600080fd5b61428287828801613c63565b91505092959194509250565b604080825283519082018190526000906020906060840190828701845b828110156142d05781516001600160a01b0316845292840192908401906001016142ab565b5050508381038285015284518082528583019183019060005b81811015614305578351835292840192918401916001016142e9565b5090979650505050505050565b602080825282518282018190526000919060409081850190868401855b8281101561436e5761435e84835180516001600160a01b031682526020908101516001600160601b0316910152565b928401929085019060010161432f565b5091979650505050505050565b60008060006060848603121561439057600080fd5b8335925060208401356143a281613ada565b915060408401356143b281613ada565b809150509250925092565b600080604083850312156143d057600080fd5b82356143db81613ada565b915060208301356143eb81613ada565b809150509250929050565b600080600080600060a0868803121561440e57600080fd5b85356001600160401b038082111561442557600080fd5b61443189838a01613c63565b9650602088013591508082111561444757600080fd5b61445389838a01613c63565b9550604088013591508082111561446957600080fd5b61447589838a01613c63565b9450606088013591508082111561448b57600080fd5b61449789838a01613c63565b935060808801359150808211156144ad57600080fd5b506144ba88828901613cf5565b9150509295509295909350565b600181811c908216806144db57607f821691505b602082108114156111d257634e487b7160e01b600052602260045260246000fd5b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b6000600019821415614610576146106145e6565b5060010190565b6001600160a01b038416815260606020820181905260009061463b90830185613a82565b828103604084015261464d8185613a82565b9695505050505050565b600082821015614669576146696145e6565b500390565b60008219821115614681576146816145e6565b500190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b815160009082906020808601845b8381101561474d57815185529382019390820190600101614731565b50929695505050505050565b82815260406020820152600061289d604083018461418d565b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061464d90830184613a82565b6000602082840312156147b757600080fd5b815161124381613a23565b600083516147d4818460208801613a56565b8351908301906147e8818360208801613a56565b01949350505050565b82815260406020820152600061289d6040830184613a82565b634e487b7160e01b600052601260045260246000fd5b60008261482f5761482f61480a565b500490565b6000826148435761484361480a565b500690565b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052602160045260246000fdfea26469706673582212203653b2e40640a52881965c1b458175ecb5372dda5d23a1e58135d0b8ce37833064736f6c634300080b0033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.