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 | 16679031 | 628 days ago | IN | 0 ETH | 0.09106249 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
HitPieceNFTV0013
Compiler Version
v0.8.13+commit.abaa5c0e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721RoyaltyUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721PausableUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/utils/CountersUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/token/common/ERC2981Upgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; import "../extensions/IHPMarketplaceMintV0002.sol"; import "../extensions/OwnableUpgradeable.sol"; import "../extensions/HPApprovedMarketplaceUpgradeable.sol"; import "../extensions/IHPMarketplaceMint.sol"; import "../extensions/IHPEvent.sol"; import "../extensions/IHPRoles.sol"; import "../extensions/NFTContractMetadataUpgradeable.sol"; // import "hardhat/console.sol"; contract HitPieceNFTV0013 is Initializable, ERC721Upgradeable, ERC721URIStorageUpgradeable, ERC721RoyaltyUpgradeable, ERC721PausableUpgradeable, OwnableUpgradeable, HPApprovedMarketplaceUpgradeable, IHPMarketplaceMintV0002, NFTContractMetadataUpgradeable { bool private hasInitialized; address public mintAdmin; address public hpEventEmitterAddress; mapping(string => uint256) private _trackIdToTokenId; mapping(uint256 => string) private _tokenIdToTrackId; CountersUpgradeable.Counter private tokenCount; event Minted(uint256 indexed tokenId, string trackId); address private hpRolesContractAddress; bool private hasUpgradeInitialzed; uint256 public MAX_SUPPLY; bool private isSeriesNft; string private baseTokenURI; function initialize( address _mintAdmin, address royaltyAddress, uint96 feeNumerator, string memory tokenName, string memory token, address[] memory marketplaces, string memory _contractMetadataURI, address _hpEventEmitterAddress, address _hpRolesContractAddress, uint256 _maxSupply, bool _isSeriesNft, string memory _baseTokenURI ) initializer public { require(hasInitialized == false, "This has already been initialized"); hasInitialized = true; mintAdmin = _mintAdmin; hpEventEmitterAddress = _hpEventEmitterAddress; _baseContractURI = _contractMetadataURI; hpRolesContractAddress = _hpRolesContractAddress; hasUpgradeInitialzed = true; MAX_SUPPLY = _maxSupply; isSeriesNft = _isSeriesNft; baseTokenURI = _baseTokenURI; __ERC721_init(tokenName, token); __ERC721URIStorage_init_unchained(); __ERC2981_init_unchained(); __Ownable_init_unchained(); __ERC721Pausable_init_unchained(); _setDefaultRoyalty(royaltyAddress, feeNumerator); IHPEvent hpEventEmitter = IHPEvent(address(hpEventEmitterAddress)); hpEventEmitter.setAllowedContracts(address(this)); hpEventEmitter.emitNftContractInitialized(address(this)); } function upgrader(address _hpRolesContractAddress) external { require(hasUpgradeInitialzed == false, "already upgraded"); hasUpgradeInitialzed = true; hpRolesContractAddress = _hpRolesContractAddress; } function setHasUpgradeInitialized(bool upgraded) external onlyOwner { hasUpgradeInitialzed = upgraded; } function _mintTo( address to, address creatorRoyaltyAddress, uint96 feeNumerator, string memory uri, string memory trackId ) private returns (uint256) { require( _trackIdToTokenId[trackId] == 0 || _exists(0) == false, "Track already minted!" ); uint256 newItemId = CountersUpgradeable.current(tokenCount); require(MAX_SUPPLY == 0 || newItemId < MAX_SUPPLY, "Already minted all the tokens."); _mint(to, newItemId); if (!isSeriesNft) { _setTokenURI(newItemId, uri); } _trackIdToTokenId[trackId] = newItemId; _tokenIdToTrackId[newItemId] = trackId; if (creatorRoyaltyAddress != address(0)) { _setTokenRoyalty(newItemId, creatorRoyaltyAddress, feeNumerator); } CountersUpgradeable.increment(tokenCount); IHPEvent hpEventEmitter = IHPEvent(address(hpEventEmitterAddress)); hpEventEmitter.emitMintEvent( to, address(this), newItemId, trackId); emit Minted(newItemId, trackId); return newItemId; } function adminMint( address to, address creatorRoyaltyAddress, uint96 feeNumerator, string memory uri, string memory trackId ) public { IHPRoles hpRoles = IHPRoles(address(hpRolesContractAddress)); require(mintAdmin == msg.sender || hpRoles.isAdmin(msg.sender) == true, "Admin rights required"); _mintTo(to, creatorRoyaltyAddress, feeNumerator, uri, trackId); } function marketplaceMint( address to, address creatorRoyaltyAddress, uint96 feeNumerator, string memory uri, string memory trackId ) public override returns(uint256) { IHPRoles hpRoles = IHPRoles(address(hpRolesContractAddress)); require(hpRoles.isApprovedMarketplace(msg.sender) == true, "Only approved Marketplaces can call this function"); uint256 newTokenId = _mintTo(to, creatorRoyaltyAddress, feeNumerator, uri, trackId); return newTokenId; } function marketplaceTransfer( address from, address to, uint tokenId ) public override { IHPRoles hpRoles = IHPRoles(address(hpRolesContractAddress)); require(hpRoles.isApprovedMarketplace(msg.sender) == true, "Only approved Marketplaces can call this function"); _transfer(from, to, tokenId); } function getTotalSupply() public view returns (uint256) { return CountersUpgradeable.current(tokenCount); } function setMaxSupply(uint256 _maxSupply) public onlyOwner { MAX_SUPPLY = _maxSupply; } function setIsSeriesNft(bool _isSeriesNft) public onlyOwner { isSeriesNft = _isSeriesNft; } function setBaseTokenURI(string memory _baseTokenURI) public onlyOwner { baseTokenURI = _baseTokenURI; } function setApprovalForAll(address operator, bool approved) public override(ERC721Upgradeable) { super.setApprovalForAll(operator, approved); IHPEvent hpEventEmitter = IHPEvent(address(hpEventEmitterAddress)); hpEventEmitter.emitSetApprovedForAll( address(this), operator, approved ); } function approve(address operator, uint256 tokenId) public override(ERC721Upgradeable) { super.approve(operator, tokenId); IHPEvent hpEventEmitter = IHPEvent(address(hpEventEmitterAddress)); hpEventEmitter.emitApproved( address(this), operator, tokenId ); } function transferFrom(address from, address to, uint256 tokenId) public override(ERC721Upgradeable) { super.transferFrom(from, to, tokenId); } function safeTransferFrom(address from, address to, uint256 tokenId) public override(ERC721Upgradeable) { super.safeTransferFrom(from, to, tokenId); } function burn(uint256 tokenId) public { IHPRoles hpRoles = IHPRoles(address(hpRolesContractAddress)); require(msg.sender == ownerOf(tokenId) || hpRoles.isAdmin(msg.sender) == true, "You must be the owner to burn token"); _burn(tokenId); } function getTokenIdFromTrackId(string memory trackId) public view returns (uint256) { return _trackIdToTokenId[trackId]; } function _isTokenOwner(address requester, uint256 tokenId) private view returns (bool) { if (ownerOf(tokenId) == requester) { return true; } return false; } function pause() public onlyOwner { _pause(); } function unpause() public onlyOwner { _unpause(); } // ERC2981Upgradeable overrides function supportsInterface(bytes4 interfaceId) public view override(ERC721Upgradeable, ERC721RoyaltyUpgradeable) returns (bool) { return super.supportsInterface(interfaceId); } function setMintAdmin(address newAdmin) public onlyOwner { mintAdmin = newAdmin; } function isApprovedForAll(address owner, address operator) override(ERC721Upgradeable) public view returns (bool) { IHPRoles hpRoles = IHPRoles(address(hpRolesContractAddress)); if (hpRoles.isApprovedMarketplace(operator)) { return true; } return ERC721Upgradeable.isApprovedForAll(owner, operator); } function _seriesBaseURI() internal view returns (string memory) { return string(abi.encodePacked(baseTokenURI, "/")); } // ERC721 Overrides function tokenURI(uint256 tokenId) public view override(ERC721URIStorageUpgradeable, ERC721Upgradeable) returns (string memory) { require(_exists(tokenId), "Token ID doesn't exist"); if (isSeriesNft && bytes(baseTokenURI).length > 0) { return string(abi.encodePacked(_seriesBaseURI(), _toString(tokenId))); } return super.tokenURI(tokenId); } function _burn(uint256 tokenId) internal override(ERC721URIStorageUpgradeable, ERC721Upgradeable, ERC721RoyaltyUpgradeable) { delete _trackIdToTokenId[_tokenIdToTrackId[tokenId]]; delete _tokenIdToTrackId[tokenId]; super._burn(tokenId); } // Pausable function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal override(ERC721PausableUpgradeable, ERC721Upgradeable) { super._beforeTokenTransfer(from, to, tokenId); require(!paused(), "ERC721Pausable: token transfer while paused"); } function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override(ERC721Upgradeable) { IHPEvent hpEventEmitter = IHPEvent(address(hpEventEmitterAddress)); hpEventEmitter.emitTokenTransferred( from, to, address(this), tokenId ); super._afterTokenTransfer(from, to, tokenId); } // Royalties function setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) public { IHPRoles hpRoles = IHPRoles(address(hpRolesContractAddress)); require(mintAdmin == msg.sender || hpRoles.isAdmin(msg.sender) == true, "Admin rights required"); _setTokenRoyalty(tokenId, receiver, feeNumerator); } function setTokenURI(uint256 tokenId, string memory _tokenURI) public onlyOwner { _setTokenURI(tokenId, _tokenURI); } function getHpRoles() public view returns (address) { return hpRolesContractAddress; } function setHpRoles(address _hpRolesContractAddress) public onlyOwner { hpRolesContractAddress = _hpRolesContractAddress; } function overrideOwnership(address newOwner) public { IHPRoles hpRoles = IHPRoles(address(hpRolesContractAddress)); require(hpRoles.isAdmin(msg.sender) == true, "Admin rights required"); _transferOwnership(newOwner); } function _toString(uint256 value) internal pure returns (string memory ptr) { assembly { ptr := add(mload(0x40), 128) mstore(0x40, ptr) let end := ptr for { let temp := value ptr := sub(ptr, 1) mstore8(ptr, add(48, mod(temp, 10))) temp := div(temp, 10) } temp { temp := div(temp, 10) } { ptr := sub(ptr, 1) mstore8(ptr, add(48, mod(temp, 10))) } let length := sub(end, ptr) ptr := sub(ptr, 32) mstore(ptr, length) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165Upgradeable.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. * * _Available since v4.5._ */ interface IERC2981Upgradeable is IERC165Upgradeable { /** * @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 paid in that same unit of exchange. */ function royaltyInfo(uint256 tokenId, uint256 salePrice) external view returns (address receiver, uint256 royaltyAmount); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (proxy/utils/Initializable.sol) pragma solidity ^0.8.2; import "../../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * The initialization functions use a version number. Once a version number is used, it is consumed and cannot be * reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in * case an upgrade adds a module that needs to be initialized. * * For example: * * [.hljs-theme-light.nopadding] * ``` * contract MyToken is ERC20Upgradeable { * function initialize() initializer public { * __ERC20_init("MyToken", "MTK"); * } * } * contract MyTokenV2 is MyToken, ERC20PermitUpgradeable { * function initializeV2() reinitializer(2) public { * __ERC20Permit_init("MyToken"); * } * } * ``` * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. * * [CAUTION] * ==== * Avoid leaving a contract uninitialized. * * An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation * contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke * the {_disableInitializers} function in the constructor to automatically lock it when it is deployed: * * [.hljs-theme-light.nopadding] * ``` * /// @custom:oz-upgrades-unsafe-allow constructor * constructor() { * _disableInitializers(); * } * ``` * ==== */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. * @custom:oz-retyped-from bool */ uint8 private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Triggered when the contract has been initialized or reinitialized. */ event Initialized(uint8 version); /** * @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope, * `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`. */ modifier initializer() { bool isTopLevelCall = _setInitializedVersion(1); if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(1); } } /** * @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the * contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be * used to initialize parent contracts. * * `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original * initialization step. This is essential to configure modules that are added through upgrades and that require * initialization. * * Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in * a contract, executing them in the right order is up to the developer or operator. */ modifier reinitializer(uint8 version) { bool isTopLevelCall = _setInitializedVersion(version); if (isTopLevelCall) { _initializing = true; } _; if (isTopLevelCall) { _initializing = false; emit Initialized(version); } } /** * @dev Modifier to protect an initialization function so that it can only be invoked by functions with the * {initializer} and {reinitializer} modifiers, directly or indirectly. */ modifier onlyInitializing() { require(_initializing, "Initializable: contract is not initializing"); _; } /** * @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call. * Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized * to any version. It is recommended to use this to lock implementation contracts that are designed to be called * through proxies. */ function _disableInitializers() internal virtual { _setInitializedVersion(type(uint8).max); } function _setInitializedVersion(uint8 version) private returns (bool) { // If the contract is initializing we ignore whether _initialized is set in order to support multiple // inheritance patterns, but we only do this in the context of a constructor, and for the lowest level // of initializers, because in other contexts the contract may have been reentered. if (_initializing) { require( version == 1 && !AddressUpgradeable.isContract(address(this)), "Initializable: contract is already initialized" ); return false; } else { require(_initialized < version, "Initializable: contract is already initialized"); _initialized = version; return true; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract PausableUpgradeable is Initializable, ContextUpgradeable { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ function __Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __Pausable_init_unchained() internal onlyInitializing { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/common/ERC2981.sol) pragma solidity ^0.8.0; import "../../interfaces/IERC2981Upgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the NFT Royalty Standard, a standardized way to retrieve royalty payment information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * Royalty is specified as a fraction of sale price. {_feeDenominator} is overridable but defaults to 10000, meaning the * fee is specified in basis points by default. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC2981Upgradeable is Initializable, IERC2981Upgradeable, ERC165Upgradeable { function __ERC2981_init() internal onlyInitializing { } function __ERC2981_init_unchained() internal onlyInitializing { } struct RoyaltyInfo { address receiver; uint96 royaltyFraction; } RoyaltyInfo private _defaultRoyaltyInfo; mapping(uint256 => RoyaltyInfo) private _tokenRoyaltyInfo; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165Upgradeable, ERC165Upgradeable) returns (bool) { return interfaceId == type(IERC2981Upgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @inheritdoc IERC2981Upgradeable */ function royaltyInfo(uint256 _tokenId, uint256 _salePrice) public view virtual override returns (address, uint256) { RoyaltyInfo memory royalty = _tokenRoyaltyInfo[_tokenId]; if (royalty.receiver == address(0)) { royalty = _defaultRoyaltyInfo; } uint256 royaltyAmount = (_salePrice * royalty.royaltyFraction) / _feeDenominator(); return (royalty.receiver, royaltyAmount); } /** * @dev The denominator with which to interpret the fee set in {_setTokenRoyalty} and {_setDefaultRoyalty} as a * fraction of the sale price. Defaults to 10000 so fees are expressed in basis points, but may be customized by an * override. */ function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /** * @dev Sets the royalty information that all ids in this contract will default to. * * Requirements: * * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: invalid receiver"); _defaultRoyaltyInfo = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Removes default royalty information. */ function _deleteDefaultRoyalty() internal virtual { delete _defaultRoyaltyInfo; } /** * @dev Sets the royalty information for a specific token id, overriding the global default. * * Requirements: * * - `tokenId` must be already minted. * - `receiver` cannot be the zero address. * - `feeNumerator` cannot be greater than the fee denominator. */ function _setTokenRoyalty( uint256 tokenId, address receiver, uint96 feeNumerator ) internal virtual { require(feeNumerator <= _feeDenominator(), "ERC2981: royalty fee will exceed salePrice"); require(receiver != address(0), "ERC2981: Invalid parameters"); _tokenRoyaltyInfo[tokenId] = RoyaltyInfo(receiver, feeNumerator); } /** * @dev Resets royalty information for the token id back to the global default. */ function _resetTokenRoyalty(uint256 tokenId) internal virtual { delete _tokenRoyaltyInfo[tokenId]; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[48] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721Upgradeable.sol"; import "./IERC721ReceiverUpgradeable.sol"; import "./extensions/IERC721MetadataUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../utils/StringsUpgradeable.sol"; import "../../utils/introspection/ERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable { using AddressUpgradeable for address; using StringsUpgradeable for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ function __ERC721_init(string memory name_, string memory symbol_) internal onlyInitializing { __ERC721_init_unchained(name_, symbol_); } function __ERC721_init_unchained(string memory name_, string memory symbol_) internal onlyInitializing { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) { return interfaceId == type(IERC721Upgradeable).interfaceId || interfaceId == type(IERC721MetadataUpgradeable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721Upgradeable.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721Upgradeable.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721Upgradeable.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721ReceiverUpgradeable.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[44] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Pausable.sol) pragma solidity ^0.8.0; import "../ERC721Upgradeable.sol"; import "../../../security/PausableUpgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev ERC721 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the * event of a large bug. */ abstract contract ERC721PausableUpgradeable is Initializable, ERC721Upgradeable, PausableUpgradeable { function __ERC721Pausable_init() internal onlyInitializing { __Pausable_init_unchained(); } function __ERC721Pausable_init_unchained() internal onlyInitializing { } /** * @dev See {ERC721-_beforeTokenTransfer}. * * Requirements: * * - the contract must not be paused. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); require(!paused(), "ERC721Pausable: token transfer while paused"); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/ERC721Royalty.sol) pragma solidity ^0.8.0; import "../ERC721Upgradeable.sol"; import "../../common/ERC2981Upgradeable.sol"; import "../../../utils/introspection/ERC165Upgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev Extension of ERC721 with the ERC2981 NFT Royalty Standard, a standardized way to retrieve royalty payment * information. * * Royalty information can be specified globally for all token ids via {_setDefaultRoyalty}, and/or individually for * specific token ids via {_setTokenRoyalty}. The latter takes precedence over the first. * * IMPORTANT: ERC-2981 only specifies a way to signal royalty information and does not enforce its payment. See * https://eips.ethereum.org/EIPS/eip-2981#optional-royalty-payments[Rationale] in the EIP. Marketplaces are expected to * voluntarily pay royalties together with sales, but note that this standard is not yet widely supported. * * _Available since v4.5._ */ abstract contract ERC721RoyaltyUpgradeable is Initializable, ERC2981Upgradeable, ERC721Upgradeable { function __ERC721Royalty_init() internal onlyInitializing { } function __ERC721Royalty_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721Upgradeable, ERC2981Upgradeable) returns (bool) { return super.supportsInterface(interfaceId); } /** * @dev See {ERC721-_burn}. This override additionally clears the royalty information for the token. */ function _burn(uint256 tokenId) internal virtual override { super._burn(tokenId); _resetTokenRoyalty(tokenId); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721URIStorage.sol) pragma solidity ^0.8.0; import "../ERC721Upgradeable.sol"; import "../../../proxy/utils/Initializable.sol"; /** * @dev ERC721 token with storage based token URI management. */ abstract contract ERC721URIStorageUpgradeable is Initializable, ERC721Upgradeable { function __ERC721URIStorage_init() internal onlyInitializing { } function __ERC721URIStorage_init_unchained() internal onlyInitializing { } using StringsUpgradeable for uint256; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721URIStorage: URI query for nonexistent token"); string memory _tokenURI = _tokenURIs[tokenId]; string memory base = _baseURI(); // If there is no base URI, return the token URI. if (bytes(base).length == 0) { return _tokenURI; } // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). if (bytes(_tokenURI).length > 0) { return string(abi.encodePacked(base, _tokenURI)); } return super.tokenURI(tokenId); } /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token"); _tokenURIs[tokenId] = _tokenURI; } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual override { super._burn(tokenId); if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721Upgradeable.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721MetadataUpgradeable is IERC721Upgradeable { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721ReceiverUpgradeable { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * 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; /** * @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 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 the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [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 Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; import "../proxy/utils/Initializable.sol"; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal onlyInitializing { } function __Context_init_unchained() internal onlyInitializing { } function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library CountersUpgradeable { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165Upgradeable.sol"; import "../../proxy/utils/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { function __ERC165_init() internal onlyInitializing { } function __ERC165_init_unchained() internal onlyInitializing { } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165Upgradeable).interfaceId; } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[50] private __gap; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "./OwnableUpgradeable.sol"; abstract contract HPApprovedMarketplaceUpgradeable is OwnableUpgradeable { event MessageSender(address sender, bool hasAccess); mapping(address => bool) internal _approvedMarketplaces; function setApprovedMarketplaceActive(address marketplaceAddress, bool approveMarket) public onlyOwner { _approvedMarketplaces[marketplaceAddress] = approveMarket; } function isApprovedMarketplace(address marketplaceAddress) public view returns(bool) { return _approvedMarketplaces[marketplaceAddress]; } function msgSenderEmit() public { bool hasAccess = _approvedMarketplaces[msg.sender]; emit MessageSender(msg.sender, hasAccess); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; abstract contract IHPEvent { function emitMintEvent( address to, address nft, uint256 tokenId, string memory trackId ) external virtual; function emitNftContractInitialized( address nft ) external virtual; function emitTokenTransferred( address from, address to, address nft, uint256 tokenId ) external virtual; function emitSetApprovedForAll( address nft, address operator, bool approved ) external virtual; function emitApproved( address nft, address operator, uint256 tokenId ) external virtual; function setAllowedContracts(address _contractAddress) external virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; abstract contract IHPMarketplaceMint { function marketplaceMint( address to, address creatorRoyaltyAddress, uint96 feeNumerator, string memory uri, string memory trackId ) external virtual returns(uint256); function canMarketplaceMint() public pure returns(bool) { return true; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; abstract contract IHPMarketplaceMintV0002 { function marketplaceMint( address to, address creatorRoyaltyAddress, uint96 feeNumerator, string memory uri, string memory trackId ) external virtual returns(uint256); function canMarketplaceMint() public pure returns(bool) { return true; } function marketplaceTransfer( address from, address to, uint tokenId ) external virtual; function canMarketplaceTransfer() public pure returns(bool) { return true; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; abstract contract IHPRoles { function isAdmin( address wallet ) public virtual view returns(bool); function isApprovedMarketplace( address _marketplaceAddress ) public virtual view returns(bool); function getAdminAddress() public virtual view returns(address); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.13; import "./OwnableUpgradeable.sol"; abstract contract NFTContractMetadataUpgradeable is OwnableUpgradeable { string internal _baseContractURI; function contractURI() public view returns (string memory) { return _baseContractURI; } function setContractURI(string memory _newContractURI) public onlyOwner { _baseContractURI = _newContractURI; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.sol"; import "@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(msg.sender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == msg.sender, "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @dev This empty reserved space is put in place to allow future versions to add new * variables without shifting down storage in the inheritance chain. * See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps */ uint256[49] private __gap; }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"bool","name":"hasAccess","type":"bool"}],"name":"MessageSender","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"trackId","type":"string"}],"name":"Minted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"MAX_SUPPLY","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"creatorRoyaltyAddress","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"},{"internalType":"string","name":"uri","type":"string"},{"internalType":"string","name":"trackId","type":"string"}],"name":"adminMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"canMarketplaceMint","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"canMarketplaceTransfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getHpRoles","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"trackId","type":"string"}],"name":"getTokenIdFromTrackId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hpEventEmitterAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_mintAdmin","type":"address"},{"internalType":"address","name":"royaltyAddress","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"},{"internalType":"string","name":"tokenName","type":"string"},{"internalType":"string","name":"token","type":"string"},{"internalType":"address[]","name":"marketplaces","type":"address[]"},{"internalType":"string","name":"_contractMetadataURI","type":"string"},{"internalType":"address","name":"_hpEventEmitterAddress","type":"address"},{"internalType":"address","name":"_hpRolesContractAddress","type":"address"},{"internalType":"uint256","name":"_maxSupply","type":"uint256"},{"internalType":"bool","name":"_isSeriesNft","type":"bool"},{"internalType":"string","name":"_baseTokenURI","type":"string"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"marketplaceAddress","type":"address"}],"name":"isApprovedMarketplace","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"creatorRoyaltyAddress","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"},{"internalType":"string","name":"uri","type":"string"},{"internalType":"string","name":"trackId","type":"string"}],"name":"marketplaceMint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"marketplaceTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mintAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"msgSenderEmit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"overrideOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","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":"address","name":"marketplaceAddress","type":"address"},{"internalType":"bool","name":"approveMarket","type":"bool"}],"name":"setApprovedMarketplaceActive","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_baseTokenURI","type":"string"}],"name":"setBaseTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_newContractURI","type":"string"}],"name":"setContractURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"upgraded","type":"bool"}],"name":"setHasUpgradeInitialized","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_hpRolesContractAddress","type":"address"}],"name":"setHpRoles","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isSeriesNft","type":"bool"}],"name":"setIsSeriesNft","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_maxSupply","type":"uint256"}],"name":"setMaxSupply","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAdmin","type":"address"}],"name":"setMintAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"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":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_hpRolesContractAddress","type":"address"}],"name":"upgrader","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b506139b3806100206000396000f3fe608060405234801561001057600080fd5b50600436106102a05760003560e01c80636352211e11610167578063a22cb465116100ce578063e87e2acb11610087578063e87e2acb146105da578063e8a3d485146105ed578063e985e9c5146105f5578063f07e879614610608578063f2fde38b1461061b578063f59ecc351461062e57600080fd5b8063a22cb46514610586578063b88d4fde14610599578063bab20a6b146105ac578063c4e41b22146105bf578063c87b56dd146105c7578063d429b98a146103af57600080fd5b80638456cb59116101205780638456cb591461052b5780638da5cb5b146105335780638e7d3f2b14610545578063938e3d7b1461055857806395d89b411461056b5780639de049891461057357600080fd5b80636352211e146104be57806367087563146104d15780636f8b44b0146104e457806370a08231146104f7578063715018a61461050a5780637e01afc31461051257600080fd5b80632bdd64091161020b5780633f4ba83a116101c45780633f4ba83a1461045e57806342842e0e1461046657806342966c68146104795780635913aa7f1461048c5780635944c7531461049f5780635c975abb146104b257600080fd5b80632bdd6409146103e85780632cd603e4146103fb57806330176e131461040e57806332cb6b0c1461042157806332e07384146104395780633ae21bb11461044b57600080fd5b8063162094c41161025d578063162094c41461034957806321038a051461035c5780632139556b1461038957806323b872dd1461039c578063274ac4fd146103af5780632a55205a146103b657600080fd5b806301ffc9a7146102a557806306fdde03146102cd578063081812fc146102e2578063095ea7b31461030d5780630deabe5f146103225780630f31983a14610335575b600080fd5b6102b86102b3366004612e36565b610636565b60405190151581526020015b60405180910390f35b6102d5610647565b6040516102c49190612eab565b6102f56102f0366004612ebe565b6106d9565b6040516001600160a01b0390911681526020016102c4565b61032061031b366004612eee565b610766565b005b610320610330366004612f31565b6107e5565b6101c6546102f5906001600160a01b031681565b61032061035736600461300b565b61083e565b6102b861036a366004613051565b6001600160a01b031660009081526101c3602052604090205460ff1690565b61032061039736600461306c565b610886565b6103206103aa36600461306c565b610927565b60016102b8565b6103c96103c43660046130a8565b610937565b604080516001600160a01b0390931683526020830191909152016102c4565b6103206103f6366004613167565b6109e3565b610320610409366004613051565b610c7a565b61032061041c3660046132c9565b610cd7565b61042b6101cb5481565b6040519081526020016102c4565b6101ca546001600160a01b03166102f5565b610320610459366004613051565b610d25565b610320610dbe565b61032061047436600461306c565b610e02565b610320610487366004612ebe565b610e0d565b61032061049a366004612f31565b610f0c565b6103206104ad3660046132fd565b610f5a565b61012d5460ff166102b8565b6102f56104cc366004612ebe565b611012565b61042b6104df3660046132c9565b611089565b6103206104f2366004612ebe565b6110b2565b61042b610505366004613051565b6110f2565b610320611179565b6101c5546102f59061010090046001600160a01b031681565b6103206111bd565b610191546001600160a01b03166102f5565b610320610553366004613051565b6111ff565b6103206105663660046132c9565b611277565b6102d56112c5565b610320610581366004613339565b6112d4565b6103206105943660046133ce565b61138e565b6103206105a7366004613405565b6113db565b6103206105ba366004613051565b61140d565b61042b611470565b6102d56105d5366004612ebe565b611481565b6103206105e83660046133ce565b611539565b6102d561159f565b6102b8610603366004613480565b6115af565b61042b610616366004613339565b611662565b610320610629366004613051565b61170e565b6103206117b9565b60006106418261180f565b92915050565b606060978054610656906134b3565b80601f0160208091040260200160405190810160405280929190818152602001828054610682906134b3565b80156106cf5780601f106106a4576101008083540402835291602001916106cf565b820191906000526020600020905b8154815290600101906020018083116106b257829003601f168201915b5050505050905090565b60006106e48261181a565b61074a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152609b60205260409020546001600160a01b031690565b6107708282611837565b6101c654604051631d8948cd60e01b81523060048201526001600160a01b03848116602483015260448201849052909116908190631d8948cd906064015b600060405180830381600087803b1580156107c857600080fd5b505af11580156107dc573d6000803e3d6000fd5b50505050505050565b336107f9610191546001600160a01b031690565b6001600160a01b03161461081f5760405162461bcd60e51b8152600401610741906134ed565b6101ca8054911515600160a01b0260ff60a01b19909216919091179055565b33610852610191546001600160a01b031690565b6001600160a01b0316146108785760405162461bcd60e51b8152600401610741906134ed565b6108828282611947565b5050565b6101ca546040516321038a0560e01b81523360048201526001600160a01b039091169081906321038a0590602401602060405180830381865afa1580156108d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f59190613522565b15156001146109165760405162461bcd60e51b81526004016107419061353f565b6109218484846119d2565b50505050565b610932838383611b7f565b505050565b60008281526066602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916109ac5750604080518082019091526065546001600160a01b0381168252600160a01b90046001600160601b031660208201525b6020810151600090612710906109cb906001600160601b0316876135a6565b6109d591906135db565b915196919550909350505050565b60006109ef6001611bb0565b90508015610a07576000805461ff0019166101001790555b6101c55460ff1615610a655760405162461bcd60e51b815260206004820152602160248201527f546869732068617320616c7265616479206265656e20696e697469616c697a656044820152601960fa1b6064820152608401610741565b60016101c560006101000a81548160ff0219169083151502179055508c6101c560016101000a8154816001600160a01b0302191690836001600160a01b03160217905550856101c660006101000a8154816001600160a01b0302191690836001600160a01b03160217905550866101c49080519060200190610ae8929190612d51565b506101ca80546001600160a81b0319166001600160a01b03871617600160a01b1790556101cb8490556101cc805484151560ff199091161790558151610b36906101cd906020850190612d51565b50610b418a8a611c3d565b610b49611c6e565b610b51611c6e565b610b59611c95565b610b61611c6e565b610b6b8c8c611cc5565b6101c654604051635d9e297760e11b81523060048201526001600160a01b0390911690819063bb3c52ee90602401600060405180830381600087803b158015610bb357600080fd5b505af1158015610bc7573d6000803e3d6000fd5b505060405163c7dcdc7960e01b81523060048201526001600160a01b038416925063c7dcdc799150602401600060405180830381600087803b158015610c0c57600080fd5b505af1158015610c20573d6000803e3d6000fd5b50505050508015610c6b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050505050505050565b33610c8e610191546001600160a01b031690565b6001600160a01b031614610cb45760405162461bcd60e51b8152600401610741906134ed565b6101ca80546001600160a01b0319166001600160a01b0392909216919091179055565b33610ceb610191546001600160a01b031690565b6001600160a01b031614610d115760405162461bcd60e51b8152600401610741906134ed565b8051610882906101cd906020840190612d51565b6101ca54604051630935e01b60e21b81523360048201526001600160a01b039091169081906324d7806c90602401602060405180830381865afa158015610d70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d949190613522565b1515600114610db55760405162461bcd60e51b8152600401610741906135ef565b61088282611d7f565b33610dd2610191546001600160a01b031690565b6001600160a01b031614610df85760405162461bcd60e51b8152600401610741906134ed565b610e00611dd2565b565b610932838383611e67565b6101ca546001600160a01b0316610e2382611012565b6001600160a01b0316336001600160a01b03161480610eab5750604051630935e01b60e21b81523360048201526001600160a01b038216906324d7806c90602401602060405180830381865afa158015610e81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea59190613522565b15156001145b610f035760405162461bcd60e51b815260206004820152602360248201527f596f75206d75737420626520746865206f776e657220746f206275726e20746f60448201526235b2b760e91b6064820152608401610741565b61088282611e82565b33610f20610191546001600160a01b031690565b6001600160a01b031614610f465760405162461bcd60e51b8152600401610741906134ed565b6101cc805460ff1916911515919091179055565b6101ca546101c5546001600160a01b039182169161010090910416331480610feb5750604051630935e01b60e21b81523360048201526001600160a01b038216906324d7806c90602401602060405180830381865afa158015610fc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe59190613522565b15156001145b6110075760405162461bcd60e51b8152600401610741906135ef565b610921848484611edd565b6000818152609960205260408120546001600160a01b0316806106415760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610741565b60006101c78260405161109c919061361e565b9081526020016040518091039020549050919050565b336110c6610191546001600160a01b031690565b6001600160a01b0316146110ec5760405162461bcd60e51b8152600401610741906134ed565b6101cb55565b60006001600160a01b03821661115d5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610741565b506001600160a01b03166000908152609a602052604090205490565b3361118d610191546001600160a01b031690565b6001600160a01b0316146111b35760405162461bcd60e51b8152600401610741906134ed565b610e006000611d7f565b336111d1610191546001600160a01b031690565b6001600160a01b0316146111f75760405162461bcd60e51b8152600401610741906134ed565b610e00611fa8565b6101ca54600160a01b900460ff161561124d5760405162461bcd60e51b815260206004820152601060248201526f185b1c9958591e481d5c19dc9859195960821b6044820152606401610741565b6101ca80546001600160a01b039092166001600160a81b031990921691909117600160a01b179055565b3361128b610191546001600160a01b031690565b6001600160a01b0316146112b15760405162461bcd60e51b8152600401610741906134ed565b8051610882906101c4906020840190612d51565b606060988054610656906134b3565b6101ca546101c5546001600160a01b0391821691610100909104163314806113655750604051630935e01b60e21b81523360048201526001600160a01b038216906324d7806c90602401602060405180830381865afa15801561133b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061135f9190613522565b15156001145b6113815760405162461bcd60e51b8152600401610741906135ef565b6107dc8686868686612025565b6113988282612248565b6101c6546040516360bfcc9760e11b81523060048201526001600160a01b038481166024830152831515604483015290911690819063c17f992e906064016107ae565b6113e53383612253565b6114015760405162461bcd60e51b81526004016107419061363a565b6109218484848461231c565b33611421610191546001600160a01b031690565b6001600160a01b0316146114475760405162461bcd60e51b8152600401610741906134ed565b6101c580546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b600061147c6101c95490565b905090565b606061148c8261181a565b6114d15760405162461bcd60e51b8152602060048201526016602482015275151bdad95b88125108191bd95cdb89dd08195e1a5cdd60521b6044820152606401610741565b6101cc5460ff1680156114f3575060006101cd80546114ef906134b3565b9050115b156115305761150061234f565b61150983612378565b60405160200161151a92919061368b565b6040516020818303038152906040529050919050565b610641826123c7565b3361154d610191546001600160a01b031690565b6001600160a01b0316146115735760405162461bcd60e51b8152600401610741906134ed565b6001600160a01b039190911660009081526101c360205260409020805460ff1916911515919091179055565b60606101c48054610656906134b3565b6101ca546040516321038a0560e01b81526001600160a01b038381166004830152600092169081906321038a0590602401602060405180830381865afa1580156115fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116219190613522565b15611630576001915050610641565b6001600160a01b038085166000908152609c602090815260408083209387168352929052205460ff165b949350505050565b6101ca546040516321038a0560e01b81523360048201526000916001600160a01b03169081906321038a0590602401602060405180830381865afa1580156116ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d29190613522565b15156001146116f35760405162461bcd60e51b81526004016107419061353f565b60006117028888888888612025565b98975050505050505050565b33611722610191546001600160a01b031690565b6001600160a01b0316146117485760405162461bcd60e51b8152600401610741906134ed565b6001600160a01b0381166117ad5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610741565b6117b681611d7f565b50565b3360008181526101c3602090815260409182902054825193845260ff1680151591840191909152917f68cbc3e91f7e388c24e4bd0bc08ccecb4c68d84000bc95b18adb8532e6716e2b910160405180910390a150565b600061064182612535565b6000908152609960205260409020546001600160a01b0316151590565b600061184282611012565b9050806001600160a01b0316836001600160a01b0316036118af5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610741565b336001600160a01b03821614806118cb57506118cb81336115af565b61193d5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610741565b6109328383612575565b6119508261181a565b6119b35760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610741565b600082815260c960209081526040909120825161093292840190612d51565b826001600160a01b03166119e582611012565b6001600160a01b031614611a495760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610741565b6001600160a01b038216611aab5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610741565b611ab68383836125e3565b611ac1600082612575565b6001600160a01b0383166000908152609a60205260408120805460019290611aea9084906136ba565b90915550506001600160a01b0382166000908152609a60205260408120805460019290611b189084906136d1565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610932838383612656565b611b893382612253565b611ba55760405162461bcd60e51b81526004016107419061363a565b6109328383836119d2565b60008054610100900460ff1615611bf7578160ff166001148015611bd35750303b155b611bef5760405162461bcd60e51b8152600401610741906136e9565b506000919050565b60005460ff808416911610611c1e5760405162461bcd60e51b8152600401610741906136e9565b506000805460ff191660ff92909216919091179055600190565b919050565b600054610100900460ff16611c645760405162461bcd60e51b815260040161074190613737565b61088282826126d2565b600054610100900460ff16610e005760405162461bcd60e51b815260040161074190613737565b600054610100900460ff16611cbc5760405162461bcd60e51b815260040161074190613737565b610e0033611d7f565b6127106001600160601b0382161115611cf05760405162461bcd60e51b815260040161074190613782565b6001600160a01b038216611d465760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610741565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217606555565b61019180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61012d5460ff16611e1c5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610741565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610932838383604051806020016040528060008152506113db565b60008181526101c860205260409081902090516101c791611ea291613865565b9081526020016040518091039020600090556101c860008281526020019081526020016000206000611ed49190612dd5565b6117b681612720565b6127106001600160601b0382161115611f085760405162461bcd60e51b815260040161074190613782565b6001600160a01b038216611f5e5760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610741565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752606690529190942093519051909116600160a01b029116179055565b61012d5460ff1615611fef5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610741565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611e4a3390565b60006101c782604051612038919061361e565b9081526020016040518091039020546000148061205c575061205a600061181a565b155b6120a05760405162461bcd60e51b8152602060048201526015602482015274547261636b20616c7265616479206d696e7465642160581b6044820152606401610741565b60006120ac6101c95490565b90506101cb54600014806120c257506101cb5481105b61210e5760405162461bcd60e51b815260206004820152601e60248201527f416c7265616479206d696e74656420616c6c2074686520746f6b656e732e00006044820152606401610741565b612118878261273a565b6101cc5460ff1661212d5761212d8185611947565b806101c78460405161213f919061361e565b90815260408051602092819003830190209290925560008381526101c8825291909120845161217092860190612d51565b506001600160a01b0386161561218b5761218b818787611edd565b61219a6101c980546001019055565b6101c654604051635addd98f60e11b81526001600160a01b0390911690819063b5bbb31e906121d3908b90309087908a90600401613871565b600060405180830381600087803b1580156121ed57600080fd5b505af1158015612201573d6000803e3d6000fd5b50505050817fadef11a3979b8ceb0573eb6ef0678134a09c23a0d94e5ea47cd18ac3a9fc0194856040516122359190612eab565b60405180910390a2509695505050505050565b610882338383612881565b600061225e8261181a565b6122bf5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610741565b60006122ca83611012565b9050806001600160a01b0316846001600160a01b031614806122f157506122f181856115af565b8061165a5750836001600160a01b031661230a846106d9565b6001600160a01b031614949350505050565b6123278484846119d2565b6123338484848461294f565b6109215760405162461bcd60e51b8152600401610741906138ae565b60606101cd6040516020016123649190613900565b604051602081830303815290604052905090565b604080516080810191829052607f0190826030600a8206018353600a90045b80156123b557600183039250600a81066030018353600a9004612397565b50819003601f19909101908152919050565b60606123d28261181a565b6124385760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b6064820152608401610741565b600082815260c9602052604081208054612451906134b3565b80601f016020809104026020016040519081016040528092919081815260200182805461247d906134b3565b80156124ca5780601f1061249f576101008083540402835291602001916124ca565b820191906000526020600020905b8154815290600101906020018083116124ad57829003601f168201915b5050505050905060006124e860408051602081019091526000815290565b905080516000036124fa575092915050565b81511561252c57808260405160200161251492919061368b565b60405160208183030381529060405292505050919050565b61165a84612a50565b60006001600160e01b031982166380ac58cd60e01b148061256657506001600160e01b03198216635b5e139f60e01b145b80610641575061064182612b28565b6000818152609b6020526040902080546001600160a01b0319166001600160a01b03841690811790915581906125aa82611012565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6125ee838383612b5d565b61012d5460ff16156109325760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b6064820152608401610741565b6101c6546040516306a9115360e01b81526001600160a01b0385811660048301528481166024830152306044830152606482018490529091169081906306a9115390608401600060405180830381600087803b1580156126b557600080fd5b505af11580156126c9573d6000803e3d6000fd5b50505050610921565b600054610100900460ff166126f95760405162461bcd60e51b815260040161074190613737565b815161270c906097906020850190612d51565b508051610932906098906020840190612d51565b61272981612b62565b600090815260666020526040812055565b6001600160a01b0382166127905760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610741565b6127998161181a565b156127e65760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610741565b6127f2600083836125e3565b6001600160a01b0382166000908152609a6020526040812080546001929061281b9084906136d1565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461088260008383612656565b816001600160a01b0316836001600160a01b0316036128e25760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610741565b6001600160a01b038381166000818152609c6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60006001600160a01b0384163b15612a4557604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612993903390899088908890600401613871565b6020604051808303816000875af19250505080156129ce575060408051601f3d908101601f191682019092526129cb9181019061391d565b60015b612a2b573d8080156129fc576040519150601f19603f3d011682016040523d82523d6000602084013e612a01565b606091505b508051600003612a235760405162461bcd60e51b8152600401610741906138ae565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061165a565b506001949350505050565b6060612a5b8261181a565b612abf5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610741565b6000612ad660408051602081019091526000815290565b90506000815111612af65760405180602001604052806000815250612b21565b80612b0084612ba2565b604051602001612b1192919061368b565b6040516020818303038152906040525b9392505050565b60006001600160e01b0319821663152a902d60e11b148061064157506301ffc9a760e01b6001600160e01b0319831614610641565b6125ee565b612b6b81612ca2565b600081815260c9602052604090208054612b84906134b3565b1590506117b657600081815260c9602052604081206117b691612dd5565b606081600003612bc95750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612bf35780612bdd8161393a565b9150612bec9050600a836135db565b9150612bcd565b6000816001600160401b03811115612c0d57612c0d612f4e565b6040519080825280601f01601f191660200182016040528015612c37576020820181803683370190505b5090505b841561165a57612c4c6001836136ba565b9150612c59600a86613953565b612c649060306136d1565b60f81b818381518110612c7957612c79613967565b60200101906001600160f81b031916908160001a905350612c9b600a866135db565b9450612c3b565b6000612cad82611012565b9050612cbb816000846125e3565b612cc6600083612575565b6001600160a01b0381166000908152609a60205260408120805460019290612cef9084906136ba565b909155505060008281526099602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a461088281600084612656565b828054612d5d906134b3565b90600052602060002090601f016020900481019282612d7f5760008555612dc5565b82601f10612d9857805160ff1916838001178555612dc5565b82800160010185558215612dc5579182015b82811115612dc5578251825591602001919060010190612daa565b50612dd1929150612e0b565b5090565b508054612de1906134b3565b6000825580601f10612df1575050565b601f0160209004906000526020600020908101906117b691905b5b80821115612dd15760008155600101612e0c565b6001600160e01b0319811681146117b657600080fd5b600060208284031215612e4857600080fd5b8135612b2181612e20565b60005b83811015612e6e578181015183820152602001612e56565b838111156109215750506000910152565b60008151808452612e97816020860160208601612e53565b601f01601f19169290920160200192915050565b602081526000612b216020830184612e7f565b600060208284031215612ed057600080fd5b5035919050565b80356001600160a01b0381168114611c3857600080fd5b60008060408385031215612f0157600080fd5b612f0a83612ed7565b946020939093013593505050565b80151581146117b657600080fd5b8035611c3881612f18565b600060208284031215612f4357600080fd5b8135612b2181612f18565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612f8c57612f8c612f4e565b604052919050565b60006001600160401b03831115612fad57612fad612f4e565b612fc0601f8401601f1916602001612f64565b9050828152838383011115612fd457600080fd5b828260208301376000602084830101529392505050565b600082601f830112612ffc57600080fd5b612b2183833560208501612f94565b6000806040838503121561301e57600080fd5b8235915060208301356001600160401b0381111561303b57600080fd5b61304785828601612feb565b9150509250929050565b60006020828403121561306357600080fd5b612b2182612ed7565b60008060006060848603121561308157600080fd5b61308a84612ed7565b925061309860208501612ed7565b9150604084013590509250925092565b600080604083850312156130bb57600080fd5b50508035926020909101359150565b80356001600160601b0381168114611c3857600080fd5b600082601f8301126130f257600080fd5b813560206001600160401b0382111561310d5761310d612f4e565b8160051b61311c828201612f64565b928352848101820192828101908785111561313657600080fd5b83870192505b8483101561315c5761314d83612ed7565b8252918301919083019061313c565b979650505050505050565b6000806000806000806000806000806000806101808d8f03121561318a57600080fd5b6131938d612ed7565b9b506131a160208e01612ed7565b9a506131af60408e016130ca565b99506001600160401b0360608e013511156131c957600080fd5b6131d98e60608f01358f01612feb565b98506001600160401b0360808e013511156131f357600080fd5b6132038e60808f01358f01612feb565b97506001600160401b0360a08e0135111561321d57600080fd5b61322d8e60a08f01358f016130e1565b96506001600160401b0360c08e0135111561324757600080fd5b6132578e60c08f01358f01612feb565b955061326560e08e01612ed7565b94506132746101008e01612ed7565b93506101208d0135925061328b6101408e01612f26565b91506001600160401b036101608e013511156132a657600080fd5b6132b78e6101608f01358f01612feb565b90509295989b509295989b509295989b565b6000602082840312156132db57600080fd5b81356001600160401b038111156132f157600080fd5b61165a84828501612feb565b60008060006060848603121561331257600080fd5b8335925061332260208501612ed7565b9150613330604085016130ca565b90509250925092565b600080600080600060a0868803121561335157600080fd5b61335a86612ed7565b945061336860208701612ed7565b9350613376604087016130ca565b925060608601356001600160401b038082111561339257600080fd5b61339e89838a01612feb565b935060808801359150808211156133b457600080fd5b506133c188828901612feb565b9150509295509295909350565b600080604083850312156133e157600080fd5b6133ea83612ed7565b915060208301356133fa81612f18565b809150509250929050565b6000806000806080858703121561341b57600080fd5b61342485612ed7565b935061343260208601612ed7565b92506040850135915060608501356001600160401b0381111561345457600080fd5b8501601f8101871361346557600080fd5b61347487823560208401612f94565b91505092959194509250565b6000806040838503121561349357600080fd5b61349c83612ed7565b91506134aa60208401612ed7565b90509250929050565b600181811c908216806134c757607f821691505b6020821081036134e757634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561353457600080fd5b8151612b2181612f18565b60208082526031908201527f4f6e6c7920617070726f766564204d61726b6574706c616365732063616e206360408201527030b636103a3434b990333ab731ba34b7b760791b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156135c0576135c0613590565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826135ea576135ea6135c5565b500490565b60208082526015908201527410591b5a5b881c9a59da1d1cc81c995c5d5a5c9959605a1b604082015260600190565b60008251613630818460208701612e53565b9190910192915050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000835161369d818460208801612e53565b8351908301906136b1818360208801612e53565b01949350505050565b6000828210156136cc576136cc613590565b500390565b600082198211156136e4576136e4613590565b500190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b8054600090600181811c90808316806137e657607f831692505b6020808410820361380757634e487b7160e01b600052602260045260246000fd5b81801561381b576001811461382c57613859565b60ff19861689528489019650613859565b60008881526020902060005b868110156138515781548b820152908501908301613838565b505084890196505b50505050505092915050565b6000612b2182846137cc565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906138a490830184612e7f565b9695505050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600061390c82846137cc565b602f60f81b81526001019392505050565b60006020828403121561392f57600080fd5b8151612b2181612e20565b60006001820161394c5761394c613590565b5060010190565b600082613962576139626135c5565b500690565b634e487b7160e01b600052603260045260246000fdfea2646970667358221220669e8f9643c2b83dced9b55fb70ca9afbb053365e6f07a29918d5bc39dab6f1464736f6c634300080d0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102a05760003560e01c80636352211e11610167578063a22cb465116100ce578063e87e2acb11610087578063e87e2acb146105da578063e8a3d485146105ed578063e985e9c5146105f5578063f07e879614610608578063f2fde38b1461061b578063f59ecc351461062e57600080fd5b8063a22cb46514610586578063b88d4fde14610599578063bab20a6b146105ac578063c4e41b22146105bf578063c87b56dd146105c7578063d429b98a146103af57600080fd5b80638456cb59116101205780638456cb591461052b5780638da5cb5b146105335780638e7d3f2b14610545578063938e3d7b1461055857806395d89b411461056b5780639de049891461057357600080fd5b80636352211e146104be57806367087563146104d15780636f8b44b0146104e457806370a08231146104f7578063715018a61461050a5780637e01afc31461051257600080fd5b80632bdd64091161020b5780633f4ba83a116101c45780633f4ba83a1461045e57806342842e0e1461046657806342966c68146104795780635913aa7f1461048c5780635944c7531461049f5780635c975abb146104b257600080fd5b80632bdd6409146103e85780632cd603e4146103fb57806330176e131461040e57806332cb6b0c1461042157806332e07384146104395780633ae21bb11461044b57600080fd5b8063162094c41161025d578063162094c41461034957806321038a051461035c5780632139556b1461038957806323b872dd1461039c578063274ac4fd146103af5780632a55205a146103b657600080fd5b806301ffc9a7146102a557806306fdde03146102cd578063081812fc146102e2578063095ea7b31461030d5780630deabe5f146103225780630f31983a14610335575b600080fd5b6102b86102b3366004612e36565b610636565b60405190151581526020015b60405180910390f35b6102d5610647565b6040516102c49190612eab565b6102f56102f0366004612ebe565b6106d9565b6040516001600160a01b0390911681526020016102c4565b61032061031b366004612eee565b610766565b005b610320610330366004612f31565b6107e5565b6101c6546102f5906001600160a01b031681565b61032061035736600461300b565b61083e565b6102b861036a366004613051565b6001600160a01b031660009081526101c3602052604090205460ff1690565b61032061039736600461306c565b610886565b6103206103aa36600461306c565b610927565b60016102b8565b6103c96103c43660046130a8565b610937565b604080516001600160a01b0390931683526020830191909152016102c4565b6103206103f6366004613167565b6109e3565b610320610409366004613051565b610c7a565b61032061041c3660046132c9565b610cd7565b61042b6101cb5481565b6040519081526020016102c4565b6101ca546001600160a01b03166102f5565b610320610459366004613051565b610d25565b610320610dbe565b61032061047436600461306c565b610e02565b610320610487366004612ebe565b610e0d565b61032061049a366004612f31565b610f0c565b6103206104ad3660046132fd565b610f5a565b61012d5460ff166102b8565b6102f56104cc366004612ebe565b611012565b61042b6104df3660046132c9565b611089565b6103206104f2366004612ebe565b6110b2565b61042b610505366004613051565b6110f2565b610320611179565b6101c5546102f59061010090046001600160a01b031681565b6103206111bd565b610191546001600160a01b03166102f5565b610320610553366004613051565b6111ff565b6103206105663660046132c9565b611277565b6102d56112c5565b610320610581366004613339565b6112d4565b6103206105943660046133ce565b61138e565b6103206105a7366004613405565b6113db565b6103206105ba366004613051565b61140d565b61042b611470565b6102d56105d5366004612ebe565b611481565b6103206105e83660046133ce565b611539565b6102d561159f565b6102b8610603366004613480565b6115af565b61042b610616366004613339565b611662565b610320610629366004613051565b61170e565b6103206117b9565b60006106418261180f565b92915050565b606060978054610656906134b3565b80601f0160208091040260200160405190810160405280929190818152602001828054610682906134b3565b80156106cf5780601f106106a4576101008083540402835291602001916106cf565b820191906000526020600020905b8154815290600101906020018083116106b257829003601f168201915b5050505050905090565b60006106e48261181a565b61074a5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152609b60205260409020546001600160a01b031690565b6107708282611837565b6101c654604051631d8948cd60e01b81523060048201526001600160a01b03848116602483015260448201849052909116908190631d8948cd906064015b600060405180830381600087803b1580156107c857600080fd5b505af11580156107dc573d6000803e3d6000fd5b50505050505050565b336107f9610191546001600160a01b031690565b6001600160a01b03161461081f5760405162461bcd60e51b8152600401610741906134ed565b6101ca8054911515600160a01b0260ff60a01b19909216919091179055565b33610852610191546001600160a01b031690565b6001600160a01b0316146108785760405162461bcd60e51b8152600401610741906134ed565b6108828282611947565b5050565b6101ca546040516321038a0560e01b81523360048201526001600160a01b039091169081906321038a0590602401602060405180830381865afa1580156108d1573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108f59190613522565b15156001146109165760405162461bcd60e51b81526004016107419061353f565b6109218484846119d2565b50505050565b610932838383611b7f565b505050565b60008281526066602090815260408083208151808301909252546001600160a01b038116808352600160a01b9091046001600160601b03169282019290925282916109ac5750604080518082019091526065546001600160a01b0381168252600160a01b90046001600160601b031660208201525b6020810151600090612710906109cb906001600160601b0316876135a6565b6109d591906135db565b915196919550909350505050565b60006109ef6001611bb0565b90508015610a07576000805461ff0019166101001790555b6101c55460ff1615610a655760405162461bcd60e51b815260206004820152602160248201527f546869732068617320616c7265616479206265656e20696e697469616c697a656044820152601960fa1b6064820152608401610741565b60016101c560006101000a81548160ff0219169083151502179055508c6101c560016101000a8154816001600160a01b0302191690836001600160a01b03160217905550856101c660006101000a8154816001600160a01b0302191690836001600160a01b03160217905550866101c49080519060200190610ae8929190612d51565b506101ca80546001600160a81b0319166001600160a01b03871617600160a01b1790556101cb8490556101cc805484151560ff199091161790558151610b36906101cd906020850190612d51565b50610b418a8a611c3d565b610b49611c6e565b610b51611c6e565b610b59611c95565b610b61611c6e565b610b6b8c8c611cc5565b6101c654604051635d9e297760e11b81523060048201526001600160a01b0390911690819063bb3c52ee90602401600060405180830381600087803b158015610bb357600080fd5b505af1158015610bc7573d6000803e3d6000fd5b505060405163c7dcdc7960e01b81523060048201526001600160a01b038416925063c7dcdc799150602401600060405180830381600087803b158015610c0c57600080fd5b505af1158015610c20573d6000803e3d6000fd5b50505050508015610c6b576000805461ff0019169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b50505050505050505050505050565b33610c8e610191546001600160a01b031690565b6001600160a01b031614610cb45760405162461bcd60e51b8152600401610741906134ed565b6101ca80546001600160a01b0319166001600160a01b0392909216919091179055565b33610ceb610191546001600160a01b031690565b6001600160a01b031614610d115760405162461bcd60e51b8152600401610741906134ed565b8051610882906101cd906020840190612d51565b6101ca54604051630935e01b60e21b81523360048201526001600160a01b039091169081906324d7806c90602401602060405180830381865afa158015610d70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d949190613522565b1515600114610db55760405162461bcd60e51b8152600401610741906135ef565b61088282611d7f565b33610dd2610191546001600160a01b031690565b6001600160a01b031614610df85760405162461bcd60e51b8152600401610741906134ed565b610e00611dd2565b565b610932838383611e67565b6101ca546001600160a01b0316610e2382611012565b6001600160a01b0316336001600160a01b03161480610eab5750604051630935e01b60e21b81523360048201526001600160a01b038216906324d7806c90602401602060405180830381865afa158015610e81573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ea59190613522565b15156001145b610f035760405162461bcd60e51b815260206004820152602360248201527f596f75206d75737420626520746865206f776e657220746f206275726e20746f60448201526235b2b760e91b6064820152608401610741565b61088282611e82565b33610f20610191546001600160a01b031690565b6001600160a01b031614610f465760405162461bcd60e51b8152600401610741906134ed565b6101cc805460ff1916911515919091179055565b6101ca546101c5546001600160a01b039182169161010090910416331480610feb5750604051630935e01b60e21b81523360048201526001600160a01b038216906324d7806c90602401602060405180830381865afa158015610fc1573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610fe59190613522565b15156001145b6110075760405162461bcd60e51b8152600401610741906135ef565b610921848484611edd565b6000818152609960205260408120546001600160a01b0316806106415760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610741565b60006101c78260405161109c919061361e565b9081526020016040518091039020549050919050565b336110c6610191546001600160a01b031690565b6001600160a01b0316146110ec5760405162461bcd60e51b8152600401610741906134ed565b6101cb55565b60006001600160a01b03821661115d5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610741565b506001600160a01b03166000908152609a602052604090205490565b3361118d610191546001600160a01b031690565b6001600160a01b0316146111b35760405162461bcd60e51b8152600401610741906134ed565b610e006000611d7f565b336111d1610191546001600160a01b031690565b6001600160a01b0316146111f75760405162461bcd60e51b8152600401610741906134ed565b610e00611fa8565b6101ca54600160a01b900460ff161561124d5760405162461bcd60e51b815260206004820152601060248201526f185b1c9958591e481d5c19dc9859195960821b6044820152606401610741565b6101ca80546001600160a01b039092166001600160a81b031990921691909117600160a01b179055565b3361128b610191546001600160a01b031690565b6001600160a01b0316146112b15760405162461bcd60e51b8152600401610741906134ed565b8051610882906101c4906020840190612d51565b606060988054610656906134b3565b6101ca546101c5546001600160a01b0391821691610100909104163314806113655750604051630935e01b60e21b81523360048201526001600160a01b038216906324d7806c90602401602060405180830381865afa15801561133b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061135f9190613522565b15156001145b6113815760405162461bcd60e51b8152600401610741906135ef565b6107dc8686868686612025565b6113988282612248565b6101c6546040516360bfcc9760e11b81523060048201526001600160a01b038481166024830152831515604483015290911690819063c17f992e906064016107ae565b6113e53383612253565b6114015760405162461bcd60e51b81526004016107419061363a565b6109218484848461231c565b33611421610191546001600160a01b031690565b6001600160a01b0316146114475760405162461bcd60e51b8152600401610741906134ed565b6101c580546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b600061147c6101c95490565b905090565b606061148c8261181a565b6114d15760405162461bcd60e51b8152602060048201526016602482015275151bdad95b88125108191bd95cdb89dd08195e1a5cdd60521b6044820152606401610741565b6101cc5460ff1680156114f3575060006101cd80546114ef906134b3565b9050115b156115305761150061234f565b61150983612378565b60405160200161151a92919061368b565b6040516020818303038152906040529050919050565b610641826123c7565b3361154d610191546001600160a01b031690565b6001600160a01b0316146115735760405162461bcd60e51b8152600401610741906134ed565b6001600160a01b039190911660009081526101c360205260409020805460ff1916911515919091179055565b60606101c48054610656906134b3565b6101ca546040516321038a0560e01b81526001600160a01b038381166004830152600092169081906321038a0590602401602060405180830381865afa1580156115fd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116219190613522565b15611630576001915050610641565b6001600160a01b038085166000908152609c602090815260408083209387168352929052205460ff165b949350505050565b6101ca546040516321038a0560e01b81523360048201526000916001600160a01b03169081906321038a0590602401602060405180830381865afa1580156116ae573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116d29190613522565b15156001146116f35760405162461bcd60e51b81526004016107419061353f565b60006117028888888888612025565b98975050505050505050565b33611722610191546001600160a01b031690565b6001600160a01b0316146117485760405162461bcd60e51b8152600401610741906134ed565b6001600160a01b0381166117ad5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610741565b6117b681611d7f565b50565b3360008181526101c3602090815260409182902054825193845260ff1680151591840191909152917f68cbc3e91f7e388c24e4bd0bc08ccecb4c68d84000bc95b18adb8532e6716e2b910160405180910390a150565b600061064182612535565b6000908152609960205260409020546001600160a01b0316151590565b600061184282611012565b9050806001600160a01b0316836001600160a01b0316036118af5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610741565b336001600160a01b03821614806118cb57506118cb81336115af565b61193d5760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610741565b6109328383612575565b6119508261181a565b6119b35760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610741565b600082815260c960209081526040909120825161093292840190612d51565b826001600160a01b03166119e582611012565b6001600160a01b031614611a495760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610741565b6001600160a01b038216611aab5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610741565b611ab68383836125e3565b611ac1600082612575565b6001600160a01b0383166000908152609a60205260408120805460019290611aea9084906136ba565b90915550506001600160a01b0382166000908152609a60205260408120805460019290611b189084906136d1565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4610932838383612656565b611b893382612253565b611ba55760405162461bcd60e51b81526004016107419061363a565b6109328383836119d2565b60008054610100900460ff1615611bf7578160ff166001148015611bd35750303b155b611bef5760405162461bcd60e51b8152600401610741906136e9565b506000919050565b60005460ff808416911610611c1e5760405162461bcd60e51b8152600401610741906136e9565b506000805460ff191660ff92909216919091179055600190565b919050565b600054610100900460ff16611c645760405162461bcd60e51b815260040161074190613737565b61088282826126d2565b600054610100900460ff16610e005760405162461bcd60e51b815260040161074190613737565b600054610100900460ff16611cbc5760405162461bcd60e51b815260040161074190613737565b610e0033611d7f565b6127106001600160601b0382161115611cf05760405162461bcd60e51b815260040161074190613782565b6001600160a01b038216611d465760405162461bcd60e51b815260206004820152601960248201527f455243323938313a20696e76616c6964207265636569766572000000000000006044820152606401610741565b604080518082019091526001600160a01b039092168083526001600160601b039091166020909201829052600160a01b90910217606555565b61019180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b61012d5460ff16611e1c5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610741565b61012d805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b610932838383604051806020016040528060008152506113db565b60008181526101c860205260409081902090516101c791611ea291613865565b9081526020016040518091039020600090556101c860008281526020019081526020016000206000611ed49190612dd5565b6117b681612720565b6127106001600160601b0382161115611f085760405162461bcd60e51b815260040161074190613782565b6001600160a01b038216611f5e5760405162461bcd60e51b815260206004820152601b60248201527f455243323938313a20496e76616c696420706172616d657465727300000000006044820152606401610741565b6040805180820182526001600160a01b0393841681526001600160601b0392831660208083019182526000968752606690529190942093519051909116600160a01b029116179055565b61012d5460ff1615611fef5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610741565b61012d805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611e4a3390565b60006101c782604051612038919061361e565b9081526020016040518091039020546000148061205c575061205a600061181a565b155b6120a05760405162461bcd60e51b8152602060048201526015602482015274547261636b20616c7265616479206d696e7465642160581b6044820152606401610741565b60006120ac6101c95490565b90506101cb54600014806120c257506101cb5481105b61210e5760405162461bcd60e51b815260206004820152601e60248201527f416c7265616479206d696e74656420616c6c2074686520746f6b656e732e00006044820152606401610741565b612118878261273a565b6101cc5460ff1661212d5761212d8185611947565b806101c78460405161213f919061361e565b90815260408051602092819003830190209290925560008381526101c8825291909120845161217092860190612d51565b506001600160a01b0386161561218b5761218b818787611edd565b61219a6101c980546001019055565b6101c654604051635addd98f60e11b81526001600160a01b0390911690819063b5bbb31e906121d3908b90309087908a90600401613871565b600060405180830381600087803b1580156121ed57600080fd5b505af1158015612201573d6000803e3d6000fd5b50505050817fadef11a3979b8ceb0573eb6ef0678134a09c23a0d94e5ea47cd18ac3a9fc0194856040516122359190612eab565b60405180910390a2509695505050505050565b610882338383612881565b600061225e8261181a565b6122bf5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610741565b60006122ca83611012565b9050806001600160a01b0316846001600160a01b031614806122f157506122f181856115af565b8061165a5750836001600160a01b031661230a846106d9565b6001600160a01b031614949350505050565b6123278484846119d2565b6123338484848461294f565b6109215760405162461bcd60e51b8152600401610741906138ae565b60606101cd6040516020016123649190613900565b604051602081830303815290604052905090565b604080516080810191829052607f0190826030600a8206018353600a90045b80156123b557600183039250600a81066030018353600a9004612397565b50819003601f19909101908152919050565b60606123d28261181a565b6124385760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b6064820152608401610741565b600082815260c9602052604081208054612451906134b3565b80601f016020809104026020016040519081016040528092919081815260200182805461247d906134b3565b80156124ca5780601f1061249f576101008083540402835291602001916124ca565b820191906000526020600020905b8154815290600101906020018083116124ad57829003601f168201915b5050505050905060006124e860408051602081019091526000815290565b905080516000036124fa575092915050565b81511561252c57808260405160200161251492919061368b565b60405160208183030381529060405292505050919050565b61165a84612a50565b60006001600160e01b031982166380ac58cd60e01b148061256657506001600160e01b03198216635b5e139f60e01b145b80610641575061064182612b28565b6000818152609b6020526040902080546001600160a01b0319166001600160a01b03841690811790915581906125aa82611012565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6125ee838383612b5d565b61012d5460ff16156109325760405162461bcd60e51b815260206004820152602b60248201527f4552433732315061757361626c653a20746f6b656e207472616e73666572207760448201526a1a1a5b19481c185d5cd95960aa1b6064820152608401610741565b6101c6546040516306a9115360e01b81526001600160a01b0385811660048301528481166024830152306044830152606482018490529091169081906306a9115390608401600060405180830381600087803b1580156126b557600080fd5b505af11580156126c9573d6000803e3d6000fd5b50505050610921565b600054610100900460ff166126f95760405162461bcd60e51b815260040161074190613737565b815161270c906097906020850190612d51565b508051610932906098906020840190612d51565b61272981612b62565b600090815260666020526040812055565b6001600160a01b0382166127905760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610741565b6127998161181a565b156127e65760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610741565b6127f2600083836125e3565b6001600160a01b0382166000908152609a6020526040812080546001929061281b9084906136d1565b909155505060008181526099602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a461088260008383612656565b816001600160a01b0316836001600160a01b0316036128e25760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610741565b6001600160a01b038381166000818152609c6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60006001600160a01b0384163b15612a4557604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612993903390899088908890600401613871565b6020604051808303816000875af19250505080156129ce575060408051601f3d908101601f191682019092526129cb9181019061391d565b60015b612a2b573d8080156129fc576040519150601f19603f3d011682016040523d82523d6000602084013e612a01565b606091505b508051600003612a235760405162461bcd60e51b8152600401610741906138ae565b805181602001fd5b6001600160e01b031916630a85bd0160e11b14905061165a565b506001949350505050565b6060612a5b8261181a565b612abf5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610741565b6000612ad660408051602081019091526000815290565b90506000815111612af65760405180602001604052806000815250612b21565b80612b0084612ba2565b604051602001612b1192919061368b565b6040516020818303038152906040525b9392505050565b60006001600160e01b0319821663152a902d60e11b148061064157506301ffc9a760e01b6001600160e01b0319831614610641565b6125ee565b612b6b81612ca2565b600081815260c9602052604090208054612b84906134b3565b1590506117b657600081815260c9602052604081206117b691612dd5565b606081600003612bc95750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612bf35780612bdd8161393a565b9150612bec9050600a836135db565b9150612bcd565b6000816001600160401b03811115612c0d57612c0d612f4e565b6040519080825280601f01601f191660200182016040528015612c37576020820181803683370190505b5090505b841561165a57612c4c6001836136ba565b9150612c59600a86613953565b612c649060306136d1565b60f81b818381518110612c7957612c79613967565b60200101906001600160f81b031916908160001a905350612c9b600a866135db565b9450612c3b565b6000612cad82611012565b9050612cbb816000846125e3565b612cc6600083612575565b6001600160a01b0381166000908152609a60205260408120805460019290612cef9084906136ba565b909155505060008281526099602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a461088281600084612656565b828054612d5d906134b3565b90600052602060002090601f016020900481019282612d7f5760008555612dc5565b82601f10612d9857805160ff1916838001178555612dc5565b82800160010185558215612dc5579182015b82811115612dc5578251825591602001919060010190612daa565b50612dd1929150612e0b565b5090565b508054612de1906134b3565b6000825580601f10612df1575050565b601f0160209004906000526020600020908101906117b691905b5b80821115612dd15760008155600101612e0c565b6001600160e01b0319811681146117b657600080fd5b600060208284031215612e4857600080fd5b8135612b2181612e20565b60005b83811015612e6e578181015183820152602001612e56565b838111156109215750506000910152565b60008151808452612e97816020860160208601612e53565b601f01601f19169290920160200192915050565b602081526000612b216020830184612e7f565b600060208284031215612ed057600080fd5b5035919050565b80356001600160a01b0381168114611c3857600080fd5b60008060408385031215612f0157600080fd5b612f0a83612ed7565b946020939093013593505050565b80151581146117b657600080fd5b8035611c3881612f18565b600060208284031215612f4357600080fd5b8135612b2181612f18565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b0381118282101715612f8c57612f8c612f4e565b604052919050565b60006001600160401b03831115612fad57612fad612f4e565b612fc0601f8401601f1916602001612f64565b9050828152838383011115612fd457600080fd5b828260208301376000602084830101529392505050565b600082601f830112612ffc57600080fd5b612b2183833560208501612f94565b6000806040838503121561301e57600080fd5b8235915060208301356001600160401b0381111561303b57600080fd5b61304785828601612feb565b9150509250929050565b60006020828403121561306357600080fd5b612b2182612ed7565b60008060006060848603121561308157600080fd5b61308a84612ed7565b925061309860208501612ed7565b9150604084013590509250925092565b600080604083850312156130bb57600080fd5b50508035926020909101359150565b80356001600160601b0381168114611c3857600080fd5b600082601f8301126130f257600080fd5b813560206001600160401b0382111561310d5761310d612f4e565b8160051b61311c828201612f64565b928352848101820192828101908785111561313657600080fd5b83870192505b8483101561315c5761314d83612ed7565b8252918301919083019061313c565b979650505050505050565b6000806000806000806000806000806000806101808d8f03121561318a57600080fd5b6131938d612ed7565b9b506131a160208e01612ed7565b9a506131af60408e016130ca565b99506001600160401b0360608e013511156131c957600080fd5b6131d98e60608f01358f01612feb565b98506001600160401b0360808e013511156131f357600080fd5b6132038e60808f01358f01612feb565b97506001600160401b0360a08e0135111561321d57600080fd5b61322d8e60a08f01358f016130e1565b96506001600160401b0360c08e0135111561324757600080fd5b6132578e60c08f01358f01612feb565b955061326560e08e01612ed7565b94506132746101008e01612ed7565b93506101208d0135925061328b6101408e01612f26565b91506001600160401b036101608e013511156132a657600080fd5b6132b78e6101608f01358f01612feb565b90509295989b509295989b509295989b565b6000602082840312156132db57600080fd5b81356001600160401b038111156132f157600080fd5b61165a84828501612feb565b60008060006060848603121561331257600080fd5b8335925061332260208501612ed7565b9150613330604085016130ca565b90509250925092565b600080600080600060a0868803121561335157600080fd5b61335a86612ed7565b945061336860208701612ed7565b9350613376604087016130ca565b925060608601356001600160401b038082111561339257600080fd5b61339e89838a01612feb565b935060808801359150808211156133b457600080fd5b506133c188828901612feb565b9150509295509295909350565b600080604083850312156133e157600080fd5b6133ea83612ed7565b915060208301356133fa81612f18565b809150509250929050565b6000806000806080858703121561341b57600080fd5b61342485612ed7565b935061343260208601612ed7565b92506040850135915060608501356001600160401b0381111561345457600080fd5b8501601f8101871361346557600080fd5b61347487823560208401612f94565b91505092959194509250565b6000806040838503121561349357600080fd5b61349c83612ed7565b91506134aa60208401612ed7565b90509250929050565b600181811c908216806134c757607f821691505b6020821081036134e757634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b60006020828403121561353457600080fd5b8151612b2181612f18565b60208082526031908201527f4f6e6c7920617070726f766564204d61726b6574706c616365732063616e206360408201527030b636103a3434b990333ab731ba34b7b760791b606082015260800190565b634e487b7160e01b600052601160045260246000fd5b60008160001904831182151516156135c0576135c0613590565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826135ea576135ea6135c5565b500490565b60208082526015908201527410591b5a5b881c9a59da1d1cc81c995c5d5a5c9959605a1b604082015260600190565b60008251613630818460208701612e53565b9190910192915050565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b6000835161369d818460208801612e53565b8351908301906136b1818360208801612e53565b01949350505050565b6000828210156136cc576136cc613590565b500390565b600082198211156136e4576136e4613590565b500190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6020808252602a908201527f455243323938313a20726f79616c7479206665652077696c6c206578636565646040820152692073616c65507269636560b01b606082015260800190565b8054600090600181811c90808316806137e657607f831692505b6020808410820361380757634e487b7160e01b600052602260045260246000fd5b81801561381b576001811461382c57613859565b60ff19861689528489019650613859565b60008881526020902060005b868110156138515781548b820152908501908301613838565b505084890196505b50505050505092915050565b6000612b2182846137cc565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906138a490830184612e7f565b9695505050505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600061390c82846137cc565b602f60f81b81526001019392505050565b60006020828403121561392f57600080fd5b8151612b2181612e20565b60006001820161394c5761394c613590565b5060010190565b600082613962576139626135c5565b500690565b634e487b7160e01b600052603260045260246000fdfea2646970667358221220669e8f9643c2b83dced9b55fb70ca9afbb053365e6f07a29918d5bc39dab6f1464736f6c634300080d0033
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.