Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
DeNFT
Compiler Version
v0.8.7+commit.e28d00a7
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.7; import "./ERC721WithPermitUpgradable.sol"; import "./interfaces/IDeNFT.sol"; import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol"; contract DeNFT is ERC721WithPermitUpgradable, OwnableUpgradeable, IDeNFT { using StringsUpgradeable for uint256; /* ========== STATE VARIABLES ========== */ /// @dev DeNftBridge contract who deployed this collection address public deNftBridge; /// @dev List of addresses who may call mint()/burn() methods of this contract /// It is expected it has no duplicates address[] public minters; /// @notice See [ERC721URIStorageUpgradeable](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/extensions/ERC721URIStorage.sol) mapping(uint256 => string) private _tokenURIs; /// @dev Prefix for NFTs' URIs string private _baseURIValue; /* ========== ERRORS ========== */ error AdminBadRole(); error MinterBadRole(); error ZeroAddress(); error WrongLengthOfArguments(); /* ========== MODIFIER ========== */ modifier onlyMinter() { if (!hasMinterAccess(msg.sender)) revert AdminBadRole(); _; } /* ========== EVENTS ========== */ event MinterAdded(address minter); event MinterRemoved(address minter); /* ========== CONSTRUCTOR ========== */ /// @custom:oz-upgrades-unsafe-allow constructor constructor() { _disableInitializers(); } function initialize( address owner_, address[] memory _minters, address _deNftBridge, string memory name_, string memory symbol_, string memory baseURI_ ) public initializer { if (_deNftBridge == address(0)) revert ZeroAddress(); __ERC721WithPermitUpgradable_init(name_, symbol_); __DeNFT_init_unchained(owner_, _minters, _deNftBridge, baseURI_); } function __DeNFT_init_unchained( address owner_, address[] memory _minters, address _deNftBridge, string memory baseURI_ ) internal initializer { _baseURIValue = baseURI_; deNftBridge = _deNftBridge; // avoid duplicates in the minters array for (uint256 i = 0; i < _minters.length; ++i) { _addMinter(_minters[i]); } // couldn't call __Ownable_init() here, because msg.sender will become an owner _transferOwnership(owner_); } /* ========== MINTER METHODS ========== */ /// @dev Mints a new token and transfers it to `to` address /// @param _to new token's owner /// @param _tokenId new token's id /// @param _tokenUri new token's URI function mint( address _to, uint256 _tokenId, string memory _tokenUri ) external override onlyMinter { _tokenURIs[_tokenId] = _tokenUri; _safeMint(_to, _tokenId); } /// @dev Mints multiple tokens sequentially in a single call, taking each token's ID and URI /// from the given arrays correspondingly, and transfers each token to the `msg.sender` function mintMany(uint256[] memory _tokenIds, string[] memory _tokenUris) external override onlyMinter { mintMany(msg.sender, _tokenIds, _tokenUris); } /// @dev Mints multiple tokens sequentially in a single call, taking each object's ID and URI /// from the given arrays correspondingly, and transfers each token to the given `_to` recipient function mintMany( address _to, uint256[] memory _tokenIds, string[] memory _tokenUris ) public override onlyMinter { if (_tokenIds.length != _tokenUris.length) revert WrongLengthOfArguments(); for (uint256 i = 0; i < _tokenIds.length; ++i) { uint256 tokenId = _tokenIds[i]; _tokenURIs[tokenId] = _tokenUris[i]; _safeMint(_to, tokenId); } } /// @dev Mints multiple tokens sequentially in a single call, taking each object's owner, ID and URI /// from the given arrays correspondingly, and transfers each token to the corresponding owner's address function mintMany( address[] memory _to, uint256[] memory _tokenIds, string[] memory _tokenUris ) external override onlyMinter { if (_tokenIds.length != _to.length || _tokenIds.length != _tokenUris.length) revert WrongLengthOfArguments(); for (uint256 i = 0; i < _tokenIds.length; ++i) { uint256 tokenId = _tokenIds[i]; _tokenURIs[tokenId] = _tokenUris[i]; _safeMint(_to[i], tokenId); } } /// @dev Destroys a token identified by the `_tokenId`. See `ERC721Upgradeable._burn()` /// Only addresses listed in the minters array may burn objects, and only if /// the object holder has given explicit approval to the minter /// @notice Portions of code have been ported from /// [ERC721BurnableUpgradeable](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/extensions/ERC721Burnable.sol) /// and [ERC721URIStorageUpgradeable](https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/extensions/ERC721URIStorage.sol) function burn(uint256 _tokenId) public virtual override onlyMinter { // code ported from @openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721BurnableUpgradeable.sol require( _isApprovedOrOwner(_msgSender(), _tokenId), "ERC721Burnable: caller is not owner nor approved" ); _burn(_tokenId); // code ported from @openzeppelin/contracts-upgradeable/token/ERC721/extensions/ERC721URIStorageUpgradeable.sol if (bytes(_tokenURIs[_tokenId]).length != 0) { delete _tokenURIs[_tokenId]; } } /* ========== OWNER METHODS ========== */ function addMinter(address _minter) external override onlyOwner { _addMinter(_minter); } function revokeMinter(address _minter) external override onlyOwner { for (uint256 i = 0; i < minters.length; ++i) { if (minters[i] == _minter) { address oldMinter = minters[i]; minters[i] = minters[minters.length - 1]; minters.pop(); emit MinterRemoved(oldMinter); // addresses are unique in the minters array, as per addMinter() return; } } } /// @dev This method revokes owner and all registered minters, leaving only the DeNftBridge /// as a minter, which is necessary to burn/mint objects which travel across chains function revokeOwnerAndMinters() external override onlyOwner { // clear minter array uint256 count = minters.length; for (uint256 i = 0; i < count; ++i) { minters.pop(); } // add deNftBridge to minters minters.push(deNftBridge); renounceOwnership(); } /* ========== VIEWS ========== */ function exists(uint256 tokenId) public view override returns (bool) { return _exists(tokenId); } function hasMinterAccess(address sender) public view override returns (bool hasAccess) { for (uint256 i = 0; i < minters.length; ++i) { if (minters[i] == sender) { return true; } } return false; } function _baseURI() internal view override returns (string memory) { return _baseURIValue; } /// @inheritdoc IERC721MetadataUpgradeable /// @notice Implementation has been ported from OpenZeppelin's ERC721URIStorageUpgradeable /// (see https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/extensions/ERC721URIStorage.sol) 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); } function getMintersLength() public view returns (uint256) { return minters.length; } /* ========== INTERNAL ========== */ function _addMinter(address _minter) internal returns (bool) { // avoid duplicates if (hasMinterAccess(_minter)) { return false; } minters.push(_minter); emit MinterAdded(_minter); return true; } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.7; import "@openzeppelin/contracts-upgradeable/token/ERC721/ERC721Upgradeable.sol"; import '@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol'; import '@openzeppelin/contracts/utils/cryptography/ECDSA.sol'; import './interfaces/IERC4494.sol'; /// @dev OpenZeppelin's ERC721Upgradeable extended with EIP-4494-compliant permits /// @notice Based on the reference implementation of the EIP-4494 /// @notice See https://github.com/dievardump/erc721-with-permits and https://eips.ethereum.org/EIPS/eip-4494 /// @author Simon Fremaux (@dievardump) & William SchwabSchwab (@wschwab) abstract contract ERC721WithPermitUpgradable is ERC721Upgradeable, IERC4494 { bytes32 public constant PERMIT_TYPEHASH = keccak256( 'Permit(address spender,uint256 tokenId,uint256 nonce,uint256 deadline)' ); mapping(uint256 => uint256) private _nonces; // the chainId is also saved to be able to recompute domainSeparator in the case of a fork bytes32 private _domainSeparator; uint256 private _domainChainId; function __ERC721WithPermitUpgradable_init(string memory name_, string memory symbol_) internal initializer { __ERC721_init(name_, symbol_); __ERC721WithPermitUpgradable_init_unchained(); } function __ERC721WithPermitUpgradable_init_unchained() internal initializer { uint256 chainId; //solhint-disable-next-line no-inline-assembly assembly { chainId := chainid() } _domainChainId = chainId; _domainSeparator = _calculateDomainSeparator(chainId); } /// @notice Builds the DOMAIN_SEPARATOR (eip712) at time of use /// @dev This is not set as a constant, to ensure that the chainId will change in the event of a chain fork /// @return the DOMAIN_SEPARATOR of eip712 function DOMAIN_SEPARATOR() public view override returns (bytes32) { uint256 chainId; //solhint-disable-next-line no-inline-assembly assembly { chainId := chainid() } return (chainId == _domainChainId) ? _domainSeparator : _calculateDomainSeparator(chainId); } function _calculateDomainSeparator(uint256 chainId) internal view returns (bytes32) { return keccak256( abi.encode( keccak256( 'EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)' ), keccak256(bytes(name())), keccak256(bytes('1')), chainId, address(this) ) ); } /// @notice Allows to retrieve current nonce for token /// @param tokenId token id /// @return current token nonce function nonces(uint256 tokenId) public view override returns (uint256) { require(_exists(tokenId), '!UNKNOWN_TOKEN!'); return _nonces[tokenId]; } /// @notice function to be called by anyone to approve `spender` using a Permit signature /// @dev Anyone can call this to approve `spender`, even a third-party /// @param spender the actor to approve /// @param tokenId the token id /// @param deadline the deadline for the permit to be used /// @param signature permit function permit( address spender, uint256 tokenId, uint256 deadline, bytes memory signature ) external override { require(deadline >= block.timestamp, 'permit expired'); bytes32 digest = _buildDigest( spender, tokenId, _nonces[tokenId], deadline ); (address recoveredAddress, ) = ECDSA.tryRecover(digest, signature); require( // verify if the recovered address is owner or approved on tokenId // and make sure recoveredAddress is not address(0), else getApproved(tokenId) might match (recoveredAddress != address(0) && _isApprovedOrOwner(recoveredAddress, tokenId)) || // else try to recover signature using SignatureChecker, which also allows to recover signature made by contracts SignatureChecker.isValidSignatureNow( ownerOf(tokenId), digest, signature ), 'permit is invalid' ); _approve(spender, tokenId); } /// @notice Builds the permit digest to sign /// @param spender the token spender /// @param tokenId the tokenId /// @param nonce the nonce to make a permit for /// @param deadline the deadline before when the permit can be used /// @return the digest (following eip712) to sign function _buildDigest( address spender, uint256 tokenId, uint256 nonce, uint256 deadline ) public view returns (bytes32) { return ECDSA.toTypedDataHash( DOMAIN_SEPARATOR(), keccak256( abi.encode( PERMIT_TYPEHASH, spender, tokenId, nonce, deadline ) ) ); } /// @dev helper to easily increment a nonce for a given tokenId /// @param tokenId the tokenId to increment the nonce for function _incrementNonce(uint256 tokenId) internal { _nonces[tokenId]++; } /// @dev _transfer override to be able to increment the nonce /// @inheritdoc ERC721Upgradeable function _transfer( address from, address to, uint256 tokenId ) internal virtual override { // increment the nonce to be sure it can't be reused _incrementNonce(tokenId); // do normal transfer super._transfer(from, to, tokenId); } /// @notice Query if a contract implements an interface /// @param interfaceId The interface identifier, as specified in ERC-165 /// @dev Overridden from ERC721 here in order to include the interface of this EIP /// @return `true` if the contract implements `interfaceID` and /// `interfaceID` is not 0xffffffff, `false` otherwise function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC4494).interfaceId || super.supportsInterface(interfaceId); } // Reserved storage space to allow for layout changes in the future. // solhint-disable-next-line ordering uint256[47] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity 0.8.7; import "@openzeppelin/contracts-upgradeable/token/ERC721/IERC721Upgradeable.sol"; import "./IERC4494.sol"; interface IDeNFT is IERC721Upgradeable, IERC4494 { /// @dev Mints a new token and transfers it to `to` address /// @param _to new token's owner /// @param _tokenId new token's id /// @param _tokenUri new token's URI function mint( address _to, uint256 _tokenId, string memory _tokenUri ) external; /// @dev Mints multiple tokens sequentially in a single call, taking each token's ID and URI /// from the given arrays correspondingly, and transfers each token to the `msg.sender` function mintMany(uint256[] memory _tokenIds, string[] memory _tokenUris) external; /// @dev Mints multiple tokens sequentially in a single call, taking each object's ID and URI /// from the given arrays correspondingly, and transfers each token to the given `_to` recipient function mintMany( address _to, uint256[] memory _tokenIds, string[] memory _tokenUris ) external; /// @dev Mints multiple tokens sequentially in a single call, taking each object's owner, ID and URI /// from the given arrays correspondingly, and transfers each token to the corresponding owner's address function mintMany( address[] memory _to, uint256[] memory _tokenIds, string[] memory _tokenUris ) external; function burn(uint256 _tokenId) external; /* ========== OWNER METHODS ========== */ function addMinter(address _minter) external; function revokeMinter(address _minter) external; /// @dev This method revokes owner and all registered minters, leaving only the DeNftBridge /// as a minter, which is necessary to burn/mint objects which travel across chains function revokeOwnerAndMinters() external; /* ========== VIEWS ========== */ function hasMinterAccess(address sender) external view returns (bool hasAccess); function exists(uint256 tokenId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/ContextUpgradeable.sol"; import "../proxy/utils/Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal onlyInitializing { __Ownable_init_unchained(); } function __Ownable_init_unchained() internal onlyInitializing { _transferOwnership(_msgSender()); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } /** * @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.7.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: address zero is not a valid owner"); 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: invalid token ID"); 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) { _requireMinted(tokenId); 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 token owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { _requireMinted(tokenId); 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: caller is not token 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: caller is not token 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) { 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 an {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 an {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 Reverts if the `tokenId` has not been minted yet. */ function _requireMinted(uint256 tokenId) internal view virtual { require(_exists(tokenId), "ERC721: invalid token ID"); } /** * @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 { /// @solidity memory-safe-assembly 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 (last updated v4.7.1) (utils/cryptography/SignatureChecker.sol) pragma solidity ^0.8.0; import "./ECDSA.sol"; import "../Address.sol"; import "../../interfaces/IERC1271.sol"; /** * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like * Argent and Gnosis Safe. * * _Available since v4.1._ */ library SignatureChecker { /** * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`. * * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus * change through time. It could return true at block N and false at block N+1 (or the opposite). */ function isValidSignatureNow( address signer, bytes32 hash, bytes memory signature ) internal view returns (bool) { (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature); if (error == ECDSA.RecoverError.NoError && recovered == signer) { return true; } (bool success, bytes memory result) = signer.staticcall( abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature) ); return (success && result.length == 32 && abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
//SPDX-License-Identifier: MIT pragma solidity ^0.8.7; /// @notice Based on the reference implementation of the EIP-4494 /// @notice See https://github.com/dievardump/erc721-with-permits and https://eips.ethereum.org/EIPS/eip-4494 /// @author Simon Fremaux (@dievardump) & William SchwabSchwab (@wschwab) interface IERC4494 { function DOMAIN_SEPARATOR() external view returns (bytes32); /// @notice Allows to retrieve current nonce for token /// @param tokenId token id /// @return current token nonce function nonces(uint256 tokenId) external view returns (uint256); /// @notice function to be called by anyone to approve `spender` using a Permit signature /// @dev Anyone can call this to approve `spender`, even a third-party /// @param spender the actor to approve /// @param tokenId the token id /// @param deadline the deadline for the permit to be used /// @param signature permit function permit( address spender, uint256 tokenId, uint256 deadline, bytes memory signature ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 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.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 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.7.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 /// @solidity memory-safe-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 (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library StringsUpgradeable { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @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); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// 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 (last updated v4.7.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 = !_initializing; require( (isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1), "Initializable: contract is already initialized" ); _initialized = 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) { require(!_initializing && _initialized < version, "Initializable: contract is already initialized"); _initialized = version; _initializing = true; _; _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 { require(!_initializing, "Initializable: contract is initializing"); if (_initialized < type(uint8).max) { _initialized = type(uint8).max; emit Initialized(type(uint8).max); } } }
// 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 (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC1271.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC1271 standard signature validation method for * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]. * * _Available since v4.1._ */ interface IERC1271 { /** * @dev Should return whether the signature provided is valid for the provided data * @param hash Hash of the data to be signed * @param signature Signature byte array associated with _data */ function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @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); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AdminBadRole","type":"error"},{"inputs":[],"name":"MinterBadRole","type":"error"},{"inputs":[],"name":"WrongLengthOfArguments","type":"error"},{"inputs":[],"name":"ZeroAddress","type":"error"},{"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":"minter","type":"address"}],"name":"MinterAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"minter","type":"address"}],"name":"MinterRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"nonce","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"_buildDigest","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"addMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deNftBridge","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"getMintersLength","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"hasMinterAccess","outputs":[{"internalType":"bool","name":"hasAccess","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner_","type":"address"},{"internalType":"address[]","name":"_minters","type":"address[]"},{"internalType":"address","name":"_deNftBridge","type":"address"},{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"string","name":"baseURI_","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":"_to","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"string","name":"_tokenUri","type":"string"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"_to","type":"address[]"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"string[]","name":"_tokenUris","type":"string[]"}],"name":"mintMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"string[]","name":"_tokenUris","type":"string[]"}],"name":"mintMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"string[]","name":"_tokenUris","type":"string[]"}],"name":"mintMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"minters","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_minter","type":"address"}],"name":"revokeMinter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"revokeOwnerAndMinters","outputs":[],"stateMutability":"nonpayable","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":"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"}]
Contract Creation Code
60806040523480156200001157600080fd5b506200001c62000022565b620000e4565b600054610100900460ff16156200008f5760405162461bcd60e51b815260206004820152602760248201527f496e697469616c697a61626c653a20636f6e747261637420697320696e697469604482015266616c697a696e6760c81b606482015260840160405180910390fd5b60005460ff9081161015620000e2576000805460ff191660ff9081179091556040519081527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb38474024989060200160405180910390a15b565b612fec80620000f46000396000f3fe608060405234801561001057600080fd5b50600436106102115760003560e01c8063715018a611610125578063b88d4fde116100ad578063cfbd48851161007c578063cfbd48851461046a578063d3fc98641461047d578063d8fe84c414610490578063e985e9c5146104a3578063f2fde38b146104df57600080fd5b8063b88d4fde14610429578063bef2b1ea1461043c578063c87b56dd14610444578063cc61f2a11461045757600080fd5b80638da5cb5b116100f45780638da5cb5b146103d757806395d89b41146103e8578063969e4474146103f0578063983b2d5614610403578063a22cb4651461041657600080fd5b8063715018a6146103a1578063745a41bc146103a957806383aedf9c146103bc5780638623ec7b146103c457600080fd5b806330adf81f116101a85780634bb17ac0116101775780634bb17ac0146103425780634d2fc990146103555780634f558e79146103685780636352211e1461037b57806370a082311461038e57600080fd5b806330adf81f146102ed5780633644e5151461031457806342842e0e1461031c57806342966c681461032f57600080fd5b8063095ea7b3116101e4578063095ea7b314610293578063141a468c146102a657806323b872dd146102c757806329b7216c146102da57600080fd5b806301ffc9a71461021657806306fdde031461023e57806307eaf63714610253578063081812fc14610268575b600080fd5b610229610224366004612b62565b6104f2565b60405190151581526020015b60405180910390f35b61024661051d565b6040516102359190612c82565b610266610261366004612a96565b6105af565b005b61027b610276366004612b9c565b6106ab565b6040516001600160a01b039091168152602001610235565b6102666102a136600461299d565b6106d2565b6102b96102b4366004612b9c565b6107ed565b604051908152602001610235565b6102666102d536600461277c565b610856565b6102666102e83660046128ed565b610888565b6102b97f49ecf333e5b8c95c40fdafc95c1ad136e8914a8fb55e9dc8bb01eaa83a2df9ad81565b6102b9610956565b61026661032a36600461277c565b61097c565b61026661033d366004612b9c565b610997565b61022961035036600461272e565b610a6e565b610266610363366004612820565b610ad6565b610229610376366004612b9c565b610bc9565b61027b610389366004612b9c565b610be8565b6102b961039c36600461272e565b610c48565b610266610cce565b6102666103b7366004612a14565b610ce2565b60fc546102b9565b61027b6103d2366004612b9c565b610dd9565b60c9546001600160a01b031661027b565b610246610e03565b6102b96103fe366004612a5d565b610e12565b61026661041136600461272e565b610eca565b610266610424366004612961565b610edf565b6102666104373660046127b8565b610eea565b610266610f1c565b610246610452366004612b9c565b610fd0565b60fb5461027b906001600160a01b031681565b61026661047836600461272e565b611142565b61026661048b3660046129c7565b6112bf565b61026661049e366004612ae5565b61130f565b6102296104b1366004612749565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b6102666104ed36600461272e565b611340565b60006001600160e01b03198216635604e22560e01b14806105175750610517826113b6565b92915050565b60606065805461052c90612e92565b80601f016020809104026020016040519081016040528092919081815260200182805461055890612e92565b80156105a55780601f1061057a576101008083540402835291602001916105a5565b820191906000526020600020905b81548152906001019060200180831161058857829003601f168201915b5050505050905090565b6105b833610a6e565b6105d557604051636f4720fd60e11b815260040160405180910390fd5b825182511415806105e857508051825114155b156106065760405163a10d1dbb60e01b815260040160405180910390fd5b60005b82518110156106a557600083828151811061062657610626612f54565b6020026020010151905082828151811061064257610642612f54565b602002602001015160fd60008381526020019081526020016000209080519060200190610670929190612468565b5061069485838151811061068657610686612f54565b602002602001015182611406565b5061069e81612ecd565b9050610609565b50505050565b60006106b682611420565b506000908152606960205260409020546001600160a01b031690565b60006106dd82610be8565b9050806001600160a01b0316836001600160a01b031614156107505760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061076c575061076c81336104b1565b6107de5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610747565b6107e8838361147f565b505050565b6000818152606760205260408120546001600160a01b03166108435760405162461bcd60e51b815260206004820152600f60248201526e21554e4b4e4f574e5f544f4b454e2160881b6044820152606401610747565b5060009081526097602052604090205490565b610861335b826114ed565b61087d5760405162461bcd60e51b815260040161074790612d80565b6107e883838361156b565b61089133610a6e565b6108ae57604051636f4720fd60e11b815260040160405180910390fd5b80518251146108d05760405163a10d1dbb60e01b815260040160405180910390fd5b60005b82518110156106a55760008382815181106108f0576108f0612f54565b6020026020010151905082828151811061090c5761090c612f54565b602002602001015160fd6000838152602001908152602001600020908051906020019061093a929190612468565b506109458582611406565b5061094f81612ecd565b90506108d3565b609954600090469081146109725761096d8161157f565b610976565b6098545b91505090565b6107e883838360405180602001604052806000815250610eea565b6109a033610a6e565b6109bd57604051636f4720fd60e11b815260040160405180910390fd5b6109c63361085b565b610a2b5760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b6064820152608401610747565b610a348161162b565b600081815260fd602052604090208054610a4d90612e92565b159050610a6b57600081815260fd60205260408120610a6b916124ec565b50565b6000805b60fc54811015610acd57826001600160a01b031660fc8281548110610a9957610a99612f54565b6000918252602090912001546001600160a01b03161415610abd5750600192915050565b610ac681612ecd565b9050610a72565b50600092915050565b600054610100900460ff1615808015610af65750600054600160ff909116105b80610b105750303b158015610b10575060005460ff166001145b610b2c5760405162461bcd60e51b815260040161074790612ce7565b6000805460ff191660011790558015610b4f576000805461ff0019166101001790555b6001600160a01b038516610b765760405163d92e233d60e01b815260040160405180910390fd5b610b8084846116c6565b610b8c87878785611789565b8015610bc0576000805461ff001916905560405160018152600080516020612f978339815191529060200160405180910390a15b50505050505050565b6000818152606760205260408120546001600160a01b03161515610517565b6000818152606760205260408120546001600160a01b0316806105175760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610747565b60006001600160a01b038216610cb25760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610747565b506001600160a01b031660009081526068602052604090205490565b610cd66118b5565b610ce0600061190f565b565b42821015610d235760405162461bcd60e51b815260206004820152600e60248201526d1c195c9b5a5d08195e1c1a5c995960921b6044820152606401610747565b600083815260976020526040812054610d40908690869086610e12565b90506000610d4e8284611961565b5090506001600160a01b03811615801590610d6e5750610d6e81866114ed565b80610d875750610d87610d8086610be8565b83856119a7565b610dc75760405162461bcd60e51b81526020600482015260116024820152701c195c9b5a5d081a5cc81a5b9d985b1a59607a1b6044820152606401610747565b610dd1868661147f565b505050505050565b60fc8181548110610de957600080fd5b6000918252602090912001546001600160a01b0316905081565b60606066805461052c90612e92565b6000610ebf610e1f610956565b604080517f49ecf333e5b8c95c40fdafc95c1ad136e8914a8fb55e9dc8bb01eaa83a2df9ad6020808301919091526001600160a01b038a1682840152606082018990526080820188905260a08083018890528351808403909101815260c08301845280519082012061190160f01b60e084015260e28301949094526101028083019490945282518083039094018452610122909101909152815191012090565b90505b949350505050565b610ed26118b5565b610edb81611aeb565b5050565b610edb338383611b8c565b610ef433836114ed565b610f105760405162461bcd60e51b815260040161074790612d80565b6106a584848484611c5b565b610f246118b5565b60fc5460005b81811015610f755760fc805480610f4357610f43612f3e565b600082815260209020810160001990810180546001600160a01b0319169055019055610f6e81612ecd565b9050610f2a565b5060fb5460fc80546001810182556000919091527f371f36870d18f32a11fea0f144b021c8b407bb50f8e0267c711123f454b963c00180546001600160a01b0319166001600160a01b03909216919091179055610a6b610cce565b6000818152606760205260409020546060906001600160a01b03166110515760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b6064820152608401610747565b600082815260fd60205260408120805461106a90612e92565b80601f016020809104026020016040519081016040528092919081815260200182805461109690612e92565b80156110e35780601f106110b8576101008083540402835291602001916110e3565b820191906000526020600020905b8154815290600101906020018083116110c657829003601f168201915b5050505050905060006110f4611c8e565b9050805160001415611107575092915050565b815115611139578082604051602001611121929190612bfd565b60405160208183030381529060405292505050919050565b610ec284611c9d565b61114a6118b5565b60005b60fc54811015610edb57816001600160a01b031660fc828154811061117457611174612f54565b6000918252602090912001546001600160a01b031614156112af57600060fc82815481106111a4576111a4612f54565b60009182526020909120015460fc80546001600160a01b039092169250906111ce90600190612e4f565b815481106111de576111de612f54565b60009182526020909120015460fc80546001600160a01b03909216918490811061120a5761120a612f54565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060fc80548061124957611249612f3e565b6000828152602090819020600019908301810180546001600160a01b03191690559091019091556040516001600160a01b03831681527fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb66692910160405180910390a1505050565b6112b881612ecd565b905061114d565b6112c833610a6e565b6112e557604051636f4720fd60e11b815260040160405180910390fd5b600082815260fd60209081526040909120825161130492840190612468565b506107e88383611406565b61131833610a6e565b61133557604051636f4720fd60e11b815260040160405180910390fd5b610edb338383610888565b6113486118b5565b6001600160a01b0381166113ad5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610747565b610a6b8161190f565b60006001600160e01b031982166380ac58cd60e01b14806113e757506001600160e01b03198216635b5e139f60e01b145b8061051757506301ffc9a760e01b6001600160e01b0319831614610517565b610edb828260405180602001604052806000815250611d03565b6000818152606760205260409020546001600160a01b0316610a6b5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610747565b600081815260696020526040902080546001600160a01b0319166001600160a01b03841690811790915581906114b482610be8565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806114f983610be8565b9050806001600160a01b0316846001600160a01b0316148061154057506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b80610ec25750836001600160a01b0316611559846106ab565b6001600160a01b031614949350505050565b61157481611d36565b6107e8838383611d58565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6115aa61051d565b805160209182012060408051808201825260018152603160f81b90840152805192830193909352918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018390523060a082015260c001604051602081830303815290604052805190602001209050919050565b600061163682610be8565b905061164360008361147f565b6001600160a01b038116600090815260686020526040812080546001929061166c908490612e4f565b909155505060008281526067602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600054610100900460ff16158080156116e65750600054600160ff909116105b806117005750303b158015611700575060005460ff166001145b61171c5760405162461bcd60e51b815260040161074790612ce7565b6000805460ff19166001179055801561173f576000805461ff0019166101001790555b6117498383611ef4565b611751611f25565b80156107e8576000805461ff001916905560405160018152600080516020612f978339815191529060200160405180910390a1505050565b600054610100900460ff16158080156117a95750600054600160ff909116105b806117c35750303b1580156117c3575060005460ff166001145b6117df5760405162461bcd60e51b815260040161074790612ce7565b6000805460ff191660011790558015611802576000805461ff0019166101001790555b81516118159060fe906020850190612468565b5060fb80546001600160a01b0319166001600160a01b03851617905560005b84518110156118705761185f85828151811061185257611852612f54565b6020026020010151611aeb565b5061186981612ecd565b9050611834565b5061187a8561190f565b80156118ae576000805461ff001916905560405160018152600080516020612f978339815191529060200160405180910390a15b5050505050565b60c9546001600160a01b03163314610ce05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610747565b60c980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000808251604114156119985760208301516040840151606085015160001a61198c87828585611fe7565b945094505050506119a0565b506000905060025b9250929050565b60008060006119b68585611961565b909250905060008160048111156119cf576119cf612f28565b1480156119ed5750856001600160a01b0316826001600160a01b0316145b156119fd57600192505050611ae4565b600080876001600160a01b0316631626ba7e60e01b8888604051602401611a25929190612c69565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051611a639190612be1565b600060405180830381855afa9150503d8060008114611a9e576040519150601f19603f3d011682016040523d82523d6000602084013e611aa3565b606091505b5091509150818015611ab6575080516020145b8015611add57508051630b135d3f60e11b90611adb9083016020908101908401612b49565b145b9450505050505b9392505050565b6000611af682610a6e565b15611b0357506000919050565b60fc80546001810182556000919091527f371f36870d18f32a11fea0f144b021c8b407bb50f8e0267c711123f454b963c00180546001600160a01b0319166001600160a01b0384169081179091556040519081527f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f69060200160405180910390a1506001919050565b816001600160a01b0316836001600160a01b03161415611bee5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610747565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611c6684848461156b565b611c72848484846120d4565b6106a55760405162461bcd60e51b815260040161074790612c95565b606060fe805461052c90612e92565b6060611ca882611420565b6000611cb2611c8e565b90506000815111611cd25760405180602001604052806000815250611ae4565b80611cdc846121de565b604051602001611ced929190612bfd565b6040516020818303038152906040529392505050565b611d0d83836122dc565b611d1a60008484846120d4565b6107e85760405162461bcd60e51b815260040161074790612c95565b6000818152609760205260408120805491611d5083612ecd565b919050555050565b826001600160a01b0316611d6b82610be8565b6001600160a01b031614611dcf5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610747565b6001600160a01b038216611e315760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610747565b611e3c60008261147f565b6001600160a01b0383166000908152606860205260408120805460019290611e65908490612e4f565b90915550506001600160a01b0382166000908152606860205260408120805460019290611e93908490612e23565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600054610100900460ff16611f1b5760405162461bcd60e51b815260040161074790612d35565b610edb828261241e565b600054610100900460ff1615808015611f455750600054600160ff909116105b80611f5f5750303b158015611f5f575060005460ff166001145b611f7b5760405162461bcd60e51b815260040161074790612ce7565b6000805460ff191660011790558015611f9e576000805461ff0019166101001790555b466099819055611fad8161157f565b609855508015610a6b576000805461ff001916905560405160018152600080516020612f978339815191529060200160405180910390a150565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561201e57506000905060036120cb565b8460ff16601b1415801561203657508460ff16601c14155b1561204757506000905060046120cb565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561209b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166120c4576000600192509250506120cb565b9150600090505b94509492505050565b60006001600160a01b0384163b156121d657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612118903390899088908890600401612c2c565b602060405180830381600087803b15801561213257600080fd5b505af1925050508015612162575060408051601f3d908101601f1916820190925261215f91810190612b7f565b60015b6121bc573d808015612190576040519150601f19603f3d011682016040523d82523d6000602084013e612195565b606091505b5080516121b45760405162461bcd60e51b815260040161074790612c95565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610ec2565b506001610ec2565b6060816122025750506040805180820190915260018152600360fc1b602082015290565b8160005b811561222c578061221681612ecd565b91506122259050600a83612e3b565b9150612206565b60008167ffffffffffffffff81111561224757612247612f6a565b6040519080825280601f01601f191660200182016040528015612271576020820181803683370190505b5090505b8415610ec257612286600183612e4f565b9150612293600a86612ee8565b61229e906030612e23565b60f81b8183815181106122b3576122b3612f54565b60200101906001600160f81b031916908160001a9053506122d5600a86612e3b565b9450612275565b6001600160a01b0382166123325760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610747565b6000818152606760205260409020546001600160a01b0316156123975760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610747565b6001600160a01b03821660009081526068602052604081208054600192906123c0908490612e23565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600054610100900460ff166124455760405162461bcd60e51b815260040161074790612d35565b8151612458906065906020850190612468565b5080516107e89060669060208401905b82805461247490612e92565b90600052602060002090601f01602090048101928261249657600085556124dc565b82601f106124af57805160ff19168380011785556124dc565b828001600101855582156124dc579182015b828111156124dc5782518255916020019190600101906124c1565b506124e8929150612522565b5090565b5080546124f890612e92565b6000825580601f10612508575050565b601f016020900490600052602060002090810190610a6b91905b5b808211156124e85760008155600101612523565b80356001600160a01b038116811461254e57600080fd5b919050565b600082601f83011261256457600080fd5b8135602061257961257483612dff565b612dce565b80838252828201915082860187848660051b890101111561259957600080fd5b60005b858110156125bf576125ad82612537565b8452928401929084019060010161259c565b5090979650505050505050565b600082601f8301126125dd57600080fd5b813560206125ed61257483612dff565b80838252828201915082860187848660051b890101111561260d57600080fd5b6000805b8681101561265057823567ffffffffffffffff81111561262f578283fd5b61263d8b88838d01016126be565b8652509385019391850191600101612611565b509198975050505050505050565b600082601f83011261266f57600080fd5b8135602061267f61257483612dff565b80838252828201915082860187848660051b890101111561269f57600080fd5b60005b858110156125bf578135845292840192908401906001016126a2565b600082601f8301126126cf57600080fd5b813567ffffffffffffffff8111156126e9576126e9612f6a565b6126fc601f8201601f1916602001612dce565b81815284602083860101111561271157600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561274057600080fd5b611ae482612537565b6000806040838503121561275c57600080fd5b61276583612537565b915061277360208401612537565b90509250929050565b60008060006060848603121561279157600080fd5b61279a84612537565b92506127a860208501612537565b9150604084013590509250925092565b600080600080608085870312156127ce57600080fd5b6127d785612537565b93506127e560208601612537565b925060408501359150606085013567ffffffffffffffff81111561280857600080fd5b612814878288016126be565b91505092959194509250565b60008060008060008060c0878903121561283957600080fd5b61284287612537565b9550602087013567ffffffffffffffff8082111561285f57600080fd5b61286b8a838b01612553565b965061287960408a01612537565b9550606089013591508082111561288f57600080fd5b61289b8a838b016126be565b945060808901359150808211156128b157600080fd5b6128bd8a838b016126be565b935060a08901359150808211156128d357600080fd5b506128e089828a016126be565b9150509295509295509295565b60008060006060848603121561290257600080fd5b61290b84612537565b9250602084013567ffffffffffffffff8082111561292857600080fd5b6129348783880161265e565b9350604086013591508082111561294a57600080fd5b50612957868287016125cc565b9150509250925092565b6000806040838503121561297457600080fd5b61297d83612537565b91506020830135801515811461299257600080fd5b809150509250929050565b600080604083850312156129b057600080fd5b6129b983612537565b946020939093013593505050565b6000806000606084860312156129dc57600080fd5b6129e584612537565b925060208401359150604084013567ffffffffffffffff811115612a0857600080fd5b612957868287016126be565b60008060008060808587031215612a2a57600080fd5b612a3385612537565b93506020850135925060408501359150606085013567ffffffffffffffff81111561280857600080fd5b60008060008060808587031215612a7357600080fd5b612a7c85612537565b966020860135965060408601359560600135945092505050565b600080600060608486031215612aab57600080fd5b833567ffffffffffffffff80821115612ac357600080fd5b612acf87838801612553565b9450602086013591508082111561292857600080fd5b60008060408385031215612af857600080fd5b823567ffffffffffffffff80821115612b1057600080fd5b612b1c8683870161265e565b93506020850135915080821115612b3257600080fd5b50612b3f858286016125cc565b9150509250929050565b600060208284031215612b5b57600080fd5b5051919050565b600060208284031215612b7457600080fd5b8135611ae481612f80565b600060208284031215612b9157600080fd5b8151611ae481612f80565b600060208284031215612bae57600080fd5b5035919050565b60008151808452612bcd816020860160208601612e66565b601f01601f19169290920160200192915050565b60008251612bf3818460208701612e66565b9190910192915050565b60008351612c0f818460208801612e66565b835190830190612c23818360208801612e66565b01949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612c5f90830184612bb5565b9695505050505050565b828152604060208201526000610ec26040830184612bb5565b602081526000611ae46020830184612bb5565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715612df757612df7612f6a565b604052919050565b600067ffffffffffffffff821115612e1957612e19612f6a565b5060051b60200190565b60008219821115612e3657612e36612efc565b500190565b600082612e4a57612e4a612f12565b500490565b600082821015612e6157612e61612efc565b500390565b60005b83811015612e81578181015183820152602001612e69565b838111156106a55750506000910152565b600181811c90821680612ea657607f821691505b60208210811415612ec757634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612ee157612ee1612efc565b5060010190565b600082612ef757612ef7612f12565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114610a6b57600080fdfe7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498a2646970667358221220291929a5b88ae7961aa7861169812eacd14b5295f8c921b28feec1031d43b62864736f6c63430008070033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102115760003560e01c8063715018a611610125578063b88d4fde116100ad578063cfbd48851161007c578063cfbd48851461046a578063d3fc98641461047d578063d8fe84c414610490578063e985e9c5146104a3578063f2fde38b146104df57600080fd5b8063b88d4fde14610429578063bef2b1ea1461043c578063c87b56dd14610444578063cc61f2a11461045757600080fd5b80638da5cb5b116100f45780638da5cb5b146103d757806395d89b41146103e8578063969e4474146103f0578063983b2d5614610403578063a22cb4651461041657600080fd5b8063715018a6146103a1578063745a41bc146103a957806383aedf9c146103bc5780638623ec7b146103c457600080fd5b806330adf81f116101a85780634bb17ac0116101775780634bb17ac0146103425780634d2fc990146103555780634f558e79146103685780636352211e1461037b57806370a082311461038e57600080fd5b806330adf81f146102ed5780633644e5151461031457806342842e0e1461031c57806342966c681461032f57600080fd5b8063095ea7b3116101e4578063095ea7b314610293578063141a468c146102a657806323b872dd146102c757806329b7216c146102da57600080fd5b806301ffc9a71461021657806306fdde031461023e57806307eaf63714610253578063081812fc14610268575b600080fd5b610229610224366004612b62565b6104f2565b60405190151581526020015b60405180910390f35b61024661051d565b6040516102359190612c82565b610266610261366004612a96565b6105af565b005b61027b610276366004612b9c565b6106ab565b6040516001600160a01b039091168152602001610235565b6102666102a136600461299d565b6106d2565b6102b96102b4366004612b9c565b6107ed565b604051908152602001610235565b6102666102d536600461277c565b610856565b6102666102e83660046128ed565b610888565b6102b97f49ecf333e5b8c95c40fdafc95c1ad136e8914a8fb55e9dc8bb01eaa83a2df9ad81565b6102b9610956565b61026661032a36600461277c565b61097c565b61026661033d366004612b9c565b610997565b61022961035036600461272e565b610a6e565b610266610363366004612820565b610ad6565b610229610376366004612b9c565b610bc9565b61027b610389366004612b9c565b610be8565b6102b961039c36600461272e565b610c48565b610266610cce565b6102666103b7366004612a14565b610ce2565b60fc546102b9565b61027b6103d2366004612b9c565b610dd9565b60c9546001600160a01b031661027b565b610246610e03565b6102b96103fe366004612a5d565b610e12565b61026661041136600461272e565b610eca565b610266610424366004612961565b610edf565b6102666104373660046127b8565b610eea565b610266610f1c565b610246610452366004612b9c565b610fd0565b60fb5461027b906001600160a01b031681565b61026661047836600461272e565b611142565b61026661048b3660046129c7565b6112bf565b61026661049e366004612ae5565b61130f565b6102296104b1366004612749565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b6102666104ed36600461272e565b611340565b60006001600160e01b03198216635604e22560e01b14806105175750610517826113b6565b92915050565b60606065805461052c90612e92565b80601f016020809104026020016040519081016040528092919081815260200182805461055890612e92565b80156105a55780601f1061057a576101008083540402835291602001916105a5565b820191906000526020600020905b81548152906001019060200180831161058857829003601f168201915b5050505050905090565b6105b833610a6e565b6105d557604051636f4720fd60e11b815260040160405180910390fd5b825182511415806105e857508051825114155b156106065760405163a10d1dbb60e01b815260040160405180910390fd5b60005b82518110156106a557600083828151811061062657610626612f54565b6020026020010151905082828151811061064257610642612f54565b602002602001015160fd60008381526020019081526020016000209080519060200190610670929190612468565b5061069485838151811061068657610686612f54565b602002602001015182611406565b5061069e81612ecd565b9050610609565b50505050565b60006106b682611420565b506000908152606960205260409020546001600160a01b031690565b60006106dd82610be8565b9050806001600160a01b0316836001600160a01b031614156107505760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b038216148061076c575061076c81336104b1565b6107de5760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610747565b6107e8838361147f565b505050565b6000818152606760205260408120546001600160a01b03166108435760405162461bcd60e51b815260206004820152600f60248201526e21554e4b4e4f574e5f544f4b454e2160881b6044820152606401610747565b5060009081526097602052604090205490565b610861335b826114ed565b61087d5760405162461bcd60e51b815260040161074790612d80565b6107e883838361156b565b61089133610a6e565b6108ae57604051636f4720fd60e11b815260040160405180910390fd5b80518251146108d05760405163a10d1dbb60e01b815260040160405180910390fd5b60005b82518110156106a55760008382815181106108f0576108f0612f54565b6020026020010151905082828151811061090c5761090c612f54565b602002602001015160fd6000838152602001908152602001600020908051906020019061093a929190612468565b506109458582611406565b5061094f81612ecd565b90506108d3565b609954600090469081146109725761096d8161157f565b610976565b6098545b91505090565b6107e883838360405180602001604052806000815250610eea565b6109a033610a6e565b6109bd57604051636f4720fd60e11b815260040160405180910390fd5b6109c63361085b565b610a2b5760405162461bcd60e51b815260206004820152603060248201527f4552433732314275726e61626c653a2063616c6c6572206973206e6f74206f7760448201526f1b995c881b9bdc88185c1c1c9bdd995960821b6064820152608401610747565b610a348161162b565b600081815260fd602052604090208054610a4d90612e92565b159050610a6b57600081815260fd60205260408120610a6b916124ec565b50565b6000805b60fc54811015610acd57826001600160a01b031660fc8281548110610a9957610a99612f54565b6000918252602090912001546001600160a01b03161415610abd5750600192915050565b610ac681612ecd565b9050610a72565b50600092915050565b600054610100900460ff1615808015610af65750600054600160ff909116105b80610b105750303b158015610b10575060005460ff166001145b610b2c5760405162461bcd60e51b815260040161074790612ce7565b6000805460ff191660011790558015610b4f576000805461ff0019166101001790555b6001600160a01b038516610b765760405163d92e233d60e01b815260040160405180910390fd5b610b8084846116c6565b610b8c87878785611789565b8015610bc0576000805461ff001916905560405160018152600080516020612f978339815191529060200160405180910390a15b50505050505050565b6000818152606760205260408120546001600160a01b03161515610517565b6000818152606760205260408120546001600160a01b0316806105175760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610747565b60006001600160a01b038216610cb25760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610747565b506001600160a01b031660009081526068602052604090205490565b610cd66118b5565b610ce0600061190f565b565b42821015610d235760405162461bcd60e51b815260206004820152600e60248201526d1c195c9b5a5d08195e1c1a5c995960921b6044820152606401610747565b600083815260976020526040812054610d40908690869086610e12565b90506000610d4e8284611961565b5090506001600160a01b03811615801590610d6e5750610d6e81866114ed565b80610d875750610d87610d8086610be8565b83856119a7565b610dc75760405162461bcd60e51b81526020600482015260116024820152701c195c9b5a5d081a5cc81a5b9d985b1a59607a1b6044820152606401610747565b610dd1868661147f565b505050505050565b60fc8181548110610de957600080fd5b6000918252602090912001546001600160a01b0316905081565b60606066805461052c90612e92565b6000610ebf610e1f610956565b604080517f49ecf333e5b8c95c40fdafc95c1ad136e8914a8fb55e9dc8bb01eaa83a2df9ad6020808301919091526001600160a01b038a1682840152606082018990526080820188905260a08083018890528351808403909101815260c08301845280519082012061190160f01b60e084015260e28301949094526101028083019490945282518083039094018452610122909101909152815191012090565b90505b949350505050565b610ed26118b5565b610edb81611aeb565b5050565b610edb338383611b8c565b610ef433836114ed565b610f105760405162461bcd60e51b815260040161074790612d80565b6106a584848484611c5b565b610f246118b5565b60fc5460005b81811015610f755760fc805480610f4357610f43612f3e565b600082815260209020810160001990810180546001600160a01b0319169055019055610f6e81612ecd565b9050610f2a565b5060fb5460fc80546001810182556000919091527f371f36870d18f32a11fea0f144b021c8b407bb50f8e0267c711123f454b963c00180546001600160a01b0319166001600160a01b03909216919091179055610a6b610cce565b6000818152606760205260409020546060906001600160a01b03166110515760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b6064820152608401610747565b600082815260fd60205260408120805461106a90612e92565b80601f016020809104026020016040519081016040528092919081815260200182805461109690612e92565b80156110e35780601f106110b8576101008083540402835291602001916110e3565b820191906000526020600020905b8154815290600101906020018083116110c657829003601f168201915b5050505050905060006110f4611c8e565b9050805160001415611107575092915050565b815115611139578082604051602001611121929190612bfd565b60405160208183030381529060405292505050919050565b610ec284611c9d565b61114a6118b5565b60005b60fc54811015610edb57816001600160a01b031660fc828154811061117457611174612f54565b6000918252602090912001546001600160a01b031614156112af57600060fc82815481106111a4576111a4612f54565b60009182526020909120015460fc80546001600160a01b039092169250906111ce90600190612e4f565b815481106111de576111de612f54565b60009182526020909120015460fc80546001600160a01b03909216918490811061120a5761120a612f54565b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060fc80548061124957611249612f3e565b6000828152602090819020600019908301810180546001600160a01b03191690559091019091556040516001600160a01b03831681527fe94479a9f7e1952cc78f2d6baab678adc1b772d936c6583def489e524cb66692910160405180910390a1505050565b6112b881612ecd565b905061114d565b6112c833610a6e565b6112e557604051636f4720fd60e11b815260040160405180910390fd5b600082815260fd60209081526040909120825161130492840190612468565b506107e88383611406565b61131833610a6e565b61133557604051636f4720fd60e11b815260040160405180910390fd5b610edb338383610888565b6113486118b5565b6001600160a01b0381166113ad5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610747565b610a6b8161190f565b60006001600160e01b031982166380ac58cd60e01b14806113e757506001600160e01b03198216635b5e139f60e01b145b8061051757506301ffc9a760e01b6001600160e01b0319831614610517565b610edb828260405180602001604052806000815250611d03565b6000818152606760205260409020546001600160a01b0316610a6b5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610747565b600081815260696020526040902080546001600160a01b0319166001600160a01b03841690811790915581906114b482610be8565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000806114f983610be8565b9050806001600160a01b0316846001600160a01b0316148061154057506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff165b80610ec25750836001600160a01b0316611559846106ab565b6001600160a01b031614949350505050565b61157481611d36565b6107e8838383611d58565b60007f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f6115aa61051d565b805160209182012060408051808201825260018152603160f81b90840152805192830193909352918101919091527fc89efdaa54c0f20c7adf612882df0950f5a951637e0307cdcb4c672f298b8bc66060820152608081018390523060a082015260c001604051602081830303815290604052805190602001209050919050565b600061163682610be8565b905061164360008361147f565b6001600160a01b038116600090815260686020526040812080546001929061166c908490612e4f565b909155505060008281526067602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b600054610100900460ff16158080156116e65750600054600160ff909116105b806117005750303b158015611700575060005460ff166001145b61171c5760405162461bcd60e51b815260040161074790612ce7565b6000805460ff19166001179055801561173f576000805461ff0019166101001790555b6117498383611ef4565b611751611f25565b80156107e8576000805461ff001916905560405160018152600080516020612f978339815191529060200160405180910390a1505050565b600054610100900460ff16158080156117a95750600054600160ff909116105b806117c35750303b1580156117c3575060005460ff166001145b6117df5760405162461bcd60e51b815260040161074790612ce7565b6000805460ff191660011790558015611802576000805461ff0019166101001790555b81516118159060fe906020850190612468565b5060fb80546001600160a01b0319166001600160a01b03851617905560005b84518110156118705761185f85828151811061185257611852612f54565b6020026020010151611aeb565b5061186981612ecd565b9050611834565b5061187a8561190f565b80156118ae576000805461ff001916905560405160018152600080516020612f978339815191529060200160405180910390a15b5050505050565b60c9546001600160a01b03163314610ce05760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610747565b60c980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6000808251604114156119985760208301516040840151606085015160001a61198c87828585611fe7565b945094505050506119a0565b506000905060025b9250929050565b60008060006119b68585611961565b909250905060008160048111156119cf576119cf612f28565b1480156119ed5750856001600160a01b0316826001600160a01b0316145b156119fd57600192505050611ae4565b600080876001600160a01b0316631626ba7e60e01b8888604051602401611a25929190612c69565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092529051611a639190612be1565b600060405180830381855afa9150503d8060008114611a9e576040519150601f19603f3d011682016040523d82523d6000602084013e611aa3565b606091505b5091509150818015611ab6575080516020145b8015611add57508051630b135d3f60e11b90611adb9083016020908101908401612b49565b145b9450505050505b9392505050565b6000611af682610a6e565b15611b0357506000919050565b60fc80546001810182556000919091527f371f36870d18f32a11fea0f144b021c8b407bb50f8e0267c711123f454b963c00180546001600160a01b0319166001600160a01b0384169081179091556040519081527f6ae172837ea30b801fbfcdd4108aa1d5bf8ff775444fd70256b44e6bf3dfc3f69060200160405180910390a1506001919050565b816001600160a01b0316836001600160a01b03161415611bee5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610747565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b611c6684848461156b565b611c72848484846120d4565b6106a55760405162461bcd60e51b815260040161074790612c95565b606060fe805461052c90612e92565b6060611ca882611420565b6000611cb2611c8e565b90506000815111611cd25760405180602001604052806000815250611ae4565b80611cdc846121de565b604051602001611ced929190612bfd565b6040516020818303038152906040529392505050565b611d0d83836122dc565b611d1a60008484846120d4565b6107e85760405162461bcd60e51b815260040161074790612c95565b6000818152609760205260408120805491611d5083612ecd565b919050555050565b826001600160a01b0316611d6b82610be8565b6001600160a01b031614611dcf5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610747565b6001600160a01b038216611e315760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610747565b611e3c60008261147f565b6001600160a01b0383166000908152606860205260408120805460019290611e65908490612e4f565b90915550506001600160a01b0382166000908152606860205260408120805460019290611e93908490612e23565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600054610100900460ff16611f1b5760405162461bcd60e51b815260040161074790612d35565b610edb828261241e565b600054610100900460ff1615808015611f455750600054600160ff909116105b80611f5f5750303b158015611f5f575060005460ff166001145b611f7b5760405162461bcd60e51b815260040161074790612ce7565b6000805460ff191660011790558015611f9e576000805461ff0019166101001790555b466099819055611fad8161157f565b609855508015610a6b576000805461ff001916905560405160018152600080516020612f978339815191529060200160405180910390a150565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a083111561201e57506000905060036120cb565b8460ff16601b1415801561203657508460ff16601c14155b1561204757506000905060046120cb565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa15801561209b573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b0381166120c4576000600192509250506120cb565b9150600090505b94509492505050565b60006001600160a01b0384163b156121d657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612118903390899088908890600401612c2c565b602060405180830381600087803b15801561213257600080fd5b505af1925050508015612162575060408051601f3d908101601f1916820190925261215f91810190612b7f565b60015b6121bc573d808015612190576040519150601f19603f3d011682016040523d82523d6000602084013e612195565b606091505b5080516121b45760405162461bcd60e51b815260040161074790612c95565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050610ec2565b506001610ec2565b6060816122025750506040805180820190915260018152600360fc1b602082015290565b8160005b811561222c578061221681612ecd565b91506122259050600a83612e3b565b9150612206565b60008167ffffffffffffffff81111561224757612247612f6a565b6040519080825280601f01601f191660200182016040528015612271576020820181803683370190505b5090505b8415610ec257612286600183612e4f565b9150612293600a86612ee8565b61229e906030612e23565b60f81b8183815181106122b3576122b3612f54565b60200101906001600160f81b031916908160001a9053506122d5600a86612e3b565b9450612275565b6001600160a01b0382166123325760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610747565b6000818152606760205260409020546001600160a01b0316156123975760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610747565b6001600160a01b03821660009081526068602052604081208054600192906123c0908490612e23565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b600054610100900460ff166124455760405162461bcd60e51b815260040161074790612d35565b8151612458906065906020850190612468565b5080516107e89060669060208401905b82805461247490612e92565b90600052602060002090601f01602090048101928261249657600085556124dc565b82601f106124af57805160ff19168380011785556124dc565b828001600101855582156124dc579182015b828111156124dc5782518255916020019190600101906124c1565b506124e8929150612522565b5090565b5080546124f890612e92565b6000825580601f10612508575050565b601f016020900490600052602060002090810190610a6b91905b5b808211156124e85760008155600101612523565b80356001600160a01b038116811461254e57600080fd5b919050565b600082601f83011261256457600080fd5b8135602061257961257483612dff565b612dce565b80838252828201915082860187848660051b890101111561259957600080fd5b60005b858110156125bf576125ad82612537565b8452928401929084019060010161259c565b5090979650505050505050565b600082601f8301126125dd57600080fd5b813560206125ed61257483612dff565b80838252828201915082860187848660051b890101111561260d57600080fd5b6000805b8681101561265057823567ffffffffffffffff81111561262f578283fd5b61263d8b88838d01016126be565b8652509385019391850191600101612611565b509198975050505050505050565b600082601f83011261266f57600080fd5b8135602061267f61257483612dff565b80838252828201915082860187848660051b890101111561269f57600080fd5b60005b858110156125bf578135845292840192908401906001016126a2565b600082601f8301126126cf57600080fd5b813567ffffffffffffffff8111156126e9576126e9612f6a565b6126fc601f8201601f1916602001612dce565b81815284602083860101111561271157600080fd5b816020850160208301376000918101602001919091529392505050565b60006020828403121561274057600080fd5b611ae482612537565b6000806040838503121561275c57600080fd5b61276583612537565b915061277360208401612537565b90509250929050565b60008060006060848603121561279157600080fd5b61279a84612537565b92506127a860208501612537565b9150604084013590509250925092565b600080600080608085870312156127ce57600080fd5b6127d785612537565b93506127e560208601612537565b925060408501359150606085013567ffffffffffffffff81111561280857600080fd5b612814878288016126be565b91505092959194509250565b60008060008060008060c0878903121561283957600080fd5b61284287612537565b9550602087013567ffffffffffffffff8082111561285f57600080fd5b61286b8a838b01612553565b965061287960408a01612537565b9550606089013591508082111561288f57600080fd5b61289b8a838b016126be565b945060808901359150808211156128b157600080fd5b6128bd8a838b016126be565b935060a08901359150808211156128d357600080fd5b506128e089828a016126be565b9150509295509295509295565b60008060006060848603121561290257600080fd5b61290b84612537565b9250602084013567ffffffffffffffff8082111561292857600080fd5b6129348783880161265e565b9350604086013591508082111561294a57600080fd5b50612957868287016125cc565b9150509250925092565b6000806040838503121561297457600080fd5b61297d83612537565b91506020830135801515811461299257600080fd5b809150509250929050565b600080604083850312156129b057600080fd5b6129b983612537565b946020939093013593505050565b6000806000606084860312156129dc57600080fd5b6129e584612537565b925060208401359150604084013567ffffffffffffffff811115612a0857600080fd5b612957868287016126be565b60008060008060808587031215612a2a57600080fd5b612a3385612537565b93506020850135925060408501359150606085013567ffffffffffffffff81111561280857600080fd5b60008060008060808587031215612a7357600080fd5b612a7c85612537565b966020860135965060408601359560600135945092505050565b600080600060608486031215612aab57600080fd5b833567ffffffffffffffff80821115612ac357600080fd5b612acf87838801612553565b9450602086013591508082111561292857600080fd5b60008060408385031215612af857600080fd5b823567ffffffffffffffff80821115612b1057600080fd5b612b1c8683870161265e565b93506020850135915080821115612b3257600080fd5b50612b3f858286016125cc565b9150509250929050565b600060208284031215612b5b57600080fd5b5051919050565b600060208284031215612b7457600080fd5b8135611ae481612f80565b600060208284031215612b9157600080fd5b8151611ae481612f80565b600060208284031215612bae57600080fd5b5035919050565b60008151808452612bcd816020860160208601612e66565b601f01601f19169290920160200192915050565b60008251612bf3818460208701612e66565b9190910192915050565b60008351612c0f818460208801612e66565b835190830190612c23818360208801612e66565b01949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612c5f90830184612bb5565b9695505050505050565b828152604060208201526000610ec26040830184612bb5565b602081526000611ae46020830184612bb5565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b6020808252602e908201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160408201526d191e481a5b9a5d1a585b1a5e995960921b606082015260800190565b6020808252602b908201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960408201526a6e697469616c697a696e6760a81b606082015260800190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715612df757612df7612f6a565b604052919050565b600067ffffffffffffffff821115612e1957612e19612f6a565b5060051b60200190565b60008219821115612e3657612e36612efc565b500190565b600082612e4a57612e4a612f12565b500490565b600082821015612e6157612e61612efc565b500390565b60005b83811015612e81578181015183820152602001612e69565b838111156106a55750506000910152565b600181811c90821680612ea657607f821691505b60208210811415612ec757634e487b7160e01b600052602260045260246000fd5b50919050565b6000600019821415612ee157612ee1612efc565b5060010190565b600082612ef757612ef7612f12565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052602160045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160e01b031981168114610a6b57600080fdfe7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498a2646970667358221220291929a5b88ae7961aa7861169812eacd14b5295f8c921b28feec1031d43b62864736f6c63430008070033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 34 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.