Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 15225873 | 849 days ago | IN | 0 ETH | 0.126492 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
This contract may be a proxy contract. Click on More Options and select Is this a proxy? to confirm and enable the "Read as Proxy" & "Write as Proxy" tabs.
Contract Name:
NiftyERC721Token
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 1500 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; // ,|||||< ~|||||' `_+7ykKD%RDqmI*~` // 8@@@@@@8' `Q@@@@@` `^oB@@@@@@@@@@@@@@@@@R|` // !@@@@@@@@Q; L@@@@@J '}Q@@@@@@QqonzJfk8@@@@@@@Q, // Q@@@@@@@@@@j `Q@@@@Q` `m@@@@@@h^` `?Q@@@@@* // =@@@@@@@@@@@@D. 7@@@@@i ~Q@@@@@w' ^@@@@@* // Q@@@@@m@@@@@@@Q! `@@@@@Q ;@@@@@@; .txxxx: // |@@@@@u *@@@@@@@@z u@@@@@* `Q@@@@@^ // `Q@@@@Q` 'W@@@@@@@R.'@@@@@B 7@@@@@% :DDDDDDDDDDDDDD5 // c@@@@@7 `Z@@@@@@@QK@@@@@+ 6@@@@@K aQQQQQQQ@@@@@@@* // `@@@@@Q` ^Q@@@@@@@@@@@W j@@@@@@; ,6@@@@@@# // t@@@@@L ,8@@@@@@@@@@! 'Q@@@@@@u, .=A@@@@@@@@^ // .@@@@@Q }@@@@@@@@D 'd@@@@@@@@gUwwU%Q@@@@@@@@@@g // j@@@@@< +@@@@@@@; ;wQ@@@@@@@@@@@@@@@Wf;8@@@; // ~;;;;; .;;;;;~ '!Lx5mEEmyt|!' ;;;~ // // Powered By: @niftygateway // Author: @niftynathang // Collaborators: @conviction_1 // @stormihoebe // @smatthewenglish // @dccockfoster // @blainemalone import "./ERC721Omnibus.sol"; import "../interfaces/IERC2309.sol"; import "../interfaces/IERC721MetadataGenerator.sol"; import "../interfaces/IERC721DefaultOwnerCloneable.sol"; import "../structs/NiftyType.sol"; import "../utils/Ownable.sol"; import "../utils/Signable.sol"; import "../utils/Withdrawable.sol"; import "../utils/Royalties.sol"; contract NiftyERC721Token is ERC721Omnibus, Royalties, Signable, Withdrawable, Ownable, IERC2309 { using Address for address; event NiftyTypeCreated(address indexed contractAddress, uint256 niftyType, uint256 idFirst, uint256 idLast); uint256 constant internal MAX_INT = 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff; // A pointer to a contract that can generate token URI/metadata IERC721MetadataGenerator internal metadataGenerator; // Used to determine next nifty type/token ids to create on a mint call NiftyType internal lastNiftyType; // Sorted array of NiftyType definitions - ordered to allow binary searching NiftyType[] internal niftyTypes; // Mapping from Nifty type to IPFS hash of canonical artifact file. mapping(uint256 => string) private niftyTypeIPFSHashes; constructor() { } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Omnibus, Royalties, NiftyPermissions) returns (bool) { return interfaceId == type(IERC2309).interfaceId || super.supportsInterface(interfaceId); } function setMetadataGenerator(address metadataGenerator_) external { _requireOnlyValidSender(); if(metadataGenerator_ == address(0)) { metadataGenerator = IERC721MetadataGenerator(metadataGenerator_); } else { require(IERC165(metadataGenerator_).supportsInterface(type(IERC721MetadataGenerator).interfaceId), "Invalid Metadata Generator"); metadataGenerator = IERC721MetadataGenerator(metadataGenerator_); } } function finalizeContract() external { _requireOnlyValidSender(); require(!collectionStatus.isContractFinalized, ERROR_CONTRACT_IS_FINALIZED); collectionStatus.isContractFinalized = true; } function tokenURI(uint256 tokenId) public virtual view override returns (string memory) { if(address(metadataGenerator) == address(0)) { return super.tokenURI(tokenId); } else { require(_exists(tokenId), ERROR_QUERY_FOR_NONEXISTENT_TOKEN); return metadataGenerator.tokenMetadata(tokenId, _getNiftyType(tokenId), bytes("")); } } function contractURI() public virtual view override returns (string memory) { if(address(metadataGenerator) == address(0)) { return super.contractURI(); } else { return metadataGenerator.contractMetadata(); } } function tokenIPFSHash(uint256 tokenId) external view returns (string memory) { require(_exists(tokenId), ERROR_QUERY_FOR_NONEXISTENT_TOKEN); return niftyTypeIPFSHashes[_getNiftyType(tokenId)]; } function setIPFSHash(uint256 niftyType, string memory ipfsHash) external { _requireOnlyValidSender(); require(bytes(niftyTypeIPFSHashes[niftyType]).length == 0, "ERC721Metadata: IPFS hash already set"); niftyTypeIPFSHashes[niftyType] = ipfsHash; } function mint(uint256[] calldata amounts, string[] calldata ipfsHashes) external { _requireOnlyValidSender(); require(amounts.length > 0 && ipfsHashes.length > 0, ERROR_INPUT_ARRAY_EMPTY); require(amounts.length == ipfsHashes.length, ERROR_INPUT_ARRAY_SIZE_MISMATCH); address to = collectionStatus.defaultOwner; require(to != address(0), ERROR_TRANSFER_TO_ZERO_ADDRESS); require(!collectionStatus.isContractFinalized, ERROR_CONTRACT_IS_FINALIZED); uint88 initialIdLast = lastNiftyType.idLast; uint72 nextNiftyType = lastNiftyType.niftyType; uint88 nextIdCounter = initialIdLast + 1; uint88 firstNewTokenId = nextIdCounter; uint88 lastIdCounter = 0; for(uint256 i = 0; i < amounts.length; i++) { require(amounts[i] > 0, ERROR_NO_TOKENS_MINTED); uint88 amount = uint88(amounts[i]); lastIdCounter = nextIdCounter + amount - 1; nextNiftyType++; if(bytes(ipfsHashes[i]).length > 0) { niftyTypeIPFSHashes[nextNiftyType] = ipfsHashes[i]; } niftyTypes.push(NiftyType({ isMinted: true, niftyType: nextNiftyType, idFirst: nextIdCounter, idLast: lastIdCounter })); emit NiftyTypeCreated(address(this), nextNiftyType, nextIdCounter, lastIdCounter); nextIdCounter += amount; } uint256 newlyMinted = lastIdCounter - initialIdLast; balances[to] += newlyMinted; lastNiftyType.niftyType = nextNiftyType; lastNiftyType.idLast = lastIdCounter; collectionStatus.amountCreated += uint88(newlyMinted); emit ConsecutiveTransfer(firstNewTokenId, lastIdCounter, address(0), to); } function setBaseURI(string calldata uri) external { _requireOnlyValidSender(); _setBaseURI(uri); } function exists(uint256 tokenId) public view returns (bool) { return _exists(tokenId); } function burn(uint256 tokenId) public { _burn(tokenId); } function burnBatch(uint256[] calldata tokenIds) public { require(tokenIds.length > 0, ERROR_INPUT_ARRAY_EMPTY); for(uint256 i = 0; i < tokenIds.length; i++) { _burn(tokenIds[i]); } } function getNiftyTypes() public view returns (NiftyType[] memory) { return niftyTypes; } function getNiftyTypeDetails(uint256 niftyType) public view returns (NiftyType memory) { uint256 niftyTypeIndex = MAX_INT; unchecked { niftyTypeIndex = niftyType - 1; } if(niftyTypeIndex >= niftyTypes.length) { revert('Nifty Type Does Not Exist'); } return niftyTypes[niftyTypeIndex]; } function _isValidTokenId(uint256 tokenId) internal virtual view override returns (bool) { return tokenId > 0 && tokenId <= collectionStatus.amountCreated; } // Performs a binary search of the nifty types array to find which nifty type a token id is associated with // This is more efficient than iterating the entire nifty type array until the proper entry is found. // This is O(log n) instead of O(n) function _getNiftyType(uint256 tokenId) internal virtual override view returns (uint256) { uint256 min = 0; uint256 max = niftyTypes.length - 1; uint256 guess = (max - min) / 2; while(guess < niftyTypes.length) { NiftyType storage guessResult = niftyTypes[guess]; if(tokenId >= guessResult.idFirst && tokenId <= guessResult.idLast) { return guessResult.niftyType; } else if(tokenId > guessResult.idLast) { min = guess + 1; guess = min + (max - min) / 2; } else if(tokenId < guessResult.idFirst) { max = guess - 1; guess = min + (max - min) / 2; } } return 0; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./ERC721.sol"; import "../interfaces/IERC721DefaultOwnerCloneable.sol"; abstract contract ERC721Omnibus is ERC721, IERC721DefaultOwnerCloneable { struct TokenOwner { bool transferred; address ownerAddress; } struct CollectionStatus { bool isContractFinalized; // 1 byte uint88 amountCreated; // 11 bytes address defaultOwner; // 20 bytes } // Only allow Nifty Entity to be initialized once bool internal initializedDefaultOwner; CollectionStatus internal collectionStatus; // Mapping from token ID to owner address mapping(uint256 => TokenOwner) internal ownersOptimized; function initializeDefaultOwner(address defaultOwner_) public { require(!initializedDefaultOwner, ERROR_REINITIALIZATION_NOT_PERMITTED); collectionStatus.defaultOwner = defaultOwner_; initializedDefaultOwner = true; } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721, IERC165) returns (bool) { return interfaceId == type(IERC721DefaultOwnerCloneable).interfaceId || super.supportsInterface(interfaceId); } function getCollectionStatus() public view virtual returns (CollectionStatus memory) { return collectionStatus; } function ownerOf(uint256 tokenId) public view virtual override returns (address owner) { require(_isValidTokenId(tokenId), ERROR_QUERY_FOR_NONEXISTENT_TOKEN); owner = ownersOptimized[tokenId].transferred ? ownersOptimized[tokenId].ownerAddress : collectionStatus.defaultOwner; require(owner != address(0), ERROR_QUERY_FOR_NONEXISTENT_TOKEN); } function _exists(uint256 tokenId) internal view virtual override returns (bool) { if(_isValidTokenId(tokenId)) { return ownersOptimized[tokenId].ownerAddress != address(0) || !ownersOptimized[tokenId].transferred; } return false; } function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual override returns (address owner, bool isApprovedOrOwner) { owner = ownerOf(tokenId); isApprovedOrOwner = (spender == owner || tokenApprovals[tokenId] == spender || isApprovedForAll(owner, spender)); } function _clearOwnership(uint256 tokenId) internal virtual override { ownersOptimized[tokenId].transferred = true; ownersOptimized[tokenId].ownerAddress = address(0); } function _setOwnership(address to, uint256 tokenId) internal virtual override { ownersOptimized[tokenId].transferred = true; ownersOptimized[tokenId].ownerAddress = to; } function _isValidTokenId(uint256 /*tokenId*/) internal virtual view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; /** * @dev Interface of the ERC2309 standard as defined in the EIP. */ interface IERC2309 { /** * @dev Emitted when consecutive token ids in range ('fromTokenId') to ('toTokenId') are transferred from one account (`fromAddress`) to * another (`toAddress`). * * Note that `value` may be zero. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed fromAddress, address indexed toAddress); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./IERC165.sol"; interface IERC721MetadataGenerator is IERC165 { function contractMetadata() external view returns (string memory); function tokenMetadata(uint256 tokenId, uint256 niftyType, bytes calldata data) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./IERC165.sol"; interface IERC721DefaultOwnerCloneable is IERC165 { function initializeDefaultOwner(address defaultOwner_) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; struct NiftyType { bool isMinted; // 1 bytes uint72 niftyType; // 9 bytes uint88 idFirst; // 11 bytes uint88 idLast; // 11 bytes }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./NiftyPermissions.sol"; abstract contract Ownable is NiftyPermissions { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); function owner() public view virtual returns (address) { return _owner; } function transferOwnership(address newOwner) public virtual { _requireOnlyValidSender(); address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./NiftyPermissions.sol"; import "../libraries/ECDSA.sol"; import "../structs/SignatureStatus.sol"; abstract contract Signable is NiftyPermissions { event ContractSigned(address signer, bytes32 data, bytes signature); SignatureStatus public signatureStatus; bytes public signature; string internal constant ERROR_CONTRACT_ALREADY_SIGNED = "Contract already signed"; string internal constant ERROR_CONTRACT_NOT_SALTED = "Contract not salted"; string internal constant ERROR_INCORRECT_SECRET_SALT = "Incorrect secret salt"; string internal constant ERROR_SALTED_HASH_SET_TO_ZERO = "Salted hash set to zero"; string internal constant ERROR_SIGNER_SET_TO_ZERO = "Signer set to zero address"; function setSigner(address signer_, bytes32 saltedHash_) external { _requireOnlyValidSender(); require(signer_ != address(0), ERROR_SIGNER_SET_TO_ZERO); require(saltedHash_ != bytes32(0), ERROR_SALTED_HASH_SET_TO_ZERO); require(!signatureStatus.isVerified, ERROR_CONTRACT_ALREADY_SIGNED); signatureStatus.signer = signer_; signatureStatus.saltedHash = saltedHash_; signatureStatus.isSalted = true; } function sign(uint256 salt, bytes calldata signature_) external { require(!signatureStatus.isVerified, ERROR_CONTRACT_ALREADY_SIGNED); require(signatureStatus.isSalted, ERROR_CONTRACT_NOT_SALTED); address expectedSigner = signatureStatus.signer; bytes32 expectedSaltedHash = signatureStatus.saltedHash; require(_msgSender() == expectedSigner, ERROR_INVALID_MSG_SENDER); require(keccak256(abi.encodePacked(salt)) == expectedSaltedHash, ERROR_INCORRECT_SECRET_SALT); require(ECDSA.recover(ECDSA.toEthSignedMessageHash(expectedSaltedHash), signature_) == expectedSigner, ERROR_UNEXPECTED_DATA_SIGNER); signature = signature_; signatureStatus.isVerified = true; emit ContractSigned(expectedSigner, expectedSaltedHash, signature_); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./RejectEther.sol"; import "./NiftyPermissions.sol"; import "../interfaces/IERC20.sol"; import "../interfaces/IERC721.sol"; abstract contract Withdrawable is RejectEther, NiftyPermissions { /** * @dev Slither identifies an issue with sending ETH to an arbitrary destianation. * https://github.com/crytic/slither/wiki/Detector-Documentation#functions-that-send-ether-to-arbitrary-destinations * Recommended mitigation is to "Ensure that an arbitrary user cannot withdraw unauthorized funds." * This mitigation has been performed, as only the contract admin can call 'withdrawETH' and they should * verify the recipient should receive the ETH first. */ function withdrawETH(address payable recipient, uint256 amount) external { _requireOnlyValidSender(); require(amount > 0, ERROR_ZERO_ETH_TRANSFER); require(recipient != address(0), "Transfer to zero address"); uint256 currentBalance = address(this).balance; require(amount <= currentBalance, ERROR_INSUFFICIENT_BALANCE); //slither-disable-next-line arbitrary-send (bool success,) = recipient.call{value: amount}(""); require(success, ERROR_WITHDRAW_UNSUCCESSFUL); } function withdrawERC20(address tokenContract, address recipient, uint256 amount) external { _requireOnlyValidSender(); bool success = IERC20(tokenContract).transfer(recipient, amount); require(success, ERROR_WITHDRAW_UNSUCCESSFUL); } function withdrawERC721(address tokenContract, address recipient, uint256 tokenId) external { _requireOnlyValidSender(); IERC721(tokenContract).safeTransferFrom(address(this), recipient, tokenId, ""); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./NiftyPermissions.sol"; import "../libraries/Clones.sol"; import "../interfaces/IERC20.sol"; import "../interfaces/IERC721.sol"; import "../interfaces/IERC2981.sol"; import "../interfaces/ICloneablePaymentSplitter.sol"; import "../structs/RoyaltyRecipient.sol"; abstract contract Royalties is NiftyPermissions, IERC2981 { event RoyaltyReceiverUpdated(uint256 indexed niftyType, address previousReceiver, address newReceiver); uint256 constant public BIPS_PERCENTAGE_TOTAL = 10000; // Royalty information mapped by nifty type mapping (uint256 => RoyaltyRecipient) internal royaltyRecipients; function supportsInterface(bytes4 interfaceId) public view virtual override(NiftyPermissions, IERC165) returns (bool) { return interfaceId == type(IERC2981).interfaceId || super.supportsInterface(interfaceId); } function getRoyaltySettings(uint256 niftyType) public view returns (RoyaltyRecipient memory) { return royaltyRecipients[niftyType]; } function setRoyaltyBips(uint256 niftyType, uint256 bips) external { _requireOnlyValidSender(); require(bips <= BIPS_PERCENTAGE_TOTAL, ERROR_BIPS_OVER_100_PERCENT); royaltyRecipients[niftyType].bips = uint16(bips); } function royaltyInfo(uint256 tokenId, uint256 salePrice) public virtual override view returns (address, uint256) { uint256 niftyType = _getNiftyType(tokenId); return royaltyRecipients[niftyType].recipient == address(0) ? (address(0), 0) : (royaltyRecipients[niftyType].recipient, (salePrice * royaltyRecipients[niftyType].bips) / BIPS_PERCENTAGE_TOTAL); } function initializeRoyalties(uint256 niftyType, address splitterImplementation, address[] calldata payees, uint256[] calldata shares) external returns (address) { _requireOnlyValidSender(); address previousReceiver = royaltyRecipients[niftyType].recipient; royaltyRecipients[niftyType].isPaymentSplitter = payees.length > 1; royaltyRecipients[niftyType].recipient = payees.length == 1 ? payees[0] : _clonePaymentSplitter(splitterImplementation, payees, shares); emit RoyaltyReceiverUpdated(niftyType, previousReceiver, royaltyRecipients[niftyType].recipient); return royaltyRecipients[niftyType].recipient; } function getNiftyType(uint256 tokenId) public view returns (uint256) { return _getNiftyType(tokenId); } function getPaymentSplitterByNiftyType(uint256 niftyType) public virtual view returns (address) { return _getPaymentSplitter(niftyType); } function getPaymentSplitterByTokenId(uint256 tokenId) public virtual view returns (address) { return _getPaymentSplitter(_getNiftyType(tokenId)); } function _getNiftyType(uint256 tokenId) internal virtual view returns (uint256) { return 0; } function _clonePaymentSplitter(address splitterImplementation, address[] calldata payees, uint256[] calldata shares_) internal returns (address) { require(IERC165(splitterImplementation).supportsInterface(type(ICloneablePaymentSplitter).interfaceId), ERROR_UNCLONEABLE_REFERENCE_CONTRACT); address clone = payable (Clones.clone(splitterImplementation)); ICloneablePaymentSplitter(clone).initialize(payees, shares_); return clone; } function _getPaymentSplitter(uint256 niftyType) internal virtual view returns (address) { return royaltyRecipients[niftyType].isPaymentSplitter ? royaltyRecipients[niftyType].recipient : address(0); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./ERC721Errors.sol"; import "../interfaces/IERC721.sol"; import "../interfaces/IERC721Receiver.sol"; import "../interfaces/IERC721Metadata.sol"; import "../interfaces/IERC721Cloneable.sol"; import "../libraries/Address.sol"; import "../libraries/Context.sol"; import "../libraries/Strings.sol"; import "../utils/ERC165.sol"; import "../utils/GenericErrors.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}. */ abstract contract ERC721 is Context, ERC165, ERC721Errors, GenericErrors, IERC721Metadata, IERC721Cloneable { using Address for address; using Strings for uint256; // Only allow ERC721 to be initialized once bool internal initializedERC721; // Token name string internal tokenName; // Token symbol string internal tokenSymbol; // Base URI For Offchain Metadata string internal baseMetadataURI; // Mapping from token ID to owner address mapping(uint256 => address) internal owners; // Mapping owner address to token count mapping(address => uint256) internal balances; // Mapping from token ID to approved address mapping(uint256 => address) internal tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) internal operatorApprovals; function initializeERC721(string memory name_, string memory symbol_, string memory baseURI_) public override { require(!initializedERC721, ERROR_REINITIALIZATION_NOT_PERMITTED); tokenName = name_; tokenSymbol = symbol_; _setBaseURI(baseURI_); initializedERC721 = true; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || interfaceId == type(IERC721Cloneable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), ERROR_QUERY_FOR_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), ERROR_QUERY_FOR_NONEXISTENT_TOKEN); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return tokenName; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return tokenSymbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), ERROR_QUERY_FOR_NONEXISTENT_TOKEN); string memory uriBase = baseURI(); return bytes(uriBase).length > 0 ? string(abi.encodePacked(uriBase, tokenId.toString())) : ""; } function baseURI() public view virtual returns (string memory) { return baseMetadataURI; } /** * @dev Storefront-level metadata for contract */ function contractURI() public view virtual returns (string memory) { string memory uriBase = baseURI(); return bytes(uriBase).length > 0 ? string(abi.encodePacked(uriBase, "contract-metadata")) : ""; } /** * @dev Internal function to set the base URI */ function _setBaseURI(string memory uri) internal { baseMetadataURI = uri; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ownerOf(tokenId); require(to != owner, ERROR_APPROVAL_TO_CURRENT_OWNER); require(_msgSender() == owner || isApprovedForAll(owner, _msgSender()), ERROR_NOT_OWNER_NOR_APPROVED); _approve(owner, to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), ERROR_QUERY_FOR_NONEXISTENT_TOKEN); return tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), ERROR_APPROVE_TO_CALLER); operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom(address from, address to, uint256 tokenId) public virtual override { (address owner, bool isApprovedOrOwner) = _isApprovedOrOwner(_msgSender(), tokenId); require(isApprovedOrOwner, ERROR_NOT_OWNER_NOR_APPROVED); _transfer(owner, 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 { transferFrom(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, data), ERROR_NOT_AN_ERC721_RECEIVER); } /** * @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 (address owner, bool isApprovedOrOwner) { owner = owners[tokenId]; require(owner != address(0), ERROR_QUERY_FOR_NONEXISTENT_TOKEN); isApprovedOrOwner = (spender == owner || tokenApprovals[tokenId] == spender || isApprovedForAll(owner, spender)); } /** * @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 = ownerOf(tokenId); bool isApprovedOrOwner = (_msgSender() == owner || tokenApprovals[tokenId] == _msgSender() || isApprovedForAll(owner, _msgSender())); require(isApprovedOrOwner, ERROR_NOT_OWNER_NOR_APPROVED); // Clear approvals _clearApproval(owner, tokenId); balances[owner] -= 1; _clearOwnership(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 owner, address from, address to, uint256 tokenId) internal virtual { require(owner == from, ERROR_TRANSFER_FROM_INCORRECT_OWNER); require(to != address(0), ERROR_TRANSFER_TO_ZERO_ADDRESS); // Clear approvals from the previous owner _clearApproval(owner, tokenId); balances[from] -= 1; balances[to] += 1; _setOwnership(to, tokenId); emit Transfer(from, to, tokenId); } /** * @dev Equivalent to approving address(0), but more gas efficient * * Emits a {Approval} event. */ function _clearApproval(address owner, uint256 tokenId) internal virtual { delete tokenApprovals[tokenId]; emit Approval(owner, address(0), tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address owner, address to, uint256 tokenId) internal virtual { tokenApprovals[tokenId] = to; emit Approval(owner, to, tokenId); } function _clearOwnership(uint256 tokenId) internal virtual { delete owners[tokenId]; } function _setOwnership(address to, uint256 tokenId) internal virtual { owners[tokenId] = to; } /** * @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 * * @dev Slither identifies an issue with unused return value. * Reference: https://github.com/crytic/slither/wiki/Detector-Documentation#unused-return * This should be a non-issue. It is the standard OpenZeppelin implementation which has been heavily used and audited. */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) internal returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert(ERROR_NOT_AN_ERC721_RECEIVER); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; abstract contract ERC721Errors { string internal constant ERROR_QUERY_FOR_ZERO_ADDRESS = "Query for zero address"; string internal constant ERROR_QUERY_FOR_NONEXISTENT_TOKEN = "Token does not exist"; string internal constant ERROR_APPROVAL_TO_CURRENT_OWNER = "Current owner approval"; string internal constant ERROR_APPROVE_TO_CALLER = "Approve to caller"; string internal constant ERROR_NOT_OWNER_NOR_APPROVED = "Not owner nor approved"; string internal constant ERROR_NOT_AN_ERC721_RECEIVER = "Not an ERC721Receiver"; string internal constant ERROR_TRANSFER_FROM_INCORRECT_OWNER = "Transfer from incorrect owner"; string internal constant ERROR_TRANSFER_TO_ZERO_ADDRESS = "Transfer to zero address"; string internal constant ERROR_ALREADY_MINTED = "Token already minted"; string internal constant ERROR_NO_TOKENS_MINTED = "No tokens minted"; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./IERC721.sol"; interface IERC721Cloneable is IERC721 { function initializeERC721(string calldata name_, string calldata symbol_, string calldata baseURI_) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; /** * @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 pragma solidity 0.8.9; import "../interfaces/IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; abstract contract GenericErrors { string internal constant ERROR_INPUT_ARRAY_EMPTY = "Input array empty"; string internal constant ERROR_INPUT_ARRAY_SIZE_MISMATCH = "Input array size mismatch"; string internal constant ERROR_INVALID_MSG_SENDER = "Invalid msg.sender"; string internal constant ERROR_UNEXPECTED_DATA_SIGNER = "Unexpected data signer"; string internal constant ERROR_INSUFFICIENT_BALANCE = "Insufficient balance"; string internal constant ERROR_WITHDRAW_UNSUCCESSFUL = "Withdraw unsuccessful"; string internal constant ERROR_CONTRACT_IS_FINALIZED = "Contract is finalized"; string internal constant ERROR_CANNOT_CHANGE_DEFAULT_OWNER = "Cannot change default owner"; string internal constant ERROR_UNCLONEABLE_REFERENCE_CONTRACT = "Uncloneable reference contract"; string internal constant ERROR_BIPS_OVER_100_PERCENT = "Bips over 100%"; string internal constant ERROR_NO_ROYALTY_RECEIVER = "No royalty receiver"; string internal constant ERROR_REINITIALIZATION_NOT_PERMITTED = "Re-initialization not permitted"; string internal constant ERROR_ZERO_ETH_TRANSFER = "Zero ETH Transfer"; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./ERC165.sol"; import "./GenericErrors.sol"; import "../interfaces/INiftyEntityCloneable.sol"; import "../interfaces/INiftyRegistry.sol"; import "../libraries/Context.sol"; abstract contract NiftyPermissions is Context, ERC165, GenericErrors, INiftyEntityCloneable { event AdminTransferred(address indexed previousAdmin, address indexed newAdmin); // Only allow Nifty Entity to be initialized once bool internal initializedNiftyEntity; // If address(0), use enable Nifty Gateway permissions - otherwise, specifies the address with permissions address public admin; // To prevent a mistake, transferring admin rights will be a two step process // First, the current admin nominates a new admin // Second, the nominee accepts admin address public nominatedAdmin; // Nifty Registry Contract INiftyRegistry internal permissionsRegistry; function initializeNiftyEntity(address niftyRegistryContract_) public { require(!initializedNiftyEntity, ERROR_REINITIALIZATION_NOT_PERMITTED); permissionsRegistry = INiftyRegistry(niftyRegistryContract_); initializedNiftyEntity = true; } function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(INiftyEntityCloneable).interfaceId || super.supportsInterface(interfaceId); } function renounceAdmin() external { _requireOnlyValidSender(); _transferAdmin(address(0)); } function nominateAdmin(address nominee) external { _requireOnlyValidSender(); nominatedAdmin = nominee; } function acceptAdmin() external { address nominee = nominatedAdmin; require(_msgSender() == nominee, ERROR_INVALID_MSG_SENDER); _transferAdmin(nominee); } function _requireOnlyValidSender() internal view { address currentAdmin = admin; if(currentAdmin == address(0)) { require(permissionsRegistry.isValidNiftySender(_msgSender()), ERROR_INVALID_MSG_SENDER); } else { require(_msgSender() == currentAdmin, ERROR_INVALID_MSG_SENDER); } } function _transferAdmin(address newAdmin) internal { address oldAdmin = admin; admin = newAdmin; delete nominatedAdmin; emit AdminTransferred(oldAdmin, newAdmin); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./IERC165.sol"; interface INiftyEntityCloneable is IERC165 { function initializeNiftyEntity(address niftyRegistryContract_) external; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; interface INiftyRegistry { function isValidNiftySender(address sendingKey) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol) pragma solidity 0.8.9; 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 pragma solidity 0.8.9; struct SignatureStatus { bool isSalted; bool isVerified; address signer; bytes32 saltedHash; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; /** * @title A base contract that may be inherited in order to protect a contract from having its fallback function * invoked and to block the receipt of ETH by a contract. * @author Nathan Gang * @notice This contract bestows on inheritors the ability to block ETH transfers into the contract * @dev ETH may still be forced into the contract - it is impossible to block certain attacks, but this protects from accidental ETH deposits */ // For more info, see: "https://medium.com/@alexsherbuck/two-ways-to-force-ether-into-a-contract-1543c1311c56" abstract contract RejectEther { /** * @dev For most contracts, it is safest to explicitly restrict the use of the fallback function * This would generally be invoked if sending ETH to this contract with a 'data' value provided */ fallback() external payable { revert("Fallback function not permitted"); } /** * @dev This is the standard path where ETH would land if sending ETH to this contract without a 'data' value * In our case, we don't want our contract to receive ETH, so we restrict it here */ receive() external payable { revert("Receiving ETH not permitted"); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; /** * @dev https://eips.ethereum.org/EIPS/eip-1167[EIP 1167] is a standard for * deploying minimal proxy contracts, also known as "clones". * * > To simply and cheaply clone contract functionality in an immutable way, this standard specifies * > a minimal bytecode implementation that delegates all calls to a known, fixed address. * * The library includes functions to deploy a proxy using either `create` (traditional deployment) or `create2` * (salted deterministic deployment). It also includes functions to predict the addresses of clones deployed using the * deterministic method. * */ library Clones { /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create opcode, which should never revert. */ function clone(address implementation) internal returns (address instance) { assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) instance := create(0, ptr, 0x37) } require(instance != address(0), "ERC1167: create failed"); } /** * @dev Deploys and returns the address of a clone that mimics the behaviour of `implementation`. * * This function uses the create2 opcode and a `salt` to deterministically deploy * the clone. Using the same `implementation` and `salt` multiple time will revert, since * the clones cannot be deployed twice at the same address. */ function cloneDeterministic(address implementation, bytes32 salt) internal returns (address instance) { assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf30000000000000000000000000000000000) instance := create2(0, ptr, 0x37, salt) } require(instance != address(0), "ERC1167: create2 failed"); } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress( address implementation, bytes32 salt, address deployer ) internal pure returns (address predicted) { assembly { let ptr := mload(0x40) mstore(ptr, 0x3d602d80600a3d3981f3363d3d373d3d3d363d73000000000000000000000000) mstore(add(ptr, 0x14), shl(0x60, implementation)) mstore(add(ptr, 0x28), 0x5af43d82803e903d91602b57fd5bf3ff00000000000000000000000000000000) mstore(add(ptr, 0x38), shl(0x60, deployer)) mstore(add(ptr, 0x4c), salt) mstore(add(ptr, 0x6c), keccak256(ptr, 0x37)) predicted := keccak256(add(ptr, 0x37), 0x55) } } /** * @dev Computes the address of a clone deployed using {Clones-cloneDeterministic}. */ function predictDeterministicAddress(address implementation, bytes32 salt) internal view returns (address predicted) { return predictDeterministicAddress(implementation, salt, address(this)); } }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./IERC165.sol"; /** * @dev Interface for the NFT Royalty Standard. * * A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal * support for royalty payments across all NFT marketplaces and ecosystem participants. * */ interface IERC2981 is IERC165 { /** * @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of * exchange. The royalty amount is denominated and should be payed in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "./IERC165.sol"; import "../libraries/SafeERC20.sol"; interface ICloneablePaymentSplitter is IERC165 { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, address to, uint256 amount); event PaymentReceived(address from, uint256 amount); function initialize(address[] calldata payees, uint256[] calldata shares_) external; function totalShares() external view returns (uint256); function totalReleased() external view returns (uint256); function totalReleased(IERC20 token) external view returns (uint256); function shares(address account) external view returns (uint256); function released(address account) external view returns (uint256); function released(IERC20 token, address account) external view returns (uint256); function payee(uint256 index) external view returns (address); function release(address payable account) external; function release(IERC20 token, address account) external; function pendingPayment(address account) external view returns (uint256); function pendingPayment(IERC20 token, address account) external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; struct RoyaltyRecipient { bool isPaymentSplitter; // 1 byte uint16 bips; // 2 bytes address recipient; // 20 bytes }
// SPDX-License-Identifier: MIT pragma solidity 0.8.9; import "../interfaces/IERC20.sol"; import "./Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
{ "optimizer": { "enabled": true, "runs": 1500 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousAdmin","type":"address"},{"indexed":true,"internalType":"address","name":"newAdmin","type":"address"}],"name":"AdminTransferred","type":"event"},{"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":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"fromAddress","type":"address"},{"indexed":true,"internalType":"address","name":"toAddress","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"signer","type":"address"},{"indexed":false,"internalType":"bytes32","name":"data","type":"bytes32"},{"indexed":false,"internalType":"bytes","name":"signature","type":"bytes"}],"name":"ContractSigned","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"contractAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"niftyType","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"idFirst","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"idLast","type":"uint256"}],"name":"NiftyTypeCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"niftyType","type":"uint256"},{"indexed":false,"internalType":"address","name":"previousReceiver","type":"address"},{"indexed":false,"internalType":"address","name":"newReceiver","type":"address"}],"name":"RoyaltyReceiverUpdated","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"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"BIPS_PERCENTAGE_TOTAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"admin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","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":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"finalizeContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCollectionStatus","outputs":[{"components":[{"internalType":"bool","name":"isContractFinalized","type":"bool"},{"internalType":"uint88","name":"amountCreated","type":"uint88"},{"internalType":"address","name":"defaultOwner","type":"address"}],"internalType":"struct ERC721Omnibus.CollectionStatus","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getNiftyType","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"niftyType","type":"uint256"}],"name":"getNiftyTypeDetails","outputs":[{"components":[{"internalType":"bool","name":"isMinted","type":"bool"},{"internalType":"uint72","name":"niftyType","type":"uint72"},{"internalType":"uint88","name":"idFirst","type":"uint88"},{"internalType":"uint88","name":"idLast","type":"uint88"}],"internalType":"struct NiftyType","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getNiftyTypes","outputs":[{"components":[{"internalType":"bool","name":"isMinted","type":"bool"},{"internalType":"uint72","name":"niftyType","type":"uint72"},{"internalType":"uint88","name":"idFirst","type":"uint88"},{"internalType":"uint88","name":"idLast","type":"uint88"}],"internalType":"struct NiftyType[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"niftyType","type":"uint256"}],"name":"getPaymentSplitterByNiftyType","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getPaymentSplitterByTokenId","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"niftyType","type":"uint256"}],"name":"getRoyaltySettings","outputs":[{"components":[{"internalType":"bool","name":"isPaymentSplitter","type":"bool"},{"internalType":"uint16","name":"bips","type":"uint16"},{"internalType":"address","name":"recipient","type":"address"}],"internalType":"struct RoyaltyRecipient","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"defaultOwner_","type":"address"}],"name":"initializeDefaultOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"string","name":"baseURI_","type":"string"}],"name":"initializeERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"niftyRegistryContract_","type":"address"}],"name":"initializeNiftyEntity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"niftyType","type":"uint256"},{"internalType":"address","name":"splitterImplementation","type":"address"},{"internalType":"address[]","name":"payees","type":"address[]"},{"internalType":"uint256[]","name":"shares","type":"uint256[]"}],"name":"initializeRoyalties","outputs":[{"internalType":"address","name":"","type":"address"}],"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":[{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"string[]","name":"ipfsHashes","type":"string[]"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"nominee","type":"address"}],"name":"nominateAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nominatedAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"owner","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"","type":"address"},{"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":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"uri","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"niftyType","type":"uint256"},{"internalType":"string","name":"ipfsHash","type":"string"}],"name":"setIPFSHash","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"metadataGenerator_","type":"address"}],"name":"setMetadataGenerator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"niftyType","type":"uint256"},{"internalType":"uint256","name":"bips","type":"uint256"}],"name":"setRoyaltyBips","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signer_","type":"address"},{"internalType":"bytes32","name":"saltedHash_","type":"bytes32"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"salt","type":"uint256"},{"internalType":"bytes","name":"signature_","type":"bytes"}],"name":"sign","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signature","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"signatureStatus","outputs":[{"internalType":"bool","name":"isSalted","type":"bool"},{"internalType":"bool","name":"isVerified","type":"bool"},{"internalType":"address","name":"signer","type":"address"},{"internalType":"bytes32","name":"saltedHash","type":"bytes32"}],"stateMutability":"view","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":"tokenId","type":"uint256"}],"name":"tokenIPFSHash","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenContract","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"withdrawERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561001057600080fd5b50614cbd806100206000396000f3fe6080604052600436106103435760003560e01c806377830dca116101b0578063b88d4fde116100ec578063e8a3d48511610095578063f2fde38b1161006f578063f2fde38b14610a64578063f51c457514610a84578063f592644214610b30578063f851a44014610be757610395565b8063e8a3d485146109e6578063e8ac6533146109fb578063e985e9c514610a1b57610395565b8063cd5ad4c5116100c6578063cd5ad4c514610986578063d3716630146109a6578063e4623c1b146109c657610395565b8063b88d4fde14610926578063b963daef14610946578063c87b56dd1461096657610395565b806393777369116101595780639dc20f78116101335780639dc20f78146108a3578063a22cb465146108c3578063a8f6635c146108e3578063b0abd4571461091057610395565b8063937773691461084e57806395d89b411461086e5780639b3d270a1461088357610395565b80638bad0c0a1161018a5780638bad0c0a146107fb5780638da5cb5b1461081057806392e80eb41461082e57610395565b806377830dca1461079b5780637889cc16146107bb578063792ccce0146107db57610395565b8063432643471161027f578063559cb3a7116102285780636050f48e116102025780636050f48e146107185780636352211e146107385780636c0360eb1461075857806370a082311461076d57610395565b8063559cb3a71461066c57806355f804b31461068e5780635615d8fd146106ae57610395565b80634782f779116102595780634782f779146106175780634f558e791461063757806351ff48471461065757610395565b806343264347146105b757806344004cc1146105d7578063447fd8c4146105f757610395565b806328c5cf0a116102ec578063319cd2d7116102c6578063319cd2d7146105375780634025feb21461055757806342842e0e1461057757806342966c681461059757610395565b806328c5cf0a146104c35780632a55205a146104d85780632c5c0f541461051757610395565b8063095ea7b31161031d578063095ea7b31461046c5780630e18b6811461048e57806323b872dd146104a357610395565b806301ffc9a7146103dd57806306fdde0314610412578063081812fc1461043457610395565b366103955760405162461bcd60e51b815260206004820152601b60248201527f526563656976696e6720455448206e6f74207065726d6974746564000000000060448201526064015b60405180910390fd5b60405162461bcd60e51b815260206004820152601f60248201527f46616c6c6261636b2066756e6374696f6e206e6f74207065726d697474656400604482015260640161038c565b3480156103e957600080fd5b506103fd6103f8366004614130565b610c0c565b60405190151581526020015b60405180910390f35b34801561041e57600080fd5b50610427610c2f565b60405161040991906141a9565b34801561044057600080fd5b5061045461044f3660046141bc565b610cc1565b6040516001600160a01b039091168152602001610409565b34801561047857600080fd5b5061048c6104873660046141ea565b610d34565b005b34801561049a57600080fd5b5061048c610e4b565b3480156104af57600080fd5b5061048c6104be366004614216565b610ec4565b3480156104cf57600080fd5b5061048c610f3e565b3480156104e457600080fd5b506104f86104f3366004614257565b610faf565b604080516001600160a01b039093168352602083019190915201610409565b34801561052357600080fd5b506104546105323660046141bc565b61103b565b34801561054357600080fd5b506104546105523660046141bc565b611046565b34801561056357600080fd5b5061048c610572366004614216565b611059565b34801561058357600080fd5b5061048c610592366004614216565b6110f5565b3480156105a357600080fd5b5061048c6105b23660046141bc565b611110565b3480156105c357600080fd5b5061048c6105d2366004614279565b611119565b3480156105e357600080fd5b5061048c6105f2366004614216565b6111a2565b34801561060357600080fd5b506104546106123660046142db565b6112a0565b34801561062357600080fd5b5061048c6106323660046141ea565b6113cf565b34801561064357600080fd5b506103fd6106523660046141bc565b611583565b34801561066357600080fd5b5061042761158e565b34801561067857600080fd5b5061068161161c565b6040516104099190614367565b34801561069a57600080fd5b5061048c6106a9366004614438565b6116c4565b3480156106ba57600080fd5b50600f546010546106e79160ff808216926101008304909116916201000090046001600160a01b03169084565b6040516104099493929190931515845291151560208401526001600160a01b03166040830152606082015260800190565b34801561072457600080fd5b5061048c610733366004614547565b61170f565b34801561074457600080fd5b506104546107533660046141bc565b6117ac565b34801561076457600080fd5b506104276118b3565b34801561077957600080fd5b5061078d610788366004614279565b6118c2565b604051908152602001610409565b3480156107a757600080fd5b5061048c6107b63660046145cf565b61193d565b3480156107c757600080fd5b5061048c6107d6366004614257565b611f32565b3480156107e757600080fd5b5061048c6107f6366004614279565b611fbd565b34801561080757600080fd5b5061048c61205a565b34801561081c57600080fd5b506012546001600160a01b0316610454565b34801561083a57600080fd5b5061048c6108493660046141ea565b61206e565b34801561085a57600080fd5b5061048c610869366004614279565b6121d1565b34801561087a57600080fd5b5061042761230a565b34801561088f57600080fd5b5061048c61089e36600461463b565b612319565b3480156108af57600080fd5b5061078d6108be3660046141bc565b612629565b3480156108cf57600080fd5b5061048c6108de366004614695565b612634565b3480156108ef57600080fd5b506109036108fe3660046141bc565b6126ff565b60405161040991906146ce565b34801561091c57600080fd5b5061078d61271081565b34801561093257600080fd5b5061048c61094136600461471d565b6127fe565b34801561095257600080fd5b5061048c61096136600461479d565b612869565b34801561097257600080fd5b506104276109813660046141bc565b61291e565b34801561099257600080fd5b5061048c6109a1366004614279565b612a31565b3480156109b257600080fd5b506104276109c13660046141bc565b612a5b565b3480156109d257600080fd5b5061048c6109e13660046147e4565b612b5d565b3480156109f257600080fd5b50610427612bee565b348015610a0757600080fd5b50600c54610454906001600160a01b031681565b348015610a2757600080fd5b506103fd610a3636600461481a565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610a7057600080fd5b5061048c610a7f366004614279565b612c98565b348015610a9057600080fd5b50610aff610a9f3660046141bc565b604080516060808201835260008083526020808401829052928401819052938452600e825292829020825193840183525460ff811615158452610100810461ffff1691840191909152630100000090046001600160a01b03169082015290565b6040805182511515815260208084015161ffff1690820152918101516001600160a01b031690820152606001610409565b348015610b3c57600080fd5b50610bad6040805160608101825260008082526020820181905291810191909152506040805160608101825260095460ff81161515825261010081046affffffffffffffffffffff1660208301526c0100000000000000000000000090046001600160a01b03169181019190915290565b604080518251151581526020808401516affffffffffffffffffffff1690820152918101516001600160a01b031690820152606001610409565b348015610bf357600080fd5b50600b546104549061010090046001600160a01b031681565b60006001600160e01b031982161580610c295750610c2982612cf2565b92915050565b606060018054610c3e90614848565b80601f0160208091040260200160405190810160405280929190818152602001828054610c6a90614848565b8015610cb75780601f10610c8c57610100808354040283529160200191610cb7565b820191906000526020600020905b815481529060010190602001808311610c9a57829003601f168201915b5050505050905090565b6000610ccc82612d30565b60405180604001604052806014815260200173151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b81525090610d175760405162461bcd60e51b815260040161038c91906141a9565b50506000908152600660205260409020546001600160a01b031690565b6000610d3f826117ac565b9050806001600160a01b0316836001600160a01b031614156040518060400160405280601681526020017f43757272656e74206f776e657220617070726f76616c0000000000000000000081525090610dab5760405162461bcd60e51b815260040161038c91906141a9565b50336001600160a01b0382161480610de657506001600160a01b038116600090815260076020908152604080832033845290915290205460ff165b6040518060400160405280601681526020017f4e6f74206f776e6572206e6f7220617070726f7665640000000000000000000081525090610e3a5760405162461bcd60e51b815260040161038c91906141a9565b50610e46818484612d84565b505050565b600c546001600160a01b031680336001600160a01b0316146040518060400160405280601281526020017f496e76616c6964206d73672e73656e646572000000000000000000000000000081525090610eb75760405162461bcd60e51b815260040161038c91906141a9565b50610ec181612de0565b50565b600080610ed13384612e61565b91509150806040518060400160405280601681526020017f4e6f74206f776e6572206e6f7220617070726f7665640000000000000000000081525090610f2a5760405162461bcd60e51b815260040161038c91906141a9565b50610f3782868686612ee1565b5050505050565b610f4661309c565b60095460408051808201909152601581527f436f6e74726163742069732066696e616c697a6564000000000000000000000060208201529060ff1615610f9f5760405162461bcd60e51b815260040161038c91906141a9565b506009805460ff19166001179055565b6000806000610fbd856131ec565b6000818152600e6020526040902054909150630100000090046001600160a01b03161561102a576000818152600e6020526040902054630100000081046001600160a01b0316906127109061101b90610100900461ffff1687614893565b61102591906148c8565b61102e565b6000805b92509250505b9250929050565b6000610c2982613362565b6000610c29611054836131ec565b613362565b61106161309c565b6040517fb88d4fde0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015260448201839052608060648301526000608483015284169063b88d4fde9060a401600060405180830381600087803b1580156110d857600080fd5b505af11580156110ec573d6000803e3d6000fd5b50505050505050565b610e46838383604051806020016040528060008152506127fe565b610ec1816133a2565b600b5460408051808201909152601f81527f52652d696e697469616c697a6174696f6e206e6f74207065726d69747465640060208201529060ff16156111725760405162461bcd60e51b815260040161038c91906141a9565b50600d80546001600160a01b0319166001600160a01b0392909216919091179055600b805460ff19166001179055565b6111aa61309c565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152602482018390526000919085169063a9059cbb90604401602060405180830381600087803b15801561121157600080fd5b505af1158015611225573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061124991906148dc565b9050806040518060400160405280601581526020017f576974686472617720756e7375636365737366756c000000000000000000000081525090610f375760405162461bcd60e51b815260040161038c91906141a9565b60006112aa61309c565b6000878152600e602052604090208054600180871160ff19831617909255630100000090046001600160a01b03169085146112f1576112ec8787878787613517565b611319565b85856000818110611304576113046148f9565b90506020020160208101906113199190614279565b6000898152600e602090815260409182902080547fffffffffffffffffff0000000000000000000000000000000000000000ffffff1663010000006001600160a01b03958616810291909117918290558351868616815291049093169083015289917f834a47bfbb51ad808d8649527d9bf540f58cc71dc1093ae2249c8b230575ce98910160405180910390a250505060009485525050600e60205250506040902054630100000090046001600160a01b031690565b6113d761309c565b60408051808201909152601181527f5a65726f20455448205472616e736665720000000000000000000000000000006020820152816114295760405162461bcd60e51b815260040161038c91906141a9565b506001600160a01b0382166114805760405162461bcd60e51b815260206004820152601860248201527f5472616e7366657220746f207a65726f20616464726573730000000000000000604482015260640161038c565b60408051808201909152601481527f496e73756666696369656e742062616c616e636500000000000000000000000060208201524790818311156114d75760405162461bcd60e51b815260040161038c91906141a9565b506000836001600160a01b03168360405160006040518083038185875af1925050503d8060008114611525576040519150601f19603f3d011682016040523d82523d6000602084013e61152a565b606091505b50509050806040518060400160405280601581526020017f576974686472617720756e7375636365737366756c000000000000000000000081525090610f375760405162461bcd60e51b815260040161038c91906141a9565b6000610c2982612d30565b6011805461159b90614848565b80601f01602080910402602001604051908101604052809291908181526020018280546115c790614848565b80156116145780601f106115e957610100808354040283529160200191611614565b820191906000526020600020905b8154815290600101906020018083116115f757829003601f168201915b505050505081565b60606015805480602002602001604051908101604052809291908181526020016000905b828210156116bb576000848152602090819020604080516080810182529185015460ff81161515835268ffffffffffffffffff610100820416838501526affffffffffffffffffffff6a01000000000000000000008204811692840192909252600160a81b9004166060820152825260019092019101611640565b50505050905090565b6116cc61309c565b61170b82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061369c92505050565b5050565b60005460408051808201909152601f81527f52652d696e697469616c697a6174696f6e206e6f74207065726d69747465640060208201529060ff16156117685760405162461bcd60e51b815260040161038c91906141a9565b50825161177c90600190602086019061400d565b50815161179090600290602085019061400d565b5061179a8161369c565b50506000805460ff1916600117905550565b60006117b7826136af565b60405180604001604052806014815260200173151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b815250906118025760405162461bcd60e51b815260040161038c91906141a9565b506000828152600a602052604090205460ff1661183a576009546c0100000000000000000000000090046001600160a01b0316611858565b6000828152600a602052604090205461010090046001600160a01b03165b604080518082019091526014815273151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b60208201529091506001600160a01b0382166118ad5760405162461bcd60e51b815260040161038c91906141a9565b50919050565b606060038054610c3e90614848565b60408051808201909152601681527f517565727920666f72207a65726f20616464726573730000000000000000000060208201526000906001600160a01b0383166119205760405162461bcd60e51b815260040161038c91906141a9565b50506001600160a01b031660009081526005602052604090205490565b61194561309c565b821580159061195357508015155b6040518060400160405280601181526020017f496e70757420617272617920656d707479000000000000000000000000000000815250906119a75760405162461bcd60e51b815260040161038c91906141a9565b5060408051808201909152601981527f496e7075742061727261792073697a65206d69736d617463680000000000000060208201528382146119fc5760405162461bcd60e51b815260040161038c91906141a9565b5060095460408051808201909152601881527f5472616e7366657220746f207a65726f2061646472657373000000000000000060208201526c010000000000000000000000009091046001600160a01b03169081611a6d5760405162461bcd60e51b815260040161038c91906141a9565b5060095460408051808201909152601581527f436f6e74726163742069732066696e616c697a6564000000000000000000000060208201529060ff1615611ac75760405162461bcd60e51b815260040161038c91906141a9565b50601454600160a81b81046affffffffffffffffffffff1690610100900468ffffffffffffffffff166000611afd83600161490f565b9050806000805b89811015611db75760008b8b83818110611b2057611b206148f9565b90506020020135116040518060400160405280601081526020017f4e6f20746f6b656e73206d696e7465640000000000000000000000000000000081525090611b7c5760405162461bcd60e51b815260040161038c91906141a9565b5060008b8b83818110611b9157611b916148f9565b90506020020135905060018186611ba8919061490f565b611bb2919061493e565b925085611bbe8161496a565b96505060008a8a84818110611bd557611bd56148f9565b9050602002810190611be79190614993565b90501115611c3a57898983818110611c0157611c016148f9565b9050602002810190611c139190614993565b68ffffffffffffffffff88166000908152601660205260409020611c38929091614091565b505b60408051608081018252600180825268ffffffffffffffffff89811660208085018281526affffffffffffffffffffff8c81168789018181528c83166060808b01828152601580549b8c0181556000529a517f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475909a018054965193519b518616600160a81b0274ffffffffffffffffffffffffffffffffffffffffff9c9096166a0100000000000000000000029b909b1669ffffffffffffffffffff93909916610100027fffffffffffffffffffffffffffffffffffffffffffff000000000000000000ff9a15159a909a167fffffffffffffffffffffffffffffffffffffffffffff00000000000000000000909616959095179890981716959095171790955585519182528101919091529283015230917feb15cc05309c4c75cd685463644508ef1d1663a4ca01ed00737631dc6dd02073910160405180910390a2611da1818661490f565b9450508080611daf906149da565b915050611b04565b506000611dc4868361493e565b6affffffffffffffffffffff1690508060056000896001600160a01b03166001600160a01b031681526020019081526020016000206000828254611e0891906149f5565b9091555050601480546affffffffffffffffffffff808516600160a81b0274ffffffffffffffffffffffffffffffffffffffffff68ffffffffffffffffff8a166101009081029190911674ffffffffffffffffffffff000000000000000000ff90941693909317179092556009805484939192600192611e8c92869290041661490f565b92506101000a8154816affffffffffffffffffffff02191690836affffffffffffffffffffff160217905550866001600160a01b031660006001600160a01b0316846affffffffffffffffffffff167fdeaa91b6123d068f5821d0fb0678463d1a8a6079fe8af5de3ce5e896dcf9133d85604051611f1d91906affffffffffffffffffffff91909116815260200190565b60405180910390a45050505050505050505050565b611f3a61309c565b60408051808201909152600e81527f42697073206f76657220313030250000000000000000000000000000000000006020820152612710821115611f915760405162461bcd60e51b815260040161038c91906141a9565b506000918252600e6020526040909120805461ffff9092166101000262ffff0019909216919091179055565b60085460408051808201909152601f81527f52652d696e697469616c697a6174696f6e206e6f74207065726d69747465640060208201529060ff16156120165760405162461bcd60e51b815260040161038c91906141a9565b50600980546001600160a01b039092166c01000000000000000000000000026bffffffffffffffffffffffff9092169190911790556008805460ff19166001179055565b61206261309c565b61206c6000612de0565b565b61207661309c565b60408051808201909152601a81527f5369676e65722073657420746f207a65726f206164647265737300000000000060208201526001600160a01b0383166120d15760405162461bcd60e51b815260040161038c91906141a9565b5060408051808201909152601781527f53616c74656420686173682073657420746f207a65726f0000000000000000006020820152816121245760405162461bcd60e51b815260040161038c91906141a9565b50600f5460408051808201909152601781527f436f6e747261637420616c7265616479207369676e6564000000000000000000602082015290610100900460ff16156121835760405162461bcd60e51b815260040161038c91906141a9565b50600f805460109290925560ff196001600160a01b039093166201000002929092167fffffffffffffffffffff0000000000000000000000000000000000000000ff00909116176001179055565b6121d961309c565b6001600160a01b03811661220757601380546001600160a01b0383166001600160a01b031990911617905550565b6040516301ffc9a760e01b81527f5219fb8e0000000000000000000000000000000000000000000000000000000060048201526001600160a01b038216906301ffc9a79060240160206040518083038186803b15801561226657600080fd5b505afa15801561227a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061229e91906148dc565b6122ea5760405162461bcd60e51b815260206004820152601a60248201527f496e76616c6964204d657461646174612047656e657261746f72000000000000604482015260640161038c565b601380546001600160a01b0383166001600160a01b031990911617905550565b606060028054610c3e90614848565b600f5460408051808201909152601781527f436f6e747261637420616c7265616479207369676e6564000000000000000000602082015290610100900460ff16156123775760405162461bcd60e51b815260040161038c91906141a9565b50600f5460408051808201909152601381527f436f6e7472616374206e6f742073616c7465640000000000000000000000000060208201529060ff166123d05760405162461bcd60e51b815260040161038c91906141a9565b50600f54601054620100009091046001600160a01b03169081336001600160a01b0316146040518060400160405280601281526020017f496e76616c6964206d73672e73656e6465720000000000000000000000000000815250906124485760405162461bcd60e51b815260040161038c91906141a9565b50808560405160200161245d91815260200190565b60405160208183030381529060405280519060200120146040518060400160405280601581526020017f496e636f7272656374207365637265742073616c740000000000000000000000815250906124c85760405162461bcd60e51b815260040161038c91906141a9565b50816001600160a01b031661256961252d836040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b86868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506136d692505050565b6001600160a01b0316146040518060400160405280601681526020017f556e65787065637465642064617461207369676e657200000000000000000000815250906125c75760405162461bcd60e51b815260040161038c91906141a9565b506125d460118585614091565b50600f805461ff0019166101001790556040517f955fd8871b091d05a1f766f82ece6ba4d9c55e65e065d4459b26740f2e698e709061261a908490849088908890614a0d565b60405180910390a15050505050565b6000610c29826131ec565b60408051808201909152601181527f417070726f766520746f2063616c6c657200000000000000000000000000000060208201526001600160a01b0383163314156126925760405162461bcd60e51b815260040161038c91906141a9565b503360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b604080516080810182526000808252602082018190529181018290526060810191909152601554600019830190811061277a5760405162461bcd60e51b815260206004820152601960248201527f4e69667479205479706520446f6573204e6f7420457869737400000000000000604482015260640161038c565b6015818154811061278d5761278d6148f9565b600091825260209182902060408051608081018252919092015460ff81161515825268ffffffffffffffffff610100820416938201939093526affffffffffffffffffffff6a01000000000000000000008404811692820192909252600160a81b9092041660608201529392505050565b612809848484610ec4565b612815848484846136fa565b6040518060400160405280601581526020017f4e6f7420616e204552433732315265636569766572000000000000000000000081525090610f375760405162461bcd60e51b815260040161038c91906141a9565b61287161309c565b6000828152601660205260409020805461288a90614848565b1590506128ff5760405162461bcd60e51b815260206004820152602560248201527f4552433732314d657461646174613a2049504653206861736820616c7265616460448201527f7920736574000000000000000000000000000000000000000000000000000000606482015260840161038c565b60008281526016602090815260409091208251610e469284019061400d565b6013546060906001600160a01b031661293a57610c298261383b565b61294382612d30565b60405180604001604052806014815260200173151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b8152509061298e5760405162461bcd60e51b815260040161038c91906141a9565b506013546001600160a01b031663f572b6d8836129aa816131ec565b604051806020016040528060008152506040518463ffffffff1660e01b81526004016129d893929190614a53565b60006040518083038186803b1580156129f057600080fd5b505afa158015612a04573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c299190810190614a7b565b919050565b612a3961309c565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6060612a6682612d30565b60405180604001604052806014815260200173151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b81525090612ab15760405162461bcd60e51b815260040161038c91906141a9565b5060166000612abf846131ec565b81526020019081526020016000208054612ad890614848565b80601f0160208091040260200160405190810160405280929190818152602001828054612b0490614848565b8015612b515780601f10612b2657610100808354040283529160200191612b51565b820191906000526020600020905b815481529060010190602001808311612b3457829003601f168201915b50505050509050919050565b60408051808201909152601181527f496e70757420617272617920656d707479000000000000000000000000000000602082015281612baf5760405162461bcd60e51b815260040161038c91906141a9565b5060005b81811015610e4657612bdc838383818110612bd057612bd06148f9565b905060200201356133a2565b80612be6816149da565b915050612bb3565b6013546060906001600160a01b0316612c0e57612c096138ee565b905090565b601360009054906101000a90046001600160a01b03166001600160a01b031663a76b4d566040518163ffffffff1660e01b815260040160006040518083038186803b158015612c5c57600080fd5b505afa158015612c70573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612c099190810190614a7b565b612ca061309c565b601280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006001600160e01b031982167f2a55205a000000000000000000000000000000000000000000000000000000001480610c295750610c2982613941565b6000612d3b826136af565b15612d7c576000828152600a602052604090205461010090046001600160a01b0316151580610c295750506000908152600a602052604090205460ff161590565b506000919050565b60008181526006602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600b80546001600160a01b038381166101008181027fffffffffffffffffffffff0000000000000000000000000000000000000000ff851617909455600c80546001600160a01b031916905560405193909204169182907ff8ccb027dfcd135e000e9d45e6cc2d662578a8825d4c45b5e32e0adf67e79ec690600090a35050565b600080612e6d836117ac565b9150816001600160a01b0316846001600160a01b03161480612ea857506000838152600660205260409020546001600160a01b038581169116145b80612ed857506001600160a01b0380831660009081526007602090815260408083209388168352929052205460ff165b90509250929050565b826001600160a01b0316846001600160a01b0316146040518060400160405280601d81526020017f5472616e736665722066726f6d20696e636f7272656374206f776e657200000081525090612f4a5760405162461bcd60e51b815260040161038c91906141a9565b5060408051808201909152601881527f5472616e7366657220746f207a65726f2061646472657373000000000000000060208201526001600160a01b038316612fa65760405162461bcd60e51b815260040161038c91906141a9565b50612fb1848261397f565b6001600160a01b0383166000908152600560205260408120805460019290612fda908490614ae9565b90915550506001600160a01b03821660009081526005602052604081208054600192906130089084906149f5565b90915550506000818152600a60205260409020805460017fffffffffffffffffffffff0000000000000000000000000000000000000000009091166101006001600160a01b038616021717905580826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b600b5461010090046001600160a01b03168061318f57600d546001600160a01b031663e37ce6fa336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561310357600080fd5b505afa158015613117573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061313b91906148dc565b6040518060400160405280601281526020017f496e76616c6964206d73672e73656e64657200000000000000000000000000008152509061170b5760405162461bcd60e51b815260040161038c91906141a9565b60408051808201909152601281527f496e76616c6964206d73672e73656e64657200000000000000000000000000006020820152336001600160a01b0383161461170b5760405162461bcd60e51b815260040161038c91906141a9565b6015546000908190819061320290600190614ae9565b9050600060026132128484614ae9565b61321c91906148c8565b90505b6015548110156133575760006015828154811061323e5761323e6148f9565b600091825260209091200180549091506a010000000000000000000090046affffffffffffffffffffff16861080159061328d57508054600160a81b90046affffffffffffffffffffff168611155b156132ac5754610100900468ffffffffffffffffff1695945050505050565b8054600160a81b90046affffffffffffffffffffff168611156132fd576132d48260016149f5565b935060026132e28585614ae9565b6132ec91906148c8565b6132f690856149f5565b9150613351565b80546a010000000000000000000090046affffffffffffffffffffff168610156133515761332c600183614ae9565b9250600261333a8585614ae9565b61334491906148c8565b61334e90856149f5565b91505b5061321f565b506000949350505050565b6000818152600e602052604081205460ff1661337f576000610c29565b506000908152600e6020526040902054630100000090046001600160a01b031690565b60006133ad826117ac565b90506000336001600160a01b03831614806133de57506000838152600660205260409020546001600160a01b031633145b8061340c57506001600160a01b038216600090815260076020908152604080832033845290915290205460ff165b9050806040518060400160405280601681526020017f4e6f74206f776e6572206e6f7220617070726f76656400000000000000000000815250906134635760405162461bcd60e51b815260040161038c91906141a9565b5061346e828461397f565b6001600160a01b0382166000908152600560205260408120805460019290613497908490614ae9565b909155506134da9050836000908152600a6020526040902080547fffffffffffffffffffffff000000000000000000000000000000000000000000166001179055565b60405183906000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505050565b6040516301ffc9a760e01b81527f37de79fc0000000000000000000000000000000000000000000000000000000060048201526000906001600160a01b038716906301ffc9a79060240160206040518083038186803b15801561357957600080fd5b505afa15801561358d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135b191906148dc565b6040518060400160405280601e81526020017f556e636c6f6e6561626c65207265666572656e636520636f6e74726163740000815250906136055760405162461bcd60e51b815260040161038c91906141a9565b506000613611876139d4565b6040517f7fbbe46f0000000000000000000000000000000000000000000000000000000081529091506001600160a01b03821690637fbbe46f9061365f908990899089908990600401614b00565b600060405180830381600087803b15801561367957600080fd5b505af115801561368d573d6000803e3d6000fd5b50929998505050505050505050565b805161170b90600390602084019061400d565b60008082118015610c2957505060095461010090046affffffffffffffffffffff16101590565b60008060006136e58585613a8a565b915091506136f281613af7565b509392505050565b60006001600160a01b0384163b1561382f57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061373e903390899088908890600401614b9d565b602060405180830381600087803b15801561375857600080fd5b505af1925050508015613788575060408051601f3d908101601f1916820190925261378591810190614bd9565b60015b613815573d8080156137b6576040519150601f19603f3d011682016040523d82523d6000602084013e6137bb565b606091505b50805161380d57604080518082018252601581527f4e6f7420616e20455243373231526563656976657200000000000000000000006020820152905162461bcd60e51b815261038c91906004016141a9565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050613833565b5060015b949350505050565b606061384682612d30565b60405180604001604052806014815260200173151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b815250906138915760405162461bcd60e51b815260040161038c91906141a9565b50600061389c6118b3565b905060008151116138bc57604051806020016040528060008152506138e7565b806138c684613cb2565b6040516020016138d7929190614bf6565b6040516020818303038152906040525b9392505050565b606060006138fa6118b3565b9050600081511161391a576040518060200160405280600081525061393b565b8060405160200161392b9190614c1c565b6040516020818303038152906040525b91505090565b60006001600160e01b031982167f43264347000000000000000000000000000000000000000000000000000000001480610c295750610c2982613de4565b60008181526006602052604080822080546001600160a01b0319169055518291906001600160a01b038516907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925908390a45050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528260601b60148201527f5af43d82803e903d91602b57fd5bf3000000000000000000000000000000000060288201526037816000f09150506001600160a01b038116612a2c5760405162461bcd60e51b815260206004820152601660248201527f455243313136373a20637265617465206661696c656400000000000000000000604482015260640161038c565b600080825160411415613ac15760208301516040840151606085015160001a613ab587828585613e22565b94509450505050611034565b825160401415613aeb5760208301516040840151613ae0868383613f0f565b935093505050611034565b50600090506002611034565b6000816004811115613b0b57613b0b614c5d565b1415613b145750565b6001816004811115613b2857613b28614c5d565b1415613b765760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161038c565b6002816004811115613b8a57613b8a614c5d565b1415613bd85760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161038c565b6003816004811115613bec57613bec614c5d565b1415613c455760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161038c565b6004816004811115613c5957613c59614c5d565b1415610ec15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161038c565b606081613cf257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115613d1c5780613d06816149da565b9150613d159050600a836148c8565b9150613cf6565b60008167ffffffffffffffff811115613d3757613d3761447a565b6040519080825280601f01601f191660200182016040528015613d61576020820181803683370190505b5090505b841561383357613d76600183614ae9565b9150613d83600a86614c73565b613d8e9060306149f5565b60f81b818381518110613da357613da36148f9565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613ddd600a866148c8565b9450613d65565b60006001600160e01b031982167f792ccce0000000000000000000000000000000000000000000000000000000001480610c295750610c2982613f57565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115613e595750600090506003613f06565b8460ff16601b14158015613e7157508460ff16601c14155b15613e825750600090506004613f06565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613ed6573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613eff57600060019250925050613f06565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b01613f4987828885613e22565b935093505050935093915050565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480613fba57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80613fee57506001600160e01b031982167f6050f48e00000000000000000000000000000000000000000000000000000000145b80610c2957506301ffc9a760e01b6001600160e01b0319831614610c29565b82805461401990614848565b90600052602060002090601f01602090048101928261403b5760008555614081565b82601f1061405457805160ff1916838001178555614081565b82800160010185558215614081579182015b82811115614081578251825591602001919060010190614066565b5061408d929150614105565b5090565b82805461409d90614848565b90600052602060002090601f0160209004810192826140bf5760008555614081565b82601f106140d85782800160ff19823516178555614081565b82800160010185558215614081579182015b828111156140815782358255916020019190600101906140ea565b5b8082111561408d5760008155600101614106565b6001600160e01b031981168114610ec157600080fd5b60006020828403121561414257600080fd5b81356138e78161411a565b60005b83811015614168578181015183820152602001614150565b83811115614177576000848401525b50505050565b6000815180845261419581602086016020860161414d565b601f01601f19169290920160200192915050565b6020815260006138e7602083018461417d565b6000602082840312156141ce57600080fd5b5035919050565b6001600160a01b0381168114610ec157600080fd5b600080604083850312156141fd57600080fd5b8235614208816141d5565b946020939093013593505050565b60008060006060848603121561422b57600080fd5b8335614236816141d5565b92506020840135614246816141d5565b929592945050506040919091013590565b6000806040838503121561426a57600080fd5b50508035926020909101359150565b60006020828403121561428b57600080fd5b81356138e7816141d5565b60008083601f8401126142a857600080fd5b50813567ffffffffffffffff8111156142c057600080fd5b6020830191508360208260051b850101111561103457600080fd5b600080600080600080608087890312156142f457600080fd5b863595506020870135614306816141d5565b9450604087013567ffffffffffffffff8082111561432357600080fd5b61432f8a838b01614296565b9096509450606089013591508082111561434857600080fd5b5061435589828a01614296565b979a9699509497509295939492505050565b6020808252825182820181905260009190848201906040850190845b818110156143ea576143d783855180511515825268ffffffffffffffffff602082015116602083015260408101516affffffffffffffffffffff808216604085015280606084015116606085015250505050565b9284019260809290920191600101614383565b50909695505050505050565b60008083601f84011261440857600080fd5b50813567ffffffffffffffff81111561442057600080fd5b60208301915083602082850101111561103457600080fd5b6000806020838503121561444b57600080fd5b823567ffffffffffffffff81111561446257600080fd5b61446e858286016143f6565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156144b9576144b961447a565b604052919050565b600067ffffffffffffffff8211156144db576144db61447a565b50601f01601f191660200190565b60006144fc6144f7846144c1565b614490565b905082815283838301111561451057600080fd5b828260208301376000602084830101529392505050565b600082601f83011261453857600080fd5b6138e7838335602085016144e9565b60008060006060848603121561455c57600080fd5b833567ffffffffffffffff8082111561457457600080fd5b61458087838801614527565b9450602086013591508082111561459657600080fd5b6145a287838801614527565b935060408601359150808211156145b857600080fd5b506145c586828701614527565b9150509250925092565b600080600080604085870312156145e557600080fd5b843567ffffffffffffffff808211156145fd57600080fd5b61460988838901614296565b9096509450602087013591508082111561462257600080fd5b5061462f87828801614296565b95989497509550505050565b60008060006040848603121561465057600080fd5b83359250602084013567ffffffffffffffff81111561466e57600080fd5b61467a868287016143f6565b9497909650939450505050565b8015158114610ec157600080fd5b600080604083850312156146a857600080fd5b82356146b3816141d5565b915060208301356146c381614687565b809150509250929050565b60808101610c29828480511515825268ffffffffffffffffff602082015116602083015260408101516affffffffffffffffffffff808216604085015280606084015116606085015250505050565b6000806000806080858703121561473357600080fd5b843561473e816141d5565b9350602085013561474e816141d5565b925060408501359150606085013567ffffffffffffffff81111561477157600080fd5b8501601f8101871361478257600080fd5b614791878235602084016144e9565b91505092959194509250565b600080604083850312156147b057600080fd5b82359150602083013567ffffffffffffffff8111156147ce57600080fd5b6147da85828601614527565b9150509250929050565b600080602083850312156147f757600080fd5b823567ffffffffffffffff81111561480e57600080fd5b61446e85828601614296565b6000806040838503121561482d57600080fd5b8235614838816141d5565b915060208301356146c3816141d5565b600181811c9082168061485c57607f821691505b602082108114156118ad57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156148ad576148ad61487d565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826148d7576148d76148b2565b500490565b6000602082840312156148ee57600080fd5b81516138e781614687565b634e487b7160e01b600052603260045260246000fd5b60006affffffffffffffffffffff8083168185168083038211156149355761493561487d565b01949350505050565b60006affffffffffffffffffffff838116908316818110156149625761496261487d565b039392505050565b600068ffffffffffffffffff808316818114156149895761498961487d565b6001019392505050565b6000808335601e198436030181126149aa57600080fd5b83018035915067ffffffffffffffff8211156149c557600080fd5b60200191503681900382131561103457600080fd5b60006000198214156149ee576149ee61487d565b5060010190565b60008219821115614a0857614a0861487d565b500190565b6001600160a01b038516815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f909201601f191601019392505050565b838152826020820152606060408201526000614a72606083018461417d565b95945050505050565b600060208284031215614a8d57600080fd5b815167ffffffffffffffff811115614aa457600080fd5b8201601f81018413614ab557600080fd5b8051614ac36144f7826144c1565b818152856020838501011115614ad857600080fd5b614a7282602083016020860161414d565b600082821015614afb57614afb61487d565b500390565b6040808252810184905260008560608301825b87811015614b43578235614b26816141d5565b6001600160a01b0316825260209283019290910190600101614b13565b5083810360208501528481527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff851115614b7c57600080fd5b8460051b915081866020830137600091016020019081529695505050505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152614bcf608083018461417d565b9695505050505050565b600060208284031215614beb57600080fd5b81516138e78161411a565b60008351614c0881846020880161414d565b83519083019061493581836020880161414d565b60008251614c2e81846020870161414d565b7f636f6e74726163742d6d65746164617461000000000000000000000000000000920191825250601101919050565b634e487b7160e01b600052602160045260246000fd5b600082614c8257614c826148b2565b50069056fea264697066735822122001b7f00dadd38e793c3eff9037de7ce2b59f854d89ca4af8752d130ceb18b5f164736f6c63430008090033
Deployed Bytecode
0x6080604052600436106103435760003560e01c806377830dca116101b0578063b88d4fde116100ec578063e8a3d48511610095578063f2fde38b1161006f578063f2fde38b14610a64578063f51c457514610a84578063f592644214610b30578063f851a44014610be757610395565b8063e8a3d485146109e6578063e8ac6533146109fb578063e985e9c514610a1b57610395565b8063cd5ad4c5116100c6578063cd5ad4c514610986578063d3716630146109a6578063e4623c1b146109c657610395565b8063b88d4fde14610926578063b963daef14610946578063c87b56dd1461096657610395565b806393777369116101595780639dc20f78116101335780639dc20f78146108a3578063a22cb465146108c3578063a8f6635c146108e3578063b0abd4571461091057610395565b8063937773691461084e57806395d89b411461086e5780639b3d270a1461088357610395565b80638bad0c0a1161018a5780638bad0c0a146107fb5780638da5cb5b1461081057806392e80eb41461082e57610395565b806377830dca1461079b5780637889cc16146107bb578063792ccce0146107db57610395565b8063432643471161027f578063559cb3a7116102285780636050f48e116102025780636050f48e146107185780636352211e146107385780636c0360eb1461075857806370a082311461076d57610395565b8063559cb3a71461066c57806355f804b31461068e5780635615d8fd146106ae57610395565b80634782f779116102595780634782f779146106175780634f558e791461063757806351ff48471461065757610395565b806343264347146105b757806344004cc1146105d7578063447fd8c4146105f757610395565b806328c5cf0a116102ec578063319cd2d7116102c6578063319cd2d7146105375780634025feb21461055757806342842e0e1461057757806342966c681461059757610395565b806328c5cf0a146104c35780632a55205a146104d85780632c5c0f541461051757610395565b8063095ea7b31161031d578063095ea7b31461046c5780630e18b6811461048e57806323b872dd146104a357610395565b806301ffc9a7146103dd57806306fdde0314610412578063081812fc1461043457610395565b366103955760405162461bcd60e51b815260206004820152601b60248201527f526563656976696e6720455448206e6f74207065726d6974746564000000000060448201526064015b60405180910390fd5b60405162461bcd60e51b815260206004820152601f60248201527f46616c6c6261636b2066756e6374696f6e206e6f74207065726d697474656400604482015260640161038c565b3480156103e957600080fd5b506103fd6103f8366004614130565b610c0c565b60405190151581526020015b60405180910390f35b34801561041e57600080fd5b50610427610c2f565b60405161040991906141a9565b34801561044057600080fd5b5061045461044f3660046141bc565b610cc1565b6040516001600160a01b039091168152602001610409565b34801561047857600080fd5b5061048c6104873660046141ea565b610d34565b005b34801561049a57600080fd5b5061048c610e4b565b3480156104af57600080fd5b5061048c6104be366004614216565b610ec4565b3480156104cf57600080fd5b5061048c610f3e565b3480156104e457600080fd5b506104f86104f3366004614257565b610faf565b604080516001600160a01b039093168352602083019190915201610409565b34801561052357600080fd5b506104546105323660046141bc565b61103b565b34801561054357600080fd5b506104546105523660046141bc565b611046565b34801561056357600080fd5b5061048c610572366004614216565b611059565b34801561058357600080fd5b5061048c610592366004614216565b6110f5565b3480156105a357600080fd5b5061048c6105b23660046141bc565b611110565b3480156105c357600080fd5b5061048c6105d2366004614279565b611119565b3480156105e357600080fd5b5061048c6105f2366004614216565b6111a2565b34801561060357600080fd5b506104546106123660046142db565b6112a0565b34801561062357600080fd5b5061048c6106323660046141ea565b6113cf565b34801561064357600080fd5b506103fd6106523660046141bc565b611583565b34801561066357600080fd5b5061042761158e565b34801561067857600080fd5b5061068161161c565b6040516104099190614367565b34801561069a57600080fd5b5061048c6106a9366004614438565b6116c4565b3480156106ba57600080fd5b50600f546010546106e79160ff808216926101008304909116916201000090046001600160a01b03169084565b6040516104099493929190931515845291151560208401526001600160a01b03166040830152606082015260800190565b34801561072457600080fd5b5061048c610733366004614547565b61170f565b34801561074457600080fd5b506104546107533660046141bc565b6117ac565b34801561076457600080fd5b506104276118b3565b34801561077957600080fd5b5061078d610788366004614279565b6118c2565b604051908152602001610409565b3480156107a757600080fd5b5061048c6107b63660046145cf565b61193d565b3480156107c757600080fd5b5061048c6107d6366004614257565b611f32565b3480156107e757600080fd5b5061048c6107f6366004614279565b611fbd565b34801561080757600080fd5b5061048c61205a565b34801561081c57600080fd5b506012546001600160a01b0316610454565b34801561083a57600080fd5b5061048c6108493660046141ea565b61206e565b34801561085a57600080fd5b5061048c610869366004614279565b6121d1565b34801561087a57600080fd5b5061042761230a565b34801561088f57600080fd5b5061048c61089e36600461463b565b612319565b3480156108af57600080fd5b5061078d6108be3660046141bc565b612629565b3480156108cf57600080fd5b5061048c6108de366004614695565b612634565b3480156108ef57600080fd5b506109036108fe3660046141bc565b6126ff565b60405161040991906146ce565b34801561091c57600080fd5b5061078d61271081565b34801561093257600080fd5b5061048c61094136600461471d565b6127fe565b34801561095257600080fd5b5061048c61096136600461479d565b612869565b34801561097257600080fd5b506104276109813660046141bc565b61291e565b34801561099257600080fd5b5061048c6109a1366004614279565b612a31565b3480156109b257600080fd5b506104276109c13660046141bc565b612a5b565b3480156109d257600080fd5b5061048c6109e13660046147e4565b612b5d565b3480156109f257600080fd5b50610427612bee565b348015610a0757600080fd5b50600c54610454906001600160a01b031681565b348015610a2757600080fd5b506103fd610a3636600461481a565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b348015610a7057600080fd5b5061048c610a7f366004614279565b612c98565b348015610a9057600080fd5b50610aff610a9f3660046141bc565b604080516060808201835260008083526020808401829052928401819052938452600e825292829020825193840183525460ff811615158452610100810461ffff1691840191909152630100000090046001600160a01b03169082015290565b6040805182511515815260208084015161ffff1690820152918101516001600160a01b031690820152606001610409565b348015610b3c57600080fd5b50610bad6040805160608101825260008082526020820181905291810191909152506040805160608101825260095460ff81161515825261010081046affffffffffffffffffffff1660208301526c0100000000000000000000000090046001600160a01b03169181019190915290565b604080518251151581526020808401516affffffffffffffffffffff1690820152918101516001600160a01b031690820152606001610409565b348015610bf357600080fd5b50600b546104549061010090046001600160a01b031681565b60006001600160e01b031982161580610c295750610c2982612cf2565b92915050565b606060018054610c3e90614848565b80601f0160208091040260200160405190810160405280929190818152602001828054610c6a90614848565b8015610cb75780601f10610c8c57610100808354040283529160200191610cb7565b820191906000526020600020905b815481529060010190602001808311610c9a57829003601f168201915b5050505050905090565b6000610ccc82612d30565b60405180604001604052806014815260200173151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b81525090610d175760405162461bcd60e51b815260040161038c91906141a9565b50506000908152600660205260409020546001600160a01b031690565b6000610d3f826117ac565b9050806001600160a01b0316836001600160a01b031614156040518060400160405280601681526020017f43757272656e74206f776e657220617070726f76616c0000000000000000000081525090610dab5760405162461bcd60e51b815260040161038c91906141a9565b50336001600160a01b0382161480610de657506001600160a01b038116600090815260076020908152604080832033845290915290205460ff165b6040518060400160405280601681526020017f4e6f74206f776e6572206e6f7220617070726f7665640000000000000000000081525090610e3a5760405162461bcd60e51b815260040161038c91906141a9565b50610e46818484612d84565b505050565b600c546001600160a01b031680336001600160a01b0316146040518060400160405280601281526020017f496e76616c6964206d73672e73656e646572000000000000000000000000000081525090610eb75760405162461bcd60e51b815260040161038c91906141a9565b50610ec181612de0565b50565b600080610ed13384612e61565b91509150806040518060400160405280601681526020017f4e6f74206f776e6572206e6f7220617070726f7665640000000000000000000081525090610f2a5760405162461bcd60e51b815260040161038c91906141a9565b50610f3782868686612ee1565b5050505050565b610f4661309c565b60095460408051808201909152601581527f436f6e74726163742069732066696e616c697a6564000000000000000000000060208201529060ff1615610f9f5760405162461bcd60e51b815260040161038c91906141a9565b506009805460ff19166001179055565b6000806000610fbd856131ec565b6000818152600e6020526040902054909150630100000090046001600160a01b03161561102a576000818152600e6020526040902054630100000081046001600160a01b0316906127109061101b90610100900461ffff1687614893565b61102591906148c8565b61102e565b6000805b92509250505b9250929050565b6000610c2982613362565b6000610c29611054836131ec565b613362565b61106161309c565b6040517fb88d4fde0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03838116602483015260448201839052608060648301526000608483015284169063b88d4fde9060a401600060405180830381600087803b1580156110d857600080fd5b505af11580156110ec573d6000803e3d6000fd5b50505050505050565b610e46838383604051806020016040528060008152506127fe565b610ec1816133a2565b600b5460408051808201909152601f81527f52652d696e697469616c697a6174696f6e206e6f74207065726d69747465640060208201529060ff16156111725760405162461bcd60e51b815260040161038c91906141a9565b50600d80546001600160a01b0319166001600160a01b0392909216919091179055600b805460ff19166001179055565b6111aa61309c565b6040517fa9059cbb0000000000000000000000000000000000000000000000000000000081526001600160a01b038381166004830152602482018390526000919085169063a9059cbb90604401602060405180830381600087803b15801561121157600080fd5b505af1158015611225573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061124991906148dc565b9050806040518060400160405280601581526020017f576974686472617720756e7375636365737366756c000000000000000000000081525090610f375760405162461bcd60e51b815260040161038c91906141a9565b60006112aa61309c565b6000878152600e602052604090208054600180871160ff19831617909255630100000090046001600160a01b03169085146112f1576112ec8787878787613517565b611319565b85856000818110611304576113046148f9565b90506020020160208101906113199190614279565b6000898152600e602090815260409182902080547fffffffffffffffffff0000000000000000000000000000000000000000ffffff1663010000006001600160a01b03958616810291909117918290558351868616815291049093169083015289917f834a47bfbb51ad808d8649527d9bf540f58cc71dc1093ae2249c8b230575ce98910160405180910390a250505060009485525050600e60205250506040902054630100000090046001600160a01b031690565b6113d761309c565b60408051808201909152601181527f5a65726f20455448205472616e736665720000000000000000000000000000006020820152816114295760405162461bcd60e51b815260040161038c91906141a9565b506001600160a01b0382166114805760405162461bcd60e51b815260206004820152601860248201527f5472616e7366657220746f207a65726f20616464726573730000000000000000604482015260640161038c565b60408051808201909152601481527f496e73756666696369656e742062616c616e636500000000000000000000000060208201524790818311156114d75760405162461bcd60e51b815260040161038c91906141a9565b506000836001600160a01b03168360405160006040518083038185875af1925050503d8060008114611525576040519150601f19603f3d011682016040523d82523d6000602084013e61152a565b606091505b50509050806040518060400160405280601581526020017f576974686472617720756e7375636365737366756c000000000000000000000081525090610f375760405162461bcd60e51b815260040161038c91906141a9565b6000610c2982612d30565b6011805461159b90614848565b80601f01602080910402602001604051908101604052809291908181526020018280546115c790614848565b80156116145780601f106115e957610100808354040283529160200191611614565b820191906000526020600020905b8154815290600101906020018083116115f757829003601f168201915b505050505081565b60606015805480602002602001604051908101604052809291908181526020016000905b828210156116bb576000848152602090819020604080516080810182529185015460ff81161515835268ffffffffffffffffff610100820416838501526affffffffffffffffffffff6a01000000000000000000008204811692840192909252600160a81b9004166060820152825260019092019101611640565b50505050905090565b6116cc61309c565b61170b82828080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061369c92505050565b5050565b60005460408051808201909152601f81527f52652d696e697469616c697a6174696f6e206e6f74207065726d69747465640060208201529060ff16156117685760405162461bcd60e51b815260040161038c91906141a9565b50825161177c90600190602086019061400d565b50815161179090600290602085019061400d565b5061179a8161369c565b50506000805460ff1916600117905550565b60006117b7826136af565b60405180604001604052806014815260200173151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b815250906118025760405162461bcd60e51b815260040161038c91906141a9565b506000828152600a602052604090205460ff1661183a576009546c0100000000000000000000000090046001600160a01b0316611858565b6000828152600a602052604090205461010090046001600160a01b03165b604080518082019091526014815273151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b60208201529091506001600160a01b0382166118ad5760405162461bcd60e51b815260040161038c91906141a9565b50919050565b606060038054610c3e90614848565b60408051808201909152601681527f517565727920666f72207a65726f20616464726573730000000000000000000060208201526000906001600160a01b0383166119205760405162461bcd60e51b815260040161038c91906141a9565b50506001600160a01b031660009081526005602052604090205490565b61194561309c565b821580159061195357508015155b6040518060400160405280601181526020017f496e70757420617272617920656d707479000000000000000000000000000000815250906119a75760405162461bcd60e51b815260040161038c91906141a9565b5060408051808201909152601981527f496e7075742061727261792073697a65206d69736d617463680000000000000060208201528382146119fc5760405162461bcd60e51b815260040161038c91906141a9565b5060095460408051808201909152601881527f5472616e7366657220746f207a65726f2061646472657373000000000000000060208201526c010000000000000000000000009091046001600160a01b03169081611a6d5760405162461bcd60e51b815260040161038c91906141a9565b5060095460408051808201909152601581527f436f6e74726163742069732066696e616c697a6564000000000000000000000060208201529060ff1615611ac75760405162461bcd60e51b815260040161038c91906141a9565b50601454600160a81b81046affffffffffffffffffffff1690610100900468ffffffffffffffffff166000611afd83600161490f565b9050806000805b89811015611db75760008b8b83818110611b2057611b206148f9565b90506020020135116040518060400160405280601081526020017f4e6f20746f6b656e73206d696e7465640000000000000000000000000000000081525090611b7c5760405162461bcd60e51b815260040161038c91906141a9565b5060008b8b83818110611b9157611b916148f9565b90506020020135905060018186611ba8919061490f565b611bb2919061493e565b925085611bbe8161496a565b96505060008a8a84818110611bd557611bd56148f9565b9050602002810190611be79190614993565b90501115611c3a57898983818110611c0157611c016148f9565b9050602002810190611c139190614993565b68ffffffffffffffffff88166000908152601660205260409020611c38929091614091565b505b60408051608081018252600180825268ffffffffffffffffff89811660208085018281526affffffffffffffffffffff8c81168789018181528c83166060808b01828152601580549b8c0181556000529a517f55f448fdea98c4d29eb340757ef0a66cd03dbb9538908a6a81d96026b71ec475909a018054965193519b518616600160a81b0274ffffffffffffffffffffffffffffffffffffffffff9c9096166a0100000000000000000000029b909b1669ffffffffffffffffffff93909916610100027fffffffffffffffffffffffffffffffffffffffffffff000000000000000000ff9a15159a909a167fffffffffffffffffffffffffffffffffffffffffffff00000000000000000000909616959095179890981716959095171790955585519182528101919091529283015230917feb15cc05309c4c75cd685463644508ef1d1663a4ca01ed00737631dc6dd02073910160405180910390a2611da1818661490f565b9450508080611daf906149da565b915050611b04565b506000611dc4868361493e565b6affffffffffffffffffffff1690508060056000896001600160a01b03166001600160a01b031681526020019081526020016000206000828254611e0891906149f5565b9091555050601480546affffffffffffffffffffff808516600160a81b0274ffffffffffffffffffffffffffffffffffffffffff68ffffffffffffffffff8a166101009081029190911674ffffffffffffffffffffff000000000000000000ff90941693909317179092556009805484939192600192611e8c92869290041661490f565b92506101000a8154816affffffffffffffffffffff02191690836affffffffffffffffffffff160217905550866001600160a01b031660006001600160a01b0316846affffffffffffffffffffff167fdeaa91b6123d068f5821d0fb0678463d1a8a6079fe8af5de3ce5e896dcf9133d85604051611f1d91906affffffffffffffffffffff91909116815260200190565b60405180910390a45050505050505050505050565b611f3a61309c565b60408051808201909152600e81527f42697073206f76657220313030250000000000000000000000000000000000006020820152612710821115611f915760405162461bcd60e51b815260040161038c91906141a9565b506000918252600e6020526040909120805461ffff9092166101000262ffff0019909216919091179055565b60085460408051808201909152601f81527f52652d696e697469616c697a6174696f6e206e6f74207065726d69747465640060208201529060ff16156120165760405162461bcd60e51b815260040161038c91906141a9565b50600980546001600160a01b039092166c01000000000000000000000000026bffffffffffffffffffffffff9092169190911790556008805460ff19166001179055565b61206261309c565b61206c6000612de0565b565b61207661309c565b60408051808201909152601a81527f5369676e65722073657420746f207a65726f206164647265737300000000000060208201526001600160a01b0383166120d15760405162461bcd60e51b815260040161038c91906141a9565b5060408051808201909152601781527f53616c74656420686173682073657420746f207a65726f0000000000000000006020820152816121245760405162461bcd60e51b815260040161038c91906141a9565b50600f5460408051808201909152601781527f436f6e747261637420616c7265616479207369676e6564000000000000000000602082015290610100900460ff16156121835760405162461bcd60e51b815260040161038c91906141a9565b50600f805460109290925560ff196001600160a01b039093166201000002929092167fffffffffffffffffffff0000000000000000000000000000000000000000ff00909116176001179055565b6121d961309c565b6001600160a01b03811661220757601380546001600160a01b0383166001600160a01b031990911617905550565b6040516301ffc9a760e01b81527f5219fb8e0000000000000000000000000000000000000000000000000000000060048201526001600160a01b038216906301ffc9a79060240160206040518083038186803b15801561226657600080fd5b505afa15801561227a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061229e91906148dc565b6122ea5760405162461bcd60e51b815260206004820152601a60248201527f496e76616c6964204d657461646174612047656e657261746f72000000000000604482015260640161038c565b601380546001600160a01b0383166001600160a01b031990911617905550565b606060028054610c3e90614848565b600f5460408051808201909152601781527f436f6e747261637420616c7265616479207369676e6564000000000000000000602082015290610100900460ff16156123775760405162461bcd60e51b815260040161038c91906141a9565b50600f5460408051808201909152601381527f436f6e7472616374206e6f742073616c7465640000000000000000000000000060208201529060ff166123d05760405162461bcd60e51b815260040161038c91906141a9565b50600f54601054620100009091046001600160a01b03169081336001600160a01b0316146040518060400160405280601281526020017f496e76616c6964206d73672e73656e6465720000000000000000000000000000815250906124485760405162461bcd60e51b815260040161038c91906141a9565b50808560405160200161245d91815260200190565b60405160208183030381529060405280519060200120146040518060400160405280601581526020017f496e636f7272656374207365637265742073616c740000000000000000000000815250906124c85760405162461bcd60e51b815260040161038c91906141a9565b50816001600160a01b031661256961252d836040517f19457468657265756d205369676e6564204d6573736167653a0a3332000000006020820152603c8101829052600090605c01604051602081830303815290604052805190602001209050919050565b86868080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152506136d692505050565b6001600160a01b0316146040518060400160405280601681526020017f556e65787065637465642064617461207369676e657200000000000000000000815250906125c75760405162461bcd60e51b815260040161038c91906141a9565b506125d460118585614091565b50600f805461ff0019166101001790556040517f955fd8871b091d05a1f766f82ece6ba4d9c55e65e065d4459b26740f2e698e709061261a908490849088908890614a0d565b60405180910390a15050505050565b6000610c29826131ec565b60408051808201909152601181527f417070726f766520746f2063616c6c657200000000000000000000000000000060208201526001600160a01b0383163314156126925760405162461bcd60e51b815260040161038c91906141a9565b503360008181526007602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b604080516080810182526000808252602082018190529181018290526060810191909152601554600019830190811061277a5760405162461bcd60e51b815260206004820152601960248201527f4e69667479205479706520446f6573204e6f7420457869737400000000000000604482015260640161038c565b6015818154811061278d5761278d6148f9565b600091825260209182902060408051608081018252919092015460ff81161515825268ffffffffffffffffff610100820416938201939093526affffffffffffffffffffff6a01000000000000000000008404811692820192909252600160a81b9092041660608201529392505050565b612809848484610ec4565b612815848484846136fa565b6040518060400160405280601581526020017f4e6f7420616e204552433732315265636569766572000000000000000000000081525090610f375760405162461bcd60e51b815260040161038c91906141a9565b61287161309c565b6000828152601660205260409020805461288a90614848565b1590506128ff5760405162461bcd60e51b815260206004820152602560248201527f4552433732314d657461646174613a2049504653206861736820616c7265616460448201527f7920736574000000000000000000000000000000000000000000000000000000606482015260840161038c565b60008281526016602090815260409091208251610e469284019061400d565b6013546060906001600160a01b031661293a57610c298261383b565b61294382612d30565b60405180604001604052806014815260200173151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b8152509061298e5760405162461bcd60e51b815260040161038c91906141a9565b506013546001600160a01b031663f572b6d8836129aa816131ec565b604051806020016040528060008152506040518463ffffffff1660e01b81526004016129d893929190614a53565b60006040518083038186803b1580156129f057600080fd5b505afa158015612a04573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052610c299190810190614a7b565b919050565b612a3961309c565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b6060612a6682612d30565b60405180604001604052806014815260200173151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b81525090612ab15760405162461bcd60e51b815260040161038c91906141a9565b5060166000612abf846131ec565b81526020019081526020016000208054612ad890614848565b80601f0160208091040260200160405190810160405280929190818152602001828054612b0490614848565b8015612b515780601f10612b2657610100808354040283529160200191612b51565b820191906000526020600020905b815481529060010190602001808311612b3457829003601f168201915b50505050509050919050565b60408051808201909152601181527f496e70757420617272617920656d707479000000000000000000000000000000602082015281612baf5760405162461bcd60e51b815260040161038c91906141a9565b5060005b81811015610e4657612bdc838383818110612bd057612bd06148f9565b905060200201356133a2565b80612be6816149da565b915050612bb3565b6013546060906001600160a01b0316612c0e57612c096138ee565b905090565b601360009054906101000a90046001600160a01b03166001600160a01b031663a76b4d566040518163ffffffff1660e01b815260040160006040518083038186803b158015612c5c57600080fd5b505afa158015612c70573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052612c099190810190614a7b565b612ca061309c565b601280546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60006001600160e01b031982167f2a55205a000000000000000000000000000000000000000000000000000000001480610c295750610c2982613941565b6000612d3b826136af565b15612d7c576000828152600a602052604090205461010090046001600160a01b0316151580610c295750506000908152600a602052604090205460ff161590565b506000919050565b60008181526006602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591a4505050565b600b80546001600160a01b038381166101008181027fffffffffffffffffffffff0000000000000000000000000000000000000000ff851617909455600c80546001600160a01b031916905560405193909204169182907ff8ccb027dfcd135e000e9d45e6cc2d662578a8825d4c45b5e32e0adf67e79ec690600090a35050565b600080612e6d836117ac565b9150816001600160a01b0316846001600160a01b03161480612ea857506000838152600660205260409020546001600160a01b038581169116145b80612ed857506001600160a01b0380831660009081526007602090815260408083209388168352929052205460ff165b90509250929050565b826001600160a01b0316846001600160a01b0316146040518060400160405280601d81526020017f5472616e736665722066726f6d20696e636f7272656374206f776e657200000081525090612f4a5760405162461bcd60e51b815260040161038c91906141a9565b5060408051808201909152601881527f5472616e7366657220746f207a65726f2061646472657373000000000000000060208201526001600160a01b038316612fa65760405162461bcd60e51b815260040161038c91906141a9565b50612fb1848261397f565b6001600160a01b0383166000908152600560205260408120805460019290612fda908490614ae9565b90915550506001600160a01b03821660009081526005602052604081208054600192906130089084906149f5565b90915550506000818152600a60205260409020805460017fffffffffffffffffffffff0000000000000000000000000000000000000000009091166101006001600160a01b038616021717905580826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef60405160405180910390a450505050565b600b5461010090046001600160a01b03168061318f57600d546001600160a01b031663e37ce6fa336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260240160206040518083038186803b15801561310357600080fd5b505afa158015613117573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061313b91906148dc565b6040518060400160405280601281526020017f496e76616c6964206d73672e73656e64657200000000000000000000000000008152509061170b5760405162461bcd60e51b815260040161038c91906141a9565b60408051808201909152601281527f496e76616c6964206d73672e73656e64657200000000000000000000000000006020820152336001600160a01b0383161461170b5760405162461bcd60e51b815260040161038c91906141a9565b6015546000908190819061320290600190614ae9565b9050600060026132128484614ae9565b61321c91906148c8565b90505b6015548110156133575760006015828154811061323e5761323e6148f9565b600091825260209091200180549091506a010000000000000000000090046affffffffffffffffffffff16861080159061328d57508054600160a81b90046affffffffffffffffffffff168611155b156132ac5754610100900468ffffffffffffffffff1695945050505050565b8054600160a81b90046affffffffffffffffffffff168611156132fd576132d48260016149f5565b935060026132e28585614ae9565b6132ec91906148c8565b6132f690856149f5565b9150613351565b80546a010000000000000000000090046affffffffffffffffffffff168610156133515761332c600183614ae9565b9250600261333a8585614ae9565b61334491906148c8565b61334e90856149f5565b91505b5061321f565b506000949350505050565b6000818152600e602052604081205460ff1661337f576000610c29565b506000908152600e6020526040902054630100000090046001600160a01b031690565b60006133ad826117ac565b90506000336001600160a01b03831614806133de57506000838152600660205260409020546001600160a01b031633145b8061340c57506001600160a01b038216600090815260076020908152604080832033845290915290205460ff165b9050806040518060400160405280601681526020017f4e6f74206f776e6572206e6f7220617070726f76656400000000000000000000815250906134635760405162461bcd60e51b815260040161038c91906141a9565b5061346e828461397f565b6001600160a01b0382166000908152600560205260408120805460019290613497908490614ae9565b909155506134da9050836000908152600a6020526040902080547fffffffffffffffffffffff000000000000000000000000000000000000000000166001179055565b60405183906000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a4505050565b6040516301ffc9a760e01b81527f37de79fc0000000000000000000000000000000000000000000000000000000060048201526000906001600160a01b038716906301ffc9a79060240160206040518083038186803b15801561357957600080fd5b505afa15801561358d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906135b191906148dc565b6040518060400160405280601e81526020017f556e636c6f6e6561626c65207265666572656e636520636f6e74726163740000815250906136055760405162461bcd60e51b815260040161038c91906141a9565b506000613611876139d4565b6040517f7fbbe46f0000000000000000000000000000000000000000000000000000000081529091506001600160a01b03821690637fbbe46f9061365f908990899089908990600401614b00565b600060405180830381600087803b15801561367957600080fd5b505af115801561368d573d6000803e3d6000fd5b50929998505050505050505050565b805161170b90600390602084019061400d565b60008082118015610c2957505060095461010090046affffffffffffffffffffff16101590565b60008060006136e58585613a8a565b915091506136f281613af7565b509392505050565b60006001600160a01b0384163b1561382f57604051630a85bd0160e11b81526001600160a01b0385169063150b7a029061373e903390899088908890600401614b9d565b602060405180830381600087803b15801561375857600080fd5b505af1925050508015613788575060408051601f3d908101601f1916820190925261378591810190614bd9565b60015b613815573d8080156137b6576040519150601f19603f3d011682016040523d82523d6000602084013e6137bb565b606091505b50805161380d57604080518082018252601581527f4e6f7420616e20455243373231526563656976657200000000000000000000006020820152905162461bcd60e51b815261038c91906004016141a9565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050613833565b5060015b949350505050565b606061384682612d30565b60405180604001604052806014815260200173151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b815250906138915760405162461bcd60e51b815260040161038c91906141a9565b50600061389c6118b3565b905060008151116138bc57604051806020016040528060008152506138e7565b806138c684613cb2565b6040516020016138d7929190614bf6565b6040516020818303038152906040525b9392505050565b606060006138fa6118b3565b9050600081511161391a576040518060200160405280600081525061393b565b8060405160200161392b9190614c1c565b6040516020818303038152906040525b91505090565b60006001600160e01b031982167f43264347000000000000000000000000000000000000000000000000000000001480610c295750610c2982613de4565b60008181526006602052604080822080546001600160a01b0319169055518291906001600160a01b038516907f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925908390a45050565b60006040517f3d602d80600a3d3981f3363d3d373d3d3d363d7300000000000000000000000081528260601b60148201527f5af43d82803e903d91602b57fd5bf3000000000000000000000000000000000060288201526037816000f09150506001600160a01b038116612a2c5760405162461bcd60e51b815260206004820152601660248201527f455243313136373a20637265617465206661696c656400000000000000000000604482015260640161038c565b600080825160411415613ac15760208301516040840151606085015160001a613ab587828585613e22565b94509450505050611034565b825160401415613aeb5760208301516040840151613ae0868383613f0f565b935093505050611034565b50600090506002611034565b6000816004811115613b0b57613b0b614c5d565b1415613b145750565b6001816004811115613b2857613b28614c5d565b1415613b765760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e61747572650000000000000000604482015260640161038c565b6002816004811115613b8a57613b8a614c5d565b1415613bd85760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e67746800604482015260640161038c565b6003816004811115613bec57613bec614c5d565b1415613c455760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c604482015261756560f01b606482015260840161038c565b6004816004811115613c5957613c59614c5d565b1415610ec15760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c604482015261756560f01b606482015260840161038c565b606081613cf257505060408051808201909152600181527f3000000000000000000000000000000000000000000000000000000000000000602082015290565b8160005b8115613d1c5780613d06816149da565b9150613d159050600a836148c8565b9150613cf6565b60008167ffffffffffffffff811115613d3757613d3761447a565b6040519080825280601f01601f191660200182016040528015613d61576020820181803683370190505b5090505b841561383357613d76600183614ae9565b9150613d83600a86614c73565b613d8e9060306149f5565b60f81b818381518110613da357613da36148f9565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a905350613ddd600a866148c8565b9450613d65565b60006001600160e01b031982167f792ccce0000000000000000000000000000000000000000000000000000000001480610c295750610c2982613f57565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115613e595750600090506003613f06565b8460ff16601b14158015613e7157508460ff16601c14155b15613e825750600090506004613f06565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015613ed6573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116613eff57600060019250925050613f06565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b01613f4987828885613e22565b935093505050935093915050565b60006001600160e01b031982167f80ac58cd000000000000000000000000000000000000000000000000000000001480613fba57506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b80613fee57506001600160e01b031982167f6050f48e00000000000000000000000000000000000000000000000000000000145b80610c2957506301ffc9a760e01b6001600160e01b0319831614610c29565b82805461401990614848565b90600052602060002090601f01602090048101928261403b5760008555614081565b82601f1061405457805160ff1916838001178555614081565b82800160010185558215614081579182015b82811115614081578251825591602001919060010190614066565b5061408d929150614105565b5090565b82805461409d90614848565b90600052602060002090601f0160209004810192826140bf5760008555614081565b82601f106140d85782800160ff19823516178555614081565b82800160010185558215614081579182015b828111156140815782358255916020019190600101906140ea565b5b8082111561408d5760008155600101614106565b6001600160e01b031981168114610ec157600080fd5b60006020828403121561414257600080fd5b81356138e78161411a565b60005b83811015614168578181015183820152602001614150565b83811115614177576000848401525b50505050565b6000815180845261419581602086016020860161414d565b601f01601f19169290920160200192915050565b6020815260006138e7602083018461417d565b6000602082840312156141ce57600080fd5b5035919050565b6001600160a01b0381168114610ec157600080fd5b600080604083850312156141fd57600080fd5b8235614208816141d5565b946020939093013593505050565b60008060006060848603121561422b57600080fd5b8335614236816141d5565b92506020840135614246816141d5565b929592945050506040919091013590565b6000806040838503121561426a57600080fd5b50508035926020909101359150565b60006020828403121561428b57600080fd5b81356138e7816141d5565b60008083601f8401126142a857600080fd5b50813567ffffffffffffffff8111156142c057600080fd5b6020830191508360208260051b850101111561103457600080fd5b600080600080600080608087890312156142f457600080fd5b863595506020870135614306816141d5565b9450604087013567ffffffffffffffff8082111561432357600080fd5b61432f8a838b01614296565b9096509450606089013591508082111561434857600080fd5b5061435589828a01614296565b979a9699509497509295939492505050565b6020808252825182820181905260009190848201906040850190845b818110156143ea576143d783855180511515825268ffffffffffffffffff602082015116602083015260408101516affffffffffffffffffffff808216604085015280606084015116606085015250505050565b9284019260809290920191600101614383565b50909695505050505050565b60008083601f84011261440857600080fd5b50813567ffffffffffffffff81111561442057600080fd5b60208301915083602082850101111561103457600080fd5b6000806020838503121561444b57600080fd5b823567ffffffffffffffff81111561446257600080fd5b61446e858286016143f6565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f1916810167ffffffffffffffff811182821017156144b9576144b961447a565b604052919050565b600067ffffffffffffffff8211156144db576144db61447a565b50601f01601f191660200190565b60006144fc6144f7846144c1565b614490565b905082815283838301111561451057600080fd5b828260208301376000602084830101529392505050565b600082601f83011261453857600080fd5b6138e7838335602085016144e9565b60008060006060848603121561455c57600080fd5b833567ffffffffffffffff8082111561457457600080fd5b61458087838801614527565b9450602086013591508082111561459657600080fd5b6145a287838801614527565b935060408601359150808211156145b857600080fd5b506145c586828701614527565b9150509250925092565b600080600080604085870312156145e557600080fd5b843567ffffffffffffffff808211156145fd57600080fd5b61460988838901614296565b9096509450602087013591508082111561462257600080fd5b5061462f87828801614296565b95989497509550505050565b60008060006040848603121561465057600080fd5b83359250602084013567ffffffffffffffff81111561466e57600080fd5b61467a868287016143f6565b9497909650939450505050565b8015158114610ec157600080fd5b600080604083850312156146a857600080fd5b82356146b3816141d5565b915060208301356146c381614687565b809150509250929050565b60808101610c29828480511515825268ffffffffffffffffff602082015116602083015260408101516affffffffffffffffffffff808216604085015280606084015116606085015250505050565b6000806000806080858703121561473357600080fd5b843561473e816141d5565b9350602085013561474e816141d5565b925060408501359150606085013567ffffffffffffffff81111561477157600080fd5b8501601f8101871361478257600080fd5b614791878235602084016144e9565b91505092959194509250565b600080604083850312156147b057600080fd5b82359150602083013567ffffffffffffffff8111156147ce57600080fd5b6147da85828601614527565b9150509250929050565b600080602083850312156147f757600080fd5b823567ffffffffffffffff81111561480e57600080fd5b61446e85828601614296565b6000806040838503121561482d57600080fd5b8235614838816141d5565b915060208301356146c3816141d5565b600181811c9082168061485c57607f821691505b602082108114156118ad57634e487b7160e01b600052602260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156148ad576148ad61487d565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826148d7576148d76148b2565b500490565b6000602082840312156148ee57600080fd5b81516138e781614687565b634e487b7160e01b600052603260045260246000fd5b60006affffffffffffffffffffff8083168185168083038211156149355761493561487d565b01949350505050565b60006affffffffffffffffffffff838116908316818110156149625761496261487d565b039392505050565b600068ffffffffffffffffff808316818114156149895761498961487d565b6001019392505050565b6000808335601e198436030181126149aa57600080fd5b83018035915067ffffffffffffffff8211156149c557600080fd5b60200191503681900382131561103457600080fd5b60006000198214156149ee576149ee61487d565b5060010190565b60008219821115614a0857614a0861487d565b500190565b6001600160a01b038516815283602082015260606040820152816060820152818360808301376000818301608090810191909152601f909201601f191601019392505050565b838152826020820152606060408201526000614a72606083018461417d565b95945050505050565b600060208284031215614a8d57600080fd5b815167ffffffffffffffff811115614aa457600080fd5b8201601f81018413614ab557600080fd5b8051614ac36144f7826144c1565b818152856020838501011115614ad857600080fd5b614a7282602083016020860161414d565b600082821015614afb57614afb61487d565b500390565b6040808252810184905260008560608301825b87811015614b43578235614b26816141d5565b6001600160a01b0316825260209283019290910190600101614b13565b5083810360208501528481527f07ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff851115614b7c57600080fd5b8460051b915081866020830137600091016020019081529695505050505050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152614bcf608083018461417d565b9695505050505050565b600060208284031215614beb57600080fd5b81516138e78161411a565b60008351614c0881846020880161414d565b83519083019061493581836020880161414d565b60008251614c2e81846020870161414d565b7f636f6e74726163742d6d65746164617461000000000000000000000000000000920191825250601101919050565b634e487b7160e01b600052602160045260246000fd5b600082614c8257614c826148b2565b50069056fea264697066735822122001b7f00dadd38e793c3eff9037de7ce2b59f854d89ca4af8752d130ceb18b5f164736f6c63430008090033
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.