Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
13992381 | 1049 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
CollectionContract
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
Yes with 1337 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "./interfaces/ICollectionContractInitializer.sol"; import "./interfaces/ICollectionFactory.sol"; import "./interfaces/IGetRoyalties.sol"; import "./interfaces/IProxyCall.sol"; import "./interfaces/ITokenCreator.sol"; import "./interfaces/ITokenCreatorPaymentAddress.sol"; import "./interfaces/IGetFees.sol"; import "./libraries/AccountMigrationLibrary.sol"; import "./libraries/ProxyCall.sol"; import "./libraries/BytesLibrary.sol"; import "./interfaces/IRoyaltyInfo.sol"; /** * @title A collection of NFTs. * @notice All NFTs from this contract are minted by the same creator. * A 10% royalty to the creator is included which may be split with collaborators. */ contract CollectionContract is ICollectionContractInitializer, IGetRoyalties, IGetFees, IRoyaltyInfo, ITokenCreator, ITokenCreatorPaymentAddress, ERC721BurnableUpgradeable { using AccountMigrationLibrary for address; using AddressUpgradeable for address; using BytesLibrary for bytes; using ProxyCall for IProxyCall; uint256 private constant ROYALTY_IN_BASIS_POINTS = 1000; uint256 private constant ROYALTY_RATIO = 10; /** * @notice The baseURI to use for the tokenURI, if undefined then `ipfs://` is used. */ string private baseURI_; /** * @dev Stores hashes minted to prevent duplicates. */ mapping(string => bool) private cidToMinted; /** * @notice The factory which was used to create this collection. * @dev This is used to read common config. */ ICollectionFactory public immutable collectionFactory; /** * @notice The tokenId of the most recently created NFT. * @dev Minting starts at tokenId 1. Each mint will use this value + 1. */ uint256 public latestTokenId; /** * @notice The max tokenId which can be minted, or 0 if there's no limit. * @dev This value may be set at any time, but once set it cannot be increased. */ uint256 public maxTokenId; /** * @notice The owner/creator of this NFT collection. */ address payable public owner; /** * @dev Stores an optional alternate address to receive creator revenue and royalty payments. * The target address may be a contract which could split or escrow payments. */ mapping(uint256 => address payable) private tokenIdToCreatorPaymentAddress; /** * @dev Tracks how many tokens have been burned, used to calc the total supply efficiently. */ uint256 private burnCounter; /** * @dev Stores a CID for each NFT. */ mapping(uint256 => string) private _tokenCIDs; event BaseURIUpdated(string baseURI); event CreatorMigrated(address indexed originalAddress, address indexed newAddress); event MaxTokenIdUpdated(uint256 indexed maxTokenId); event Minted(address indexed creator, uint256 indexed tokenId, string indexed indexedTokenCID, string tokenCID); event NFTOwnerMigrated(uint256 indexed tokenId, address indexed originalAddress, address indexed newAddress); event PaymentAddressMigrated( uint256 indexed tokenId, address indexed originalAddress, address indexed newAddress, address originalPaymentAddress, address newPaymentAddress ); event SelfDestruct(address indexed owner); event TokenCreatorPaymentAddressSet( address indexed fromPaymentAddress, address indexed toPaymentAddress, uint256 indexed tokenId ); modifier onlyOwner() { require(msg.sender == owner, "CollectionContract: Caller is not owner"); _; } modifier onlyOperator() { require(collectionFactory.rolesContract().isOperator(msg.sender), "CollectionContract: Caller is not an operator"); _; } /** * @dev The constructor for a proxy can only be used to assign immutable variables. */ constructor(address _collectionFactory) { require(_collectionFactory.isContract(), "CollectionContract: collectionFactory is not a contract"); collectionFactory = ICollectionFactory(_collectionFactory); } /** * @notice Called by the factory on creation. * @dev This may only be called once. */ function initialize( address payable _creator, string memory _name, string memory _symbol ) external initializer { require(msg.sender == address(collectionFactory), "CollectionContract: Collection must be created via the factory"); __ERC721_init_unchained(_name, _symbol); owner = _creator; } /** * @notice Allows the owner to mint an NFT defined by its metadata path. */ function mint(string memory tokenCID) public returns (uint256 tokenId) { tokenId = _mint(tokenCID); } /** * @notice Allows the owner to mint and sets approval for all for the provided operator. * @dev This can be used by creators the first time they mint an NFT to save having to issue a separate approval * transaction before starting an auction. */ function mintAndApprove(string memory tokenCID, address operator) public returns (uint256 tokenId) { tokenId = _mint(tokenCID); setApprovalForAll(operator, true); } /** * @notice Allows the owner to mint an NFT and have creator revenue/royalties sent to an alternate address. */ function mintWithCreatorPaymentAddress(string memory tokenCID, address payable tokenCreatorPaymentAddress) public returns (uint256 tokenId) { require(tokenCreatorPaymentAddress != address(0), "CollectionContract: tokenCreatorPaymentAddress is required"); tokenId = mint(tokenCID); _setTokenCreatorPaymentAddress(tokenId, tokenCreatorPaymentAddress); } /** * @notice Allows the owner to mint an NFT and have creator revenue/royalties sent to an alternate address. * Also sets approval for all for the provided operator. * @dev This can be used by creators the first time they mint an NFT to save having to issue a separate approval * transaction before starting an auction. */ function mintWithCreatorPaymentAddressAndApprove( string memory tokenCID, address payable tokenCreatorPaymentAddress, address operator ) public returns (uint256 tokenId) { tokenId = mintWithCreatorPaymentAddress(tokenCID, tokenCreatorPaymentAddress); setApprovalForAll(operator, true); } /** * @notice Allows the owner to mint an NFT and have creator revenue/royalties sent to an alternate address * which is defined by a contract call, typically a proxy contract address representing the payment terms. * @param paymentAddressFactory The contract to call which will return the address to use for payments. * @param paymentAddressCallData The call details to sent to the factory provided. */ function mintWithCreatorPaymentFactory( string memory tokenCID, address paymentAddressFactory, bytes memory paymentAddressCallData ) public returns (uint256 tokenId) { address payable tokenCreatorPaymentAddress = collectionFactory .proxyCallContract() .proxyCallAndReturnContractAddress(paymentAddressFactory, paymentAddressCallData); tokenId = mintWithCreatorPaymentAddress(tokenCID, tokenCreatorPaymentAddress); } /** * @notice Allows the owner to mint an NFT and have creator revenue/royalties sent to an alternate address * which is defined by a contract call, typically a proxy contract address representing the payment terms. * Also sets approval for all for the provided operator. * @param paymentAddressFactory The contract to call which will return the address to use for payments. * @param paymentAddressCallData The call details to sent to the factory provided. * @dev This can be used by creators the first time they mint an NFT to save having to issue a separate approval * transaction before starting an auction. */ function mintWithCreatorPaymentFactoryAndApprove( string memory tokenCID, address paymentAddressFactory, bytes memory paymentAddressCallData, address operator ) public returns (uint256 tokenId) { tokenId = mintWithCreatorPaymentFactory(tokenCID, paymentAddressFactory, paymentAddressCallData); setApprovalForAll(operator, true); } /** * @notice Allows the owner to set a max tokenID. * This provides a guarantee to collectors about the limit of this collection contract, if applicable. * @dev Once this value has been set, it may be decreased but can never be increased. */ function updateMaxTokenId(uint256 _maxTokenId) external onlyOwner { require(_maxTokenId > 0, "CollectionContract: Max token ID may not be cleared"); require(maxTokenId == 0 || _maxTokenId < maxTokenId, "CollectionContract: Max token ID may not increase"); require(latestTokenId + 1 <= _maxTokenId, "CollectionContract: Max token ID must be greater than last mint"); maxTokenId = _maxTokenId; emit MaxTokenIdUpdated(_maxTokenId); } /** * @notice Allows the owner to assign a baseURI to use for the tokenURI instead of the default `ipfs://`. */ function updateBaseURI(string calldata baseURIOverride) external onlyOwner { baseURI_ = baseURIOverride; emit BaseURIUpdated(baseURIOverride); } /** * @notice Allows the creator to burn if they currently own the NFT. */ function burn(uint256 tokenId) public override onlyOwner { super.burn(tokenId); } /** * @notice Allows the collection owner to destroy this contract only if * no NFTs have been minted yet. */ function selfDestruct() external onlyOwner { require(totalSupply() == 0, "CollectionContract: Any NFTs minted must be burned first"); emit SelfDestruct(msg.sender); selfdestruct(payable(msg.sender)); } /** * @notice Allows an NFT owner or creator and Foundation to work together in order to update the creator * to a new account and/or transfer NFTs to that account. * @param signature Message `I authorize Foundation to migrate my account to ${newAccount.address.toLowerCase()}` * signed by the original account. * @dev This will gracefully skip any NFTs that have been burned or transferred. */ function adminAccountMigration( uint256[] calldata ownedTokenIds, address originalAddress, address payable newAddress, bytes calldata signature ) public onlyOperator { originalAddress.requireAuthorizedAccountMigration(newAddress, signature); for (uint256 i = 0; i < ownedTokenIds.length; i++) { uint256 tokenId = ownedTokenIds[i]; // Check that the token exists and still is owned by the originalAddress // so that frontrunning a burn or transfer will not cause the entire tx to revert if (_exists(tokenId) && ownerOf(tokenId) == originalAddress) { _transfer(originalAddress, newAddress, tokenId); emit NFTOwnerMigrated(tokenId, originalAddress, newAddress); } } if (owner == originalAddress) { owner = newAddress; emit CreatorMigrated(originalAddress, newAddress); } } /** * @notice Allows a split recipient and Foundation to work together in order to update the payment address * to a new account. * @param signature Message `I authorize Foundation to migrate my account to ${newAccount.address.toLowerCase()}` * signed by the original account. */ function adminAccountMigrationForPaymentAddresses( uint256[] calldata paymentAddressTokenIds, address paymentAddressFactory, bytes memory paymentAddressCallData, uint256 addressLocationInCallData, address originalAddress, address payable newAddress, bytes calldata signature ) public onlyOperator { originalAddress.requireAuthorizedAccountMigration(newAddress, signature); _adminAccountRecoveryForPaymentAddresses( paymentAddressTokenIds, paymentAddressFactory, paymentAddressCallData, addressLocationInCallData, originalAddress, newAddress ); } function baseURI() external view returns (string memory) { return _baseURI(); } /** * @notice Returns an array of recipient addresses to which royalties for secondary sales should be sent. * The expected royalty amount is communicated with `getFeeBps`. */ function getFeeRecipients(uint256 id) external view returns (address payable[] memory recipients) { recipients = new address payable[](1); recipients[0] = getTokenCreatorPaymentAddress(id); } /** * @notice Returns an array of royalties to be sent for secondary sales in basis points. * The expected recipients is communicated with `getFeeRecipients`. */ function getFeeBps( uint256 /* id */ ) external pure returns (uint256[] memory feesInBasisPoints) { feesInBasisPoints = new uint256[](1); feesInBasisPoints[0] = ROYALTY_IN_BASIS_POINTS; } /** * @notice Checks if the creator has already minted a given NFT using this collection contract. */ function getHasMintedCID(string memory tokenCID) public view returns (bool) { return cidToMinted[tokenCID]; } /** * @notice Returns an array of royalties to be sent for secondary sales. */ function getRoyalties(uint256 tokenId) external view returns (address payable[] memory recipients, uint256[] memory feesInBasisPoints) { recipients = new address payable[](1); recipients[0] = getTokenCreatorPaymentAddress(tokenId); feesInBasisPoints = new uint256[](1); feesInBasisPoints[0] = ROYALTY_IN_BASIS_POINTS; } /** * @notice Returns the receiver and the amount to be sent for a secondary sale. */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount) { receiver = getTokenCreatorPaymentAddress(_tokenId); unchecked { royaltyAmount = _salePrice / ROYALTY_RATIO; } } /** * @notice Returns the creator for an NFT, which is always the collection owner. */ function tokenCreator( uint256 /* tokenId */ ) external view returns (address payable) { return owner; } /** * @notice Returns the desired payment address to be used for any transfers to the creator. * @dev The payment address may be assigned for each individual NFT, if not defined the collection owner is returned. */ function getTokenCreatorPaymentAddress(uint256 tokenId) public view returns (address payable tokenCreatorPaymentAddress) { tokenCreatorPaymentAddress = tokenIdToCreatorPaymentAddress[tokenId]; if (tokenCreatorPaymentAddress == address(0)) { tokenCreatorPaymentAddress = owner; } } /** * @notice Count of NFTs tracked by this contract. * @dev From the ERC-721 enumerable standard. */ function totalSupply() public view returns (uint256) { unchecked { return latestTokenId - burnCounter; } } function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { if ( interfaceId == type(IGetRoyalties).interfaceId || interfaceId == type(ITokenCreator).interfaceId || interfaceId == type(ITokenCreatorPaymentAddress).interfaceId || interfaceId == type(IGetFees).interfaceId || interfaceId == type(IRoyaltyInfo).interfaceId ) { return true; } return super.supportsInterface(interfaceId); } function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "CollectionContract: URI query for nonexistent token"); return string(abi.encodePacked(_baseURI(), _tokenCIDs[tokenId])); } function _mint(string memory tokenCID) private onlyOwner returns (uint256 tokenId) { require(bytes(tokenCID).length > 0, "CollectionContract: tokenCID is required"); require(!cidToMinted[tokenCID], "CollectionContract: NFT was already minted"); unchecked { tokenId = ++latestTokenId; require(maxTokenId == 0 || tokenId <= maxTokenId, "CollectionContract: Max token count has already been minted"); cidToMinted[tokenCID] = true; _tokenCIDs[tokenId] = tokenCID; _safeMint(msg.sender, tokenId, ""); emit Minted(msg.sender, tokenId, tokenCID, tokenCID); } } /** * @dev Allow setting a different address to send payments to for both primary sale revenue * and secondary sales royalties. */ function _setTokenCreatorPaymentAddress(uint256 tokenId, address payable tokenCreatorPaymentAddress) internal { emit TokenCreatorPaymentAddressSet(tokenIdToCreatorPaymentAddress[tokenId], tokenCreatorPaymentAddress, tokenId); tokenIdToCreatorPaymentAddress[tokenId] = tokenCreatorPaymentAddress; } function _burn(uint256 tokenId) internal override { delete cidToMinted[_tokenCIDs[tokenId]]; delete tokenIdToCreatorPaymentAddress[tokenId]; delete _tokenCIDs[tokenId]; unchecked { burnCounter++; } super._burn(tokenId); } /** * @dev Split into a second function to avoid stack too deep errors */ function _adminAccountRecoveryForPaymentAddresses( uint256[] calldata paymentAddressTokenIds, address paymentAddressFactory, bytes memory paymentAddressCallData, uint256 addressLocationInCallData, address originalAddress, address payable newAddress ) private { // Call the factory and get the originalPaymentAddress address payable originalPaymentAddress = collectionFactory.proxyCallContract().proxyCallAndReturnContractAddress( paymentAddressFactory, paymentAddressCallData ); // Confirm the original address and swap with the new address paymentAddressCallData.replaceAtIf(addressLocationInCallData, originalAddress, newAddress); // Call the factory and get the newPaymentAddress address payable newPaymentAddress = collectionFactory.proxyCallContract().proxyCallAndReturnContractAddress( paymentAddressFactory, paymentAddressCallData ); // For each token, confirm the expected payment address and then update to the new one for (uint256 i = 0; i < paymentAddressTokenIds.length; i++) { uint256 tokenId = paymentAddressTokenIds[i]; require( tokenIdToCreatorPaymentAddress[tokenId] == originalPaymentAddress, "CollectionContract: Payment address is not the expected value" ); _setTokenCreatorPaymentAddress(tokenId, newPaymentAddress); emit PaymentAddressMigrated(tokenId, originalAddress, newAddress, originalPaymentAddress, newPaymentAddress); } } function _baseURI() internal view override returns (string memory) { if (bytes(baseURI_).length > 0) { return baseURI_; } return "ipfs://"; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Burnable.sol) pragma solidity ^0.8.0; import "../ERC721Upgradeable.sol"; import "../../../utils/ContextUpgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @title ERC721 Burnable Token * @dev ERC721 Token that can be irreversibly burned (destroyed). */ abstract contract ERC721BurnableUpgradeable is Initializable, ContextUpgradeable, ERC721Upgradeable { function __ERC721Burnable_init() internal onlyInitializing { __Context_init_unchained(); __ERC165_init_unchained(); __ERC721Burnable_init_unchained(); } function __ERC721Burnable_init_unchained() internal onlyInitializing { } /** * @dev Burns `tokenId`. See {ERC721-_burn}. * * Requirements: * * - The caller must own `tokenId` or be an approved operator. */ function burn(uint256 tokenId) public virtual { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721Burnable: caller is not owner nor approved"); _burn(tokenId); } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.0; interface ICollectionContractInitializer { function initialize( address payable _creator, string memory _name, string memory _symbol ) external; }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.0; import "./IRoles.sol"; import "./IProxyCall.sol"; interface ICollectionFactory { function rolesContract() external returns (IRoles); function proxyCallContract() external returns (IProxyCall); }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.0; interface IGetRoyalties { function getRoyalties(uint256 tokenId) external view returns (address payable[] memory recipients, uint256[] memory feesInBasisPoints); }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.0; interface IProxyCall { function proxyCallAndReturnAddress(address externalContract, bytes calldata callData) external returns (address payable result); }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.0; interface ITokenCreator { function tokenCreator(uint256 tokenId) external view returns (address payable); }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.0; interface ITokenCreatorPaymentAddress { function getTokenCreatorPaymentAddress(uint256 tokenId) external view returns (address payable tokenCreatorPaymentAddress); }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.0; /** * @notice An interface for communicating fees to 3rd party marketplaces. * @dev Originally implemented in mainnet contract 0x44d6e8933f8271abcf253c72f9ed7e0e4c0323b3 */ interface IGetFees { function getFeeRecipients(uint256 id) external view returns (address payable[] memory); function getFeeBps(uint256 id) external view returns (uint256[] memory); }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; /** * @notice Checks for a valid signature authorizing the migration of an account to a new address. * @dev This is shared by both the NFT contracts and FNDNFTMarket, and the same signature authorizes both. */ library AccountMigrationLibrary { using ECDSA for bytes; using SignatureChecker for address; using Strings for uint256; // From https://ethereum.stackexchange.com/questions/8346/convert-address-to-string function _toAsciiString(address x) private pure returns (string memory) { bytes memory s = new bytes(42); s[0] = "0"; s[1] = "x"; for (uint256 i = 0; i < 20; i++) { bytes1 b = bytes1(uint8(uint256(uint160(x)) / (2**(8 * (19 - i))))); bytes1 hi = bytes1(uint8(b) / 16); bytes1 lo = bytes1(uint8(b) - 16 * uint8(hi)); s[2 * i + 2] = _char(hi); s[2 * i + 3] = _char(lo); } return string(s); } function _char(bytes1 b) private pure returns (bytes1 c) { if (uint8(b) < 10) return bytes1(uint8(b) + 0x30); else return bytes1(uint8(b) + 0x57); } /** * @dev Confirms the msg.sender is a Foundation operator and that the signature provided is valid. * @param signature Message `I authorize Foundation to migrate my account to ${newAccount.address.toLowerCase()}` * signed by the original account. */ function requireAuthorizedAccountMigration( address originalAddress, address newAddress, bytes memory signature ) internal view { require(originalAddress != newAddress, "AccountMigration: Cannot migrate to the same account"); bytes32 hash = abi .encodePacked("I authorize Foundation to migrate my account to ", _toAsciiString(newAddress)) .toEthSignedMessageHash(); require( originalAddress.isValidSignatureNow(hash, signature), "AccountMigration: Signature must be from the original account" ); } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/utils/AddressUpgradeable.sol"; import "../interfaces/IProxyCall.sol"; /** * @notice Forwards arbitrary calls to an external contract to be processed. * @dev This is used so that the from address of the calling contract does not have * any special permissions (e.g. ERC-20 transfer). */ library ProxyCall { using AddressUpgradeable for address payable; /** * @dev Used by other mixins to make external calls through the proxy contract. * This will fail if the proxyCall address is address(0). */ function proxyCallAndReturnContractAddress( IProxyCall proxyCall, address externalContract, bytes memory callData ) internal returns (address payable result) { result = proxyCall.proxyCallAndReturnAddress(externalContract, callData); require(result.isContract(), "ProxyCall: address returned is not a contract"); } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.0; /** * @notice A library for manipulation of byte arrays. */ library BytesLibrary { /** * @dev Replace the address at the given location in a byte array if the contents at that location * match the expected address. */ function replaceAtIf( bytes memory data, uint256 startLocation, address expectedAddress, address newAddress ) internal pure { bytes memory expectedData = abi.encodePacked(expectedAddress); bytes memory newData = abi.encodePacked(newAddress); // An address is 20 bytes long for (uint256 i = 0; i < 20; i++) { uint256 dataLocation = startLocation + i; require(data[dataLocation] == expectedData[i], "Bytes: Data provided does not include the expectedAddress"); data[dataLocation] = newData[i]; } } /** * @dev Checks if the call data starts with the given function signature. */ function startsWith(bytes memory callData, bytes4 functionSig) internal pure returns (bool) { // A signature is 4 bytes long if (callData.length < 4) { return false; } for (uint256 i = 0; i < 4; i++) { if (callData[i] != functionSig[i]) { return false; } } return true; } }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.0; /** * @notice Interface for EIP-2981: NFT Royalty Standard. * For more see: https://eips.ethereum.org/EIPS/eip-2981. */ interface IRoyaltyInfo { /// @notice Called with the sale price to determine how much royalty // is owed and to whom. /// @param _tokenId - the NFT asset queried for royalty information /// @param _salePrice - the sale price of the NFT asset specified by _tokenId /// @return receiver - address of who should be sent the royalty payment /// @return royaltyAmount - the royalty payment amount for _salePrice function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721Upgradeable.sol"; import "./IERC721ReceiverUpgradeable.sol"; import "./extensions/IERC721MetadataUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/StringsUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { __Context_init_unchained(); __ERC165_init_unchained(); __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721Upgradeable.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721Upgradeable.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721Upgradeable.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} uint256[44] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { __Context_init_unchained(); } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (proxy/utils/Initializable.sol) pragma solidity ^0.8.0; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the * initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() initializer {} * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, because in other contexts the // contract may have been reentered. require(_initializing ? _isConstructor() : !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} modifier, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721ReceiverUpgradeable { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { __ERC165_init_unchained(); } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT OR Apache-2.0 pragma solidity ^0.8.0; /** * @notice Interface for a contract which implements admin roles. */ interface IRoles { function isAdmin(address account) external view returns (bool); function isOperator(address account) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/SignatureChecker.sol) pragma solidity ^0.8.0; import "./ECDSA.sol"; import "../Address.sol"; import "../../interfaces/IERC1271.sol"; /** * @dev Signature verification helper: Provide a single mechanism to verify both private-key (EOA) ECDSA signature and * ERC1271 contract signatures. Using this instead of ECDSA.recover in your contract will make them compatible with * smart contract wallets such as Argent and Gnosis. * * Note: unlike ECDSA signatures, contract signature's are revocable, and the outcome of this function can thus change * through time. It could return true at block N and false at block N+1 (or the opposite). * * _Available since v4.1._ */ library SignatureChecker { function isValidSignatureNow( address signer, bytes32 hash, bytes memory signature ) internal view returns (bool) { (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature); if (error == ECDSA.RecoverError.NoError && recovered == signer) { return true; } (bool success, bytes memory result) = signer.staticcall( abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature) ); return (success && result.length == 32 && abi.decode(result, (bytes4)) == IERC1271.isValidSignature.selector); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) 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 // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC1271 standard signature validation method for * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]. * * _Available since v4.1._ */ interface IERC1271 { /** * @dev Should return whether the signature provided is valid for the provided data * @param hash Hash of the data to be signed * @param signature Signature byte array associated with _data */ function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue); }
{ "optimizer": { "enabled": true, "runs": 1337 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_collectionFactory","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"baseURI","type":"string"}],"name":"BaseURIUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"originalAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"CreatorMigrated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"maxTokenId","type":"uint256"}],"name":"MaxTokenIdUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"creator","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"string","name":"indexedTokenCID","type":"string"},{"indexed":false,"internalType":"string","name":"tokenCID","type":"string"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"originalAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"}],"name":"NFTOwnerMigrated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"originalAddress","type":"address"},{"indexed":true,"internalType":"address","name":"newAddress","type":"address"},{"indexed":false,"internalType":"address","name":"originalPaymentAddress","type":"address"},{"indexed":false,"internalType":"address","name":"newPaymentAddress","type":"address"}],"name":"PaymentAddressMigrated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"}],"name":"SelfDestruct","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"fromPaymentAddress","type":"address"},{"indexed":true,"internalType":"address","name":"toPaymentAddress","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"TokenCreatorPaymentAddressSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"uint256[]","name":"ownedTokenIds","type":"uint256[]"},{"internalType":"address","name":"originalAddress","type":"address"},{"internalType":"address payable","name":"newAddress","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"adminAccountMigration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"paymentAddressTokenIds","type":"uint256[]"},{"internalType":"address","name":"paymentAddressFactory","type":"address"},{"internalType":"bytes","name":"paymentAddressCallData","type":"bytes"},{"internalType":"uint256","name":"addressLocationInCallData","type":"uint256"},{"internalType":"address","name":"originalAddress","type":"address"},{"internalType":"address payable","name":"newAddress","type":"address"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"adminAccountMigrationForPaymentAddresses","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collectionFactory","outputs":[{"internalType":"contract ICollectionFactory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getFeeBps","outputs":[{"internalType":"uint256[]","name":"feesInBasisPoints","type":"uint256[]"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"getFeeRecipients","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"tokenCID","type":"string"}],"name":"getHasMintedCID","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getRoyalties","outputs":[{"internalType":"address payable[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"feesInBasisPoints","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenCreatorPaymentAddress","outputs":[{"internalType":"address payable","name":"tokenCreatorPaymentAddress","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"_creator","type":"address"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"tokenCID","type":"string"}],"name":"mint","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenCID","type":"string"},{"internalType":"address","name":"operator","type":"address"}],"name":"mintAndApprove","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenCID","type":"string"},{"internalType":"address payable","name":"tokenCreatorPaymentAddress","type":"address"}],"name":"mintWithCreatorPaymentAddress","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenCID","type":"string"},{"internalType":"address payable","name":"tokenCreatorPaymentAddress","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"mintWithCreatorPaymentAddressAndApprove","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenCID","type":"string"},{"internalType":"address","name":"paymentAddressFactory","type":"address"},{"internalType":"bytes","name":"paymentAddressCallData","type":"bytes"}],"name":"mintWithCreatorPaymentFactory","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenCID","type":"string"},{"internalType":"address","name":"paymentAddressFactory","type":"address"},{"internalType":"bytes","name":"paymentAddressCallData","type":"bytes"},{"internalType":"address","name":"operator","type":"address"}],"name":"mintWithCreatorPaymentFactoryAndApprove","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"selfDestruct","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"tokenCreator","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURIOverride","type":"string"}],"name":"updateBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxTokenId","type":"uint256"}],"name":"updateMaxTokenId","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a06040523480156200001157600080fd5b50604051620045de380380620045de8339810160408190526200003491620000e2565b62000053816001600160a01b0316620000dc60201b62001af11760201c565b620000ca5760405162461bcd60e51b815260206004820152603760248201527f436f6c6c656374696f6e436f6e74726163743a20636f6c6c656374696f6e466160448201527f63746f7279206973206e6f74206120636f6e7472616374000000000000000000606482015260840160405180910390fd5b6001600160a01b031660805262000114565b3b151590565b600060208284031215620000f557600080fd5b81516001600160a01b03811681146200010d57600080fd5b9392505050565b6080516144846200015a6000396000818161057b01528181610a8a01528181610b4b01528181610da2015281816114cf01528181612128015261219d01526144846000f3fe608060405234801561001057600080fd5b50600436106102ad5760003560e01c80637860ca2d1161017b578063b88d4fde116100d8578063d2c0fa5a1161008c578063e985e9c511610071578063e985e9c5146105c3578063ec5f752e146105ff578063fe102cda1461061257600080fd5b8063d2c0fa5a1461059d578063d85d3d27146105b057600080fd5b8063bb3bafd6116100bd578063bb3bafd614610542578063c87b56dd14610563578063cf25a2fd1461057657600080fd5b8063b88d4fde1461050f578063b9c4d9fb1461052257600080fd5b8063931688cb1161012f5780639b78fdd9116101145780639b78fdd9146104e15780639cb8a26a146104f4578063a22cb465146104fc57600080fd5b8063931688cb146104c657806395d89b41146104d957600080fd5b80638da5cb5b116101605780638da5cb5b1461049757806390657147146104aa57806391ba317a146104bd57600080fd5b80637860ca2d1461047b5780638c0e83491461048e57600080fd5b80633d78bede116102295780636352211e116101dd5780636933e79a116101c25780636933e79a1461044d5780636c0360eb1461046057806370a082311461046857600080fd5b80636352211e14610427578063686db1c21461043a57600080fd5b806342842e0e1161020e57806342842e0e146103ee57806342966c68146104015780634d6706631461041457600080fd5b80633d78bede146103bd57806340c1a064146103d057600080fd5b80630ebd4c7f1161028057806323b872dd1161026557806323b872dd1461036557806329f87c38146103785780632a55205a1461038b57600080fd5b80630ebd4c7f1461032f57806318160ddd1461034f57600080fd5b806301ffc9a7146102b257806306fdde03146102da578063081812fc146102ef578063095ea7b31461031a575b600080fd5b6102c56102c03660046136dd565b610625565b60405190151581526020015b60405180910390f35b6102e2610740565b6040516102d19190613752565b6103026102fd366004613765565b6107d2565b6040516001600160a01b0390911681526020016102d1565b61032d61032836600461379e565b61087d565b005b61034261033d366004613765565b6109af565b6040516102d19190613805565b60cf5460cb54035b6040519081526020016102d1565b61032d610373366004613818565b6109f8565b6103576103863660046138fc565b610a80565b61039e610399366004613974565b610b31565b604080516001600160a01b0390931683526020830191909152016102d1565b61032d6103cb366004613a1d565b610b49565b6103026103de366004613765565b5060cd546001600160a01b031690565b61032d6103fc366004613818565b610d0f565b61032d61040f366004613765565b610d2a565b61032d610422366004613af8565b610da0565b610302610435366004613765565b61108c565b61032d610448366004613765565b611117565b61035761045b366004613b91565b611330565b6102e2611348565b610357610476366004613be3565b611357565b610357610489366004613c00565b6113f1565b61035760cb5481565b60cd54610302906001600160a01b031681565b61032d6104b8366004613c64565b611411565b61035760cc5481565b61032d6104d4366004613cc3565b61159f565b6102e2611653565b6103576104ef366004613d05565b611662565b61032d611684565b61032d61050a366004613d9e565b611795565b61032d61051d366004613dcc565b6117a4565b610535610530366004613765565b61182c565b6040516102d19190613e71565b610555610550366004613765565b61188f565b6040516102d1929190613e84565b6102e2610571366004613765565b61192d565b6103027f000000000000000000000000000000000000000000000000000000000000000081565b6103576105ab366004613b91565b6119f8565b6103576105be366004613ea9565b611a8b565b6102c56105d1366004613ede565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b61030261060d366004613765565b611a96565b6102c5610620366004613ea9565b611ac6565b60006001600160e01b031982167fbb3bafd600000000000000000000000000000000000000000000000000000000148061068857506001600160e01b031982167f40c1a06400000000000000000000000000000000000000000000000000000000145b806106bc57506001600160e01b031982167fec5f752e00000000000000000000000000000000000000000000000000000000145b806106f057506001600160e01b031982167fb779958400000000000000000000000000000000000000000000000000000000145b8061072457506001600160e01b031982167f2a55205a00000000000000000000000000000000000000000000000000000000145b1561073157506001919050565b61073a82611af7565b92915050565b60606065805461074f90613f0c565b80601f016020809104026020016040519081016040528092919081815260200182805461077b90613f0c565b80156107c85780601f1061079d576101008083540402835291602001916107c8565b820191906000526020600020905b8154815290600101906020018083116107ab57829003601f168201915b5050505050905090565b6000818152606760205260408120546001600160a01b03166108615760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152606960205260409020546001600160a01b031690565b60006108888261108c565b9050806001600160a01b0316836001600160a01b031614156109125760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610858565b336001600160a01b038216148061092e575061092e81336105d1565b6109a05760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610858565b6109aa8383611b92565b505050565b604080516001808252818301909252606091602080830190803683370190505090506103e8816000815181106109e7576109e7613f47565b602002602001018181525050919050565b610a03335b82611c00565b610a755760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610858565b6109aa838383611d04565b600080610b1c84847f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb7e36486040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610ae8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0c9190613f5d565b6001600160a01b03169190611ed1565b9050610b2885826119f8565b95945050505050565b600080610b3d84611a96565b94600a90930493505050565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ca53b3916040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610ba9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bcd9190613f5d565b6040516336b87bd760e11b81523360048201526001600160a01b039190911690636d70f7ae90602401602060405180830381865afa158015610c13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c379190613f90565b610ca95760405162461bcd60e51b815260206004820152602d60248201527f436f6c6c656374696f6e436f6e74726163743a2043616c6c6572206973206e6f60448201527f7420616e206f70657261746f72000000000000000000000000000000000000006064820152608401610858565b610cf58383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506001600160a01b0389169392915050611fdd565b610d048989898989898961211f565b505050505050505050565b6109aa838383604051806020016040528060008152506117a4565b60cd546001600160a01b03163314610d945760405162461bcd60e51b815260206004820152602760248201527f436f6c6c656374696f6e436f6e74726163743a2043616c6c6572206973206e6f6044820152663a1037bbb732b960c91b6064820152608401610858565b610d9d81612331565b50565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ca53b3916040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610e00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e249190613f5d565b6040516336b87bd760e11b81523360048201526001600160a01b039190911690636d70f7ae90602401602060405180830381865afa158015610e6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8e9190613f90565b610f005760405162461bcd60e51b815260206004820152602d60248201527f436f6c6c656374696f6e436f6e74726163743a2043616c6c6572206973206e6f60448201527f7420616e206f70657261746f72000000000000000000000000000000000000006064820152608401610858565b610f4c8383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506001600160a01b0389169392915050611fdd565b60005b8581101561101f576000878783818110610f6b57610f6b613f47565b905060200201359050610f95816000908152606760205260409020546001600160a01b0316151590565b8015610fba5750856001600160a01b0316610faf8261108c565b6001600160a01b0316145b1561100c57610fca868683611d04565b846001600160a01b0316866001600160a01b0316827fde55f075ebd46256cd6bd57d8fb53e0406f687db372e90ae8c18e72be46f5c1660405160405180910390a45b508061101781613fc3565b915050610f4f565b5060cd546001600160a01b03858116911614156110845760cd80546001600160a01b0319166001600160a01b0385811691821790925560405190918616907fd5286a572483e672fa07ed52b04659a654cf04fe22abba157a9551857adaa68190600090a35b505050505050565b6000818152606760205260408120546001600160a01b03168061073a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610858565b60cd546001600160a01b031633146111815760405162461bcd60e51b815260206004820152602760248201527f436f6c6c656374696f6e436f6e74726163743a2043616c6c6572206973206e6f6044820152663a1037bbb732b960c91b6064820152608401610858565b600081116111f75760405162461bcd60e51b815260206004820152603360248201527f436f6c6c656374696f6e436f6e74726163743a204d617820746f6b656e20494460448201527f206d6179206e6f7420626520636c6561726564000000000000000000000000006064820152608401610858565b60cc541580611207575060cc5481105b6112795760405162461bcd60e51b815260206004820152603160248201527f436f6c6c656374696f6e436f6e74726163743a204d617820746f6b656e20494460448201527f206d6179206e6f7420696e6372656173650000000000000000000000000000006064820152608401610858565b8060cb5460016112899190613fde565b11156112fd5760405162461bcd60e51b815260206004820152603f60248201527f436f6c6c656374696f6e436f6e74726163743a204d617820746f6b656e20494460448201527f206d7573742062652067726561746572207468616e206c617374206d696e74006064820152608401610858565b60cc81905560405181907f5633fd1915094f39ec7d395ea541662e957f3fffdcaf492b661373bf00da98fd90600090a250565b600061133b836123b5565b905061073a826001611795565b6060611352612684565b905090565b60006001600160a01b0382166113d55760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610858565b506001600160a01b031660009081526068602052604090205490565b60006113fd84846119f8565b905061140a826001611795565b9392505050565b600054610100900460ff1661142c5760005460ff1615611430565b303b155b6114a25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610858565b600054610100900460ff161580156114c4576000805461ffff19166101011790555b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146115625760405162461bcd60e51b815260206004820152603e60248201527f436f6c6c656374696f6e436f6e74726163743a20436f6c6c656374696f6e206d60448201527f7573742062652063726561746564207669612074686520666163746f727900006064820152608401610858565b61156c83836126e2565b60cd80546001600160a01b0319166001600160a01b0386161790558015611599576000805461ff00191690555b50505050565b60cd546001600160a01b031633146116095760405162461bcd60e51b815260206004820152602760248201527f436f6c6c656374696f6e436f6e74726163743a2043616c6c6572206973206e6f6044820152663a1037bbb732b960c91b6064820152608401610858565b61161560c98383613584565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad8282604051611647929190613ff6565b60405180910390a15050565b60606066805461074f90613f0c565b600061166f858585610a80565b905061167c826001611795565b949350505050565b60cd546001600160a01b031633146116ee5760405162461bcd60e51b815260206004820152602760248201527f436f6c6c656374696f6e436f6e74726163743a2043616c6c6572206973206e6f6044820152663a1037bbb732b960c91b6064820152608401610858565b60cf5460cb54146117675760405162461bcd60e51b815260206004820152603860248201527f436f6c6c656374696f6e436f6e74726163743a20416e79204e465473206d696e60448201527f746564206d757374206265206275726e656420666972737400000000000000006064820152608401610858565b60405133907fd3747e9bfbfe48316cef75f276e53ab68e800a3fa1a0d4540245a64b85c2598890600090a233ff5b6117a0338383612786565b5050565b6117ae3383611c00565b6118205760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610858565b61159984848484612855565b6040805160018082528183019092526060916020808301908036833701905050905061185782611a96565b8160008151811061186a5761186a613f47565b60200260200101906001600160a01b031690816001600160a01b031681525050919050565b604080516001808252818301909252606091829190602080830190803683370190505091506118bd83611a96565b826000815181106118d0576118d0613f47565b6001600160a01b03929092166020928302919091018201526040805160018082528183019092529182810190803683370190505090506103e88160008151811061191c5761191c613f47565b602002602001018181525050915091565b6000818152606760205260409020546060906001600160a01b03166119ba5760405162461bcd60e51b815260206004820152603360248201527f436f6c6c656374696f6e436f6e74726163743a2055524920717565727920666f60448201527f72206e6f6e6578697374656e7420746f6b656e000000000000000000000000006064820152608401610858565b6119c2612684565b600083815260d0602090815260409182902091516119e2939291016140bf565b6040516020818303038152906040529050919050565b60006001600160a01b038216611a765760405162461bcd60e51b815260206004820152603a60248201527f436f6c6c656374696f6e436f6e74726163743a20746f6b656e43726561746f7260448201527f5061796d656e74416464726573732069732072657175697265640000000000006064820152608401610858565b611a7f83611a8b565b905061073a81836128de565b600061073a826123b5565b600081815260ce60205260409020546001600160a01b031680611ac1575060cd546001600160a01b03165b919050565b600060ca82604051611ad891906140dd565b9081526040519081900360200190205460ff1692915050565b3b151590565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480611b5a57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061073a57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161461073a565b600081815260696020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611bc78261108c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152606760205260408120546001600160a01b0316611c8a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610858565b6000611c958361108c565b9050806001600160a01b0316846001600160a01b03161480611cd05750836001600160a01b0316611cc5846107d2565b6001600160a01b0316145b8061167c57506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff1661167c565b826001600160a01b0316611d178261108c565b6001600160a01b031614611d935760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610858565b6001600160a01b038216611e0e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610858565b611e19600082611b92565b6001600160a01b0383166000908152606860205260408120805460019290611e429084906140f9565b90915550506001600160a01b0382166000908152606860205260408120805460019290611e70908490613fde565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6040517fa1453b0e0000000000000000000000000000000000000000000000000000000081526000906001600160a01b0385169063a1453b0e90611f1b9086908690600401614110565b6020604051808303816000875af1158015611f3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f5e9190613f5d565b90506001600160a01b0381163b61140a5760405162461bcd60e51b815260206004820152602d60248201527f50726f787943616c6c3a20616464726573732072657475726e6564206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610858565b816001600160a01b0316836001600160a01b031614156120655760405162461bcd60e51b815260206004820152603460248201527f4163636f756e744d6967726174696f6e3a2043616e6e6f74206d69677261746560448201527f20746f207468652073616d65206163636f756e740000000000000000000000006064820152608401610858565b600061209761207384612952565b6040516020016120839190614132565b604051602081830303815290604052612b1e565b90506120ad6001600160a01b0385168284612b59565b6115995760405162461bcd60e51b815260206004820152603d60248201527f4163636f756e744d6967726174696f6e3a205369676e6174757265206d75737460448201527f2062652066726f6d20746865206f726967696e616c206163636f756e740000006064820152608401610858565b600061218686867f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb7e36486040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610ae8573d6000803e3d6000fd5b905061219485858585612cd3565b60006121fb87877f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663bb7e36486040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610ae8573d6000803e3d6000fd5b905060005b888110156123255760008a8a8381811061221c5761221c613f47565b60209081029290920135600081815260ce909352604090922054919250506001600160a01b038581169116146122ba5760405162461bcd60e51b815260206004820152603d60248201527f436f6c6c656374696f6e436f6e74726163743a205061796d656e74206164647260448201527f657373206973206e6f74207468652065787065637465642076616c75650000006064820152608401610858565b6122c481846128de565b604080516001600160a01b0386811682528581166020830152808816929089169184917f806ccd3ad4c360726b134c8c9d1ce9842006fbcf915e66449802d74b608bed84910160405180910390a4508061231d81613fc3565b915050612200565b50505050505050505050565b61233a336109fd565b6123ac5760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f766564000000000000000000000000000000006064820152608401610858565b610d9d81612e81565b60cd546000906001600160a01b031633146124225760405162461bcd60e51b815260206004820152602760248201527f436f6c6c656374696f6e436f6e74726163743a2043616c6c6572206973206e6f6044820152663a1037bbb732b960c91b6064820152608401610858565b60008251116124995760405162461bcd60e51b815260206004820152602860248201527f436f6c6c656374696f6e436f6e74726163743a20746f6b656e4349442069732060448201527f72657175697265640000000000000000000000000000000000000000000000006064820152608401610858565b60ca826040516124a991906140dd565b9081526040519081900360200190205460ff161561252f5760405162461bcd60e51b815260206004820152602a60248201527f436f6c6c656374696f6e436f6e74726163743a204e46542077617320616c726560448201527f616479206d696e746564000000000000000000000000000000000000000000006064820152608401610858565b5060cb80546001019081905560cc54158061254c575060cc548111155b6125be5760405162461bcd60e51b815260206004820152603b60248201527f436f6c6c656374696f6e436f6e74726163743a204d617820746f6b656e20636f60448201527f756e742068617320616c7265616479206265656e206d696e74656400000000006064820152608401610858565b600160ca836040516125d091906140dd565b9081526040805160209281900383019020805460ff191693151593909317909255600083815260d0825291909120835161260c92850190613608565b50612627338260405180602001604052806000815250612ef4565b8160405161263591906140dd565b604051809103902081336001600160a01b03167fe2406cfd356cfbe4e42d452bde96d27f48c423e5f02b5d78695893308399519d856040516126779190613752565b60405180910390a4919050565b6060600060c9805461269590613f0c565b905011156126aa5760c9805461074f90613f0c565b5060408051808201909152600781527f697066733a2f2f00000000000000000000000000000000000000000000000000602082015290565b600054610100900460ff1661275f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610858565b8151612772906065906020850190613608565b5080516109aa906066906020840190613608565b816001600160a01b0316836001600160a01b031614156127e85760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610858565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612860848484611d04565b61286c84848484612f7d565b6115995760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610858565b600082815260ce602052604080822054905184926001600160a01b038086169316917f296490d14aadeb9208962e029edf126e34fe835b4ed9dc8c91602df4d04766959190a4600091825260ce602052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b60408051602a808252606082810190935260009190602082018180368337019050509050600360fc1b8160008151811061298e5761298e613f47565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106129d9576129d9613f47565b60200101906001600160f81b031916908160001a90535060005b6014811015612b17576000612a098260136140f9565b612a1490600861419d565b612a1f9060026142a0565b612a32906001600160a01b0387166142ac565b60f81b9050600060108260f81c612a4991906142c0565b60f81b905060008160f81c6010612a6091906142e2565b8360f81c612a6e9190614303565b60f81b9050612a7c826130ce565b85612a8886600261419d565b612a93906002613fde565b81518110612aa357612aa3613f47565b60200101906001600160f81b031916908160001a905350612ac3816130ce565b85612acf86600261419d565b612ada906003613fde565b81518110612aea57612aea613f47565b60200101906001600160f81b031916908160001a9053505050508080612b0f90613fc3565b9150506129f3565b5092915050565b6000612b2a8251613104565b82604051602001612b3c929190614326565b604051602081830303815290604052805190602001209050919050565b6000806000612b688585613202565b90925090506000816004811115612b8157612b81614381565b148015612b9f5750856001600160a01b0316826001600160a01b0316145b15612baf5760019250505061140a565b600080876001600160a01b0316631626ba7e60e01b8888604051602401612bd7929190614397565b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b0319909416939093179092529051612c2a91906140dd565b600060405180830381855afa9150503d8060008114612c65576040519150601f19603f3d011682016040523d82523d6000602084013e612c6a565b606091505b5091509150818015612c7d575080516020145b8015612cc7575080517f1626ba7e0000000000000000000000000000000000000000000000000000000090612cbb90830160209081019084016143b0565b6001600160e01b031916145b98975050505050505050565b60408051606084811b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000009081166020840152835160148185030181526034840185529185901b16605483015282516048818403018152606890920190925260005b6014811015612e78576000612d498288613fde565b9050838281518110612d5d57612d5d613f47565b602001015160f81c60f81b6001600160f81b031916888281518110612d8457612d84613f47565b01602001517fff000000000000000000000000000000000000000000000000000000000000001614612e1e5760405162461bcd60e51b815260206004820152603960248201527f42797465733a20446174612070726f766964656420646f6573206e6f7420696e60448201527f636c7564652074686520657870656374656441646472657373000000000000006064820152608401610858565b828281518110612e3057612e30613f47565b602001015160f81c60f81b888281518110612e4d57612e4d613f47565b60200101906001600160f81b031916908160001a905350508080612e7090613fc3565b915050612d34565b50505050505050565b600081815260d0602052604090819020905160ca91612e9f916143cd565b9081526040805160209281900383019020805460ff19169055600083815260ce835281812080546001600160a01b031916905560d09092528120612ee29161367c565b60cf80546001019055610d9d81613272565b612efe838361330d565b612f0b6000848484612f7d565b6109aa5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610858565b60006001600160a01b0384163b156130c657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612fc19033908990889088906004016143d9565b6020604051808303816000875af1925050508015612ffc575060408051601f3d908101601f19168201909252612ff9918101906143b0565b60015b6130ac573d80801561302a576040519150601f19603f3d011682016040523d82523d6000602084013e61302f565b606091505b5080516130a45760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610858565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061167c565b50600161167c565b6000600a60f883901c10156130f5576130ec60f883901c6030614415565b60f81b92915050565b6130ec60f883901c6057614415565b6060816131285750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613152578061313c81613fc3565b915061314b9050600a836142ac565b915061312c565b60008167ffffffffffffffff81111561316d5761316d613859565b6040519080825280601f01601f191660200182016040528015613197576020820181803683370190505b5090505b841561167c576131ac6001836140f9565b91506131b9600a8661443a565b6131c4906030613fde565b60f81b8183815181106131d9576131d9613f47565b60200101906001600160f81b031916908160001a9053506131fb600a866142ac565b945061319b565b6000808251604114156132395760208301516040840151606085015160001a61322d8782858561344f565b9450945050505061326b565b825160401415613263576020830151604084015161325886838361353c565b93509350505061326b565b506000905060025b9250929050565b600061327d8261108c565b905061328a600083611b92565b6001600160a01b03811660009081526068602052604081208054600192906132b39084906140f9565b909155505060008281526067602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166133635760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610858565b6000818152606760205260409020546001600160a01b0316156133c85760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610858565b6001600160a01b03821660009081526068602052604081208054600192906133f1908490613fde565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156134865750600090506003613533565b8460ff16601b1415801561349e57508460ff16601c14155b156134af5750600090506004613533565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613503573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661352c57600060019250925050613533565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b016135768782888561344f565b935093505050935093915050565b82805461359090613f0c565b90600052602060002090601f0160209004810192826135b257600085556135f8565b82601f106135cb5782800160ff198235161785556135f8565b828001600101855582156135f8579182015b828111156135f85782358255916020019190600101906135dd565b506136049291506136b2565b5090565b82805461361490613f0c565b90600052602060002090601f01602090048101928261363657600085556135f8565b82601f1061364f57805160ff19168380011785556135f8565b828001600101855582156135f8579182015b828111156135f8578251825591602001919060010190613661565b50805461368890613f0c565b6000825580601f10613698575050565b601f016020900490600052602060002090810190610d9d91905b5b8082111561360457600081556001016136b3565b6001600160e01b031981168114610d9d57600080fd5b6000602082840312156136ef57600080fd5b813561140a816136c7565b60005b838110156137155781810151838201526020016136fd565b838111156115995750506000910152565b6000815180845261373e8160208601602086016136fa565b601f01601f19169290920160200192915050565b60208152600061140a6020830184613726565b60006020828403121561377757600080fd5b5035919050565b6001600160a01b0381168114610d9d57600080fd5b8035611ac18161377e565b600080604083850312156137b157600080fd5b82356137bc8161377e565b946020939093013593505050565b600081518084526020808501945080840160005b838110156137fa578151875295820195908201906001016137de565b509495945050505050565b60208152600061140a60208301846137ca565b60008060006060848603121561382d57600080fd5b83356138388161377e565b925060208401356138488161377e565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261388057600080fd5b813567ffffffffffffffff8082111561389b5761389b613859565b604051601f8301601f19908116603f011681019082821181831017156138c3576138c3613859565b816040528381528660208588010111156138dc57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060006060848603121561391157600080fd5b833567ffffffffffffffff8082111561392957600080fd5b6139358783880161386f565b9450602086013591506139478261377e565b9092506040850135908082111561395d57600080fd5b5061396a8682870161386f565b9150509250925092565b6000806040838503121561398757600080fd5b50508035926020909101359150565b60008083601f8401126139a857600080fd5b50813567ffffffffffffffff8111156139c057600080fd5b6020830191508360208260051b850101111561326b57600080fd5b60008083601f8401126139ed57600080fd5b50813567ffffffffffffffff811115613a0557600080fd5b60208301915083602082850101111561326b57600080fd5b600080600080600080600080600060e08a8c031215613a3b57600080fd5b893567ffffffffffffffff80821115613a5357600080fd5b613a5f8d838e01613996565b909b50995060208c01359150613a748261377e565b90975060408b01359080821115613a8a57600080fd5b613a968d838e0161386f565b975060608c0135965060808c01359150613aaf8261377e565b819550613abe60a08d01613793565b945060c08c0135915080821115613ad457600080fd5b50613ae18c828d016139db565b915080935050809150509295985092959850929598565b60008060008060008060808789031215613b1157600080fd5b863567ffffffffffffffff80821115613b2957600080fd5b613b358a838b01613996565b909850965060208901359150613b4a8261377e565b909450604088013590613b5c8261377e565b90935060608801359080821115613b7257600080fd5b50613b7f89828a016139db565b979a9699509497509295939492505050565b60008060408385031215613ba457600080fd5b823567ffffffffffffffff811115613bbb57600080fd5b613bc78582860161386f565b9250506020830135613bd88161377e565b809150509250929050565b600060208284031215613bf557600080fd5b813561140a8161377e565b600080600060608486031215613c1557600080fd5b833567ffffffffffffffff811115613c2c57600080fd5b613c388682870161386f565b9350506020840135613c498161377e565b91506040840135613c598161377e565b809150509250925092565b600080600060608486031215613c7957600080fd5b8335613c848161377e565b9250602084013567ffffffffffffffff80821115613ca157600080fd5b613cad8783880161386f565b9350604086013591508082111561395d57600080fd5b60008060208385031215613cd657600080fd5b823567ffffffffffffffff811115613ced57600080fd5b613cf9858286016139db565b90969095509350505050565b60008060008060808587031215613d1b57600080fd5b843567ffffffffffffffff80821115613d3357600080fd5b613d3f8883890161386f565b955060208701359150613d518261377e565b90935060408601359080821115613d6757600080fd5b50613d748782880161386f565b9250506060850135613d858161377e565b939692955090935050565b8015158114610d9d57600080fd5b60008060408385031215613db157600080fd5b8235613dbc8161377e565b91506020830135613bd881613d90565b60008060008060808587031215613de257600080fd5b8435613ded8161377e565b93506020850135613dfd8161377e565b925060408501359150606085013567ffffffffffffffff811115613e2057600080fd5b613e2c8782880161386f565b91505092959194509250565b600081518084526020808501945080840160005b838110156137fa5781516001600160a01b031687529582019590820190600101613e4c565b60208152600061140a6020830184613e38565b604081526000613e976040830185613e38565b8281036020840152610b2881856137ca565b600060208284031215613ebb57600080fd5b813567ffffffffffffffff811115613ed257600080fd5b61167c8482850161386f565b60008060408385031215613ef157600080fd5b8235613efc8161377e565b91506020830135613bd88161377e565b600181811c90821680613f2057607f821691505b60208210811415613f4157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215613f6f57600080fd5b815161140a8161377e565b634e487b7160e01b600052601260045260246000fd5b600060208284031215613fa257600080fd5b815161140a81613d90565b634e487b7160e01b600052601160045260246000fd5b6000600019821415613fd757613fd7613fad565b5060010190565b60008219821115613ff157613ff1613fad565b500190565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b8054600090600181811c908083168061403f57607f831692505b602080841082141561406157634e487b7160e01b600052602260045260246000fd5b8180156140755760018114614086576140b3565b60ff198616895284890196506140b3565b60008881526020902060005b868110156140ab5781548b820152908501908301614092565b505084890196505b50505050505092915050565b600083516140d18184602088016136fa565b610b2881840185614025565b600082516140ef8184602087016136fa565b9190910192915050565b60008282101561410b5761410b613fad565b500390565b6001600160a01b038316815260406020820152600061167c6040830184613726565b7f4920617574686f72697a6520466f756e646174696f6e20746f206d696772617481527f65206d79206163636f756e7420746f20000000000000000000000000000000006020820152600082516141908160308501602087016136fa565b9190910160300192915050565b60008160001904831182151516156141b7576141b7613fad565b500290565b600181815b808511156141f75781600019048211156141dd576141dd613fad565b808516156141ea57918102915b93841c93908002906141c1565b509250929050565b60008261420e5750600161073a565b8161421b5750600061073a565b8160018114614231576002811461423b57614257565b600191505061073a565b60ff84111561424c5761424c613fad565b50506001821b61073a565b5060208310610133831016604e8410600b841016171561427a575081810a61073a565b61428483836141bc565b806000190482111561429857614298613fad565b029392505050565b600061140a83836141ff565b6000826142bb576142bb613f7a565b500490565b600060ff8316806142d3576142d3613f7a565b8060ff84160491505092915050565b600060ff821660ff84168160ff048111821515161561429857614298613fad565b600060ff821660ff84168082101561431d5761431d613fad565b90039392505050565b7f19457468657265756d205369676e6564204d6573736167653a0a00000000000081526000835161435e81601a8501602088016136fa565b83519083019061437581601a8401602088016136fa565b01601a01949350505050565b634e487b7160e01b600052602160045260246000fd5b82815260406020820152600061167c6040830184613726565b6000602082840312156143c257600080fd5b815161140a816136c7565b600061140a8284614025565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261440b6080830184613726565b9695505050505050565b600060ff821660ff84168060ff0382111561443257614432613fad565b019392505050565b60008261444957614449613f7a565b50069056fea2646970667358221220b0f3cf16a2e1022e5bac420a2aed2e97c852990c7bd58aa139670751823b1cf864736f6c634300080b00330000000000000000000000003b612a5b49e025a6e4ba4ee4fb1ef46d13588059
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102ad5760003560e01c80637860ca2d1161017b578063b88d4fde116100d8578063d2c0fa5a1161008c578063e985e9c511610071578063e985e9c5146105c3578063ec5f752e146105ff578063fe102cda1461061257600080fd5b8063d2c0fa5a1461059d578063d85d3d27146105b057600080fd5b8063bb3bafd6116100bd578063bb3bafd614610542578063c87b56dd14610563578063cf25a2fd1461057657600080fd5b8063b88d4fde1461050f578063b9c4d9fb1461052257600080fd5b8063931688cb1161012f5780639b78fdd9116101145780639b78fdd9146104e15780639cb8a26a146104f4578063a22cb465146104fc57600080fd5b8063931688cb146104c657806395d89b41146104d957600080fd5b80638da5cb5b116101605780638da5cb5b1461049757806390657147146104aa57806391ba317a146104bd57600080fd5b80637860ca2d1461047b5780638c0e83491461048e57600080fd5b80633d78bede116102295780636352211e116101dd5780636933e79a116101c25780636933e79a1461044d5780636c0360eb1461046057806370a082311461046857600080fd5b80636352211e14610427578063686db1c21461043a57600080fd5b806342842e0e1161020e57806342842e0e146103ee57806342966c68146104015780634d6706631461041457600080fd5b80633d78bede146103bd57806340c1a064146103d057600080fd5b80630ebd4c7f1161028057806323b872dd1161026557806323b872dd1461036557806329f87c38146103785780632a55205a1461038b57600080fd5b80630ebd4c7f1461032f57806318160ddd1461034f57600080fd5b806301ffc9a7146102b257806306fdde03146102da578063081812fc146102ef578063095ea7b31461031a575b600080fd5b6102c56102c03660046136dd565b610625565b60405190151581526020015b60405180910390f35b6102e2610740565b6040516102d19190613752565b6103026102fd366004613765565b6107d2565b6040516001600160a01b0390911681526020016102d1565b61032d61032836600461379e565b61087d565b005b61034261033d366004613765565b6109af565b6040516102d19190613805565b60cf5460cb54035b6040519081526020016102d1565b61032d610373366004613818565b6109f8565b6103576103863660046138fc565b610a80565b61039e610399366004613974565b610b31565b604080516001600160a01b0390931683526020830191909152016102d1565b61032d6103cb366004613a1d565b610b49565b6103026103de366004613765565b5060cd546001600160a01b031690565b61032d6103fc366004613818565b610d0f565b61032d61040f366004613765565b610d2a565b61032d610422366004613af8565b610da0565b610302610435366004613765565b61108c565b61032d610448366004613765565b611117565b61035761045b366004613b91565b611330565b6102e2611348565b610357610476366004613be3565b611357565b610357610489366004613c00565b6113f1565b61035760cb5481565b60cd54610302906001600160a01b031681565b61032d6104b8366004613c64565b611411565b61035760cc5481565b61032d6104d4366004613cc3565b61159f565b6102e2611653565b6103576104ef366004613d05565b611662565b61032d611684565b61032d61050a366004613d9e565b611795565b61032d61051d366004613dcc565b6117a4565b610535610530366004613765565b61182c565b6040516102d19190613e71565b610555610550366004613765565b61188f565b6040516102d1929190613e84565b6102e2610571366004613765565b61192d565b6103027f0000000000000000000000003b612a5b49e025a6e4ba4ee4fb1ef46d1358805981565b6103576105ab366004613b91565b6119f8565b6103576105be366004613ea9565b611a8b565b6102c56105d1366004613ede565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b61030261060d366004613765565b611a96565b6102c5610620366004613ea9565b611ac6565b60006001600160e01b031982167fbb3bafd600000000000000000000000000000000000000000000000000000000148061068857506001600160e01b031982167f40c1a06400000000000000000000000000000000000000000000000000000000145b806106bc57506001600160e01b031982167fec5f752e00000000000000000000000000000000000000000000000000000000145b806106f057506001600160e01b031982167fb779958400000000000000000000000000000000000000000000000000000000145b8061072457506001600160e01b031982167f2a55205a00000000000000000000000000000000000000000000000000000000145b1561073157506001919050565b61073a82611af7565b92915050565b60606065805461074f90613f0c565b80601f016020809104026020016040519081016040528092919081815260200182805461077b90613f0c565b80156107c85780601f1061079d576101008083540402835291602001916107c8565b820191906000526020600020905b8154815290600101906020018083116107ab57829003601f168201915b5050505050905090565b6000818152606760205260408120546001600160a01b03166108615760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000908152606960205260409020546001600160a01b031690565b60006108888261108c565b9050806001600160a01b0316836001600160a01b031614156109125760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f72000000000000000000000000000000000000000000000000000000000000006064820152608401610858565b336001600160a01b038216148061092e575061092e81336105d1565b6109a05760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610858565b6109aa8383611b92565b505050565b604080516001808252818301909252606091602080830190803683370190505090506103e8816000815181106109e7576109e7613f47565b602002602001018181525050919050565b610a03335b82611c00565b610a755760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610858565b6109aa838383611d04565b600080610b1c84847f0000000000000000000000003b612a5b49e025a6e4ba4ee4fb1ef46d135880596001600160a01b031663bb7e36486040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610ae8573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b0c9190613f5d565b6001600160a01b03169190611ed1565b9050610b2885826119f8565b95945050505050565b600080610b3d84611a96565b94600a90930493505050565b7f0000000000000000000000003b612a5b49e025a6e4ba4ee4fb1ef46d135880596001600160a01b031663ca53b3916040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610ba9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610bcd9190613f5d565b6040516336b87bd760e11b81523360048201526001600160a01b039190911690636d70f7ae90602401602060405180830381865afa158015610c13573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c379190613f90565b610ca95760405162461bcd60e51b815260206004820152602d60248201527f436f6c6c656374696f6e436f6e74726163743a2043616c6c6572206973206e6f60448201527f7420616e206f70657261746f72000000000000000000000000000000000000006064820152608401610858565b610cf58383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506001600160a01b0389169392915050611fdd565b610d048989898989898961211f565b505050505050505050565b6109aa838383604051806020016040528060008152506117a4565b60cd546001600160a01b03163314610d945760405162461bcd60e51b815260206004820152602760248201527f436f6c6c656374696f6e436f6e74726163743a2043616c6c6572206973206e6f6044820152663a1037bbb732b960c91b6064820152608401610858565b610d9d81612331565b50565b7f0000000000000000000000003b612a5b49e025a6e4ba4ee4fb1ef46d135880596001600160a01b031663ca53b3916040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610e00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e249190613f5d565b6040516336b87bd760e11b81523360048201526001600160a01b039190911690636d70f7ae90602401602060405180830381865afa158015610e6a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8e9190613f90565b610f005760405162461bcd60e51b815260206004820152602d60248201527f436f6c6c656374696f6e436f6e74726163743a2043616c6c6572206973206e6f60448201527f7420616e206f70657261746f72000000000000000000000000000000000000006064820152608401610858565b610f4c8383838080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250506001600160a01b0389169392915050611fdd565b60005b8581101561101f576000878783818110610f6b57610f6b613f47565b905060200201359050610f95816000908152606760205260409020546001600160a01b0316151590565b8015610fba5750856001600160a01b0316610faf8261108c565b6001600160a01b0316145b1561100c57610fca868683611d04565b846001600160a01b0316866001600160a01b0316827fde55f075ebd46256cd6bd57d8fb53e0406f687db372e90ae8c18e72be46f5c1660405160405180910390a45b508061101781613fc3565b915050610f4f565b5060cd546001600160a01b03858116911614156110845760cd80546001600160a01b0319166001600160a01b0385811691821790925560405190918616907fd5286a572483e672fa07ed52b04659a654cf04fe22abba157a9551857adaa68190600090a35b505050505050565b6000818152606760205260408120546001600160a01b03168061073a5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e00000000000000000000000000000000000000000000006064820152608401610858565b60cd546001600160a01b031633146111815760405162461bcd60e51b815260206004820152602760248201527f436f6c6c656374696f6e436f6e74726163743a2043616c6c6572206973206e6f6044820152663a1037bbb732b960c91b6064820152608401610858565b600081116111f75760405162461bcd60e51b815260206004820152603360248201527f436f6c6c656374696f6e436f6e74726163743a204d617820746f6b656e20494460448201527f206d6179206e6f7420626520636c6561726564000000000000000000000000006064820152608401610858565b60cc541580611207575060cc5481105b6112795760405162461bcd60e51b815260206004820152603160248201527f436f6c6c656374696f6e436f6e74726163743a204d617820746f6b656e20494460448201527f206d6179206e6f7420696e6372656173650000000000000000000000000000006064820152608401610858565b8060cb5460016112899190613fde565b11156112fd5760405162461bcd60e51b815260206004820152603f60248201527f436f6c6c656374696f6e436f6e74726163743a204d617820746f6b656e20494460448201527f206d7573742062652067726561746572207468616e206c617374206d696e74006064820152608401610858565b60cc81905560405181907f5633fd1915094f39ec7d395ea541662e957f3fffdcaf492b661373bf00da98fd90600090a250565b600061133b836123b5565b905061073a826001611795565b6060611352612684565b905090565b60006001600160a01b0382166113d55760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f2061646472657373000000000000000000000000000000000000000000006064820152608401610858565b506001600160a01b031660009081526068602052604090205490565b60006113fd84846119f8565b905061140a826001611795565b9392505050565b600054610100900460ff1661142c5760005460ff1615611430565b303b155b6114a25760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a65640000000000000000000000000000000000006064820152608401610858565b600054610100900460ff161580156114c4576000805461ffff19166101011790555b336001600160a01b037f0000000000000000000000003b612a5b49e025a6e4ba4ee4fb1ef46d1358805916146115625760405162461bcd60e51b815260206004820152603e60248201527f436f6c6c656374696f6e436f6e74726163743a20436f6c6c656374696f6e206d60448201527f7573742062652063726561746564207669612074686520666163746f727900006064820152608401610858565b61156c83836126e2565b60cd80546001600160a01b0319166001600160a01b0386161790558015611599576000805461ff00191690555b50505050565b60cd546001600160a01b031633146116095760405162461bcd60e51b815260206004820152602760248201527f436f6c6c656374696f6e436f6e74726163743a2043616c6c6572206973206e6f6044820152663a1037bbb732b960c91b6064820152608401610858565b61161560c98383613584565b507f6741b2fc379fad678116fe3d4d4b9a1a184ab53ba36b86ad0fa66340b1ab41ad8282604051611647929190613ff6565b60405180910390a15050565b60606066805461074f90613f0c565b600061166f858585610a80565b905061167c826001611795565b949350505050565b60cd546001600160a01b031633146116ee5760405162461bcd60e51b815260206004820152602760248201527f436f6c6c656374696f6e436f6e74726163743a2043616c6c6572206973206e6f6044820152663a1037bbb732b960c91b6064820152608401610858565b60cf5460cb54146117675760405162461bcd60e51b815260206004820152603860248201527f436f6c6c656374696f6e436f6e74726163743a20416e79204e465473206d696e60448201527f746564206d757374206265206275726e656420666972737400000000000000006064820152608401610858565b60405133907fd3747e9bfbfe48316cef75f276e53ab68e800a3fa1a0d4540245a64b85c2598890600090a233ff5b6117a0338383612786565b5050565b6117ae3383611c00565b6118205760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f7665640000000000000000000000000000006064820152608401610858565b61159984848484612855565b6040805160018082528183019092526060916020808301908036833701905050905061185782611a96565b8160008151811061186a5761186a613f47565b60200260200101906001600160a01b031690816001600160a01b031681525050919050565b604080516001808252818301909252606091829190602080830190803683370190505091506118bd83611a96565b826000815181106118d0576118d0613f47565b6001600160a01b03929092166020928302919091018201526040805160018082528183019092529182810190803683370190505090506103e88160008151811061191c5761191c613f47565b602002602001018181525050915091565b6000818152606760205260409020546060906001600160a01b03166119ba5760405162461bcd60e51b815260206004820152603360248201527f436f6c6c656374696f6e436f6e74726163743a2055524920717565727920666f60448201527f72206e6f6e6578697374656e7420746f6b656e000000000000000000000000006064820152608401610858565b6119c2612684565b600083815260d0602090815260409182902091516119e2939291016140bf565b6040516020818303038152906040529050919050565b60006001600160a01b038216611a765760405162461bcd60e51b815260206004820152603a60248201527f436f6c6c656374696f6e436f6e74726163743a20746f6b656e43726561746f7260448201527f5061796d656e74416464726573732069732072657175697265640000000000006064820152608401610858565b611a7f83611a8b565b905061073a81836128de565b600061073a826123b5565b600081815260ce60205260409020546001600160a01b031680611ac1575060cd546001600160a01b03165b919050565b600060ca82604051611ad891906140dd565b9081526040519081900360200190205460ff1692915050565b3b151590565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480611b5a57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b8061073a57507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b031983161461073a565b600081815260696020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611bc78261108c565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152606760205260408120546001600160a01b0316611c8a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201527f697374656e7420746f6b656e00000000000000000000000000000000000000006064820152608401610858565b6000611c958361108c565b9050806001600160a01b0316846001600160a01b03161480611cd05750836001600160a01b0316611cc5846107d2565b6001600160a01b0316145b8061167c57506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff1661167c565b826001600160a01b0316611d178261108c565b6001600160a01b031614611d935760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e00000000000000000000000000000000000000000000006064820152608401610858565b6001600160a01b038216611e0e5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610858565b611e19600082611b92565b6001600160a01b0383166000908152606860205260408120805460019290611e429084906140f9565b90915550506001600160a01b0382166000908152606860205260408120805460019290611e70908490613fde565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b6040517fa1453b0e0000000000000000000000000000000000000000000000000000000081526000906001600160a01b0385169063a1453b0e90611f1b9086908690600401614110565b6020604051808303816000875af1158015611f3a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611f5e9190613f5d565b90506001600160a01b0381163b61140a5760405162461bcd60e51b815260206004820152602d60248201527f50726f787943616c6c3a20616464726573732072657475726e6564206973206e60448201527f6f74206120636f6e7472616374000000000000000000000000000000000000006064820152608401610858565b816001600160a01b0316836001600160a01b031614156120655760405162461bcd60e51b815260206004820152603460248201527f4163636f756e744d6967726174696f6e3a2043616e6e6f74206d69677261746560448201527f20746f207468652073616d65206163636f756e740000000000000000000000006064820152608401610858565b600061209761207384612952565b6040516020016120839190614132565b604051602081830303815290604052612b1e565b90506120ad6001600160a01b0385168284612b59565b6115995760405162461bcd60e51b815260206004820152603d60248201527f4163636f756e744d6967726174696f6e3a205369676e6174757265206d75737460448201527f2062652066726f6d20746865206f726967696e616c206163636f756e740000006064820152608401610858565b600061218686867f0000000000000000000000003b612a5b49e025a6e4ba4ee4fb1ef46d135880596001600160a01b031663bb7e36486040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610ae8573d6000803e3d6000fd5b905061219485858585612cd3565b60006121fb87877f0000000000000000000000003b612a5b49e025a6e4ba4ee4fb1ef46d135880596001600160a01b031663bb7e36486040518163ffffffff1660e01b81526004016020604051808303816000875af1158015610ae8573d6000803e3d6000fd5b905060005b888110156123255760008a8a8381811061221c5761221c613f47565b60209081029290920135600081815260ce909352604090922054919250506001600160a01b038581169116146122ba5760405162461bcd60e51b815260206004820152603d60248201527f436f6c6c656374696f6e436f6e74726163743a205061796d656e74206164647260448201527f657373206973206e6f74207468652065787065637465642076616c75650000006064820152608401610858565b6122c481846128de565b604080516001600160a01b0386811682528581166020830152808816929089169184917f806ccd3ad4c360726b134c8c9d1ce9842006fbcf915e66449802d74b608bed84910160405180910390a4508061231d81613fc3565b915050612200565b50505050505050505050565b61233a336109fd565b6123ac5760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f766564000000000000000000000000000000006064820152608401610858565b610d9d81612e81565b60cd546000906001600160a01b031633146124225760405162461bcd60e51b815260206004820152602760248201527f436f6c6c656374696f6e436f6e74726163743a2043616c6c6572206973206e6f6044820152663a1037bbb732b960c91b6064820152608401610858565b60008251116124995760405162461bcd60e51b815260206004820152602860248201527f436f6c6c656374696f6e436f6e74726163743a20746f6b656e4349442069732060448201527f72657175697265640000000000000000000000000000000000000000000000006064820152608401610858565b60ca826040516124a991906140dd565b9081526040519081900360200190205460ff161561252f5760405162461bcd60e51b815260206004820152602a60248201527f436f6c6c656374696f6e436f6e74726163743a204e46542077617320616c726560448201527f616479206d696e746564000000000000000000000000000000000000000000006064820152608401610858565b5060cb80546001019081905560cc54158061254c575060cc548111155b6125be5760405162461bcd60e51b815260206004820152603b60248201527f436f6c6c656374696f6e436f6e74726163743a204d617820746f6b656e20636f60448201527f756e742068617320616c7265616479206265656e206d696e74656400000000006064820152608401610858565b600160ca836040516125d091906140dd565b9081526040805160209281900383019020805460ff191693151593909317909255600083815260d0825291909120835161260c92850190613608565b50612627338260405180602001604052806000815250612ef4565b8160405161263591906140dd565b604051809103902081336001600160a01b03167fe2406cfd356cfbe4e42d452bde96d27f48c423e5f02b5d78695893308399519d856040516126779190613752565b60405180910390a4919050565b6060600060c9805461269590613f0c565b905011156126aa5760c9805461074f90613f0c565b5060408051808201909152600781527f697066733a2f2f00000000000000000000000000000000000000000000000000602082015290565b600054610100900460ff1661275f5760405162461bcd60e51b815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610858565b8151612772906065906020850190613608565b5080516109aa906066906020840190613608565b816001600160a01b0316836001600160a01b031614156127e85760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610858565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612860848484611d04565b61286c84848484612f7d565b6115995760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610858565b600082815260ce602052604080822054905184926001600160a01b038086169316917f296490d14aadeb9208962e029edf126e34fe835b4ed9dc8c91602df4d04766959190a4600091825260ce602052604090912080546001600160a01b0319166001600160a01b03909216919091179055565b60408051602a808252606082810190935260009190602082018180368337019050509050600360fc1b8160008151811061298e5761298e613f47565b60200101906001600160f81b031916908160001a9053507f7800000000000000000000000000000000000000000000000000000000000000816001815181106129d9576129d9613f47565b60200101906001600160f81b031916908160001a90535060005b6014811015612b17576000612a098260136140f9565b612a1490600861419d565b612a1f9060026142a0565b612a32906001600160a01b0387166142ac565b60f81b9050600060108260f81c612a4991906142c0565b60f81b905060008160f81c6010612a6091906142e2565b8360f81c612a6e9190614303565b60f81b9050612a7c826130ce565b85612a8886600261419d565b612a93906002613fde565b81518110612aa357612aa3613f47565b60200101906001600160f81b031916908160001a905350612ac3816130ce565b85612acf86600261419d565b612ada906003613fde565b81518110612aea57612aea613f47565b60200101906001600160f81b031916908160001a9053505050508080612b0f90613fc3565b9150506129f3565b5092915050565b6000612b2a8251613104565b82604051602001612b3c929190614326565b604051602081830303815290604052805190602001209050919050565b6000806000612b688585613202565b90925090506000816004811115612b8157612b81614381565b148015612b9f5750856001600160a01b0316826001600160a01b0316145b15612baf5760019250505061140a565b600080876001600160a01b0316631626ba7e60e01b8888604051602401612bd7929190614397565b60408051601f198184030181529181526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166001600160e01b0319909416939093179092529051612c2a91906140dd565b600060405180830381855afa9150503d8060008114612c65576040519150601f19603f3d011682016040523d82523d6000602084013e612c6a565b606091505b5091509150818015612c7d575080516020145b8015612cc7575080517f1626ba7e0000000000000000000000000000000000000000000000000000000090612cbb90830160209081019084016143b0565b6001600160e01b031916145b98975050505050505050565b60408051606084811b7fffffffffffffffffffffffffffffffffffffffff0000000000000000000000009081166020840152835160148185030181526034840185529185901b16605483015282516048818403018152606890920190925260005b6014811015612e78576000612d498288613fde565b9050838281518110612d5d57612d5d613f47565b602001015160f81c60f81b6001600160f81b031916888281518110612d8457612d84613f47565b01602001517fff000000000000000000000000000000000000000000000000000000000000001614612e1e5760405162461bcd60e51b815260206004820152603960248201527f42797465733a20446174612070726f766964656420646f6573206e6f7420696e60448201527f636c7564652074686520657870656374656441646472657373000000000000006064820152608401610858565b828281518110612e3057612e30613f47565b602001015160f81c60f81b888281518110612e4d57612e4d613f47565b60200101906001600160f81b031916908160001a905350508080612e7090613fc3565b915050612d34565b50505050505050565b600081815260d0602052604090819020905160ca91612e9f916143cd565b9081526040805160209281900383019020805460ff19169055600083815260ce835281812080546001600160a01b031916905560d09092528120612ee29161367c565b60cf80546001019055610d9d81613272565b612efe838361330d565b612f0b6000848484612f7d565b6109aa5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610858565b60006001600160a01b0384163b156130c657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612fc19033908990889088906004016143d9565b6020604051808303816000875af1925050508015612ffc575060408051601f3d908101601f19168201909252612ff9918101906143b0565b60015b6130ac573d80801561302a576040519150601f19603f3d011682016040523d82523d6000602084013e61302f565b606091505b5080516130a45760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e74657200000000000000000000000000006064820152608401610858565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061167c565b50600161167c565b6000600a60f883901c10156130f5576130ec60f883901c6030614415565b60f81b92915050565b6130ec60f883901c6057614415565b6060816131285750506040805180820190915260018152600360fc1b602082015290565b8160005b8115613152578061313c81613fc3565b915061314b9050600a836142ac565b915061312c565b60008167ffffffffffffffff81111561316d5761316d613859565b6040519080825280601f01601f191660200182016040528015613197576020820181803683370190505b5090505b841561167c576131ac6001836140f9565b91506131b9600a8661443a565b6131c4906030613fde565b60f81b8183815181106131d9576131d9613f47565b60200101906001600160f81b031916908160001a9053506131fb600a866142ac565b945061319b565b6000808251604114156132395760208301516040840151606085015160001a61322d8782858561344f565b9450945050505061326b565b825160401415613263576020830151604084015161325886838361353c565b93509350505061326b565b506000905060025b9250929050565b600061327d8261108c565b905061328a600083611b92565b6001600160a01b03811660009081526068602052604081208054600192906132b39084906140f9565b909155505060008281526067602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6001600160a01b0382166133635760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610858565b6000818152606760205260409020546001600160a01b0316156133c85760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610858565b6001600160a01b03821660009081526068602052604081208054600192906133f1908490613fde565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08311156134865750600090506003613533565b8460ff16601b1415801561349e57508460ff16601c14155b156134af5750600090506004613533565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613503573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b03811661352c57600060019250925050613533565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b016135768782888561344f565b935093505050935093915050565b82805461359090613f0c565b90600052602060002090601f0160209004810192826135b257600085556135f8565b82601f106135cb5782800160ff198235161785556135f8565b828001600101855582156135f8579182015b828111156135f85782358255916020019190600101906135dd565b506136049291506136b2565b5090565b82805461361490613f0c565b90600052602060002090601f01602090048101928261363657600085556135f8565b82601f1061364f57805160ff19168380011785556135f8565b828001600101855582156135f8579182015b828111156135f8578251825591602001919060010190613661565b50805461368890613f0c565b6000825580601f10613698575050565b601f016020900490600052602060002090810190610d9d91905b5b8082111561360457600081556001016136b3565b6001600160e01b031981168114610d9d57600080fd5b6000602082840312156136ef57600080fd5b813561140a816136c7565b60005b838110156137155781810151838201526020016136fd565b838111156115995750506000910152565b6000815180845261373e8160208601602086016136fa565b601f01601f19169290920160200192915050565b60208152600061140a6020830184613726565b60006020828403121561377757600080fd5b5035919050565b6001600160a01b0381168114610d9d57600080fd5b8035611ac18161377e565b600080604083850312156137b157600080fd5b82356137bc8161377e565b946020939093013593505050565b600081518084526020808501945080840160005b838110156137fa578151875295820195908201906001016137de565b509495945050505050565b60208152600061140a60208301846137ca565b60008060006060848603121561382d57600080fd5b83356138388161377e565b925060208401356138488161377e565b929592945050506040919091013590565b634e487b7160e01b600052604160045260246000fd5b600082601f83011261388057600080fd5b813567ffffffffffffffff8082111561389b5761389b613859565b604051601f8301601f19908116603f011681019082821181831017156138c3576138c3613859565b816040528381528660208588010111156138dc57600080fd5b836020870160208301376000602085830101528094505050505092915050565b60008060006060848603121561391157600080fd5b833567ffffffffffffffff8082111561392957600080fd5b6139358783880161386f565b9450602086013591506139478261377e565b9092506040850135908082111561395d57600080fd5b5061396a8682870161386f565b9150509250925092565b6000806040838503121561398757600080fd5b50508035926020909101359150565b60008083601f8401126139a857600080fd5b50813567ffffffffffffffff8111156139c057600080fd5b6020830191508360208260051b850101111561326b57600080fd5b60008083601f8401126139ed57600080fd5b50813567ffffffffffffffff811115613a0557600080fd5b60208301915083602082850101111561326b57600080fd5b600080600080600080600080600060e08a8c031215613a3b57600080fd5b893567ffffffffffffffff80821115613a5357600080fd5b613a5f8d838e01613996565b909b50995060208c01359150613a748261377e565b90975060408b01359080821115613a8a57600080fd5b613a968d838e0161386f565b975060608c0135965060808c01359150613aaf8261377e565b819550613abe60a08d01613793565b945060c08c0135915080821115613ad457600080fd5b50613ae18c828d016139db565b915080935050809150509295985092959850929598565b60008060008060008060808789031215613b1157600080fd5b863567ffffffffffffffff80821115613b2957600080fd5b613b358a838b01613996565b909850965060208901359150613b4a8261377e565b909450604088013590613b5c8261377e565b90935060608801359080821115613b7257600080fd5b50613b7f89828a016139db565b979a9699509497509295939492505050565b60008060408385031215613ba457600080fd5b823567ffffffffffffffff811115613bbb57600080fd5b613bc78582860161386f565b9250506020830135613bd88161377e565b809150509250929050565b600060208284031215613bf557600080fd5b813561140a8161377e565b600080600060608486031215613c1557600080fd5b833567ffffffffffffffff811115613c2c57600080fd5b613c388682870161386f565b9350506020840135613c498161377e565b91506040840135613c598161377e565b809150509250925092565b600080600060608486031215613c7957600080fd5b8335613c848161377e565b9250602084013567ffffffffffffffff80821115613ca157600080fd5b613cad8783880161386f565b9350604086013591508082111561395d57600080fd5b60008060208385031215613cd657600080fd5b823567ffffffffffffffff811115613ced57600080fd5b613cf9858286016139db565b90969095509350505050565b60008060008060808587031215613d1b57600080fd5b843567ffffffffffffffff80821115613d3357600080fd5b613d3f8883890161386f565b955060208701359150613d518261377e565b90935060408601359080821115613d6757600080fd5b50613d748782880161386f565b9250506060850135613d858161377e565b939692955090935050565b8015158114610d9d57600080fd5b60008060408385031215613db157600080fd5b8235613dbc8161377e565b91506020830135613bd881613d90565b60008060008060808587031215613de257600080fd5b8435613ded8161377e565b93506020850135613dfd8161377e565b925060408501359150606085013567ffffffffffffffff811115613e2057600080fd5b613e2c8782880161386f565b91505092959194509250565b600081518084526020808501945080840160005b838110156137fa5781516001600160a01b031687529582019590820190600101613e4c565b60208152600061140a6020830184613e38565b604081526000613e976040830185613e38565b8281036020840152610b2881856137ca565b600060208284031215613ebb57600080fd5b813567ffffffffffffffff811115613ed257600080fd5b61167c8482850161386f565b60008060408385031215613ef157600080fd5b8235613efc8161377e565b91506020830135613bd88161377e565b600181811c90821680613f2057607f821691505b60208210811415613f4157634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b600060208284031215613f6f57600080fd5b815161140a8161377e565b634e487b7160e01b600052601260045260246000fd5b600060208284031215613fa257600080fd5b815161140a81613d90565b634e487b7160e01b600052601160045260246000fd5b6000600019821415613fd757613fd7613fad565b5060010190565b60008219821115613ff157613ff1613fad565b500190565b60208152816020820152818360408301376000818301604090810191909152601f909201601f19160101919050565b8054600090600181811c908083168061403f57607f831692505b602080841082141561406157634e487b7160e01b600052602260045260246000fd5b8180156140755760018114614086576140b3565b60ff198616895284890196506140b3565b60008881526020902060005b868110156140ab5781548b820152908501908301614092565b505084890196505b50505050505092915050565b600083516140d18184602088016136fa565b610b2881840185614025565b600082516140ef8184602087016136fa565b9190910192915050565b60008282101561410b5761410b613fad565b500390565b6001600160a01b038316815260406020820152600061167c6040830184613726565b7f4920617574686f72697a6520466f756e646174696f6e20746f206d696772617481527f65206d79206163636f756e7420746f20000000000000000000000000000000006020820152600082516141908160308501602087016136fa565b9190910160300192915050565b60008160001904831182151516156141b7576141b7613fad565b500290565b600181815b808511156141f75781600019048211156141dd576141dd613fad565b808516156141ea57918102915b93841c93908002906141c1565b509250929050565b60008261420e5750600161073a565b8161421b5750600061073a565b8160018114614231576002811461423b57614257565b600191505061073a565b60ff84111561424c5761424c613fad565b50506001821b61073a565b5060208310610133831016604e8410600b841016171561427a575081810a61073a565b61428483836141bc565b806000190482111561429857614298613fad565b029392505050565b600061140a83836141ff565b6000826142bb576142bb613f7a565b500490565b600060ff8316806142d3576142d3613f7a565b8060ff84160491505092915050565b600060ff821660ff84168160ff048111821515161561429857614298613fad565b600060ff821660ff84168082101561431d5761431d613fad565b90039392505050565b7f19457468657265756d205369676e6564204d6573736167653a0a00000000000081526000835161435e81601a8501602088016136fa565b83519083019061437581601a8401602088016136fa565b01601a01949350505050565b634e487b7160e01b600052602160045260246000fd5b82815260406020820152600061167c6040830184613726565b6000602082840312156143c257600080fd5b815161140a816136c7565b600061140a8284614025565b60006001600160a01b0380871683528086166020840152508360408301526080606083015261440b6080830184613726565b9695505050505050565b600060ff821660ff84168060ff0382111561443257614432613fad565b019392505050565b60008261444957614449613f7a565b50069056fea2646970667358221220b0f3cf16a2e1022e5bac420a2aed2e97c852990c7bd58aa139670751823b1cf864736f6c634300080b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000003b612a5b49e025a6e4ba4ee4fb1ef46d13588059
-----Decoded View---------------
Arg [0] : _collectionFactory (address): 0x3B612a5B49e025a6e4bA4eE4FB1EF46D13588059
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000003b612a5b49e025a6e4ba4ee4fb1ef46d13588059
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ 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.