Feature Tip: Add private address tag to any address under My Name Tag !
Overview
TokenID
2227
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
Dr1ver
Compiler Version
v0.8.17+commit.8df45f5f
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.17; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; // @@@@@@@@@@@@@@@@@@@ // @@@@@@ @@@@@@ // @@@@@ @@@@ // @@@@ @@@@ // @@@@ @@@@ // @@@@ @@@@@ @@@@ // @@@ @@@@@@@@@@@ @@@ // @@@ @@@ @@@ @@@ // @@@ @@@ @@@@ @@@ @@@ // @@@ @@@ @@@@@@ @@@ @@@ // @@@ @@@ @@@@ @@@ @@@ // @@@ @@@ @@@ @@@ // @@@ @@@@@@@@@@@ @@@ // @@@ @@@@ @@@ // @@@ @@@ // @@@ @@@ // abstract contract MintableInterface { function mintTransfer(address to) public virtual; } abstract contract EnhancementInterface { function restore(address driverOwner, uint256 enhancementId) public virtual returns (bool); function use(address driverOwner, uint256 enhancementId) public virtual returns (bool); } contract Dr1ver is Ownable, Pausable, ReentrancyGuard, ERC721Enumerable { address private _bankWallet = 0x04d0d24c72F9A95026a37389EEA64d2df1f2239B; address private _approved = 0x04d0d24c72F9A95026a37389EEA64d2df1f2239B; uint256 public price = 0.05 ether; string private _baseTokenURI = "https://dr1ver.cult1vate.com/metadata/"; address genesisSorceAddress; // Approved mintvial contract address sorceAddress; // Something ~ ~ ~ uint256 currentTokenId = 24; struct Enhancement { address addr; uint tokenId; } mapping(uint256 => uint256) private enhancementMap; mapping(uint256 => address) private enhancementContractMap; mapping(uint256 => uint256) private enhancementTokenIdMap; mapping(address => uint256) private authorizedEnhancementContracts; constructor() ERC721("CULTIVATE | DR1VER GENESIS", "DR1VER") { unchecked { for (uint i = 1; i <= 24; i++) { // Mint 23 Dr1vers for Cultivate Vault _safeMint(msg.sender, i); } } } /* * * Migration * */ function mintTransfer(address to) public payable { require(msg.sender == genesisSorceAddress, "Not authorized"); require(price <= msg.value, "KD: Insufficient eth"); MintableInterface sorceContract = MintableInterface(sorceAddress); sorceContract.mintTransfer(to); currentTokenId++; _safeMint(to, currentTokenId); } /* * * Staking * */ mapping(uint256 => uint256) private stakingStarted; mapping(uint256 => uint256) private stakingTotal; mapping(uint256 => uint256) private lastStakeEnd; function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { require(!paused(), "Contract is paused"); require(stakingStarted[tokenId] == 0, "Dr1ver staked"); require( block.timestamp - lastStakeEnd[tokenId] > 1800, "Dr1ver just unstaked, you need to wait some time before transferring" ); super._beforeTokenTransfer(from, to, tokenId); } bool public stakingOpen = false; function setStakingOpen(bool open) external onlyOwner { stakingOpen = open; } function toggleStaking(uint256 tokenId) internal onlyOwnerOrApproved { unchecked { uint256 start = stakingStarted[tokenId]; if (start == 0) { require(stakingOpen, "Staking Closed"); stakingStarted[tokenId] = block.timestamp; } else { stakingTotal[tokenId] += block.timestamp - start; stakingStarted[tokenId] = 0; lastStakeEnd[tokenId] = block.timestamp; } } } function toggleStaking(uint256[] calldata tokenIds) external { uint256 n = tokenIds.length; for (uint256 i = 0; i < n; ++i) { toggleStaking(tokenIds[i]); } } function stakingPeriod(uint256 tokenId) external view returns ( bool isStaked, uint256 current, uint256 total ) { uint256 start = stakingStarted[tokenId]; if (start != 0) { isStaked = true; current = block.timestamp - start; } total = current + stakingTotal[tokenId]; } /* * * ownerMint * */ function ownerMint( address[] calldata addresses, uint256[] calldata airdropAmount ) public onlyOwner { require( addresses.length == airdropAmount.length, "KD: addresses does not match amount length" ); unchecked { for (uint256 i = 0; i < addresses.length; i++) { for (uint256 j = 0; j < airdropAmount[i]; j++) { currentTokenId++; _safeMint(addresses[i], currentTokenId); MintableInterface sorceContract = MintableInterface( sorceAddress ); sorceContract.mintTransfer(addresses[i]); } } } } /* * * Enhancement * */ bool enhancementStarted = false; uint256 constant enhancementShift = 10_000; function setEnhancementStarted(bool isStarted) internal onlyOwnerOrApproved { enhancementStarted = isStarted; } function setAuthorizedEnhancementContract( address enhancementContract, bool allowed ) external onlyOwnerOrApproved { if (allowed) { authorizedEnhancementContracts[enhancementContract] = 1; } else { authorizedEnhancementContracts[enhancementContract] = 0; } } // Called by the Dressing system to burn/remint the token when enhanced function enhanceToken( uint256 tokenId, address enhancementContract, uint256 enhancementTokenId ) public { require( enhancementStarted == true, "Enhancement session has not started" ); require(ownerOf(tokenId) == _msgSender(), "Doesn't own the token"); require( authorizedEnhancementContracts[enhancementContract] == 1, "Not a valid Enhancement" ); uint256 newTokenId = tokenId + enhancementShift; _burn(tokenId); _safeMint(_msgSender(), newTokenId); // increase enhancement count for enhanced dr1ver enhancementMap[newTokenId] = enhancementMap[tokenId] + 1; enhancementMap[tokenId] = 0; // Store enhancement data enhancementContractMap[newTokenId] = enhancementContract; enhancementTokenIdMap[newTokenId] = enhancementTokenId; // Burn the used enhancement EnhancementInterface enhancement = EnhancementInterface( enhancementContract ); enhancement.use(msg.sender, enhancementTokenId); } function resetToken(uint256 tokenId) public { require(ownerOf(tokenId) == _msgSender(), "Doesn't own the token"); require(tokenId > 6400, "Already reset"); uint256 enhancementCount = enhancementMap[tokenId]; for (uint i = 0; i < enhancementCount; i++) { uint256 dr1verTokenId = tokenId - enhancementShift * i; address enhancementContract = enhancementContractMap[dr1verTokenId]; uint256 enhancementTokenId = enhancementTokenIdMap[dr1verTokenId]; // Restore the enhancement EnhancementInterface enhancement = EnhancementInterface( enhancementContract ); enhancement.restore(msg.sender, enhancementTokenId); enhancementMap[dr1verTokenId] = 0; enhancementContractMap[dr1verTokenId] = address(0); enhancementTokenIdMap[dr1verTokenId] = 0; } // Restore the original dr1ver _burn(tokenId); _safeMint(_msgSender(), tokenId - enhancementShift * enhancementCount); } function removeEnhancement( uint256 tokenId, address enhancementContractToRemove, uint256 enhancementIdToRemove ) public { require(ownerOf(tokenId) == _msgSender(), "Doesn't own the token"); require(tokenId > 6400, "No enhancement to remove"); uint256 enhancementCount = enhancementMap[tokenId]; // find the enhancement for this token for (uint i = 0; i < enhancementCount; i++) { uint256 dr1verTokenId = tokenId - enhancementShift * i; address enhancementContract = enhancementContractMap[dr1verTokenId]; uint256 enhancementTokenId = enhancementTokenIdMap[dr1verTokenId]; if ( enhancementContract == enhancementContractToRemove && enhancementTokenId == enhancementIdToRemove ) { // Enhancement found, restore it EnhancementInterface enhancement = EnhancementInterface( enhancementContractToRemove ); enhancement.restore(msg.sender, enhancementIdToRemove); // Override removed enhancement with last enhancement enhancementContractMap[dr1verTokenId] = enhancementContractMap[ tokenId ]; enhancementTokenIdMap[dr1verTokenId] = enhancementTokenIdMap[ tokenId ]; // Remove last enhancement enhancementMap[tokenId] = 0; enhancementContractMap[tokenId] = address(0); enhancementTokenIdMap[tokenId] = 0; // Remint _burn(tokenId); _safeMint(_msgSender(), tokenId - enhancementShift); break; } } } function getEnhancements(uint256 tokenId) external view returns (Enhancement[] memory enhancements) { uint256 enhancementCount = enhancementMap[tokenId]; for (uint i = 0; i < enhancementCount; i++) { uint256 dr1verTokenId = tokenId - enhancementShift * i; enhancements[i] = Enhancement( enhancementContractMap[dr1verTokenId], enhancementTokenIdMap[dr1verTokenId] ); } } /* ** Retrieve the funds of the sale */ function retrieveFunds() external nonReentrant { // Only the Bank Wallet or the owner can withraw the funds require( msg.sender == _bankWallet || msg.sender == owner(), "Not allowed" ); uint256 balance = address(this).balance; (bool success, ) = _bankWallet.call{value: balance}(""); require(success, "TRANSFER_FAIL"); } /** * Set the bank address */ function setBankWallet(address addr) external onlyOwner { require(addr != address(0), "Invalid address"); _bankWallet = addr; } /** * Set the purchase price */ function setPrice(uint256 newPrice) external onlyOwner { price = newPrice; } function _baseURI() internal view virtual override returns (string memory) { return _baseTokenURI; } function setBaseURI(string calldata baseURI) external onlyOwnerOrApproved { _baseTokenURI = baseURI; } function setGenesisSorceAddress(address newAddress) public onlyOwnerOrApproved { genesisSorceAddress = newAddress; } function setSorceAddress(address newAddress) public onlyOwnerOrApproved { sorceAddress = newAddress; } function contractURI() public pure returns (string memory) { return "https://dr1ver.cult1vate.com/opensea"; } function pause() public onlyOwnerOrApproved { Pausable._pause(); } function unpause() public onlyOwnerOrApproved { Pausable._unpause(); } modifier onlyOwnerOrApproved() { require( msg.sender == owner() || msg.sender == _approved, "Not owner or approved" ); _; } function setApproved(address approved) external onlyOwner { _approved = approved; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.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 Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721Enumerable.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; import "./IERC721Enumerable.sol"; /** * @dev This implements an optional extension of {ERC721} defined in the EIP that adds * enumerability of all the token ids in the contract as well as all token ids owned by each * account. */ abstract contract ERC721Enumerable is ERC721, IERC721Enumerable { // Mapping from owner to list of owned token IDs mapping(address => mapping(uint256 => uint256)) private _ownedTokens; // Mapping from token ID to index of the owner tokens list mapping(uint256 => uint256) private _ownedTokensIndex; // Array with all token ids, used for enumeration uint256[] private _allTokens; // Mapping from token id to position in the allTokens array mapping(uint256 => uint256) private _allTokensIndex; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(IERC165, ERC721) returns (bool) { return interfaceId == type(IERC721Enumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721Enumerable-tokenOfOwnerByIndex}. */ function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) { require(index < ERC721.balanceOf(owner), "ERC721Enumerable: owner index out of bounds"); return _ownedTokens[owner][index]; } /** * @dev See {IERC721Enumerable-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _allTokens.length; } /** * @dev See {IERC721Enumerable-tokenByIndex}. */ function tokenByIndex(uint256 index) public view virtual override returns (uint256) { require(index < ERC721Enumerable.totalSupply(), "ERC721Enumerable: global index out of bounds"); return _allTokens[index]; } /** * @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` cannot be the zero address. * - `to` cannot be the zero address. * * 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 override { super._beforeTokenTransfer(from, to, tokenId); if (from == address(0)) { _addTokenToAllTokensEnumeration(tokenId); } else if (from != to) { _removeTokenFromOwnerEnumeration(from, tokenId); } if (to == address(0)) { _removeTokenFromAllTokensEnumeration(tokenId); } else if (to != from) { _addTokenToOwnerEnumeration(to, tokenId); } } /** * @dev Private function to add a token to this extension's ownership-tracking data structures. * @param to address representing the new owner of the given token ID * @param tokenId uint256 ID of the token to be added to the tokens list of the given address */ function _addTokenToOwnerEnumeration(address to, uint256 tokenId) private { uint256 length = ERC721.balanceOf(to); _ownedTokens[to][length] = tokenId; _ownedTokensIndex[tokenId] = length; } /** * @dev Private function to add a token to this extension's token tracking data structures. * @param tokenId uint256 ID of the token to be added to the tokens list */ function _addTokenToAllTokensEnumeration(uint256 tokenId) private { _allTokensIndex[tokenId] = _allTokens.length; _allTokens.push(tokenId); } /** * @dev Private function to remove a token from this extension's ownership-tracking data structures. Note that * while the token is not assigned a new owner, the `_ownedTokensIndex` mapping is _not_ updated: this allows for * gas optimizations e.g. when performing a transfer operation (avoiding double writes). * This has O(1) time complexity, but alters the order of the _ownedTokens array. * @param from address representing the previous owner of the given token ID * @param tokenId uint256 ID of the token to be removed from the tokens list of the given address */ function _removeTokenFromOwnerEnumeration(address from, uint256 tokenId) private { // To prevent a gap in from's tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = ERC721.balanceOf(from) - 1; uint256 tokenIndex = _ownedTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary if (tokenIndex != lastTokenIndex) { uint256 lastTokenId = _ownedTokens[from][lastTokenIndex]; _ownedTokens[from][tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _ownedTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index } // This also deletes the contents at the last position of the array delete _ownedTokensIndex[tokenId]; delete _ownedTokens[from][lastTokenIndex]; } /** * @dev Private function to remove a token from this extension's token tracking data structures. * This has O(1) time complexity, but alters the order of the _allTokens array. * @param tokenId uint256 ID of the token to be removed from the tokens list */ function _removeTokenFromAllTokensEnumeration(uint256 tokenId) private { // To prevent a gap in the tokens array, we store the last token in the index of the token to delete, and // then delete the last slot (swap and pop). uint256 lastTokenIndex = _allTokens.length - 1; uint256 tokenIndex = _allTokensIndex[tokenId]; // When the token to delete is the last token, the swap operation is unnecessary. However, since this occurs so // rarely (when the last minted token is burnt) that we still do the swap here to avoid the gas cost of adding // an 'if' statement (like in _removeTokenFromOwnerEnumeration) uint256 lastTokenId = _allTokens[lastTokenIndex]; _allTokens[tokenIndex] = lastTokenId; // Move the last token to the slot of the to-delete token _allTokensIndex[lastTokenId] = tokenIndex; // Update the moved token's index // This also deletes the contents at the last position of the array delete _allTokensIndex[tokenId]; _allTokens.pop(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/extensions/IERC721Enumerable.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional enumeration extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Enumerable is IERC721 { /** * @dev Returns the total amount of tokens stored by the contract. */ function totalSupply() external view returns (uint256); /** * @dev Returns a token ID owned by `owner` at a given `index` of its token list. * Use along with {balanceOf} to enumerate all of ``owner``'s tokens. */ function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256); /** * @dev Returns a token ID at a given `index` of all the tokens stored by the contract. * Use along with {totalSupply} to enumerate all tokens. */ function tokenByIndex(uint256 index) external view returns (uint256); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.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 ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings 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. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || 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 = ERC721.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 = ERC721.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 = ERC721.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(ERC721.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(ERC721.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 IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, data) returns (bytes4 retval) { return retval == IERC721Receiver.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 {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * 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 v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // 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); } }
// 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 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // 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 IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `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 (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 IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"contractURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"enhancementContract","type":"address"},{"internalType":"uint256","name":"enhancementTokenId","type":"uint256"}],"name":"enhanceToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getEnhancements","outputs":[{"components":[{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"internalType":"struct Dr1ver.Enhancement[]","name":"enhancements","type":"tuple[]"}],"stateMutability":"view","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"}],"name":"mintTransfer","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"},{"internalType":"uint256[]","name":"airdropAmount","type":"uint256[]"}],"name":"ownerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"enhancementContractToRemove","type":"address"},{"internalType":"uint256","name":"enhancementIdToRemove","type":"uint256"}],"name":"removeEnhancement","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"resetToken","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"retrieveFunds","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":"address","name":"approved","type":"address"}],"name":"setApproved","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"enhancementContract","type":"address"},{"internalType":"bool","name":"allowed","type":"bool"}],"name":"setAuthorizedEnhancementContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setBankWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"baseURI","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"setGenesisSorceAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newAddress","type":"address"}],"name":"setSorceAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"open","type":"bool"}],"name":"setStakingOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakingOpen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"stakingPeriod","outputs":[{"internalType":"bool","name":"isStaked","type":"bool"},{"internalType":"uint256","name":"current","type":"uint256"},{"internalType":"uint256","name":"total","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"toggleStaking","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenOfOwnerByIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
600c80547304d0d24c72f9a95026a37389eea64d2df1f2239b6001600160a01b03199182168117909255600d8054909116909117905566b1a2bc2ec50000600e5560e0604052602660808181529062003f0960a039600f9062000063908262000a22565b506018601255601a805461ffff191690553480156200008157600080fd5b506040518060400160405280601a81526020017f43554c544956415445207c204452315645522047454e4553495300000000000081525060405180604001604052806006815260200165222918ab22a960d11b815250620000f1620000eb6200014b60201b60201c565b6200014f565b6000805460ff60a01b1916905560018055600262000110838262000a22565b5060036200011f828262000a22565b5060019150505b6018811162000144576200013b33826200019f565b60010162000126565b5062000c08565b3390565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b620001c1828260405180602001604052806000815250620001c560201b60201c565b5050565b620001d1838362000241565b620001e0600084848462000397565b6200023c5760405162461bcd60e51b8152602060048201526032602482015260008051602062003ee983398151915260448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b60648201526084015b60405180910390fd5b505050565b6001600160a01b038216620002995760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640162000233565b6000818152600460205260409020546001600160a01b031615620003005760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640162000233565b6200030e60008383620004f3565b6001600160a01b03821660009081526005602052604081208054600192906200033990849062000b04565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6000620003b8846001600160a01b03166200065360201b62001b141760201c565b15620004e757604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290620003f290339089908890889060040162000b20565b6020604051808303816000875af192505050801562000430575060408051601f3d908101601f191682019092526200042d9181019062000b93565b60015b620004cc573d80801562000461576040519150601f19603f3d011682016040523d82523d6000602084013e62000466565b606091505b508051600003620004c45760405162461bcd60e51b8152602060048201526032602482015260008051602062003ee983398151915260448201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606482015260840162000233565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050620004eb565b5060015b949350505050565b62000507600054600160a01b900460ff1690565b156200054b5760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b604482015260640162000233565b60008181526017602052604090205415620005995760405162461bcd60e51b815260206004820152600d60248201526c111c8c5d995c881cdd185ad959609a1b604482015260640162000233565b60008181526019602052604090205461070890620005b8904262000bc6565b116200063b5760405162461bcd60e51b8152602060048201526044602482018190527f447231766572206a75737420756e7374616b65642c20796f75206e6565642074908201527f6f207761697420736f6d652074696d65206265666f7265207472616e7366657260648201526372696e6760e01b608482015260a40162000233565b6200023c8383836200066260201b62001b231760201c565b6001600160a01b03163b151590565b6200067a8383836200023c60201b620009b01760201c565b6001600160a01b038316620006d857620006d281600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b620006fe565b816001600160a01b0316836001600160a01b031614620006fe57620006fe83826200073e565b6001600160a01b03821662000718576200023c81620007eb565b826001600160a01b0316826001600160a01b0316146200023c576200023c8282620008a5565b600060016200075884620008f660201b6200114d1760201c565b62000764919062000bc6565b600083815260096020526040902054909150808214620007b8576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a54600090620007ff9060019062000bc6565b6000838152600b6020526040812054600a80549394509092849081106200082a576200082a62000bdc565b9060005260206000200154905080600a83815481106200084e576200084e62000bdc565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a80548062000889576200088962000bf2565b6001900381819060005260206000200160009055905550505050565b6000620008bd83620008f660201b6200114d1760201c565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b60006001600160a01b038216620009625760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b606482015260840162000233565b506001600160a01b031660009081526005602052604090205490565b634e487b7160e01b600052604160045260246000fd5b600181811c90821680620009a957607f821691505b602082108103620009ca57634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200023c57600081815260208120601f850160051c81016020861015620009f95750805b601f850160051c820191505b8181101562000a1a5782815560010162000a05565b505050505050565b81516001600160401b0381111562000a3e5762000a3e6200097e565b62000a568162000a4f845462000994565b84620009d0565b602080601f83116001811462000a8e576000841562000a755750858301515b600019600386901b1c1916600185901b17855562000a1a565b600085815260208120601f198616915b8281101562000abf5788860151825594840194600190910190840162000a9e565b508582101562000ade5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052601160045260246000fd5b8082018082111562000b1a5762000b1a62000aee565b92915050565b600060018060a01b038087168352602081871681850152856040850152608060608501528451915081608085015260005b8281101562000b6f5785810182015185820160a00152810162000b51565b5050600060a0828501015260a0601f19601f83011684010191505095945050505050565b60006020828403121562000ba657600080fd5b81516001600160e01b03198116811462000bbf57600080fd5b9392505050565b8181038181111562000b1a5762000b1a62000aee565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b6132d18062000c186000396000f3fe6080604052600436106102515760003560e01c80636ef4f9b511610139578063b88d4fde116100b6578063e985e9c51161007a578063e985e9c5146106ce578063ec4dac4d14610717578063f2fde38b14610737578063f8907a3f14610757578063fb0289ca14610777578063fe8199a81461079757600080fd5b8063b88d4fde1461061c578063b9302d921461063c578063c1027c981461065c578063c87b56dd14610699578063e8a3d485146106b957600080fd5b806391b7f5ed116100fd57806391b7f5ed1461059e578063937f2608146105be57806395d89b41146105d1578063a035b1fe146105e6578063a22cb465146105fc57600080fd5b80636ef4f9b51461051657806370a0823114610536578063715018a6146105565780638456cb591461056b5780638da5cb5b1461058057600080fd5b80634c903850116101d25780635c975abb116101965780635c975abb146104625780635f318ec51461048157806361b20d8c146104a15780636352211e146104b657806364d14d40146104d657806369f7d2f2146104f657600080fd5b80634c903850146103b55780634f6ccce7146103d557806355f804b3146103f5578063564892dc146104155780635bde71ac1461043557600080fd5b806323b872dd1161021957806323b872dd146103265780632f745c591461034657806338760298146103665780633f4ba83a1461038057806342842e0e1461039557600080fd5b806301ffc9a71461025657806306fdde031461028b578063081812fc146102ad578063095ea7b3146102e557806318160ddd14610307575b600080fd5b34801561026257600080fd5b50610276610271366004612a17565b6107b7565b60405190151581526020015b60405180910390f35b34801561029757600080fd5b506102a06107e2565b6040516102829190612a84565b3480156102b957600080fd5b506102cd6102c8366004612a97565b610874565b6040516001600160a01b039091168152602001610282565b3480156102f157600080fd5b50610305610300366004612acc565b61089b565b005b34801561031357600080fd5b50600a545b604051908152602001610282565b34801561033257600080fd5b50610305610341366004612af6565b6109b5565b34801561035257600080fd5b50610318610361366004612acc565b6109e6565b34801561037257600080fd5b50601a546102769060ff1681565b34801561038c57600080fd5b50610305610a7c565b3480156103a157600080fd5b506103056103b0366004612af6565b610ac5565b3480156103c157600080fd5b506103056103d0366004612b32565b610ae0565b3480156103e157600080fd5b506103186103f0366004612a97565b610b41565b34801561040157600080fd5b50610305610410366004612b4d565b610bd4565b34801561042157600080fd5b50610305610430366004612bcd565b610c20565b34801561044157600080fd5b50610455610450366004612a97565b610c3b565b6040516102829190612bea565b34801561046e57600080fd5b50600054600160a01b900460ff16610276565b34801561048d57600080fd5b5061030561049c366004612b32565b610ce2565b3480156104ad57600080fd5b50610305610d54565b3480156104c257600080fd5b506102cd6104d1366004612a97565b610ea7565b3480156104e257600080fd5b506103056104f1366004612c42565b610f07565b34801561050257600080fd5b50610305610511366004612cc5565b610f88565b34801561052257600080fd5b50610305610531366004612d31565b61110a565b34801561054257600080fd5b50610318610551366004612b32565b61114d565b34801561056257600080fd5b506103056111d3565b34801561057757600080fd5b506103056111e5565b34801561058c57600080fd5b506000546001600160a01b03166102cd565b3480156105aa57600080fd5b506103056105b9366004612a97565b61122c565b6103056105cc366004612b32565b611239565b3480156105dd57600080fd5b506102a0611350565b3480156105f257600080fd5b50610318600e5481565b34801561060857600080fd5b50610305610617366004612c42565b61135f565b34801561062857600080fd5b50610305610637366004612d89565b61136a565b34801561064857600080fd5b50610305610657366004612a97565b61139c565b34801561066857600080fd5b5061067c610677366004612a97565b611540565b604080519315158452602084019290925290820152606001610282565b3480156106a557600080fd5b506102a06106b4366004612a97565b61158c565b3480156106c557600080fd5b506102a06115f3565b3480156106da57600080fd5b506102766106e9366004612e65565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561072357600080fd5b50610305610732366004612e98565b611613565b34801561074357600080fd5b50610305610752366004612b32565b611811565b34801561076357600080fd5b50610305610772366004612e98565b61188a565b34801561078357600080fd5b50610305610792366004612b32565b611a89565b3480156107a357600080fd5b506103056107b2366004612b32565b611ab3565b60006001600160e01b0319821663780e9d6360e01b14806107dc57506107dc82611bdb565b92915050565b6060600280546107f190612ebd565b80601f016020809104026020016040519081016040528092919081815260200182805461081d90612ebd565b801561086a5780601f1061083f5761010080835404028352916020019161086a565b820191906000526020600020905b81548152906001019060200180831161084d57829003601f168201915b5050505050905090565b600061087f82611c2b565b506000908152600660205260409020546001600160a01b031690565b60006108a682610ea7565b9050806001600160a01b0316836001600160a01b0316036109185760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610934575061093481336106e9565b6109a65760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c0000606482015260840161090f565b6109b08383611c8a565b505050565b6109bf3382611cf8565b6109db5760405162461bcd60e51b815260040161090f90612ef7565b6109b0838383611d77565b60006109f18361114d565b8210610a535760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161090f565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b6000546001600160a01b0316331480610a9f5750600d546001600160a01b031633145b610abb5760405162461bcd60e51b815260040161090f90612f45565b610ac3611f1e565b565b6109b08383836040518060200160405280600081525061136a565b6000546001600160a01b0316331480610b035750600d546001600160a01b031633145b610b1f5760405162461bcd60e51b815260040161090f90612f45565b601080546001600160a01b0319166001600160a01b0392909216919091179055565b6000610b4c600a5490565b8210610baf5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161090f565b600a8281548110610bc257610bc2612f74565b90600052602060002001549050919050565b6000546001600160a01b0316331480610bf75750600d546001600160a01b031633145b610c135760405162461bcd60e51b815260040161090f90612f45565b600f6109b0828483612fd0565b610c28611f73565b601a805460ff1916911515919091179055565b6000818152601360205260408120546060915b81811015610cdb576000610c64826127106130a6565b610c6e90866130bd565b604080518082018252600083815260146020908152838220546001600160a01b03168352848252601581529290205491810191909152855191925090859084908110610cbc57610cbc612f74565b6020026020010181905250508080610cd3906130d0565b915050610c4e565b5050919050565b610cea611f73565b6001600160a01b038116610d325760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015260640161090f565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b600260015403610da65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161090f565b6002600155600c546001600160a01b0316331480610dce57506000546001600160a01b031633145b610e085760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b604482015260640161090f565b600c5460405147916000916001600160a01b039091169083908381818185875af1925050503d8060008114610e59576040519150601f19603f3d011682016040523d82523d6000602084013e610e5e565b606091505b5050905080610e9f5760405162461bcd60e51b815260206004820152600d60248201526c1514905394d1915497d1905253609a1b604482015260640161090f565b505060018055565b6000818152600460205260408120546001600160a01b0316806107dc5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640161090f565b6000546001600160a01b0316331480610f2a5750600d546001600160a01b031633145b610f465760405162461bcd60e51b815260040161090f90612f45565b8015610f6a57506001600160a01b0316600090815260166020526040902060019055565b6001600160a01b0382166000908152601660205260408120555b5050565b610f90611f73565b828114610ff25760405162461bcd60e51b815260206004820152602a60248201527f4b443a2061646472657373657320646f6573206e6f74206d6174636820616d6f6044820152690eadce840d8cadccee8d60b31b606482015260840161090f565b60005b838110156111035760005b83838381811061101257611012612f74565b905060200201358110156110fa5760128054600101905561105b86868481811061103e5761103e612f74565b90506020020160208101906110539190612b32565b601254611fcd565b6011546001600160a01b03168063937f260888888681811061107f5761107f612f74565b90506020020160208101906110949190612b32565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381600087803b1580156110d557600080fd5b505af11580156110e9573d6000803e3d6000fd5b505060019093019250611000915050565b50600101610ff5565b5050505050565b8060005b818110156111475761113784848381811061112b5761112b612f74565b90506020020135611fe7565b611140816130d0565b905061110e565b50505050565b60006001600160a01b0382166111b75760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b606482015260840161090f565b506001600160a01b031660009081526005602052604090205490565b6111db611f73565b610ac360006120c3565b6000546001600160a01b03163314806112085750600d546001600160a01b031633145b6112245760405162461bcd60e51b815260040161090f90612f45565b610ac3612113565b611234611f73565b600e55565b6010546001600160a01b031633146112845760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b604482015260640161090f565b34600e5411156112cd5760405162461bcd60e51b815260206004820152601460248201527309688744092dce6eaccccd2c6d2cadce840cae8d60631b604482015260640161090f565b60115460405163126fe4c160e31b81526001600160a01b03838116600483015290911690819063937f260890602401600060405180830381600087803b15801561131657600080fd5b505af115801561132a573d6000803e3d6000fd5b50506012805492509050600061133f836130d0565b9190505550610f8482601254611fcd565b6060600380546107f190612ebd565b610f84338383612156565b6113743383611cf8565b6113905760405162461bcd60e51b815260040161090f90612ef7565b61114784848484612224565b336113a682610ea7565b6001600160a01b0316146113cc5760405162461bcd60e51b815260040161090f906130e9565b611900811161140d5760405162461bcd60e51b815260206004820152600d60248201526c105b1c9958591e481c995cd95d609a1b604482015260640161090f565b600081815260136020526040812054905b81811015611517576000611434826127106130a6565b61143e90856130bd565b600081815260146020908152604080832054601590925291829020549151637804160760e11b8152336004820152602481018390529293506001600160a01b0316918290819063f0082c0e906044016020604051808303816000875af11580156114ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d09190613118565b5050506000918252506013602090815260408083208390556014825280832080546001600160a01b031916905560159091528120558061150f816130d0565b91505061141e565b5061152182612257565b610f8433611531836127106130a6565b61153b90856130bd565b611fcd565b60008181526017602052604081205481908190801561156a576001935061156781426130bd565b92505b6000858152601860205260409020546115839084613135565b93959294505050565b606061159782611c2b565b60006115a16122fe565b905060008151116115c157604051806020016040528060008152506115ec565b806115cb8461230d565b6040516020016115dc929190613148565b6040516020818303038152906040525b9392505050565b606060405180606001604052806024815260200161327860249139905090565b601a5460ff61010090910416151560011461167c5760405162461bcd60e51b815260206004820152602360248201527f456e68616e63656d656e742073657373696f6e20686173206e6f7420737461726044820152621d195960ea1b606482015260840161090f565b3361168684610ea7565b6001600160a01b0316146116ac5760405162461bcd60e51b815260040161090f906130e9565b6001600160a01b0382166000908152601660205260409020546001146117145760405162461bcd60e51b815260206004820152601760248201527f4e6f7420612076616c696420456e68616e63656d656e74000000000000000000604482015260640161090f565b600061172261271085613135565b905061172d84612257565b6117373382611fcd565b600084815260136020526040902054611751906001613135565b6000828152601360209081526040808320939093558682528282208290558382526014815282822080546001600160a01b0319166001600160a01b038816908117909155601590915290829020849055905163034fd95160e51b8152336004820152602481018490528491906369fb2a20906044016020604051808303816000875af11580156117e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118099190613118565b505050505050565b611819611f73565b6001600160a01b03811661187e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161090f565b611887816120c3565b50565b3361189484610ea7565b6001600160a01b0316146118ba5760405162461bcd60e51b815260040161090f906130e9565b611900831161190b5760405162461bcd60e51b815260206004820152601860248201527f4e6f20656e68616e63656d656e7420746f2072656d6f76650000000000000000604482015260640161090f565b600083815260136020526040812054905b81811015611103576000611932826127106130a6565b61193c90876130bd565b6000818152601460209081526040808320546015909252909120549192506001600160a01b03908116919087168214801561197657508581145b15611a7357604051637804160760e11b81523360048201526024810187905287906001600160a01b0382169063f0082c0e906044016020604051808303816000875af11580156119ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119ee9190613118565b506000898152601460209081526040808320805488855282852080546001600160a01b039092166001600160a01b03199283161790558d8552601580855283862080548b8852858820558f875260138652938620869055825490911690915590915255611a5a89612257565b611a6a3361153b6127108c6130bd565b50505050611103565b5050508080611a81906130d0565b91505061191c565b611a91611f73565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331480611ad65750600d546001600160a01b031633145b611af25760405162461bcd60e51b815260040161090f90612f45565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03163b151590565b6001600160a01b038316611b7e57611b7981600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b611ba1565b816001600160a01b0316836001600160a01b031614611ba157611ba1838261240e565b6001600160a01b038216611bb8576109b0816124ab565b826001600160a01b0316826001600160a01b0316146109b0576109b0828261255a565b60006001600160e01b031982166380ac58cd60e01b1480611c0c57506001600160e01b03198216635b5e139f60e01b145b806107dc57506301ffc9a760e01b6001600160e01b03198316146107dc565b6000818152600460205260409020546001600160a01b03166118875760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640161090f565b600081815260066020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611cbf82610ea7565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080611d0483610ea7565b9050806001600160a01b0316846001600160a01b03161480611d4b57506001600160a01b0380821660009081526007602090815260408083209388168352929052205460ff165b80611d6f5750836001600160a01b0316611d6484610874565b6001600160a01b0316145b949350505050565b826001600160a01b0316611d8a82610ea7565b6001600160a01b031614611dee5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b606482015260840161090f565b6001600160a01b038216611e505760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161090f565b611e5b83838361259e565b611e66600082611c8a565b6001600160a01b0383166000908152600560205260408120805460019290611e8f9084906130bd565b90915550506001600160a01b0382166000908152600560205260408120805460019290611ebd908490613135565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611f266126e2565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000546001600160a01b03163314610ac35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161090f565b610f84828260405180602001604052806000815250612732565b6000546001600160a01b031633148061200a5750600d546001600160a01b031633145b6120265760405162461bcd60e51b815260040161090f90612f45565b6000818152601760205260408120549081900361209457601a5460ff166120805760405162461bcd60e51b815260206004820152600e60248201526d14dd185ada5b99c810db1bdcd95960921b604482015260640161090f565b506000908152601760205260409020429055565b600091825260186020908152604080842080544294850301905560178252808420849055601990915290912055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61211b612765565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611f563390565b816001600160a01b0316836001600160a01b0316036121b75760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161090f565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61222f848484611d77565b61223b848484846127b2565b6111475760405162461bcd60e51b815260040161090f90613177565b600061226282610ea7565b90506122708160008461259e565b61227b600083611c8a565b6001600160a01b03811660009081526005602052604081208054600192906122a49084906130bd565b909155505060008281526004602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6060600f80546107f190612ebd565b6060816000036123345750506040805180820190915260018152600360fc1b602082015290565b8160005b811561235e5780612348816130d0565b91506123579050600a836131df565b9150612338565b60008167ffffffffffffffff81111561237957612379612d73565b6040519080825280601f01601f1916602001820160405280156123a3576020820181803683370190505b5090505b8415611d6f576123b86001836130bd565b91506123c5600a866131f3565b6123d0906030613135565b60f81b8183815181106123e5576123e5612f74565b60200101906001600160f81b031916908160001a905350612407600a866131df565b94506123a7565b6000600161241b8461114d565b61242591906130bd565b600083815260096020526040902054909150808214612478576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a546000906124bd906001906130bd565b6000838152600b6020526040812054600a80549394509092849081106124e5576124e5612f74565b9060005260206000200154905080600a838154811061250657612506612f74565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a80548061253e5761253e613207565b6001900381819060005260206000200160009055905550505050565b60006125658361114d565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b600054600160a01b900460ff16156125ed5760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b604482015260640161090f565b600081815260176020526040902054156126395760405162461bcd60e51b815260206004820152600d60248201526c111c8c5d995c881cdd185ad959609a1b604482015260640161090f565b6000818152601960205260409020546107089061265690426130bd565b116126d75760405162461bcd60e51b8152602060048201526044602482018190527f447231766572206a75737420756e7374616b65642c20796f75206e6565642074908201527f6f207761697420736f6d652074696d65206265666f7265207472616e7366657260648201526372696e6760e01b608482015260a40161090f565b6109b0838383611b23565b600054600160a01b900460ff16610ac35760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161090f565b61273c83836128b3565b61274960008484846127b2565b6109b05760405162461bcd60e51b815260040161090f90613177565b600054600160a01b900460ff1615610ac35760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161090f565b60006001600160a01b0384163b156128a857604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906127f690339089908890889060040161321d565b6020604051808303816000875af1925050508015612831575060408051601f3d908101601f1916820190925261282e9181019061325a565b60015b61288e573d80801561285f576040519150601f19603f3d011682016040523d82523d6000602084013e612864565b606091505b5080516000036128865760405162461bcd60e51b815260040161090f90613177565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611d6f565b506001949350505050565b6001600160a01b0382166129095760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161090f565b6000818152600460205260409020546001600160a01b03161561296e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161090f565b61297a6000838361259e565b6001600160a01b03821660009081526005602052604081208054600192906129a3908490613135565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b03198116811461188757600080fd5b600060208284031215612a2957600080fd5b81356115ec81612a01565b60005b83811015612a4f578181015183820152602001612a37565b50506000910152565b60008151808452612a70816020860160208601612a34565b601f01601f19169290920160200192915050565b6020815260006115ec6020830184612a58565b600060208284031215612aa957600080fd5b5035919050565b80356001600160a01b0381168114612ac757600080fd5b919050565b60008060408385031215612adf57600080fd5b612ae883612ab0565b946020939093013593505050565b600080600060608486031215612b0b57600080fd5b612b1484612ab0565b9250612b2260208501612ab0565b9150604084013590509250925092565b600060208284031215612b4457600080fd5b6115ec82612ab0565b60008060208385031215612b6057600080fd5b823567ffffffffffffffff80821115612b7857600080fd5b818501915085601f830112612b8c57600080fd5b813581811115612b9b57600080fd5b866020828501011115612bad57600080fd5b60209290920196919550909350505050565b801515811461188757600080fd5b600060208284031215612bdf57600080fd5b81356115ec81612bbf565b602080825282518282018190526000919060409081850190868401855b82811015612c3557815180516001600160a01b03168552860151868501529284019290850190600101612c07565b5091979650505050505050565b60008060408385031215612c5557600080fd5b612c5e83612ab0565b91506020830135612c6e81612bbf565b809150509250929050565b60008083601f840112612c8b57600080fd5b50813567ffffffffffffffff811115612ca357600080fd5b6020830191508360208260051b8501011115612cbe57600080fd5b9250929050565b60008060008060408587031215612cdb57600080fd5b843567ffffffffffffffff80821115612cf357600080fd5b612cff88838901612c79565b90965094506020870135915080821115612d1857600080fd5b50612d2587828801612c79565b95989497509550505050565b60008060208385031215612d4457600080fd5b823567ffffffffffffffff811115612d5b57600080fd5b612d6785828601612c79565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215612d9f57600080fd5b612da885612ab0565b9350612db660208601612ab0565b925060408501359150606085013567ffffffffffffffff80821115612dda57600080fd5b818701915087601f830112612dee57600080fd5b813581811115612e0057612e00612d73565b604051601f8201601f19908116603f01168101908382118183101715612e2857612e28612d73565b816040528281528a6020848701011115612e4157600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215612e7857600080fd5b612e8183612ab0565b9150612e8f60208401612ab0565b90509250929050565b600080600060608486031215612ead57600080fd5b83359250612b2260208501612ab0565b600181811c90821680612ed157607f821691505b602082108103612ef157634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b602080825260159082015274139bdd081bdddb995c881bdc88185c1c1c9bdd9959605a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b601f8211156109b057600081815260208120601f850160051c81016020861015612fb15750805b601f850160051c820191505b8181101561180957828155600101612fbd565b67ffffffffffffffff831115612fe857612fe8612d73565b612ffc83612ff68354612ebd565b83612f8a565b6000601f84116001811461303057600085156130185750838201355b600019600387901b1c1916600186901b178355611103565b600083815260209020601f19861690835b828110156130615786850135825560209485019460019092019101613041565b508682101561307e5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176107dc576107dc613090565b818103818111156107dc576107dc613090565b6000600182016130e2576130e2613090565b5060010190565b6020808252601590820152742237b2b9b713ba1037bbb7103a3432903a37b5b2b760591b604082015260600190565b60006020828403121561312a57600080fd5b81516115ec81612bbf565b808201808211156107dc576107dc613090565b6000835161315a818460208801612a34565b83519083019061316e818360208801612a34565b01949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b6000826131ee576131ee6131c9565b500490565b600082613202576132026131c9565b500690565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061325090830184612a58565b9695505050505050565b60006020828403121561326c57600080fd5b81516115ec81612a0156fe68747470733a2f2f6472317665722e63756c7431766174652e636f6d2f6f70656e736561a2646970667358221220e00480d83fea3fed9c18e70fb6c4c12f93f8a038599d79cf8e153a85514bbeb364736f6c634300081100334552433732313a207472616e7366657220746f206e6f6e20455243373231526568747470733a2f2f6472317665722e63756c7431766174652e636f6d2f6d657461646174612f
Deployed Bytecode
0x6080604052600436106102515760003560e01c80636ef4f9b511610139578063b88d4fde116100b6578063e985e9c51161007a578063e985e9c5146106ce578063ec4dac4d14610717578063f2fde38b14610737578063f8907a3f14610757578063fb0289ca14610777578063fe8199a81461079757600080fd5b8063b88d4fde1461061c578063b9302d921461063c578063c1027c981461065c578063c87b56dd14610699578063e8a3d485146106b957600080fd5b806391b7f5ed116100fd57806391b7f5ed1461059e578063937f2608146105be57806395d89b41146105d1578063a035b1fe146105e6578063a22cb465146105fc57600080fd5b80636ef4f9b51461051657806370a0823114610536578063715018a6146105565780638456cb591461056b5780638da5cb5b1461058057600080fd5b80634c903850116101d25780635c975abb116101965780635c975abb146104625780635f318ec51461048157806361b20d8c146104a15780636352211e146104b657806364d14d40146104d657806369f7d2f2146104f657600080fd5b80634c903850146103b55780634f6ccce7146103d557806355f804b3146103f5578063564892dc146104155780635bde71ac1461043557600080fd5b806323b872dd1161021957806323b872dd146103265780632f745c591461034657806338760298146103665780633f4ba83a1461038057806342842e0e1461039557600080fd5b806301ffc9a71461025657806306fdde031461028b578063081812fc146102ad578063095ea7b3146102e557806318160ddd14610307575b600080fd5b34801561026257600080fd5b50610276610271366004612a17565b6107b7565b60405190151581526020015b60405180910390f35b34801561029757600080fd5b506102a06107e2565b6040516102829190612a84565b3480156102b957600080fd5b506102cd6102c8366004612a97565b610874565b6040516001600160a01b039091168152602001610282565b3480156102f157600080fd5b50610305610300366004612acc565b61089b565b005b34801561031357600080fd5b50600a545b604051908152602001610282565b34801561033257600080fd5b50610305610341366004612af6565b6109b5565b34801561035257600080fd5b50610318610361366004612acc565b6109e6565b34801561037257600080fd5b50601a546102769060ff1681565b34801561038c57600080fd5b50610305610a7c565b3480156103a157600080fd5b506103056103b0366004612af6565b610ac5565b3480156103c157600080fd5b506103056103d0366004612b32565b610ae0565b3480156103e157600080fd5b506103186103f0366004612a97565b610b41565b34801561040157600080fd5b50610305610410366004612b4d565b610bd4565b34801561042157600080fd5b50610305610430366004612bcd565b610c20565b34801561044157600080fd5b50610455610450366004612a97565b610c3b565b6040516102829190612bea565b34801561046e57600080fd5b50600054600160a01b900460ff16610276565b34801561048d57600080fd5b5061030561049c366004612b32565b610ce2565b3480156104ad57600080fd5b50610305610d54565b3480156104c257600080fd5b506102cd6104d1366004612a97565b610ea7565b3480156104e257600080fd5b506103056104f1366004612c42565b610f07565b34801561050257600080fd5b50610305610511366004612cc5565b610f88565b34801561052257600080fd5b50610305610531366004612d31565b61110a565b34801561054257600080fd5b50610318610551366004612b32565b61114d565b34801561056257600080fd5b506103056111d3565b34801561057757600080fd5b506103056111e5565b34801561058c57600080fd5b506000546001600160a01b03166102cd565b3480156105aa57600080fd5b506103056105b9366004612a97565b61122c565b6103056105cc366004612b32565b611239565b3480156105dd57600080fd5b506102a0611350565b3480156105f257600080fd5b50610318600e5481565b34801561060857600080fd5b50610305610617366004612c42565b61135f565b34801561062857600080fd5b50610305610637366004612d89565b61136a565b34801561064857600080fd5b50610305610657366004612a97565b61139c565b34801561066857600080fd5b5061067c610677366004612a97565b611540565b604080519315158452602084019290925290820152606001610282565b3480156106a557600080fd5b506102a06106b4366004612a97565b61158c565b3480156106c557600080fd5b506102a06115f3565b3480156106da57600080fd5b506102766106e9366004612e65565b6001600160a01b03918216600090815260076020908152604080832093909416825291909152205460ff1690565b34801561072357600080fd5b50610305610732366004612e98565b611613565b34801561074357600080fd5b50610305610752366004612b32565b611811565b34801561076357600080fd5b50610305610772366004612e98565b61188a565b34801561078357600080fd5b50610305610792366004612b32565b611a89565b3480156107a357600080fd5b506103056107b2366004612b32565b611ab3565b60006001600160e01b0319821663780e9d6360e01b14806107dc57506107dc82611bdb565b92915050565b6060600280546107f190612ebd565b80601f016020809104026020016040519081016040528092919081815260200182805461081d90612ebd565b801561086a5780601f1061083f5761010080835404028352916020019161086a565b820191906000526020600020905b81548152906001019060200180831161084d57829003601f168201915b5050505050905090565b600061087f82611c2b565b506000908152600660205260409020546001600160a01b031690565b60006108a682610ea7565b9050806001600160a01b0316836001600160a01b0316036109185760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610934575061093481336106e9565b6109a65760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c0000606482015260840161090f565b6109b08383611c8a565b505050565b6109bf3382611cf8565b6109db5760405162461bcd60e51b815260040161090f90612ef7565b6109b0838383611d77565b60006109f18361114d565b8210610a535760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b606482015260840161090f565b506001600160a01b03919091166000908152600860209081526040808320938352929052205490565b6000546001600160a01b0316331480610a9f5750600d546001600160a01b031633145b610abb5760405162461bcd60e51b815260040161090f90612f45565b610ac3611f1e565b565b6109b08383836040518060200160405280600081525061136a565b6000546001600160a01b0316331480610b035750600d546001600160a01b031633145b610b1f5760405162461bcd60e51b815260040161090f90612f45565b601080546001600160a01b0319166001600160a01b0392909216919091179055565b6000610b4c600a5490565b8210610baf5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b606482015260840161090f565b600a8281548110610bc257610bc2612f74565b90600052602060002001549050919050565b6000546001600160a01b0316331480610bf75750600d546001600160a01b031633145b610c135760405162461bcd60e51b815260040161090f90612f45565b600f6109b0828483612fd0565b610c28611f73565b601a805460ff1916911515919091179055565b6000818152601360205260408120546060915b81811015610cdb576000610c64826127106130a6565b610c6e90866130bd565b604080518082018252600083815260146020908152838220546001600160a01b03168352848252601581529290205491810191909152855191925090859084908110610cbc57610cbc612f74565b6020026020010181905250508080610cd3906130d0565b915050610c4e565b5050919050565b610cea611f73565b6001600160a01b038116610d325760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015260640161090f565b600c80546001600160a01b0319166001600160a01b0392909216919091179055565b600260015403610da65760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161090f565b6002600155600c546001600160a01b0316331480610dce57506000546001600160a01b031633145b610e085760405162461bcd60e51b815260206004820152600b60248201526a139bdd08185b1b1bddd95960aa1b604482015260640161090f565b600c5460405147916000916001600160a01b039091169083908381818185875af1925050503d8060008114610e59576040519150601f19603f3d011682016040523d82523d6000602084013e610e5e565b606091505b5050905080610e9f5760405162461bcd60e51b815260206004820152600d60248201526c1514905394d1915497d1905253609a1b604482015260640161090f565b505060018055565b6000818152600460205260408120546001600160a01b0316806107dc5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640161090f565b6000546001600160a01b0316331480610f2a5750600d546001600160a01b031633145b610f465760405162461bcd60e51b815260040161090f90612f45565b8015610f6a57506001600160a01b0316600090815260166020526040902060019055565b6001600160a01b0382166000908152601660205260408120555b5050565b610f90611f73565b828114610ff25760405162461bcd60e51b815260206004820152602a60248201527f4b443a2061646472657373657320646f6573206e6f74206d6174636820616d6f6044820152690eadce840d8cadccee8d60b31b606482015260840161090f565b60005b838110156111035760005b83838381811061101257611012612f74565b905060200201358110156110fa5760128054600101905561105b86868481811061103e5761103e612f74565b90506020020160208101906110539190612b32565b601254611fcd565b6011546001600160a01b03168063937f260888888681811061107f5761107f612f74565b90506020020160208101906110949190612b32565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401600060405180830381600087803b1580156110d557600080fd5b505af11580156110e9573d6000803e3d6000fd5b505060019093019250611000915050565b50600101610ff5565b5050505050565b8060005b818110156111475761113784848381811061112b5761112b612f74565b90506020020135611fe7565b611140816130d0565b905061110e565b50505050565b60006001600160a01b0382166111b75760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b606482015260840161090f565b506001600160a01b031660009081526005602052604090205490565b6111db611f73565b610ac360006120c3565b6000546001600160a01b03163314806112085750600d546001600160a01b031633145b6112245760405162461bcd60e51b815260040161090f90612f45565b610ac3612113565b611234611f73565b600e55565b6010546001600160a01b031633146112845760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b604482015260640161090f565b34600e5411156112cd5760405162461bcd60e51b815260206004820152601460248201527309688744092dce6eaccccd2c6d2cadce840cae8d60631b604482015260640161090f565b60115460405163126fe4c160e31b81526001600160a01b03838116600483015290911690819063937f260890602401600060405180830381600087803b15801561131657600080fd5b505af115801561132a573d6000803e3d6000fd5b50506012805492509050600061133f836130d0565b9190505550610f8482601254611fcd565b6060600380546107f190612ebd565b610f84338383612156565b6113743383611cf8565b6113905760405162461bcd60e51b815260040161090f90612ef7565b61114784848484612224565b336113a682610ea7565b6001600160a01b0316146113cc5760405162461bcd60e51b815260040161090f906130e9565b611900811161140d5760405162461bcd60e51b815260206004820152600d60248201526c105b1c9958591e481c995cd95d609a1b604482015260640161090f565b600081815260136020526040812054905b81811015611517576000611434826127106130a6565b61143e90856130bd565b600081815260146020908152604080832054601590925291829020549151637804160760e11b8152336004820152602481018390529293506001600160a01b0316918290819063f0082c0e906044016020604051808303816000875af11580156114ac573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114d09190613118565b5050506000918252506013602090815260408083208390556014825280832080546001600160a01b031916905560159091528120558061150f816130d0565b91505061141e565b5061152182612257565b610f8433611531836127106130a6565b61153b90856130bd565b611fcd565b60008181526017602052604081205481908190801561156a576001935061156781426130bd565b92505b6000858152601860205260409020546115839084613135565b93959294505050565b606061159782611c2b565b60006115a16122fe565b905060008151116115c157604051806020016040528060008152506115ec565b806115cb8461230d565b6040516020016115dc929190613148565b6040516020818303038152906040525b9392505050565b606060405180606001604052806024815260200161327860249139905090565b601a5460ff61010090910416151560011461167c5760405162461bcd60e51b815260206004820152602360248201527f456e68616e63656d656e742073657373696f6e20686173206e6f7420737461726044820152621d195960ea1b606482015260840161090f565b3361168684610ea7565b6001600160a01b0316146116ac5760405162461bcd60e51b815260040161090f906130e9565b6001600160a01b0382166000908152601660205260409020546001146117145760405162461bcd60e51b815260206004820152601760248201527f4e6f7420612076616c696420456e68616e63656d656e74000000000000000000604482015260640161090f565b600061172261271085613135565b905061172d84612257565b6117373382611fcd565b600084815260136020526040902054611751906001613135565b6000828152601360209081526040808320939093558682528282208290558382526014815282822080546001600160a01b0319166001600160a01b038816908117909155601590915290829020849055905163034fd95160e51b8152336004820152602481018490528491906369fb2a20906044016020604051808303816000875af11580156117e5573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118099190613118565b505050505050565b611819611f73565b6001600160a01b03811661187e5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161090f565b611887816120c3565b50565b3361189484610ea7565b6001600160a01b0316146118ba5760405162461bcd60e51b815260040161090f906130e9565b611900831161190b5760405162461bcd60e51b815260206004820152601860248201527f4e6f20656e68616e63656d656e7420746f2072656d6f76650000000000000000604482015260640161090f565b600083815260136020526040812054905b81811015611103576000611932826127106130a6565b61193c90876130bd565b6000818152601460209081526040808320546015909252909120549192506001600160a01b03908116919087168214801561197657508581145b15611a7357604051637804160760e11b81523360048201526024810187905287906001600160a01b0382169063f0082c0e906044016020604051808303816000875af11580156119ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119ee9190613118565b506000898152601460209081526040808320805488855282852080546001600160a01b039092166001600160a01b03199283161790558d8552601580855283862080548b8852858820558f875260138652938620869055825490911690915590915255611a5a89612257565b611a6a3361153b6127108c6130bd565b50505050611103565b5050508080611a81906130d0565b91505061191c565b611a91611f73565b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b0316331480611ad65750600d546001600160a01b031633145b611af25760405162461bcd60e51b815260040161090f90612f45565b601180546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03163b151590565b6001600160a01b038316611b7e57611b7981600a80546000838152600b60205260408120829055600182018355919091527fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a80155565b611ba1565b816001600160a01b0316836001600160a01b031614611ba157611ba1838261240e565b6001600160a01b038216611bb8576109b0816124ab565b826001600160a01b0316826001600160a01b0316146109b0576109b0828261255a565b60006001600160e01b031982166380ac58cd60e01b1480611c0c57506001600160e01b03198216635b5e139f60e01b145b806107dc57506301ffc9a760e01b6001600160e01b03198316146107dc565b6000818152600460205260409020546001600160a01b03166118875760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b604482015260640161090f565b600081815260066020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611cbf82610ea7565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600080611d0483610ea7565b9050806001600160a01b0316846001600160a01b03161480611d4b57506001600160a01b0380821660009081526007602090815260408083209388168352929052205460ff165b80611d6f5750836001600160a01b0316611d6484610874565b6001600160a01b0316145b949350505050565b826001600160a01b0316611d8a82610ea7565b6001600160a01b031614611dee5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b606482015260840161090f565b6001600160a01b038216611e505760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161090f565b611e5b83838361259e565b611e66600082611c8a565b6001600160a01b0383166000908152600560205260408120805460019290611e8f9084906130bd565b90915550506001600160a01b0382166000908152600560205260408120805460019290611ebd908490613135565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611f266126e2565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000546001600160a01b03163314610ac35760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161090f565b610f84828260405180602001604052806000815250612732565b6000546001600160a01b031633148061200a5750600d546001600160a01b031633145b6120265760405162461bcd60e51b815260040161090f90612f45565b6000818152601760205260408120549081900361209457601a5460ff166120805760405162461bcd60e51b815260206004820152600e60248201526d14dd185ada5b99c810db1bdcd95960921b604482015260640161090f565b506000908152601760205260409020429055565b600091825260186020908152604080842080544294850301905560178252808420849055601990915290912055565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b61211b612765565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611f563390565b816001600160a01b0316836001600160a01b0316036121b75760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c657200000000000000604482015260640161090f565b6001600160a01b03838116600081815260076020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b61222f848484611d77565b61223b848484846127b2565b6111475760405162461bcd60e51b815260040161090f90613177565b600061226282610ea7565b90506122708160008461259e565b61227b600083611c8a565b6001600160a01b03811660009081526005602052604081208054600192906122a49084906130bd565b909155505060008281526004602052604080822080546001600160a01b0319169055518391906001600160a01b038416907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908390a45050565b6060600f80546107f190612ebd565b6060816000036123345750506040805180820190915260018152600360fc1b602082015290565b8160005b811561235e5780612348816130d0565b91506123579050600a836131df565b9150612338565b60008167ffffffffffffffff81111561237957612379612d73565b6040519080825280601f01601f1916602001820160405280156123a3576020820181803683370190505b5090505b8415611d6f576123b86001836130bd565b91506123c5600a866131f3565b6123d0906030613135565b60f81b8183815181106123e5576123e5612f74565b60200101906001600160f81b031916908160001a905350612407600a866131df565b94506123a7565b6000600161241b8461114d565b61242591906130bd565b600083815260096020526040902054909150808214612478576001600160a01b03841660009081526008602090815260408083208584528252808320548484528184208190558352600990915290208190555b5060009182526009602090815260408084208490556001600160a01b039094168352600881528383209183525290812055565b600a546000906124bd906001906130bd565b6000838152600b6020526040812054600a80549394509092849081106124e5576124e5612f74565b9060005260206000200154905080600a838154811061250657612506612f74565b6000918252602080832090910192909255828152600b9091526040808220849055858252812055600a80548061253e5761253e613207565b6001900381819060005260206000200160009055905550505050565b60006125658361114d565b6001600160a01b039093166000908152600860209081526040808320868452825280832085905593825260099052919091209190915550565b600054600160a01b900460ff16156125ed5760405162461bcd60e51b815260206004820152601260248201527110dbdb9d1c9858dd081a5cc81c185d5cd95960721b604482015260640161090f565b600081815260176020526040902054156126395760405162461bcd60e51b815260206004820152600d60248201526c111c8c5d995c881cdd185ad959609a1b604482015260640161090f565b6000818152601960205260409020546107089061265690426130bd565b116126d75760405162461bcd60e51b8152602060048201526044602482018190527f447231766572206a75737420756e7374616b65642c20796f75206e6565642074908201527f6f207761697420736f6d652074696d65206265666f7265207472616e7366657260648201526372696e6760e01b608482015260a40161090f565b6109b0838383611b23565b600054600160a01b900460ff16610ac35760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161090f565b61273c83836128b3565b61274960008484846127b2565b6109b05760405162461bcd60e51b815260040161090f90613177565b600054600160a01b900460ff1615610ac35760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161090f565b60006001600160a01b0384163b156128a857604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906127f690339089908890889060040161321d565b6020604051808303816000875af1925050508015612831575060408051601f3d908101601f1916820190925261282e9181019061325a565b60015b61288e573d80801561285f576040519150601f19603f3d011682016040523d82523d6000602084013e612864565b606091505b5080516000036128865760405162461bcd60e51b815260040161090f90613177565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611d6f565b506001949350505050565b6001600160a01b0382166129095760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161090f565b6000818152600460205260409020546001600160a01b03161561296e5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161090f565b61297a6000838361259e565b6001600160a01b03821660009081526005602052604081208054600192906129a3908490613135565b909155505060008181526004602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160e01b03198116811461188757600080fd5b600060208284031215612a2957600080fd5b81356115ec81612a01565b60005b83811015612a4f578181015183820152602001612a37565b50506000910152565b60008151808452612a70816020860160208601612a34565b601f01601f19169290920160200192915050565b6020815260006115ec6020830184612a58565b600060208284031215612aa957600080fd5b5035919050565b80356001600160a01b0381168114612ac757600080fd5b919050565b60008060408385031215612adf57600080fd5b612ae883612ab0565b946020939093013593505050565b600080600060608486031215612b0b57600080fd5b612b1484612ab0565b9250612b2260208501612ab0565b9150604084013590509250925092565b600060208284031215612b4457600080fd5b6115ec82612ab0565b60008060208385031215612b6057600080fd5b823567ffffffffffffffff80821115612b7857600080fd5b818501915085601f830112612b8c57600080fd5b813581811115612b9b57600080fd5b866020828501011115612bad57600080fd5b60209290920196919550909350505050565b801515811461188757600080fd5b600060208284031215612bdf57600080fd5b81356115ec81612bbf565b602080825282518282018190526000919060409081850190868401855b82811015612c3557815180516001600160a01b03168552860151868501529284019290850190600101612c07565b5091979650505050505050565b60008060408385031215612c5557600080fd5b612c5e83612ab0565b91506020830135612c6e81612bbf565b809150509250929050565b60008083601f840112612c8b57600080fd5b50813567ffffffffffffffff811115612ca357600080fd5b6020830191508360208260051b8501011115612cbe57600080fd5b9250929050565b60008060008060408587031215612cdb57600080fd5b843567ffffffffffffffff80821115612cf357600080fd5b612cff88838901612c79565b90965094506020870135915080821115612d1857600080fd5b50612d2587828801612c79565b95989497509550505050565b60008060208385031215612d4457600080fd5b823567ffffffffffffffff811115612d5b57600080fd5b612d6785828601612c79565b90969095509350505050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215612d9f57600080fd5b612da885612ab0565b9350612db660208601612ab0565b925060408501359150606085013567ffffffffffffffff80821115612dda57600080fd5b818701915087601f830112612dee57600080fd5b813581811115612e0057612e00612d73565b604051601f8201601f19908116603f01168101908382118183101715612e2857612e28612d73565b816040528281528a6020848701011115612e4157600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b60008060408385031215612e7857600080fd5b612e8183612ab0565b9150612e8f60208401612ab0565b90509250929050565b600080600060608486031215612ead57600080fd5b83359250612b2260208501612ab0565b600181811c90821680612ed157607f821691505b602082108103612ef157634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b602080825260159082015274139bdd081bdddb995c881bdc88185c1c1c9bdd9959605a1b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b601f8211156109b057600081815260208120601f850160051c81016020861015612fb15750805b601f850160051c820191505b8181101561180957828155600101612fbd565b67ffffffffffffffff831115612fe857612fe8612d73565b612ffc83612ff68354612ebd565b83612f8a565b6000601f84116001811461303057600085156130185750838201355b600019600387901b1c1916600186901b178355611103565b600083815260209020601f19861690835b828110156130615786850135825560209485019460019092019101613041565b508682101561307e5760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b600052601160045260246000fd5b80820281158282048414176107dc576107dc613090565b818103818111156107dc576107dc613090565b6000600182016130e2576130e2613090565b5060010190565b6020808252601590820152742237b2b9b713ba1037bbb7103a3432903a37b5b2b760591b604082015260600190565b60006020828403121561312a57600080fd5b81516115ec81612bbf565b808201808211156107dc576107dc613090565b6000835161315a818460208801612a34565b83519083019061316e818360208801612a34565b01949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b6000826131ee576131ee6131c9565b500490565b600082613202576132026131c9565b500690565b634e487b7160e01b600052603160045260246000fd5b6001600160a01b038581168252841660208201526040810183905260806060820181905260009061325090830184612a58565b9695505050505050565b60006020828403121561326c57600080fd5b81516115ec81612a0156fe68747470733a2f2f6472317665722e63756c7431766174652e636f6d2f6f70656e736561a2646970667358221220e00480d83fea3fed9c18e70fb6c4c12f93f8a038599d79cf8e153a85514bbeb364736f6c63430008110033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.