Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 23 from a total of 23 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Create NFT | 14421033 | 1042 days ago | IN | 0 ETH | 0.00895998 | ||||
Create NFT | 14343319 | 1054 days ago | IN | 0 ETH | 0.02397082 | ||||
Create NFT | 14343319 | 1054 days ago | IN | 0 ETH | 0.02397082 | ||||
Create NFT | 14334419 | 1055 days ago | IN | 0 ETH | 0.01739677 | ||||
Create NFT | 14324323 | 1057 days ago | IN | 0 ETH | 0.0202597 | ||||
Create NFT | 14320287 | 1058 days ago | IN | 0 ETH | 0.01167626 | ||||
Create NFT | 14164105 | 1082 days ago | IN | 0 ETH | 0.02633058 | ||||
Create NFT | 14120914 | 1088 days ago | IN | 0 ETH | 0.06686691 | ||||
Create NFT | 14067736 | 1097 days ago | IN | 0 ETH | 0.07183257 | ||||
Create NFT | 14067010 | 1097 days ago | IN | 0 ETH | 0.02583958 | ||||
Create NFT | 14064710 | 1097 days ago | IN | 0 ETH | 0.04209459 | ||||
Create NFT | 14048089 | 1100 days ago | IN | 0 ETH | 0.04307089 | ||||
Create NFT | 14028831 | 1103 days ago | IN | 0 ETH | 0.03470328 | ||||
Create NFT | 14012264 | 1105 days ago | IN | 0 ETH | 0.05602278 | ||||
Create NFT | 14010451 | 1106 days ago | IN | 0 ETH | 0.05178889 | ||||
Create NFT | 13992975 | 1108 days ago | IN | 0 ETH | 0.07929184 | ||||
Create NFT | 13981071 | 1110 days ago | IN | 0 ETH | 0.06586308 | ||||
Create NFT | 13978814 | 1110 days ago | IN | 0 ETH | 0.09743789 | ||||
Create NFT | 13974496 | 1111 days ago | IN | 0 ETH | 0.05657343 | ||||
Create NFT | 13905616 | 1122 days ago | IN | 0 ETH | 0.04071372 | ||||
Create NFT | 13892709 | 1124 days ago | IN | 0 ETH | 0.02375522 | ||||
Create NFT | 13847517 | 1131 days ago | IN | 0 ETH | 0.01627064 | ||||
Create NFT | 13831217 | 1133 days ago | IN | 0 ETH | 0.02812501 |
Latest 24 internal transactions
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Source Code Verified (Exact Match)
Contract Name:
MetaverseNFTFactory
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 10000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/proxy/Clones.sol"; import "./MetaverseNFT.sol"; /** * MetaverseNFT is a cloneable contract for your NFT collection. * It's adapted from OpenZeppeling ERC721 implementation upgradeable versions. * This is needed to make it possible to create clones that work via delegatecall * ! The constructor is replaced with initializer, too * This way, deployment costs about 350k gas instead of 4.5M. * 1. https://forum.openzeppelin.com/t/how-to-set-implementation-contracts-for-clones/6085/4 * 2. https://github.com/OpenZeppelin/workshops/tree/master/02-contracts-clone/contracts/2-uniswap * 3. https://docs.openzeppelin.com/contracts/4.x/api/proxy */ contract MetaverseNFTFactory { address public immutable proxyImplementation; event NFTCreated(address deployedAddress); constructor() { proxyImplementation = address(new MetaverseNFT()); emit NFTCreated(proxyImplementation); } function createNFT( uint256 _startPrice, uint256 _maxSupply, uint256 _nReserved, uint256 _maxTokensPerMint, uint256 _royaltyFee, string memory _uri, string memory _name, string memory _symbol ) external { address clone = Clones.clone(proxyImplementation); MetaverseNFT(clone).initialize( _startPrice, _maxSupply, _nReserved, _maxTokensPerMint, _royaltyFee, _uri, _name, _symbol ); MetaverseNFT(clone).transferOwnership(msg.sender); emit NFTCreated(clone); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; interface INFTExtension is IERC165 { } interface INFTURIExtension is INFTExtension { function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; // These contract definitions are used to create a reference to the OpenSea // ProxyRegistry contract by using the registry's address (see isApprovedForAll). interface OwnableDelegateProxy { } interface ProxyRegistry { function proxies(address) external view returns (OwnableDelegateProxy); } library SupportsOpensea { // Use like this: // if (isOpenSeaProxyActive && SupportsOpensea.isApprovedForAll(owner, operator)) { // return true; // } function isApprovedForAll(address owner, address operator) public view returns (bool) { // Get a reference to OpenSea's proxy registry contract by instantiating // the contract using the already existing address. ProxyRegistry proxyRegistry = ProxyRegistry(0xa5409ec958C83C3f309868babACA7c86DCB077c1); return address(proxyRegistry.proxies(owner)) == operator; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; /** * @title LICENSE REQUIREMENT * @dev This contract is licensed under the MIT license. * @dev You're not allowed to remove DEVELOPER() and DEVELOPER_ADDRESS() from contract */ import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/security/ReentrancyGuardUpgradeable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165Checker.sol"; import "@openzeppelin/contracts/interfaces/IERC2981.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "./extensions/INFTExtension.sol"; import "./IMetaverseNFT.sol"; import "./OpenseaProxy.sol"; // Want to launch your own collection ? Check out https://buildship.dev. // // zAAAAA#QQQQQ= // yN8NNN@@@@@@L // jgggggQ@@@@@| // ~;!!!!|ccccc~ // ,~__~~>||L||_ // ,~__~~>|||||_ // ,~__~~>|||||_ // ``````````````````````',,,,,~;;;;;,`````````````````````` // .'..................''''''''.....''''.................''. // `'''..'''....''''''.....''''''..''''''''....'''''''....''. // `'''',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,'.'. // `.'''!^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^~'...` // `..''!^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^~''..` // ```````...''~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~:''..``````` // ..'..........''...'''...'...''''..''..''''...'...'''...''.............''` // .''..........''.........'.........''.........'.........''.............''` // .''..';^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^~'....` // .''..,aqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqv'....` // .''..,aqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqc'..''` // .''..,|77777777777777777777777777777777777777777777777777777777777^'..''` // .''..'.''.'''.....'''''.....''.'''....''.'''.....'''''.....''.''''....''` // .''..''...'''..............................................''''...''..''` // ``````....''',,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,''...'``````` // `...'':_______________________________________________,'...'` // ....'':_______________________________________________,'....` // .'...':__~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~___,'....` // .'...':__~~~!^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^;~~___,'...'` // `.'..'':___~~!^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^;~___~,'...'. // `,,,,,,,,:~~~~~~;!!!!!r=================|iiiiiiiiiiiiiiiii|>>>>>=^^^^^^;;;;;;;;: // `>LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLSUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU? // ~LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLSUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUw: // .t555555555yyyyy55555yyyyy555555yyyyy55Dgggggggggggggggggggggggggggggggggggggz // vNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ@QQQ! // ,KNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNNQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQP` // |6666666666666666666666666666666666668QQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQQ8; // `>LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLZUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU6L // ,LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLSUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUj. // !LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLS6UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUX; // .*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLSUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU7` // _LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLSUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUa' // ^LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLSUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUX! // `+LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLSUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU> // '*LLLLLLLLLLLLLLLLLLLLLLLLLLLLLLS6UUUUUUUUUUUUUUUUUUUUUUUUUUUUUz` // ,|LLLLLLLLLLLLLLLLLLLLLLLLLLLLLSUUUUUUUUUUUUUUUUUUUUUUUUUUUUUj' // ~LLLLLLLLLLLLLLLLLLLLLLLLLLLLLSU6UUUUUUUUUUUUUUUUUUUUUUUUUUX: contract MetaverseNFT is ERC721Upgradeable, ReentrancyGuardUpgradeable, OwnableUpgradeable, IMetaverseNFT // implements IERC2981 { using Address for address; using SafeERC20 for IERC20; using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; uint256 public constant SALE_STARTS_AT_INFINITY = 2**256 - 1; uint256 public constant DEVELOPER_FEE = 500; // of 10,000 = 5% uint256 public startTimestamp = SALE_STARTS_AT_INFINITY; uint256 public createdAt; uint256 public reserved; uint256 public maxSupply; uint256 public maxPerMint; uint256 public price; uint256 public royaltyFee; address public royaltyReceiver; address public uriExtension = address(0x0); bool public isFrozen; bool private isOpenSeaProxyActive; /** * @dev Additional data for each token that needs to be stored and accessed on-chain */ mapping (uint256 => bytes32) public data; /** * @dev List of connected extensions */ INFTExtension[] public extensions; string public PROVENANCE_HASH = ""; string private CONTRACT_URI = ""; string private BASE_URI; event ExtensionAdded(address indexed extensionAddress); event ExtensionRevoked(address indexed extensionAddress); event ExtensionURIAdded(address indexed extensionAddress); function initialize( uint256 _price, uint256 _maxSupply, uint256 _nReserved, uint256 _maxPerMint, uint256 _royaltyFee, string memory _uri, string memory _name, string memory _symbol ) public initializer { __ERC721_init(_name, _symbol); __ReentrancyGuard_init(); __Ownable_init(); createdAt = block.timestamp; startTimestamp = SALE_STARTS_AT_INFINITY; price = _price; reserved = _nReserved; maxPerMint = _maxPerMint; maxSupply = _maxSupply; royaltyFee = _royaltyFee; royaltyReceiver = address(this); // Need help with uploading metadata? Try https://buildship.dev BASE_URI = _uri; } // This constructor ensures that this contract can only be used as a master copy // Marking constructor as initializer makes sure that real initializer cannot be called // Thus, as the owner of the contract is 0x0, no one can do anything with the contract // on the other hand, it's impossible to call this function in proxy, // so the real initializer is the only initializer /// @custom:oz-upgrades-unsafe-allow constructor constructor() initializer {} function _baseURI() internal view override returns (string memory) { return BASE_URI; } function contractURI() public view returns (string memory uri) { uri = bytes(CONTRACT_URI).length > 0 ? CONTRACT_URI : _baseURI(); } function tokenURI(uint256 tokenId) public view override returns (string memory) { if (uriExtension != address(0)) { string memory uri = INFTURIExtension(uriExtension).tokenURI(tokenId); if (bytes(uri).length > 0) { return uri; } } return super.tokenURI(tokenId); } // ----- Admin functions ----- function setBaseURI(string calldata uri) public onlyOwner { BASE_URI = uri; } // Contract-level metadata for Opensea function setContractURI(string calldata uri) public onlyOwner { CONTRACT_URI = uri; } function setPrice(uint256 _price) public onlyOwner { price = _price; } // Freeze forever, irreversible function freeze() public onlyOwner { isFrozen = true; } function isExtensionAllowed(address _extension) public view returns (bool) { if (!ERC165Checker.supportsInterface(_extension, type(INFTExtension).interfaceId)) { return false; } for (uint index = 0; index < extensions.length; index++) { if (extensions[index] == INFTExtension(_extension)) { return true; } } return false; } // Extensions are allowed to mint function addExtension(address _extension) public onlyOwner { require(_extension != address(this), "Cannot add self as extension"); require(!isExtensionAllowed(_extension), "Extension already added"); extensions.push(INFTExtension(_extension)); emit ExtensionAdded(_extension); } function revokeExtension(address _extension) public onlyOwner { uint256 index = 0; for (; index < extensions.length; index++) { if (extensions[index] == INFTExtension(_extension)) { break; } } extensions[index] = extensions[extensions.length - 1]; extensions.pop(); emit ExtensionRevoked(_extension); } function setExtensionTokenURI(address extension) public onlyOwner { require(extension != address(this), "Cannot add self as extension"); require(extension == address(0x0) || ERC165Checker.supportsInterface(extension, type(INFTURIExtension).interfaceId), "Not conforms to extension"); uriExtension = extension; emit ExtensionURIAdded(extension); } // function to disable gasless listings for security in case // opensea ever shuts down or is compromised // from CryptoCoven https://etherscan.io/address/0x5180db8f5c931aae63c74266b211f580155ecac8#code function setIsOpenSeaProxyActive(bool _isOpenSeaProxyActive) public onlyOwner { isOpenSeaProxyActive = _isOpenSeaProxyActive; } // ---- Minting ---- function _mintConsecutive(uint256 nTokens, address to, bytes32 extraData) internal { require(_tokenIdCounter.current() + nTokens + reserved <= maxSupply, "Not enough Tokens left."); for (uint256 i; i < nTokens; i++) { uint256 tokenId = _tokenIdCounter.current(); _tokenIdCounter.increment(); _safeMint(to, tokenId); data[tokenId] = extraData; } } // ---- Mint control ---- modifier whenSaleStarted() { require(saleStarted(), "Sale not started"); _; } modifier whenNotFrozen() { require(!isFrozen, "Minting is frozen"); _; } modifier onlyExtension() { require(isExtensionAllowed(msg.sender), "Extension should be added to contract before minting"); _; } // ---- Mint public ---- // Contract can sell tokens function mint(uint256 nTokens) external payable nonReentrant whenSaleStarted { require(nTokens <= maxPerMint, "You cannot mint more than MAX_TOKENS_PER_MINT tokens at once!"); require(nTokens * price <= msg.value, "Inconsistent amount sent!"); _mintConsecutive(nTokens, msg.sender, 0x0); } // Owner can claim free tokens function claim(uint256 nTokens, address to) external nonReentrant onlyOwner { require(nTokens <= reserved, "That would exceed the max reserved."); reserved = reserved - nTokens; _mintConsecutive(nTokens, to, 0x0); } // ---- Mint via extension function mintExternal(uint256 nTokens, address to, bytes32 extraData) external payable onlyExtension nonReentrant { _mintConsecutive(nTokens, to, extraData); } // ---- Sale control ---- function updateStartTimestamp(uint256 _startTimestamp) public onlyOwner whenNotFrozen { startTimestamp = _startTimestamp; } function startSale() public onlyOwner whenNotFrozen { startTimestamp = block.timestamp; } function stopSale() public onlyOwner { startTimestamp = SALE_STARTS_AT_INFINITY; } function saleStarted() public view returns (bool) { return block.timestamp >= startTimestamp; } // ---- Offchain Info ---- // This should be set before sales open. function setProvenanceHash(string memory provenanceHash) public onlyOwner { PROVENANCE_HASH = provenanceHash; } function setRoyaltyFee(uint256 _royaltyFee) public onlyOwner { royaltyFee = _royaltyFee; } function setRoyaltyReceiver(address _receiver) public onlyOwner { require(block.timestamp >= createdAt + 26 weeks, "Only after 6 months of contract creation can the royalty receiver be changed."); royaltyReceiver = _receiver; } function royaltyInfo(uint256, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount) { // We use the same contract to split royalties: 5% of royalty goes to the developer receiver = royaltyReceiver; royaltyAmount = salePrice * royaltyFee / 10000; } // ---- Withdraw ----- function withdraw() public onlyOwner { uint256 balance = address(this).balance; uint256 amount = balance * (10000 - DEVELOPER_FEE) / 10000; address payable dev = DEVELOPER_ADDRESS(); Address.sendValue(payable(msg.sender), amount); Address.sendValue(dev, balance - amount); } function withdrawToken(IERC20 token) public onlyOwner { uint256 balance = token.balanceOf(address(this)); uint256 amount = balance * (10000 - DEVELOPER_FEE) / 10000; address payable dev = DEVELOPER_ADDRESS(); token.safeTransfer(payable(msg.sender), amount); token.safeTransfer(dev, balance - amount); } function DEVELOPER() public pure returns (string memory _url) { _url = "https://buildship.dev"; } function DEVELOPER_ADDRESS() public pure returns (address payable _dev) { _dev = payable(0x704C043CeB93bD6cBE570C6A2708c3E1C0310587); } // -------- ERC721 overrides -------- function supportsInterface(bytes4 interfaceId) public view override returns (bool) { return interfaceId == type(IERC2981).interfaceId || interfaceId == type(IMetaverseNFT).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Override isApprovedForAll to allowlist user's OpenSea proxy accounts to enable gas-less listings. * Taken from CryptoCoven: https://etherscan.io/address/0x5180db8f5c931aae63c74266b211f580155ecac8#code */ function isApprovedForAll(address owner, address operator) public view override returns (bool) { // Get a reference to OpenSea's proxy registry contract by instantiating // the contract using the already existing address. ProxyRegistry proxyRegistry = ProxyRegistry(0xa5409ec958C83C3f309868babACA7c86DCB077c1); if (isOpenSeaProxyActive && address(proxyRegistry.proxies(owner)) == operator) { return true; } return super.isApprovedForAll(owner, operator); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; interface IAvatarNFT { function DEVELOPER() external pure returns (string memory _url); function DEVELOPER_ADDRESS() external pure returns (address payable _dev); // ------ View functions ------ function saleStarted() external view returns (bool); function isExtensionAllowed(address extension) external view returns (bool); /** Extra information stored for each tokenId. Optional, provided on mint */ function data(uint256 tokenId) external view returns (bytes32); // ------ Mint functions ------ /** Mint from NFTExtension contract. Optionally provide data parameter. */ function mintExternal(uint256 nTokens, address to, bytes32 data) external payable; // ------ Admin functions ------ function addExtension(address extension) external; function revokeExtension(address extension) external; function withdraw() external; } interface IMetaverseNFT is IAvatarNFT { // ------ View functions ------ /** Recommended royalty for tokenId sale. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); // ------ Admin functions ------ function setRoyaltyReceiver(address receiver) external; function setRoyaltyFee(uint256 fee) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Library used to query support of an interface declared via {IERC165}. * * Note that these functions return the actual result of the query: they do not * `revert` if an interface is not supported. It is up to the caller to decide * what to do in these cases. */ library ERC165Checker { // As per the EIP-165 spec, no interface should ever match 0xffffffff bytes4 private constant _INTERFACE_ID_INVALID = 0xffffffff; /** * @dev Returns true if `account` supports the {IERC165} interface, */ function supportsERC165(address account) internal view returns (bool) { // Any contract that implements ERC165 must explicitly indicate support of // InterfaceId_ERC165 and explicitly indicate non-support of InterfaceId_Invalid return _supportsERC165Interface(account, type(IERC165).interfaceId) && !_supportsERC165Interface(account, _INTERFACE_ID_INVALID); } /** * @dev Returns true if `account` supports the interface defined by * `interfaceId`. Support for {IERC165} itself is queried automatically. * * See {IERC165-supportsInterface}. */ function supportsInterface(address account, bytes4 interfaceId) internal view returns (bool) { // query support of both ERC165 as per the spec and support of _interfaceId return supportsERC165(account) && _supportsERC165Interface(account, interfaceId); } /** * @dev Returns a boolean array where each value corresponds to the * interfaces passed in and whether they're supported or not. This allows * you to batch check interfaces for a contract where your expectation * is that some interfaces may not be supported. * * See {IERC165-supportsInterface}. * * _Available since v3.4._ */ function getSupportedInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool[] memory) { // an array of booleans corresponding to interfaceIds and whether they're supported or not bool[] memory interfaceIdsSupported = new bool[](interfaceIds.length); // query support of ERC165 itself if (supportsERC165(account)) { // query support of each interface in interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { interfaceIdsSupported[i] = _supportsERC165Interface(account, interfaceIds[i]); } } return interfaceIdsSupported; } /** * @dev Returns true if `account` supports all the interfaces defined in * `interfaceIds`. Support for {IERC165} itself is queried automatically. * * Batch-querying can lead to gas savings by skipping repeated checks for * {IERC165} support. * * See {IERC165-supportsInterface}. */ function supportsAllInterfaces(address account, bytes4[] memory interfaceIds) internal view returns (bool) { // query support of ERC165 itself if (!supportsERC165(account)) { return false; } // query support of each interface in _interfaceIds for (uint256 i = 0; i < interfaceIds.length; i++) { if (!_supportsERC165Interface(account, interfaceIds[i])) { return false; } } // all interfaces supported return true; } /** * @notice Query if a contract implements an interface, does not check ERC165 support * @param account The address of the contract to query for support of an interface * @param interfaceId The interface identifier, as specified in ERC-165 * @return true if the contract at account indicates support of the interface with * identifier interfaceId, false otherwise * @dev Assumes that account contains a contract that supports ERC165, otherwise * the behavior of this method is undefined. This precondition can be checked * with {supportsERC165}. * Interface identification is specified in ERC-165. */ function _supportsERC165Interface(address account, bytes4 interfaceId) private view returns (bool) { bytes memory encodedParams = abi.encodeWithSelector(IERC165.supportsInterface.selector, interfaceId); (bool success, bytes memory result) = account.staticcall{gas: 30000}(encodedParams); if (result.length < 32) return false; return success && abi.decode(result, (bool)); } }
// SPDX-License-Identifier: MIT 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 Counters { 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 pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ 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 Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, 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 pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for * deploying minimal proxy contracts, also known as "clones". * * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies * > a minimal bytecode implementation that delegates all calls to a known, fixed address. * * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2` * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the * deterministic method. * * _Available since v3.4._ */ library Clones { /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create opcode, which should never revert. */ function clone(address implementation) internal returns (address instance) { assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) instance := create(0, ptr, 0x37) } require(instance != address(0), "ERC1167: create failed"); } /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create2 opcode and a `salt` to deterministically deploy * the clone. Using the same `implementation` and `salt` multiple time will revert, since * the clones cannot be deployed twice at the same address. */ function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) { assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) instance := create2(0, ptr, 0x37, salt) } require(instance != address(0), "ERC1167: create2 failed"); } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress( address implementation, bytes32 salt, address deployer ) internal pure returns (address predicted) { assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000) mstore(add(ptr, 0x38), shl(0x60, deployer)) mstore(add(ptr, 0x4c), salt) mstore(add(ptr, 0x6c), keccak256(ptr, 0x37)) predicted := keccak256(add(ptr, 0x37), 0x55) } } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress(address implementation, bytes32 salt) internal view returns (address predicted) { return predictDeterministicAddress(implementation, salt, address(this)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard */ interface IERC2981 is IERC165 { /** * @dev Called with the sale price to determine how much royalty is owed and to whom. * @param tokenId - the NFT asset queried for royalty information * @param salePrice - the sale price of the NFT asset specified by `tokenId` * @return receiver - address of who should be sent the royalty payment * @return royaltyAmount - the royalty payment amount for `salePrice` */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT 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 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 initializer { __ERC165_init_unchained(); } function __ERC165_init_unchained() internal initializer { } /** * @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 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 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 initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } 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 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 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 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 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 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 initializer { __Context_init_unchained(); __ERC165_init_unchained(); __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal initializer { _name = name_; _symbol = symbol_; } /** * @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 { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = 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 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 pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuardUpgradeable is Initializable { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; function __ReentrancyGuard_init() internal initializer { __ReentrancyGuard_init_unchained(); } function __ReentrancyGuard_init_unchained() internal initializer { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @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. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } }
// SPDX-License-Identifier: MIT 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 initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { _setOwner(_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 { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } uint256[49] private __gap; }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 10000 }, "evmVersion": "london", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"deployedAddress","type":"address"}],"name":"NFTCreated","type":"event"},{"inputs":[{"internalType":"uint256","name":"_startPrice","type":"uint256"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"uint256","name":"_nReserved","type":"uint256"},{"internalType":"uint256","name":"_maxTokensPerMint","type":"uint256"},{"internalType":"uint256","name":"_royaltyFee","type":"uint256"},{"internalType":"string","name":"_uri","type":"string"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"name":"createNFT","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"proxyImplementation","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a060405234801561001057600080fd5b5060405161001d90610080565b604051809103906000f080158015610039573d6000803e3d6000fd5b506001600160a01b031660808190526040519081527f3754da1a98214dd62255f52efe5c8d68ba410e5c19339cc7883a5fba3df0adf29060200160405180910390a161008d565b614b8d8061066483390190565b6080516105b76100ad600039600081816040015260a701526105b76000f3fe608060405234801561001057600080fd5b50600436106100365760003560e01c80630c870f911461003b5780633e0116101461008b575b600080fd5b6100627f000000000000000000000000000000000000000000000000000000000000000081565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61009e6100993660046103f4565b6100a0565b005b60006100cb7f0000000000000000000000000000000000000000000000000000000000000000610234565b6040517f27cfcad900000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff8216906327cfcad99061012e908c908c908c908c908c908c908c908c90600401610518565b600060405180830381600087803b15801561014857600080fd5b505af115801561015c573d6000803e3d6000fd5b50506040517ff2fde38b00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8416925063f2fde38b9150602401600060405180830381600087803b1580156101c757600080fd5b505af11580156101db573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff841681527f3754da1a98214dd62255f52efe5c8d68ba410e5c19339cc7883a5fba3df0adf29250602001905060405180910390a1505050505050505050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528260601b60148201527f5af43d82803e903d91602b57fd5bf3000000000000000000000000000000000060288201526037816000f091505073ffffffffffffffffffffffffffffffffffffffff8116610315576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f455243313136373a20637265617465206661696c656400000000000000000000604482015260640160405180910390fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261035a57600080fd5b813567ffffffffffffffff808211156103755761037561031a565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156103bb576103bb61031a565b816040528381528660208588010111156103d457600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600080600080610100898b03121561041157600080fd5b883597506020890135965060408901359550606089013594506080890135935060a089013567ffffffffffffffff8082111561044c57600080fd5b6104588c838d01610349565b945060c08b013591508082111561046e57600080fd5b61047a8c838d01610349565b935060e08b013591508082111561049057600080fd5b5061049d8b828c01610349565b9150509295985092959890939650565b6000815180845260005b818110156104d3576020818501810151868301820152016104b7565b818111156104e5576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60006101008a83528960208401528860408401528760608401528660808401528060a084015261054a818401876104ad565b905082810360c084015261055e81866104ad565b905082810360e084015261057281856104ad565b9b9a505050505050505050505056fea2646970667358221220bf379e531ada41857a64d6260e65bef4ee152e9a49217c5ffd98289d245c949a64736f6c6343000809003360001960fc5561010480546001600160a01b031916905560a060408190526000608081905262000033916101079162000123565b5060408051602081019182905260009081905262000055916101089162000123565b503480156200006357600080fd5b50600054610100900460ff16806200007e575060005460ff16155b620000e65760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b606482015260840160405180910390fd5b600054610100900460ff1615801562000109576000805461ffff19166101011790555b80156200011c576000805461ff00191690555b5062000206565b8280546200013190620001c9565b90600052602060002090601f016020900481019282620001555760008555620001a0565b82601f106200017057805160ff1916838001178555620001a0565b82800160010185558215620001a0579182015b82811115620001a057825182559160200191906001019062000183565b50620001ae929150620001b2565b5090565b5b80821115620001ae5760008155600101620001b3565b600181811c90821680620001de57607f821691505b602082108114156200020057634e487b7160e01b600052602260045260246000fd5b50919050565b61497780620002166000396000f3fe6080604052600436106103765760003560e01c80638dc251e3116101d1578063cf09e0d011610102578063e67151ae116100a0578063f0ba84401161006f578063f0ba8440146109fd578063f2fde38b14610a2b578063fe60d12c14610a4b578063ff1b655614610a6157600080fd5b8063e67151ae14610992578063e6fd48bc146109b2578063e8a3d485146109c8578063e985e9c5146109dd57600080fd5b8063db85d59c116100dc578063db85d59c1461091d578063ddd5e1b21461093d578063e36b0b371461095d578063e43082f71461097257600080fd5b8063cf09e0d0146108db578063d56b7546146108f1578063d5abeb011461090757600080fd5b8063a0712d681161016f578063b66a0e5d11610149578063b66a0e5d1461086f578063b88d4fde14610884578063b8997a97146108a4578063c87b56dd146108bb57600080fd5b8063a0712d681461081c578063a22cb4651461082f578063a769310a1461084f57600080fd5b806395d89b41116101ab57806395d89b41146107b95780639eb88b2c146107ce5780639fbc8713146107e4578063a035b1fe1461080557600080fd5b80638dc251e31461075957806391b7f5ed14610779578063938e3d7b1461079957600080fd5b8063454e66c8116102ab5780636352211e1161024957806370a082311161022357806370a08231146106e6578063715018a614610706578063894760691461071b5780638da5cb5b1461073b57600080fd5b80636352211e1461068657806363c5c599146106a65780636b853314146106c657600080fd5b806352ee46961161028557806352ee46961461061857806355f804b3146106395780635c474f9e1461065957806362a5af3b1461067157600080fd5b8063454e66c8146105b95780634690521b146105e0578063507e094f146105f357600080fd5b806327cfcad9116103185780633c934ab3116102f25780633c934ab31461051e5780633ccfd60b146105645780633e4086e51461057957806342842e0e1461059957600080fd5b806327cfcad91461048c5780632a55205a146104ac57806333eeb147146104eb57600080fd5b8063095ea7b311610354578063095ea7b31461040a578063109695231461042c578063170ff3e11461044c57806323b872dd1461046c57600080fd5b806301ffc9a71461037b57806306fdde03146103b0578063081812fc146103d2575b600080fd5b34801561038757600080fd5b5061039b6103963660046140dc565b610a76565b60405190151581526020015b60405180910390f35b3480156103bc57600080fd5b506103c5610b1e565b6040516103a7919061416f565b3480156103de57600080fd5b506103f26103ed366004614182565b610bb0565b6040516001600160a01b0390911681526020016103a7565b34801561041657600080fd5b5061042a6104253660046141b0565b610c5b565b005b34801561043857600080fd5b5061042a6104473660046142fe565b610d8d565b34801561045857600080fd5b5061042a610467366004614333565b610dff565b34801561047857600080fd5b5061042a610487366004614350565b610f99565b34801561049857600080fd5b5061042a6104a7366004614391565b611020565b3480156104b857600080fd5b506104cc6104c736600461444a565b61116a565b604080516001600160a01b0390931683526020830191909152016103a7565b3480156104f757600080fd5b506101045461039b9074010000000000000000000000000000000000000000900460ff1681565b34801561052a57600080fd5b5060408051808201909152601581527f68747470733a2f2f6275696c64736869702e646576000000000000000000000060208201526103c5565b34801561057057600080fd5b5061042a6111a2565b34801561058557600080fd5b5061042a610594366004614182565b611256565b3480156105a557600080fd5b5061042a6105b4366004614350565b6112b6565b3480156105c557600080fd5b5073704c043ceb93bd6cbe570c6a2708c3e1c03105876103f2565b61042a6105ee36600461446c565b6112d1565b3480156105ff57600080fd5b5061060a6101005481565b6040519081526020016103a7565b34801561062457600080fd5b50610104546103f2906001600160a01b031681565b34801561064557600080fd5b5061042a610654366004614493565b6113b9565b34801561066557600080fd5b5060fc5442101561039b565b34801561067d57600080fd5b5061042a611420565b34801561069257600080fd5b506103f26106a1366004614182565b6114bc565b3480156106b257600080fd5b5061039b6106c1366004614333565b611547565b3480156106d257600080fd5b5061042a6106e1366004614333565b6115cb565b3480156106f257600080fd5b5061060a610701366004614333565b611768565b34801561071257600080fd5b5061042a611802565b34801561072757600080fd5b5061042a610736366004614333565b611868565b34801561074757600080fd5b5060c9546001600160a01b03166103f2565b34801561076557600080fd5b5061042a610774366004614333565b6119cc565b34801561078557600080fd5b5061042a610794366004614182565b611b0c565b3480156107a557600080fd5b5061042a6107b4366004614493565b611b6c565b3480156107c557600080fd5b506103c5611bd3565b3480156107da57600080fd5b5061060a60001981565b3480156107f057600080fd5b50610103546103f2906001600160a01b031681565b34801561081157600080fd5b5061060a6101015481565b61042a61082a366004614182565b611be2565b34801561083b57600080fd5b5061042a61084a366004614513565b611d77565b34801561085b57600080fd5b5061042a61086a366004614333565b611e5a565b34801561087b57600080fd5b5061042a612012565b34801561089057600080fd5b5061042a61089f36600461454c565b6120de565b3480156108b057600080fd5b5061060a6101025481565b3480156108c757600080fd5b506103c56108d6366004614182565b612166565b3480156108e757600080fd5b5061060a60fd5481565b3480156108fd57600080fd5b5061060a6101f481565b34801561091357600080fd5b5061060a60ff5481565b34801561092957600080fd5b506103f2610938366004614182565b61224f565b34801561094957600080fd5b5061042a6109583660046145cc565b61227a565b34801561096957600080fd5b5061042a6123ca565b34801561097e57600080fd5b5061042a61098d3660046145f1565b61242c565b34801561099e57600080fd5b5061042a6109ad366004614182565b6124d2565b3480156109be57600080fd5b5061060a60fc5481565b3480156109d457600080fd5b506103c561259d565b3480156109e957600080fd5b5061039b6109f836600461460e565b6125d1565b348015610a0957600080fd5b5061060a610a18366004614182565b6101056020526000908152604090205481565b348015610a3757600080fd5b5061042a610a46366004614333565b6126f4565b348015610a5757600080fd5b5061060a60fe5481565b348015610a6d57600080fd5b506103c56127d6565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f2a55205a000000000000000000000000000000000000000000000000000000001480610b0957507fffffffff0000000000000000000000000000000000000000000000000000000082167f99d7f75c00000000000000000000000000000000000000000000000000000000145b80610b185750610b1882612865565b92915050565b606060658054610b2d9061463c565b80601f0160208091040260200160405190810160405280929190818152602001828054610b599061463c565b8015610ba65780601f10610b7b57610100808354040283529160200191610ba6565b820191906000526020600020905b815481529060010190602001808311610b8957829003601f168201915b5050505050905090565b6000818152606760205260408120546001600160a01b0316610c3f5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152606960205260409020546001600160a01b031690565b6000610c66826114bc565b9050806001600160a01b0316836001600160a01b03161415610cf05760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610c36565b336001600160a01b0382161480610d0c5750610d0c81336125d1565b610d7e5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610c36565b610d888383612948565b505050565b60c9546001600160a01b03163314610de75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c36565b8051610dfb90610107906020840190613f83565b5050565b60c9546001600160a01b03163314610e595760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c36565b6001600160a01b038116301415610eb25760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f74206164642073656c6620617320657874656e73696f6e000000006044820152606401610c36565b610ebb81611547565b15610f085760405162461bcd60e51b815260206004820152601760248201527f457874656e73696f6e20616c72656164792061646465640000000000000000006044820152606401610c36565b610106805460018101825560009182527fc9ef9fceea91e87b2c84ea400a44fde78842aae8aa24cd4b502ce5fb4d91e63b0180547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03841690811790915560405190917f99c6112dbaef85e57ac8ca86dd23e3c785162b58a6e810e5d5e7455b568d66b191a250565b610fa333826129ce565b6110155760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610c36565b610d88838383612aae565b600054610100900460ff1680611039575060005460ff16155b6110ab5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c36565b600054610100900460ff161580156110cd576000805461ffff19166101011790555b6110d78383612c93565b6110df612d70565b6110e7612e39565b4260fd5560001960fc5561010189905560fe87905561010086905560ff88905561010285905561010380547fffffffffffffffffffffffff00000000000000000000000000000000000000001630179055835161114c90610109906020870190613f83565b50801561115f576000805461ff00191690555b505050505050505050565b61010354610102546001600160a01b03909116906000906127109061118f90856146bf565b611199919061470d565b90509250929050565b60c9546001600160a01b031633146111fc5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c36565b47600061271061120e6101f482614721565b61121890846146bf565b611222919061470d565b905073704c043ceb93bd6cbe570c6a2708c3e1c03105876112433383612ef6565b610d88816112518486614721565b612ef6565b60c9546001600160a01b031633146112b05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c36565b61010255565b610d88838383604051806020016040528060008152506120de565b6112da33611547565b61134c5760405162461bcd60e51b815260206004820152603460248201527f457874656e73696f6e2073686f756c6420626520616464656420746f20636f6e60448201527f7472616374206265666f7265206d696e74696e670000000000000000000000006064820152608401610c36565b6002609754141561139f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c36565b60026097556113af83838361300f565b5050600160975550565b60c9546001600160a01b031633146114135760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c36565b610d886101098383614007565b60c9546001600160a01b0316331461147a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c36565b61010480547fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff1674010000000000000000000000000000000000000000179055565b6000818152606760205260408120546001600160a01b031680610b185760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610c36565b60006115548260006130d5565b61156057506000919050565b60005b610106548110156115c257826001600160a01b0316610106828154811061158c5761158c614738565b6000918252602090912001546001600160a01b031614156115b05750600192915050565b806115ba81614767565b915050611563565b50600092915050565b60c9546001600160a01b031633146116255760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c36565b6001600160a01b03811630141561167e5760405162461bcd60e51b815260206004820152601c60248201527f43616e6e6f74206164642073656c6620617320657874656e73696f6e000000006044820152606401610c36565b6001600160a01b03811615806116b957506116b9817fc87b56dd000000000000000000000000000000000000000000000000000000006130d5565b6117055760405162461bcd60e51b815260206004820152601960248201527f4e6f7420636f6e666f726d7320746f20657874656e73696f6e000000000000006044820152606401610c36565b61010480547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517f92597a601f19fe4d50f14ea76d7ba45d21bad7992f7e1709c605642b190de09290600090a250565b60006001600160a01b0382166117e65760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610c36565b506001600160a01b031660009081526068602052604090205490565b60c9546001600160a01b0316331461185c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c36565b61186660006130f8565b565b60c9546001600160a01b031633146118c25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c36565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038316906370a082319060240160206040518083038186803b15801561191d57600080fd5b505afa158015611931573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119559190614782565b905060006127106119686101f482614721565b61197290846146bf565b61197c919061470d565b905073704c043ceb93bd6cbe570c6a2708c3e1c03105876119a76001600160a01b0385163384613162565b6119c6816119b58486614721565b6001600160a01b0387169190613162565b50505050565b60c9546001600160a01b03163314611a265760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c36565b60fd54611a369062eff10061479b565b421015611ad15760405162461bcd60e51b815260206004820152604d60248201527f4f6e6c792061667465722036206d6f6e746873206f6620636f6e74726163742060448201527f6372656174696f6e2063616e2074686520726f79616c7479207265636569766560648201527f72206265206368616e6765642e00000000000000000000000000000000000000608482015260a401610c36565b61010380547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0392909216919091179055565b60c9546001600160a01b03163314611b665760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c36565b61010155565b60c9546001600160a01b03163314611bc65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c36565b610d886101088383614007565b606060668054610b2d9061463c565b60026097541415611c355760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c36565b600260975560fc54421015611c8c5760405162461bcd60e51b815260206004820152601060248201527f53616c65206e6f742073746172746564000000000000000000000000000000006044820152606401610c36565b61010054811115611d055760405162461bcd60e51b815260206004820152603d60248201527f596f752063616e6e6f74206d696e74206d6f7265207468616e204d41585f544f60448201527f4b454e535f5045525f4d494e5420746f6b656e73206174206f6e6365210000006064820152608401610c36565b346101015482611d1591906146bf565b1115611d635760405162461bcd60e51b815260206004820152601960248201527f496e636f6e73697374656e7420616d6f756e742073656e7421000000000000006044820152606401610c36565b611d6f8133600061300f565b506001609755565b6001600160a01b038216331415611dd05760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610c36565b336000818152606a602090815260408083206001600160a01b0387168085529083529281902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b60c9546001600160a01b03163314611eb45760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c36565b60005b61010654811015611f1257816001600160a01b03166101068281548110611ee057611ee0614738565b6000918252602090912001546001600160a01b03161415611f0057611f12565b80611f0a81614767565b915050611eb7565b6101068054611f2390600190614721565b81548110611f3357611f33614738565b60009182526020909120015461010680546001600160a01b039092169183908110611f6057611f60614738565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550610106805480611fa057611fa06147b3565b600082815260208120820160001990810180547fffffffffffffffffffffffff00000000000000000000000000000000000000001690559091019091556040516001600160a01b038416917fe056b30f86b962fc88925cb7559e4364707cab11d2c52e090e6c0db62eb9113591a25050565b60c9546001600160a01b0316331461206c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c36565b6101045474010000000000000000000000000000000000000000900460ff16156120d85760405162461bcd60e51b815260206004820152601160248201527f4d696e74696e672069732066726f7a656e0000000000000000000000000000006044820152606401610c36565b4260fc55565b6120e833836129ce565b61215a5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610c36565b6119c6848484846131e2565b610104546060906001600160a01b03161561224657610104546040517fc87b56dd000000000000000000000000000000000000000000000000000000008152600481018490526000916001600160a01b03169063c87b56dd9060240160006040518083038186803b1580156121da57600080fd5b505afa1580156121ee573d6000803e3d6000fd5b505050506040513d6000823e601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016820160405261223491908101906147e2565b8051909150156122445792915050565b505b610b188261326b565b610106818154811061226057600080fd5b6000918252602090912001546001600160a01b0316905081565b600260975414156122cd5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610c36565b600260975560c9546001600160a01b0316331461232c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c36565b60fe548211156123a45760405162461bcd60e51b815260206004820152602360248201527f5468617420776f756c642065786365656420746865206d61782072657365727660448201527f65642e00000000000000000000000000000000000000000000000000000000006064820152608401610c36565b8160fe546123b29190614721565b60fe556123c18282600061300f565b50506001609755565b60c9546001600160a01b031633146124245760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c36565b60001960fc55565b60c9546001600160a01b031633146124865760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c36565b61010480549115157501000000000000000000000000000000000000000000027fffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffffff909216919091179055565b60c9546001600160a01b0316331461252c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c36565b6101045474010000000000000000000000000000000000000000900460ff16156125985760405162461bcd60e51b815260206004820152601160248201527f4d696e74696e672069732066726f7a656e0000000000000000000000000000006044820152606401610c36565b60fc55565b6060600061010880546125af9061463c565b9050116125c3576125be613353565b905090565b6101088054610b2d9061463c565b6101045460009073a5409ec958c83c3f309868babaca7c86dcb077c1907501000000000000000000000000000000000000000000900460ff1680156126b357506040517fc45527910000000000000000000000000000000000000000000000000000000081526001600160a01b038581166004830152808516919083169063c45527919060240160206040518083038186803b15801561267057600080fd5b505afa158015612684573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906126a89190614859565b6001600160a01b0316145b156126c2576001915050610b18565b6001600160a01b038085166000908152606a602090815260408083209387168352929052205460ff165b949350505050565b60c9546001600160a01b0316331461274e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610c36565b6001600160a01b0381166127ca5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610c36565b6127d3816130f8565b50565b61010780546127e49061463c565b80601f01602080910402602001604051908101604052809291908181526020018280546128109061463c565b801561285d5780601f106128325761010080835404028352916020019161285d565b820191906000526020600020905b81548152906001019060200180831161284057829003601f168201915b505050505081565b60007fffffffff0000000000000000000000000000000000000000000000000000000082167f80ac58cd0000000000000000000000000000000000000000000000000000000014806128f857507fffffffff0000000000000000000000000000000000000000000000000000000082167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80610b1857507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610b18565b600081815260696020526040902080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0384169081179091558190612995826114bc565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152606760205260408120546001600160a01b0316612a585760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610c36565b6000612a63836114bc565b9050806001600160a01b0316846001600160a01b03161480612a9e5750836001600160a01b0316612a9384610bb0565b6001600160a01b0316145b806126ec57506126ec81856125d1565b826001600160a01b0316612ac1826114bc565b6001600160a01b031614612b3d5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610c36565b6001600160a01b038216612bb85760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610c36565b612bc3600082612948565b6001600160a01b0383166000908152606860205260408120805460019290612bec908490614721565b90915550506001600160a01b0382166000908152606860205260408120805460019290612c1a90849061479b565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600054610100900460ff1680612cac575060005460ff16155b612d1e5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c36565b600054610100900460ff16158015612d40576000805461ffff19166101011790555b612d48613363565b612d50613363565b612d5a8383613423565b8015610d88576000805461ff0019169055505050565b600054610100900460ff1680612d89575060005460ff16155b612dfb5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c36565b600054610100900460ff16158015612e1d576000805461ffff19166101011790555b612e2561350e565b80156127d3576000805461ff001916905550565b600054610100900460ff1680612e52575060005460ff16155b612ec45760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c36565b600054610100900460ff16158015612ee6576000805461ffff19166101011790555b612eee613363565b612e256135d4565b80471015612f465760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610c36565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114612f93576040519150601f19603f3d011682016040523d82523d6000602084013e612f98565b606091505b5050905080610d885760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610c36565b60ff5460fe548461301f60fb5490565b613029919061479b565b613033919061479b565b11156130815760405162461bcd60e51b815260206004820152601760248201527f4e6f7420656e6f75676820546f6b656e73206c6566742e0000000000000000006044820152606401610c36565b60005b838110156119c657600061309760fb5490565b90506130a760fb80546001019055565b6130b1848261368a565b600090815261010560205260409020829055806130cd81614767565b915050613084565b60006130e0836136a4565b80156130f157506130f18383613708565b9392505050565b60c980546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb00000000000000000000000000000000000000000000000000000000179052610d88908490613837565b6131ed848484612aae565b6131f98484848461391c565b6119c65760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c36565b6000818152606760205260409020546060906001600160a01b03166132f85760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e00000000000000000000000000000000006064820152608401610c36565b6000613302613353565b9050600081511161332257604051806020016040528060008152506130f1565b8061332c84613ae7565b60405160200161333d929190614876565b6040516020818303038152906040529392505050565b60606101098054610b2d9061463c565b600054610100900460ff168061337c575060005460ff16155b6133ee5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c36565b600054610100900460ff16158015612e25576000805461ffff191661010117905580156127d3576000805461ff001916905550565b600054610100900460ff168061343c575060005460ff16155b6134ae5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c36565b600054610100900460ff161580156134d0576000805461ffff19166101011790555b82516134e3906065906020860190613f83565b5081516134f7906066906020850190613f83565b508015610d88576000805461ff0019169055505050565b600054610100900460ff1680613527575060005460ff16155b6135995760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c36565b600054610100900460ff161580156135bb576000805461ffff19166101011790555b600160975580156127d3576000805461ff001916905550565b600054610100900460ff16806135ed575060005460ff16155b61365f5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610c36565b600054610100900460ff16158015613681576000805461ffff19166101011790555b612e25336130f8565b610dfb828260405180602001604052806000815250613c19565b60006136d0827f01ffc9a700000000000000000000000000000000000000000000000000000000613708565b8015610b185750613701827fffffffff00000000000000000000000000000000000000000000000000000000613708565b1592915050565b604080517fffffffff00000000000000000000000000000000000000000000000000000000831660248083019190915282518083039091018152604490910182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f01ffc9a700000000000000000000000000000000000000000000000000000000179052905160009190829081906001600160a01b03871690617530906137b59086906148a5565b6000604051808303818686fa925050503d80600081146137f1576040519150601f19603f3d011682016040523d82523d6000602084013e6137f6565b606091505b50915091506020815110156138115760009350505050610b18565b81801561382d57508080602001905181019061382d91906148c1565b9695505050505050565b600061388c826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316613ca29092919063ffffffff16565b805190915015610d8857808060200190518101906138aa91906148c1565b610d885760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e60448201527f6f742073756363656564000000000000000000000000000000000000000000006064820152608401610c36565b60006001600160a01b0384163b15613adc576040517f150b7a020000000000000000000000000000000000000000000000000000000081526001600160a01b0385169063150b7a02906139799033908990889088906004016148de565b602060405180830381600087803b15801561399357600080fd5b505af19250505080156139e1575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01682019092526139de91810190614910565b60015b613a91573d808015613a0f576040519150601f19603f3d011682016040523d82523d6000602084013e613a14565b606091505b508051613a895760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c36565b805181602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000167f150b7a02000000000000000000000000000000000000000000000000000000001490506126ec565b506001949350505050565b606081613b2757505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115613b515780613b3b81614767565b9150613b4a9050600a8361470d565b9150613b2b565b60008167ffffffffffffffff811115613b6c57613b6c6141dc565b6040519080825280601f01601f191660200182016040528015613b96576020820181803683370190505b5090505b84156126ec57613bab600183614721565b9150613bb8600a8661492d565b613bc390603061479b565b60f81b818381518110613bd857613bd8614738565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613c12600a8661470d565b9450613b9a565b613c238383613cb1565b613c30600084848461391c565b610d885760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610c36565b60606126ec8484600085613e0b565b6001600160a01b038216613d075760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610c36565b6000818152606760205260409020546001600160a01b031615613d6c5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610c36565b6001600160a01b0382166000908152606860205260408120805460019290613d9590849061479b565b909155505060008181526067602052604080822080547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b606082471015613e835760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f60448201527f722063616c6c00000000000000000000000000000000000000000000000000006064820152608401610c36565b843b613ed15760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610c36565b600080866001600160a01b03168587604051613eed91906148a5565b60006040518083038185875af1925050503d8060008114613f2a576040519150601f19603f3d011682016040523d82523d6000602084013e613f2f565b606091505b5091509150613f3f828286613f4a565b979650505050505050565b60608315613f595750816130f1565b825115613f695782518084602001fd5b8160405162461bcd60e51b8152600401610c36919061416f565b828054613f8f9061463c565b90600052602060002090601f016020900481019282613fb15760008555613ff7565b82601f10613fca57805160ff1916838001178555613ff7565b82800160010185558215613ff7579182015b82811115613ff7578251825591602001919060010190613fdc565b50614003929150614099565b5090565b8280546140139061463c565b90600052602060002090601f0160209004810192826140355760008555613ff7565b82601f1061406c578280017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00823516178555613ff7565b82800160010185558215613ff7579182015b82811115613ff757823582559160200191906001019061407e565b5b80821115614003576000815560010161409a565b7fffffffff00000000000000000000000000000000000000000000000000000000811681146127d357600080fd5b6000602082840312156140ee57600080fd5b81356130f1816140ae565b60005b838110156141145781810151838201526020016140fc565b838111156119c65750506000910152565b6000815180845261413d8160208601602086016140f9565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b6020815260006130f16020830184614125565b60006020828403121561419457600080fd5b5035919050565b6001600160a01b03811681146127d357600080fd5b600080604083850312156141c357600080fd5b82356141ce8161419b565b946020939093013593505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff81118282101715614252576142526141dc565b604052919050565b600067ffffffffffffffff821115614274576142746141dc565b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe01660200190565b60006142b36142ae8461425a565b61420b565b90508281528383830111156142c757600080fd5b828260208301376000602084830101529392505050565b600082601f8301126142ef57600080fd5b6130f1838335602085016142a0565b60006020828403121561431057600080fd5b813567ffffffffffffffff81111561432757600080fd5b6126ec848285016142de565b60006020828403121561434557600080fd5b81356130f18161419b565b60008060006060848603121561436557600080fd5b83356143708161419b565b925060208401356143808161419b565b929592945050506040919091013590565b600080600080600080600080610100898b0312156143ae57600080fd5b883597506020890135965060408901359550606089013594506080890135935060a089013567ffffffffffffffff808211156143e957600080fd5b6143f58c838d016142de565b945060c08b013591508082111561440b57600080fd5b6144178c838d016142de565b935060e08b013591508082111561442d57600080fd5b5061443a8b828c016142de565b9150509295985092959890939650565b6000806040838503121561445d57600080fd5b50508035926020909101359150565b60008060006060848603121561448157600080fd5b8335925060208401356143808161419b565b600080602083850312156144a657600080fd5b823567ffffffffffffffff808211156144be57600080fd5b818501915085601f8301126144d257600080fd5b8135818111156144e157600080fd5b8660208285010111156144f357600080fd5b60209290920196919550909350505050565b80151581146127d357600080fd5b6000806040838503121561452657600080fd5b82356145318161419b565b9150602083013561454181614505565b809150509250929050565b6000806000806080858703121561456257600080fd5b843561456d8161419b565b9350602085013561457d8161419b565b925060408501359150606085013567ffffffffffffffff8111156145a057600080fd5b8501601f810187136145b157600080fd5b6145c0878235602084016142a0565b91505092959194509250565b600080604083850312156145df57600080fd5b8235915060208301356145418161419b565b60006020828403121561460357600080fd5b81356130f181614505565b6000806040838503121561462157600080fd5b823561462c8161419b565b915060208301356145418161419b565b600181811c9082168061465057607f821691505b6020821081141561468a577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008160001904831182151516156146d9576146d9614690565b500290565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261471c5761471c6146de565b500490565b60008282101561473357614733614690565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600060001982141561477b5761477b614690565b5060010190565b60006020828403121561479457600080fd5b5051919050565b600082198211156147ae576147ae614690565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fd5b6000602082840312156147f457600080fd5b815167ffffffffffffffff81111561480b57600080fd5b8201601f8101841361481c57600080fd5b805161482a6142ae8261425a565b81815285602083850101111561483f57600080fd5b6148508260208301602086016140f9565b95945050505050565b60006020828403121561486b57600080fd5b81516130f18161419b565b600083516148888184602088016140f9565b83519083019061489c8183602088016140f9565b01949350505050565b600082516148b78184602087016140f9565b9190910192915050565b6000602082840312156148d357600080fd5b81516130f181614505565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261382d6080830184614125565b60006020828403121561492257600080fd5b81516130f1816140ae565b60008261493c5761493c6146de565b50069056fea2646970667358221220d4ce9f229502c39450ad12a6eb5d5fb84e169b1cfa84fce8dda465be9b032f1564736f6c63430008090033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100365760003560e01c80630c870f911461003b5780633e0116101461008b575b600080fd5b6100627f000000000000000000000000615ff3becda0bb765c372d8d6e545c8b10ec9d1481565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200160405180910390f35b61009e6100993660046103f4565b6100a0565b005b60006100cb7f000000000000000000000000615ff3becda0bb765c372d8d6e545c8b10ec9d14610234565b6040517f27cfcad900000000000000000000000000000000000000000000000000000000815290915073ffffffffffffffffffffffffffffffffffffffff8216906327cfcad99061012e908c908c908c908c908c908c908c908c90600401610518565b600060405180830381600087803b15801561014857600080fd5b505af115801561015c573d6000803e3d6000fd5b50506040517ff2fde38b00000000000000000000000000000000000000000000000000000000815233600482015273ffffffffffffffffffffffffffffffffffffffff8416925063f2fde38b9150602401600060405180830381600087803b1580156101c757600080fd5b505af11580156101db573d6000803e3d6000fd5b505060405173ffffffffffffffffffffffffffffffffffffffff841681527f3754da1a98214dd62255f52efe5c8d68ba410e5c19339cc7883a5fba3df0adf29250602001905060405180910390a1505050505050505050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528260601b60148201527f5af43d82803e903d91602b57fd5bf3000000000000000000000000000000000060288201526037816000f091505073ffffffffffffffffffffffffffffffffffffffff8116610315576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f455243313136373a20637265617465206661696c656400000000000000000000604482015260640160405180910390fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600082601f83011261035a57600080fd5b813567ffffffffffffffff808211156103755761037561031a565b604051601f83017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0908116603f011681019082821181831017156103bb576103bb61031a565b816040528381528660208588010111156103d457600080fd5b836020870160208301376000602085830101528094505050505092915050565b600080600080600080600080610100898b03121561041157600080fd5b883597506020890135965060408901359550606089013594506080890135935060a089013567ffffffffffffffff8082111561044c57600080fd5b6104588c838d01610349565b945060c08b013591508082111561046e57600080fd5b61047a8c838d01610349565b935060e08b013591508082111561049057600080fd5b5061049d8b828c01610349565b9150509295985092959890939650565b6000815180845260005b818110156104d3576020818501810151868301820152016104b7565b818111156104e5576000602083870101525b50601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b60006101008a83528960208401528860408401528760608401528660808401528060a084015261054a818401876104ad565b905082810360c084015261055e81866104ad565b905082810360e084015261057281856104ad565b9b9a505050505050505050505056fea2646970667358221220bf379e531ada41857a64d6260e65bef4ee152e9a49217c5ffd98289d245c949a64736f6c63430008090033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.