Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 754 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Set Approval For... | 20252659 | 188 days ago | IN | 0 ETH | 0.00004812 | ||||
Set Approval For... | 19788997 | 253 days ago | IN | 0 ETH | 0.00012188 | ||||
Withdraw | 18955506 | 370 days ago | IN | 0 ETH | 0.0010929 | ||||
Set Approval For... | 18896144 | 378 days ago | IN | 0 ETH | 0.00032156 | ||||
Set Approval For... | 17706548 | 545 days ago | IN | 0 ETH | 0.00087105 | ||||
Set Approval For... | 17359809 | 593 days ago | IN | 0 ETH | 0.00165689 | ||||
Set Approval For... | 17359809 | 593 days ago | IN | 0 ETH | 0.00165904 | ||||
Set Approval For... | 17359808 | 593 days ago | IN | 0 ETH | 0.00171286 | ||||
Set Approval For... | 17344099 | 596 days ago | IN | 0 ETH | 0.001617 | ||||
Set Approval For... | 17306111 | 601 days ago | IN | 0 ETH | 0.00126866 | ||||
Set Approval For... | 17298152 | 602 days ago | IN | 0 ETH | 0.00139198 | ||||
Set Approval For... | 17264820 | 607 days ago | IN | 0 ETH | 0.00087593 | ||||
Set Approval For... | 17264812 | 607 days ago | IN | 0 ETH | 0.00100415 | ||||
Set Approval For... | 17264809 | 607 days ago | IN | 0 ETH | 0.0009312 | ||||
Set Approval For... | 17171499 | 620 days ago | IN | 0 ETH | 0.0026854 | ||||
Set Approval For... | 17116768 | 628 days ago | IN | 0 ETH | 0.00195595 | ||||
Set Approval For... | 17010614 | 643 days ago | IN | 0 ETH | 0.00102995 | ||||
Set Approval For... | 17008809 | 643 days ago | IN | 0 ETH | 0.0009177 | ||||
Set Approval For... | 16810329 | 671 days ago | IN | 0 ETH | 0.00085349 | ||||
Set Approval For... | 16639777 | 695 days ago | IN | 0 ETH | 0.00157115 | ||||
Set Approval For... | 16639764 | 695 days ago | IN | 0 ETH | 0.00162726 | ||||
Set Approval For... | 16616279 | 698 days ago | IN | 0 ETH | 0.00037057 | ||||
Set Approval For... | 16611044 | 699 days ago | IN | 0 ETH | 0.00066945 | ||||
Set Approval For... | 16488194 | 716 days ago | IN | 0 ETH | 0.00079704 | ||||
Set Approval For... | 16476757 | 718 days ago | IN | 0 ETH | 0.00072155 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
18955506 | 370 days ago | 0.4 ETH |
Loading...
Loading
Contract Name:
GroupNFT
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.0; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.sol"; import "@openzeppelin/contracts/token/ERC20/presets/ERC20PresetMinterPauser.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract GroupNFT is ERC721Enumerable, Ownable, ReentrancyGuard, Pausable { uint8 public constant TEAM_COUNT = 32; uint8 public _phase; uint256 public _saleStartTime = 253400630399; uint256 public _startTime = 253400630399; uint256 public constant WHITELIST_MINT_DURATION = 3600; uint256 public _price = 50000000000000000; uint256 public _saleSupplyPerTeam = 30; uint256 public _freeSupply; uint256 public _freeTotalSupplyPerTeam; uint256 public _freeTokenId = 960; // team => count mapping(uint8 => uint256) public _saleCount; bytes32 public _whitelistMerkleRoot; uint256 public constant MAX_PUBLIC_MINT = 10; uint256 public constant MAX_WHITELIST_MINT = 3; mapping(uint8 => mapping(address => uint256)) public _freeCountPerPhase; mapping(uint8 => mapping(address => uint256)) public _wlCountPerPhase; // false: normal; true: in prediction mapping(uint256 => bool) private _tokenStatus; // Group predict contract address address public GROUP_PREDICT_ADDRESS; string private _metadataURI; event Buy(address indexed _sender, uint256 indexed _tokenId, uint256 indexed _team); event Mint(address indexed _sender, uint256 indexed _tokenId, uint256 indexed _team); event MintByWhiteList(address indexed _sender, uint256 indexed _tokenId, uint256 indexed _team); modifier isNotContract() { require(msg.sender == tx.origin, "Sender is not EOA"); _; } modifier onlyPredictOrOwner { require( msg.sender == owner() || msg.sender == GROUP_PREDICT_ADDRESS, "caller is not owner or predict contract" ); _; } constructor( string memory name, string memory symbol ) ERC721(name, symbol) { } /** **************************************** NFT mint functions **************************************** */ function buy(uint8 team) external payable nonReentrant whenNotPaused isNotContract { require(block.timestamp >= _saleStartTime, "not start"); require(team < TEAM_COUNT, "invalid parameter"); require(_saleCount[team] <= _saleSupplyPerTeam, "sold out"); require(msg.value == _price, "invalid ETH balance"); uint256 tokenId = team + _saleCount[team] * TEAM_COUNT; _saleCount[team]++; _safeMint(msg.sender, tokenId); emit Buy(msg.sender, tokenId, team); } function mint() external nonReentrant whenNotPaused isNotContract { require(block.timestamp >= _startTime + WHITELIST_MINT_DURATION, "not start"); require(_freeSupply <= _freeTotalSupplyPerTeam * TEAM_COUNT, "sold out"); require(_freeCountPerPhase[_phase][msg.sender] < MAX_PUBLIC_MINT, "mint limit for free"); _freeSupply++; _freeCountPerPhase[_phase][msg.sender]++; _safeMint(msg.sender, _freeTokenId); emit Mint(msg.sender, _freeTokenId, uint8(_freeTokenId % TEAM_COUNT)); _freeTokenId++; } function mintByWhiteList(bytes32[] calldata proof) external nonReentrant whenNotPaused isNotContract { require(block.timestamp >= _startTime, "not start"); require(_freeSupply <= _freeTotalSupplyPerTeam * TEAM_COUNT, "sold out"); require(_wlCountPerPhase[_phase][msg.sender] < MAX_WHITELIST_MINT, "mint limit for whitelist"); bytes32 leaf = _leaf(msg.sender); require( _verify(_whitelistMerkleRoot, leaf, proof), "bad whitelist merkle proof" ); _freeSupply++; _wlCountPerPhase[_phase][msg.sender]++; _safeMint(msg.sender, _freeTokenId); emit MintByWhiteList(msg.sender, _freeTokenId, uint8(_freeTokenId % TEAM_COUNT)); _freeTokenId++; } /** **************************************** Query functions **************************************** */ function getTeam(uint256 tokenId) external view returns (uint256) { _requireMinted(tokenId); return tokenId % TEAM_COUNT; } function getSaleInfo() external view returns (uint256[32] memory list) { for (uint8 i = 0; i < TEAM_COUNT; i++) { list[i] = _saleSupplyPerTeam - _saleCount[i]; } } function getFreeLeft() external view returns (uint256) { return _freeTotalSupplyPerTeam * TEAM_COUNT - _freeSupply; } function tokenURI(uint256 tokenId) public view override returns (string memory) { _requireMinted(tokenId); return string(abi.encodePacked(_metadataURI, Strings.toString(tokenId))); } function getUserFreeLimit(address userAddr) external view returns (uint256) { return MAX_PUBLIC_MINT - _freeCountPerPhase[_phase][userAddr]; } function getUserWLLimit(address userAddr) external view returns (uint256) { return MAX_WHITELIST_MINT - _wlCountPerPhase[_phase][userAddr]; } function getTokenIds( address userAddr, uint256 pageNum, uint256 pageSize ) public view returns (uint256, uint256[] memory) { uint256 balance = balanceOf(userAddr); uint256 start = (pageNum - 1) * pageSize; uint256 end = pageNum * pageSize; if (start > balance) { return (balance, new uint256[](0)); } if (end > balance) { end = balance; } uint256[] memory tokenIds = new uint256[](end - start); uint256 index = start; for (uint256 i = 0; i < end - start; i++) { uint256 tokenId = tokenOfOwnerByIndex(userAddr, index); tokenIds[i] = tokenId; index++; } return (balance, tokenIds); } /** **************************************** Predict contract functions **************************************** */ function lock(uint256 tokenId) external onlyPredictOrOwner { require(!_tokenStatus[tokenId], "token already locked"); _tokenStatus[tokenId] = true; } function unlock(uint256 tokenId) external onlyPredictOrOwner { require(_tokenStatus[tokenId], "token is not locked"); _tokenStatus[tokenId] = false; } /** **************************************** Admin setting functions **************************************** */ function devMint() external onlyOwner { require(_freeSupply <= _freeTotalSupplyPerTeam * TEAM_COUNT, "sold out"); require(_freeCountPerPhase[_phase][msg.sender] < MAX_PUBLIC_MINT, "mint limit for free"); _freeSupply++; _freeCountPerPhase[_phase][msg.sender]++; _safeMint(msg.sender, _freeTokenId); emit Mint(msg.sender, _freeTokenId, uint8(_freeTokenId % TEAM_COUNT)); _freeTokenId++; } function setSaleSupplyPerTeam(uint256 supply) external onlyOwner { _saleSupplyPerTeam = supply; } function nextPhase( uint256 startTime, uint256 supplyPerTeam, bytes32 whitelistMerkleRoot ) external onlyOwner { _phase++; _startTime = startTime; _freeTotalSupplyPerTeam = _freeTotalSupplyPerTeam + supplyPerTeam; _whitelistMerkleRoot = whitelistMerkleRoot; } function setPhase(uint8 phase) external onlyOwner { _phase = phase; } function setStartTime(uint256 startTime) external onlyOwner { _startTime = startTime; } function setSupplyPerTeam(uint256 freeTotalSupplyPerTeam) external onlyOwner { _freeTotalSupplyPerTeam = freeTotalSupplyPerTeam; } function setWhitelistMerkleRoot(bytes32 whitelistMerkleRoot) external onlyOwner { _whitelistMerkleRoot = whitelistMerkleRoot; } function setSaleStartTime(uint256 startTime) external onlyOwner { _saleStartTime = startTime; } function setMetadataURI(string memory metadataURI) external onlyOwner { _metadataURI = metadataURI; } function setPredictContractAddress(address addr) external onlyOwner { GROUP_PREDICT_ADDRESS = addr; } function withdraw() external onlyOwner { (bool success, ) = msg.sender.call{value: address(this).balance}(""); if (!success) { revert("Ether transfer failed"); } } function pause() external onlyOwner { _pause(); } function unpause() external onlyOwner { _unpause(); } /** **************************************** Private functions **************************************** */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual override { super._beforeTokenTransfer(from, to, tokenId); // Skip check on minting to reduce gas cost if (from == address(0)) { return; } require(!_tokenStatus[tokenId], "token locked in prediction"); } function _leaf(address account) internal pure returns (bytes32){ return keccak256(abi.encodePacked(account)); } function _verify( bytes32 root, bytes32 leaf, bytes32[] memory proof ) internal pure returns (bool) { return MerkleProof.verify(proof, root, leaf); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view virtual { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view virtual override returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleGranted} event. */ function grantRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. * * May emit a {RoleRevoked} event. */ function revokeRole(bytes32 role, address account) public virtual override onlyRole(getRoleAdmin(role)) { _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. * * May emit a {RoleRevoked} event. */ function renounceRole(bytes32 role, address account) public virtual override { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * May emit a {RoleGranted} event. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. * * May emit a {RoleGranted} event. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. * * May emit a {RoleRevoked} event. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (access/AccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControlEnumerable.sol"; import "./AccessControl.sol"; import "../utils/structs/EnumerableSet.sol"; /** * @dev Extension of {AccessControl} that allows enumerating the members of each role. */ abstract contract AccessControlEnumerable is IAccessControlEnumerable, AccessControl { using EnumerableSet for EnumerableSet.AddressSet; mapping(bytes32 => EnumerableSet.AddressSet) private _roleMembers; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControlEnumerable).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view virtual override returns (address) { return _roleMembers[role].at(index); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view virtual override returns (uint256) { return _roleMembers[role].length(); } /** * @dev Overload {_grantRole} to track enumerable memberships */ function _grantRole(bytes32 role, address account) internal virtual override { super._grantRole(role, account); _roleMembers[role].add(account); } /** * @dev Overload {_revokeRole} to track enumerable memberships */ function _revokeRole(bytes32 role, address account) internal virtual override { super._revokeRole(role, account); _roleMembers[role].remove(account); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {AccessControl-_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) external; /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) external; /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControlEnumerable.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; /** * @dev External interface of AccessControlEnumerable declared to support ERC165 detection. */ interface IAccessControlEnumerable is IAccessControl { /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) external view returns (address); /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) external view returns (uint256); }
// 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 (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 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 (last updated v4.7.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens 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 amount ) 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, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol) pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../utils/Context.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { _spendAllowance(account, _msgSender(), amount); _burn(account, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/ERC20Pausable.sol) pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../security/Pausable.sol"; /** * @dev ERC20 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the * event of a large bug. */ abstract contract ERC20Pausable is ERC20, Pausable { /** * @dev See {ERC20-_beforeTokenTransfer}. * * Requirements: * * - the contract must not be paused. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual override { super._beforeTokenTransfer(from, to, amount); require(!paused(), "ERC20Pausable: token transfer while paused"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/presets/ERC20PresetMinterPauser.sol) pragma solidity ^0.8.0; import "../ERC20.sol"; import "../extensions/ERC20Burnable.sol"; import "../extensions/ERC20Pausable.sol"; import "../../../access/AccessControlEnumerable.sol"; import "../../../utils/Context.sol"; /** * @dev {ERC20} token, including: * * - ability for holders to burn (destroy) their tokens * - a minter role that allows for token minting (creation) * - a pauser role that allows to stop all token transfers * * This contract uses {AccessControl} to lock permissioned functions using the * different roles - head to its documentation for details. * * The account that deploys the contract will be granted the minter and pauser * roles, as well as the default admin role, which will let it grant both minter * and pauser roles to other accounts. * * _Deprecated in favor of https://wizard.openzeppelin.com/[Contracts Wizard]._ */ contract ERC20PresetMinterPauser is Context, AccessControlEnumerable, ERC20Burnable, ERC20Pausable { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); /** * @dev Grants `DEFAULT_ADMIN_ROLE`, `MINTER_ROLE` and `PAUSER_ROLE` to the * account that deploys the contract. * * See {ERC20-constructor}. */ constructor(string memory name, string memory symbol) ERC20(name, symbol) { _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); _setupRole(MINTER_ROLE, _msgSender()); _setupRole(PAUSER_ROLE, _msgSender()); } /** * @dev Creates `amount` new tokens for `to`. * * See {ERC20-_mint}. * * Requirements: * * - the caller must have the `MINTER_ROLE`. */ function mint(address to, uint256 amount) public virtual { require(hasRole(MINTER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have minter role to mint"); _mint(to, amount); } /** * @dev Pauses all token transfers. * * See {ERC20Pausable} and {Pausable-_pause}. * * Requirements: * * - the caller must have the `PAUSER_ROLE`. */ function pause() public virtual { require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to pause"); _pause(); } /** * @dev Unpauses all token transfers. * * See {ERC20Pausable} and {Pausable-_unpause}. * * Requirements: * * - the caller must have the `PAUSER_ROLE`. */ function unpause() public virtual { require(hasRole(PAUSER_ROLE, _msgSender()), "ERC20PresetMinterPauser: must have pauser role to unpause"); _unpause(); } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual override(ERC20, ERC20Pausable) { super._beforeTokenTransfer(from, to, amount); } }
// 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 (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 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.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 (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 (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 (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) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// 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 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); }
// 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/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"}],"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":"_sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_team","type":"uint256"}],"name":"Buy","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_team","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_sender","type":"address"},{"indexed":true,"internalType":"uint256","name":"_tokenId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"_team","type":"uint256"}],"name":"MintByWhiteList","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"GROUP_PREDICT_ADDRESS","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PUBLIC_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_WHITELIST_MINT","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TEAM_COUNT","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"WHITELIST_MINT_DURATION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"address","name":"","type":"address"}],"name":"_freeCountPerPhase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_freeSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_freeTokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_freeTotalSupplyPerTeam","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_phase","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_price","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"}],"name":"_saleCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_saleStartTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_saleSupplyPerTeam","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_whitelistMerkleRoot","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"address","name":"","type":"address"}],"name":"_wlCountPerPhase","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint8","name":"team","type":"uint8"}],"name":"buy","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"devMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFreeLeft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSaleInfo","outputs":[{"internalType":"uint256[32]","name":"list","type":"uint256[32]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTeam","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddr","type":"address"},{"internalType":"uint256","name":"pageNum","type":"uint256"},{"internalType":"uint256","name":"pageSize","type":"uint256"}],"name":"getTokenIds","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddr","type":"address"}],"name":"getUserFreeLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddr","type":"address"}],"name":"getUserWLLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"uint256","name":"tokenId","type":"uint256"}],"name":"lock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"mintByWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"supplyPerTeam","type":"uint256"},{"internalType":"bytes32","name":"whitelistMerkleRoot","type":"bytes32"}],"name":"nextPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"metadataURI","type":"string"}],"name":"setMetadataURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"phase","type":"uint8"}],"name":"setPhase","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"setPredictContractAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"startTime","type":"uint256"}],"name":"setSaleStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"supply","type":"uint256"}],"name":"setSaleSupplyPerTeam","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"startTime","type":"uint256"}],"name":"setStartTime","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"freeTotalSupplyPerTeam","type":"uint256"}],"name":"setSupplyPerTeam","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"whitelistMerkleRoot","type":"bytes32"}],"name":"setWhitelistMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"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":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"unlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052643affdac47f600d55643affdac47f600e5566b1a2bc2ec50000600f55601e6010556103c06013553480156200003957600080fd5b50604051620037ca380380620037ca8339810160408190526200005c91620001ca565b818160006200006c8382620002c3565b5060016200007b8282620002c3565b5050506200009862000092620000af60201b60201c565b620000b3565b50506001600b55600c805460ff191690556200038f565b3390565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b634e487b7160e01b600052604160045260246000fd5b600082601f8301126200012d57600080fd5b81516001600160401b03808211156200014a576200014a62000105565b604051601f8301601f19908116603f0116810190828211818310171562000175576200017562000105565b816040528381526020925086838588010111156200019257600080fd5b600091505b83821015620001b6578582018301518183018401529082019062000197565b600093810190920192909252949350505050565b60008060408385031215620001de57600080fd5b82516001600160401b0380821115620001f657600080fd5b62000204868387016200011b565b935060208501519150808211156200021b57600080fd5b506200022a858286016200011b565b9150509250929050565b600181811c908216806200024957607f821691505b6020821081036200026a57634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002be57600081815260208120601f850160051c81016020861015620002995750805b601f850160051c820191505b81811015620002ba57828155600101620002a5565b5050505b505050565b81516001600160401b03811115620002df57620002df62000105565b620002f781620002f0845462000234565b8462000270565b602080601f8311600181146200032f5760008415620003165750858301515b600019600386901b1c1916600185901b178555620002ba565b600085815260208120601f198616915b8281101562000360578886015182559484019460019091019084016200033f565b50858210156200037f5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b61342b806200039f6000396000f3fe6080604052600436106103a15760003560e01c806373519c68116101e7578063b88d4fde1161010d578063d0f359a1116100a0578063e40c5d971161006f578063e40c5d9714610a78578063e985e9c514610a98578063f2fde38b14610ae1578063fa1acb5c14610b0157600080fd5b8063d0f359a1146109f6578063d9662e3314610a16578063db83694c14610a36578063dd46706414610a5857600080fd5b8063c08dfd3c116100dc578063c08dfd3c14610995578063c0c0ea3b146109aa578063c87b56dd146109c0578063cfa08f7c146109e057600080fd5b8063b88d4fde14610915578063bd32fb6614610935578063bf422da514610955578063c03afb591461097557600080fd5b80637f8c353e1161018557806395d89b411161015457806395d89b41146108ab57806397301059146108c0578063a0b30390146108df578063a22cb465146108f557600080fd5b80637f8c353e146108205780638456cb59146108405780638c287475146108555780638da5cb5b1461088d57600080fd5b806377a605d9116101c157806377a605d9146107b357806379340a4e146107c95780637c69e207146107f65780637d52b3011461080b57600080fd5b806373519c681461075d578063750521f51461077d57806375a99b9f1461079d57600080fd5b80633a780938116102cc57806356fde6ae1161026a5780636352211e116102395780636352211e146106f357806365f130971461071357806370a0823114610728578063715018a61461074857600080fd5b806356fde6ae1461067b5780635b5c04201461069b5780635c975abb146106bb5780636198e339146106d357600080fd5b80633f4ba83a116102a65780633f4ba83a1461060657806342842e0e1461061b5780634f6ccce71461063b578063525f8a5c1461065b57600080fd5b80633a780938146105bb5780633ccfd60b146105d15780633e0a322d146105e657600080fd5b806314107f3c1161034457806323b872dd1161031357806323b872dd1461053e578063263df1d11461055e5780632f745c591461058557806332e32ae2146105a557600080fd5b806314107f3c146104c857806314eedf22146104db57806318160ddd14610513578063235b6ea11461052857600080fd5b806306fdde031161038057806306fdde0314610437578063081812fc14610459578063095ea7b3146104915780631249c58b146104b357600080fd5b80628e0f1b146103a657806301ffc9a7146103d9578063069e813d14610409575b600080fd5b3480156103b257600080fd5b506103c66103c1366004612a9d565b610b17565b6040519081526020015b60405180910390f35b3480156103e557600080fd5b506103f96103f4366004612acc565b610b33565b60405190151581526020016103d0565b34801561041557600080fd5b50610429610424366004612b05565b610b58565b6040516103d0929190612b38565b34801561044357600080fd5b5061044c610c83565b6040516103d09190612bd6565b34801561046557600080fd5b50610479610474366004612a9d565b610d15565b6040516001600160a01b0390911681526020016103d0565b34801561049d57600080fd5b506104b16104ac366004612be9565b610d3c565b005b3480156104bf57600080fd5b506104b1610e56565b6104b16104d6366004612c24565b61102a565b3480156104e757600080fd5b506103c66104f6366004612c3f565b601660209081526000928352604080842090915290825290205481565b34801561051f57600080fd5b506008546103c6565b34801561053457600080fd5b506103c6600f5481565b34801561054a57600080fd5b506104b1610559366004612c72565b6111f3565b34801561056a57600080fd5b50610573602081565b60405160ff90911681526020016103d0565b34801561059157600080fd5b506103c66105a0366004612be9565b611224565b3480156105b157600080fd5b506103c660125481565b3480156105c757600080fd5b506103c660115481565b3480156105dd57600080fd5b506104b16112ba565b3480156105f257600080fd5b506104b1610601366004612a9d565b611355565b34801561061257600080fd5b506104b1611362565b34801561062757600080fd5b506104b1610636366004612c72565b611374565b34801561064757600080fd5b506103c6610656366004612a9d565b61138f565b34801561066757600080fd5b506104b1610676366004612a9d565b611422565b34801561068757600080fd5b506104b1610696366004612cae565b61142f565b3480156106a757600080fd5b506104b16106b6366004612d23565b6116c6565b3480156106c757600080fd5b50600c5460ff166103f9565b3480156106df57600080fd5b506104b16106ee366004612a9d565b61171e565b3480156106ff57600080fd5b5061047961070e366004612a9d565b6117c9565b34801561071f57600080fd5b506103c6600a81565b34801561073457600080fd5b506103c6610743366004612d4f565b611829565b34801561075457600080fd5b506104b16118af565b34801561076957600080fd5b506104b1610778366004612a9d565b6118c1565b34801561078957600080fd5b506104b1610798366004612df6565b6118ce565b3480156107a957600080fd5b506103c6600d5481565b3480156107bf57600080fd5b506103c6610e1081565b3480156107d557600080fd5b506103c66107e4366004612c24565b60146020526000908152604090205481565b34801561080257600080fd5b506104b16118e6565b34801561081757600080fd5b506103c6611a40565b34801561082c57600080fd5b50601954610479906001600160a01b031681565b34801561084c57600080fd5b506104b1611a66565b34801561086157600080fd5b506103c6610870366004612c3f565b601760209081526000928352604080842090915290825290205481565b34801561089957600080fd5b50600a546001600160a01b0316610479565b3480156108b757600080fd5b5061044c611a76565b3480156108cc57600080fd5b50600c5461057390610100900460ff1681565b3480156108eb57600080fd5b506103c660155481565b34801561090157600080fd5b506104b1610910366004612e3f565b611a85565b34801561092157600080fd5b506104b1610930366004612e7b565b611a90565b34801561094157600080fd5b506104b1610950366004612a9d565b611ac8565b34801561096157600080fd5b506103c6610970366004612d4f565b611ad5565b34801561098157600080fd5b506104b1610990366004612c24565b611b0e565b3480156109a157600080fd5b506103c6600381565b3480156109b657600080fd5b506103c660135481565b3480156109cc57600080fd5b5061044c6109db366004612a9d565b611b32565b3480156109ec57600080fd5b506103c660105481565b348015610a0257600080fd5b506104b1610a11366004612d4f565b611b6f565b348015610a2257600080fd5b506103c6610a31366004612d4f565b611b99565b348015610a4257600080fd5b50610a4b611bd2565b6040516103d09190612ef7565b348015610a6457600080fd5b506104b1610a73366004612a9d565b611c39565b348015610a8457600080fd5b506104b1610a93366004612a9d565b611ce9565b348015610aa457600080fd5b506103f9610ab3366004612f2d565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610aed57600080fd5b506104b1610afc366004612d4f565b611cf6565b348015610b0d57600080fd5b506103c6600e5481565b6000610b2282611d6c565b610b2d602083612f5f565b92915050565b60006001600160e01b0319821663780e9d6360e01b1480610b2d5750610b2d82611dcb565b600060606000610b6786611829565b9050600084610b77600188612f89565b610b819190612f9c565b90506000610b8f8688612f9c565b905082821115610bb45750506040805160008152602081019091529092509050610c7b565b82811115610bbf5750815b6000610bcb8383612f89565b67ffffffffffffffff811115610be357610be3612d6a565b604051908082528060200260200182016040528015610c0c578160200160208202803683370190505b5090508260005b610c1d8585612f89565b811015610c71576000610c308c84611224565b905080848381518110610c4557610c45612fb3565b602090810291909101015282610c5a81612fc9565b935050508080610c6990612fc9565b915050610c13565b5093955093505050505b935093915050565b606060008054610c9290612fe2565b80601f0160208091040260200160405190810160405280929190818152602001828054610cbe90612fe2565b8015610d0b5780601f10610ce057610100808354040283529160200191610d0b565b820191906000526020600020905b815481529060010190602001808311610cee57829003601f168201915b5050505050905090565b6000610d2082611d6c565b506000908152600460205260409020546001600160a01b031690565b6000610d47826117c9565b9050806001600160a01b0316836001600160a01b031603610db95760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610dd55750610dd58133610ab3565b610e475760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610db0565b610e518383611e1b565b505050565b6002600b5403610e785760405162461bcd60e51b8152600401610db09061301c565b6002600b55610e85611e89565b333214610ea45760405162461bcd60e51b8152600401610db090613053565b610e10600e54610eb4919061307e565b421015610ed35760405162461bcd60e51b8152600401610db090613091565b601254610ee290602090612f9c565b6011541115610f035760405162461bcd60e51b8152600401610db0906130b4565b600c54610100900460ff166000908152601660209081526040808320338452909152902054600a11610f6d5760405162461bcd60e51b81526020600482015260136024820152726d696e74206c696d697420666f72206672656560681b6044820152606401610db0565b60118054906000610f7d83612fc9565b9091555050600c54610100900460ff1660009081526016602090815260408083203384529091528120805491610fb283612fc9565b9190505550610fc333601354611ecf565b601354610fd290602090612f5f565b60ff16601354336001600160a01b03167f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f60405160405180910390a46013805490600061101e83612fc9565b90915550506001600b55565b6002600b540361104c5760405162461bcd60e51b8152600401610db09061301c565b6002600b55611059611e89565b3332146110785760405162461bcd60e51b8152600401610db090613053565b600d5442101561109a5760405162461bcd60e51b8152600401610db090613091565b602060ff8216106110e15760405162461bcd60e51b815260206004820152601160248201527034b73b30b634b2103830b930b6b2ba32b960791b6044820152606401610db0565b60105460ff821660009081526014602052604090205411156111155760405162461bcd60e51b8152600401610db0906130b4565b600f54341461115c5760405162461bcd60e51b8152602060048201526013602482015272696e76616c6964204554482062616c616e636560681b6044820152606401610db0565b60ff8116600090815260146020908152604082205461117b9190612f9c565b6111889060ff841661307e565b60ff831660009081526014602052604081208054929350906111a983612fc9565b91905055506111b83382611ecf565b60405160ff831690829033907f1cbc5ab135991bd2b6a4b034a04aa2aa086dac1371cb9b16b8b5e2ed6b036bed90600090a450506001600b55565b6111fd3382611ee9565b6112195760405162461bcd60e51b8152600401610db0906130d6565b610e51838383611f68565b600061122f83611829565b82106112915760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610db0565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6112c261210f565b604051600090339047908381818185875af1925050503d8060008114611304576040519150601f19603f3d011682016040523d82523d6000602084013e611309565b606091505b50509050806113525760405162461bcd60e51b8152602060048201526015602482015274115d1a195c881d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610db0565b50565b61135d61210f565b600e55565b61136a61210f565b611372612169565b565b610e5183838360405180602001604052806000815250611a90565b600061139a60085490565b82106113fd5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610db0565b6008828154811061141057611410612fb3565b90600052602060002001549050919050565b61142a61210f565b600d55565b6002600b54036114515760405162461bcd60e51b8152600401610db09061301c565b6002600b5561145e611e89565b33321461147d5760405162461bcd60e51b8152600401610db090613053565b600e5442101561149f5760405162461bcd60e51b8152600401610db090613091565b6012546114ae90602090612f9c565b60115411156114cf5760405162461bcd60e51b8152600401610db0906130b4565b600c54610100900460ff1660009081526017602090815260408083203384529091529020546003116115435760405162461bcd60e51b815260206004820152601860248201527f6d696e74206c696d697420666f722077686974656c69737400000000000000006044820152606401610db0565b604080513360601b6bffffffffffffffffffffffff191660208083019190915282516014818403018152603490920190925280519101206115ba601554828585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506121bb92505050565b6116065760405162461bcd60e51b815260206004820152601a60248201527f6261642077686974656c697374206d65726b6c652070726f6f660000000000006044820152606401610db0565b6011805490600061161683612fc9565b9091555050600c54610100900460ff166000908152601760209081526040808320338452909152812080549161164b83612fc9565b919050555061165c33601354611ecf565b60135461166b90602090612f5f565b60ff16601354336001600160a01b03167f05b3423d4a1222ae84b0faa0c24a27a29ed0d9dfeda378324947c98213e6797e60405160405180910390a4601380549060006116b783612fc9565b90915550506001600b55505050565b6116ce61210f565b600c8054610100900460ff169060016116e683613124565b91906101000a81548160ff021916908360ff1602179055505082600e8190555081601254611714919061307e565b6012556015555050565b600a546001600160a01b031633148061174157506019546001600160a01b031633145b61175d5760405162461bcd60e51b8152600401610db090613143565b60008181526018602052604090205460ff166117b15760405162461bcd60e51b81526020600482015260136024820152721d1bdad95b881a5cc81b9bdd081b1bd8dad959606a1b6044820152606401610db0565b6000908152601860205260409020805460ff19169055565b6000818152600260205260408120546001600160a01b031680610b2d5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610db0565b60006001600160a01b0382166118935760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610db0565b506001600160a01b031660009081526003602052604090205490565b6118b761210f565b61137260006121c8565b6118c961210f565b601255565b6118d661210f565b601a6118e282826131d8565b5050565b6118ee61210f565b6012546118fd90602090612f9c565b601154111561191e5760405162461bcd60e51b8152600401610db0906130b4565b600c54610100900460ff166000908152601660209081526040808320338452909152902054600a116119885760405162461bcd60e51b81526020600482015260136024820152726d696e74206c696d697420666f72206672656560681b6044820152606401610db0565b6011805490600061199883612fc9565b9091555050600c54610100900460ff16600090815260166020908152604080832033845290915281208054916119cd83612fc9565b91905055506119de33601354611ecf565b6013546119ed90602090612f5f565b60ff16601354336001600160a01b03167f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f60405160405180910390a460138054906000611a3983612fc9565b9190505550565b6000601154602060ff16601254611a579190612f9c565b611a619190612f89565b905090565b611a6e61210f565b61137261221a565b606060018054610c9290612fe2565b6118e2338383612257565b611a9a3383611ee9565b611ab65760405162461bcd60e51b8152600401610db0906130d6565b611ac284848484612325565b50505050565b611ad061210f565b601555565b600c54610100900460ff1660009081526016602090815260408083206001600160a01b0385168452909152812054610b2d90600a612f89565b611b1661210f565b600c805460ff9092166101000261ff0019909216919091179055565b6060611b3d82611d6c565b601a611b4883612358565b604051602001611b59929190613298565b6040516020818303038152906040529050919050565b611b7761210f565b601980546001600160a01b0319166001600160a01b0392909216919091179055565b600c54610100900460ff1660009081526017602090815260408083206001600160a01b0385168452909152812054610b2d906003612f89565b611bda612a7e565b60005b602060ff82161015611c355760ff8116600090815260146020526040902054601054611c099190612f89565b828260ff1660208110611c1e57611c1e612fb3565b602002015280611c2d81613124565b915050611bdd565b5090565b600a546001600160a01b0316331480611c5c57506019546001600160a01b031633145b611c785760405162461bcd60e51b8152600401610db090613143565b60008181526018602052604090205460ff1615611cce5760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b88185b1c9958591e481b1bd8dad95960621b6044820152606401610db0565b6000908152601860205260409020805460ff19166001179055565b611cf161210f565b601055565b611cfe61210f565b6001600160a01b038116611d635760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610db0565b611352816121c8565b6000818152600260205260409020546001600160a01b03166113525760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610db0565b60006001600160e01b031982166380ac58cd60e01b1480611dfc57506001600160e01b03198216635b5e139f60e01b145b80610b2d57506301ffc9a760e01b6001600160e01b0319831614610b2d565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611e50826117c9565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600c5460ff16156113725760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610db0565b6118e2828260405180602001604052806000815250612459565b600080611ef5836117c9565b9050806001600160a01b0316846001600160a01b03161480611f3c57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80611f605750836001600160a01b0316611f5584610d15565b6001600160a01b0316145b949350505050565b826001600160a01b0316611f7b826117c9565b6001600160a01b031614611fdf5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610db0565b6001600160a01b0382166120415760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610db0565b61204c83838361248c565b612057600082611e1b565b6001600160a01b0383166000908152600360205260408120805460019290612080908490612f89565b90915550506001600160a01b03821660009081526003602052604081208054600192906120ae90849061307e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600a546001600160a01b031633146113725760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610db0565b612171612509565b600c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000611f60828585612552565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612222611e89565b600c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861219e3390565b816001600160a01b0316836001600160a01b0316036122b85760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610db0565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612330848484611f68565b61233c84848484612568565b611ac25760405162461bcd60e51b8152600401610db09061331f565b60608160000361237f5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156123a9578061239381612fc9565b91506123a29050600a83613371565b9150612383565b60008167ffffffffffffffff8111156123c4576123c4612d6a565b6040519080825280601f01601f1916602001820160405280156123ee576020820181803683370190505b5090505b8415611f6057612403600183612f89565b9150612410600a86612f5f565b61241b90603061307e565b60f81b81838151811061243057612430612fb3565b60200101906001600160f81b031916908160001a905350612452600a86613371565b94506123f2565b6124638383612669565b6124706000848484612568565b610e515760405162461bcd60e51b8152600401610db09061331f565b6124978383836127b7565b6001600160a01b0383166124aa57505050565b60008181526018602052604090205460ff1615610e515760405162461bcd60e51b815260206004820152601a60248201527f746f6b656e206c6f636b656420696e2070726564696374696f6e0000000000006044820152606401610db0565b600c5460ff166113725760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610db0565b60008261255f858461286f565b14949350505050565b60006001600160a01b0384163b1561265e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906125ac903390899088908890600401613385565b6020604051808303816000875af19250505080156125e7575060408051601f3d908101601f191682019092526125e4918101906133c2565b60015b612644573d808015612615576040519150601f19603f3d011682016040523d82523d6000602084013e61261a565b606091505b50805160000361263c5760405162461bcd60e51b8152600401610db09061331f565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611f60565b506001949350505050565b6001600160a01b0382166126bf5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610db0565b6000818152600260205260409020546001600160a01b0316156127245760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610db0565b6127306000838361248c565b6001600160a01b038216600090815260036020526040812080546001929061275990849061307e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b0383166128125761280d81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612835565b816001600160a01b0316836001600160a01b0316146128355761283583826128bc565b6001600160a01b03821661284c57610e5181612959565b826001600160a01b0316826001600160a01b031614610e5157610e518282612a08565b600081815b84518110156128b4576128a08286838151811061289357612893612fb3565b6020026020010151612a4c565b9150806128ac81612fc9565b915050612874565b509392505050565b600060016128c984611829565b6128d39190612f89565b600083815260076020526040902054909150808214612926576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061296b90600190612f89565b6000838152600960205260408120546008805493945090928490811061299357612993612fb3565b9060005260206000200154905080600883815481106129b4576129b4612fb3565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806129ec576129ec6133df565b6001900381819060005260206000200160009055905550505050565b6000612a1383611829565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6000818310612a68576000828152602084905260409020612a77565b60008381526020839052604090205b9392505050565b6040518061040001604052806020906020820280368337509192915050565b600060208284031215612aaf57600080fd5b5035919050565b6001600160e01b03198116811461135257600080fd5b600060208284031215612ade57600080fd5b8135612a7781612ab6565b80356001600160a01b0381168114612b0057600080fd5b919050565b600080600060608486031215612b1a57600080fd5b612b2384612ae9565b95602085013595506040909401359392505050565b6000604082018483526020604081850152818551808452606086019150828701935060005b81811015612b7957845183529383019391830191600101612b5d565b5090979650505050505050565b60005b83811015612ba1578181015183820152602001612b89565b50506000910152565b60008151808452612bc2816020860160208601612b86565b601f01601f19169290920160200192915050565b602081526000612a776020830184612baa565b60008060408385031215612bfc57600080fd5b612c0583612ae9565b946020939093013593505050565b803560ff81168114612b0057600080fd5b600060208284031215612c3657600080fd5b612a7782612c13565b60008060408385031215612c5257600080fd5b612c5b83612c13565b9150612c6960208401612ae9565b90509250929050565b600080600060608486031215612c8757600080fd5b612c9084612ae9565b9250612c9e60208501612ae9565b9150604084013590509250925092565b60008060208385031215612cc157600080fd5b823567ffffffffffffffff80821115612cd957600080fd5b818501915085601f830112612ced57600080fd5b813581811115612cfc57600080fd5b8660208260051b8501011115612d1157600080fd5b60209290920196919550909350505050565b600080600060608486031215612d3857600080fd5b505081359360208301359350604090920135919050565b600060208284031215612d6157600080fd5b612a7782612ae9565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612d9b57612d9b612d6a565b604051601f8501601f19908116603f01168101908282118183101715612dc357612dc3612d6a565b81604052809350858152868686011115612ddc57600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612e0857600080fd5b813567ffffffffffffffff811115612e1f57600080fd5b8201601f81018413612e3057600080fd5b611f6084823560208401612d80565b60008060408385031215612e5257600080fd5b612e5b83612ae9565b915060208301358015158114612e7057600080fd5b809150509250929050565b60008060008060808587031215612e9157600080fd5b612e9a85612ae9565b9350612ea860208601612ae9565b925060408501359150606085013567ffffffffffffffff811115612ecb57600080fd5b8501601f81018713612edc57600080fd5b612eeb87823560208401612d80565b91505092959194509250565b6104008101818360005b6020808210612f105750612f24565b825184529283019290910190600101612f01565b50505092915050565b60008060408385031215612f4057600080fd5b612c5b83612ae9565b634e487b7160e01b600052601260045260246000fd5b600082612f6e57612f6e612f49565b500690565b634e487b7160e01b600052601160045260246000fd5b81810381811115610b2d57610b2d612f73565b8082028115828204841417610b2d57610b2d612f73565b634e487b7160e01b600052603260045260246000fd5b600060018201612fdb57612fdb612f73565b5060010190565b600181811c90821680612ff657607f821691505b60208210810361301657634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526011908201527053656e646572206973206e6f7420454f4160781b604082015260600190565b80820180821115610b2d57610b2d612f73565b6020808252600990820152681b9bdd081cdd185c9d60ba1b604082015260600190565b6020808252600890820152671cdbdb19081bdd5d60c21b604082015260600190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b600060ff821660ff810361313a5761313a612f73565b60010192915050565b60208082526027908201527f63616c6c6572206973206e6f74206f776e6572206f72207072656469637420636040820152661bdb9d1c9858dd60ca1b606082015260800190565b601f821115610e5157600081815260208120601f850160051c810160208610156131b15750805b601f850160051c820191505b818110156131d0578281556001016131bd565b505050505050565b815167ffffffffffffffff8111156131f2576131f2612d6a565b613206816132008454612fe2565b8461318a565b602080601f83116001811461323b57600084156132235750858301515b600019600386901b1c1916600185901b1785556131d0565b600085815260208120601f198616915b8281101561326a5788860151825594840194600190910190840161324b565b50858210156132885787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008084546132a681612fe2565b600182811680156132be57600181146132d357613302565b60ff1984168752821515830287019450613302565b8860005260208060002060005b858110156132f95781548a8201529084019082016132e0565b50505082870194505b505050508351613316818360208801612b86565b01949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60008261338057613380612f49565b500490565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906133b890830184612baa565b9695505050505050565b6000602082840312156133d457600080fd5b8151612a7781612ab6565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220e12b6d7d59188686163623d12e20035e51d0f16ca9a3f4a88101208e5dd4bbc964736f6c6343000811003300000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000f4e466f6f5462616c6c2047726f7570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054e46544247000000000000000000000000000000000000000000000000000000
Deployed Bytecode
0x6080604052600436106103a15760003560e01c806373519c68116101e7578063b88d4fde1161010d578063d0f359a1116100a0578063e40c5d971161006f578063e40c5d9714610a78578063e985e9c514610a98578063f2fde38b14610ae1578063fa1acb5c14610b0157600080fd5b8063d0f359a1146109f6578063d9662e3314610a16578063db83694c14610a36578063dd46706414610a5857600080fd5b8063c08dfd3c116100dc578063c08dfd3c14610995578063c0c0ea3b146109aa578063c87b56dd146109c0578063cfa08f7c146109e057600080fd5b8063b88d4fde14610915578063bd32fb6614610935578063bf422da514610955578063c03afb591461097557600080fd5b80637f8c353e1161018557806395d89b411161015457806395d89b41146108ab57806397301059146108c0578063a0b30390146108df578063a22cb465146108f557600080fd5b80637f8c353e146108205780638456cb59146108405780638c287475146108555780638da5cb5b1461088d57600080fd5b806377a605d9116101c157806377a605d9146107b357806379340a4e146107c95780637c69e207146107f65780637d52b3011461080b57600080fd5b806373519c681461075d578063750521f51461077d57806375a99b9f1461079d57600080fd5b80633a780938116102cc57806356fde6ae1161026a5780636352211e116102395780636352211e146106f357806365f130971461071357806370a0823114610728578063715018a61461074857600080fd5b806356fde6ae1461067b5780635b5c04201461069b5780635c975abb146106bb5780636198e339146106d357600080fd5b80633f4ba83a116102a65780633f4ba83a1461060657806342842e0e1461061b5780634f6ccce71461063b578063525f8a5c1461065b57600080fd5b80633a780938146105bb5780633ccfd60b146105d15780633e0a322d146105e657600080fd5b806314107f3c1161034457806323b872dd1161031357806323b872dd1461053e578063263df1d11461055e5780632f745c591461058557806332e32ae2146105a557600080fd5b806314107f3c146104c857806314eedf22146104db57806318160ddd14610513578063235b6ea11461052857600080fd5b806306fdde031161038057806306fdde0314610437578063081812fc14610459578063095ea7b3146104915780631249c58b146104b357600080fd5b80628e0f1b146103a657806301ffc9a7146103d9578063069e813d14610409575b600080fd5b3480156103b257600080fd5b506103c66103c1366004612a9d565b610b17565b6040519081526020015b60405180910390f35b3480156103e557600080fd5b506103f96103f4366004612acc565b610b33565b60405190151581526020016103d0565b34801561041557600080fd5b50610429610424366004612b05565b610b58565b6040516103d0929190612b38565b34801561044357600080fd5b5061044c610c83565b6040516103d09190612bd6565b34801561046557600080fd5b50610479610474366004612a9d565b610d15565b6040516001600160a01b0390911681526020016103d0565b34801561049d57600080fd5b506104b16104ac366004612be9565b610d3c565b005b3480156104bf57600080fd5b506104b1610e56565b6104b16104d6366004612c24565b61102a565b3480156104e757600080fd5b506103c66104f6366004612c3f565b601660209081526000928352604080842090915290825290205481565b34801561051f57600080fd5b506008546103c6565b34801561053457600080fd5b506103c6600f5481565b34801561054a57600080fd5b506104b1610559366004612c72565b6111f3565b34801561056a57600080fd5b50610573602081565b60405160ff90911681526020016103d0565b34801561059157600080fd5b506103c66105a0366004612be9565b611224565b3480156105b157600080fd5b506103c660125481565b3480156105c757600080fd5b506103c660115481565b3480156105dd57600080fd5b506104b16112ba565b3480156105f257600080fd5b506104b1610601366004612a9d565b611355565b34801561061257600080fd5b506104b1611362565b34801561062757600080fd5b506104b1610636366004612c72565b611374565b34801561064757600080fd5b506103c6610656366004612a9d565b61138f565b34801561066757600080fd5b506104b1610676366004612a9d565b611422565b34801561068757600080fd5b506104b1610696366004612cae565b61142f565b3480156106a757600080fd5b506104b16106b6366004612d23565b6116c6565b3480156106c757600080fd5b50600c5460ff166103f9565b3480156106df57600080fd5b506104b16106ee366004612a9d565b61171e565b3480156106ff57600080fd5b5061047961070e366004612a9d565b6117c9565b34801561071f57600080fd5b506103c6600a81565b34801561073457600080fd5b506103c6610743366004612d4f565b611829565b34801561075457600080fd5b506104b16118af565b34801561076957600080fd5b506104b1610778366004612a9d565b6118c1565b34801561078957600080fd5b506104b1610798366004612df6565b6118ce565b3480156107a957600080fd5b506103c6600d5481565b3480156107bf57600080fd5b506103c6610e1081565b3480156107d557600080fd5b506103c66107e4366004612c24565b60146020526000908152604090205481565b34801561080257600080fd5b506104b16118e6565b34801561081757600080fd5b506103c6611a40565b34801561082c57600080fd5b50601954610479906001600160a01b031681565b34801561084c57600080fd5b506104b1611a66565b34801561086157600080fd5b506103c6610870366004612c3f565b601760209081526000928352604080842090915290825290205481565b34801561089957600080fd5b50600a546001600160a01b0316610479565b3480156108b757600080fd5b5061044c611a76565b3480156108cc57600080fd5b50600c5461057390610100900460ff1681565b3480156108eb57600080fd5b506103c660155481565b34801561090157600080fd5b506104b1610910366004612e3f565b611a85565b34801561092157600080fd5b506104b1610930366004612e7b565b611a90565b34801561094157600080fd5b506104b1610950366004612a9d565b611ac8565b34801561096157600080fd5b506103c6610970366004612d4f565b611ad5565b34801561098157600080fd5b506104b1610990366004612c24565b611b0e565b3480156109a157600080fd5b506103c6600381565b3480156109b657600080fd5b506103c660135481565b3480156109cc57600080fd5b5061044c6109db366004612a9d565b611b32565b3480156109ec57600080fd5b506103c660105481565b348015610a0257600080fd5b506104b1610a11366004612d4f565b611b6f565b348015610a2257600080fd5b506103c6610a31366004612d4f565b611b99565b348015610a4257600080fd5b50610a4b611bd2565b6040516103d09190612ef7565b348015610a6457600080fd5b506104b1610a73366004612a9d565b611c39565b348015610a8457600080fd5b506104b1610a93366004612a9d565b611ce9565b348015610aa457600080fd5b506103f9610ab3366004612f2d565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b348015610aed57600080fd5b506104b1610afc366004612d4f565b611cf6565b348015610b0d57600080fd5b506103c6600e5481565b6000610b2282611d6c565b610b2d602083612f5f565b92915050565b60006001600160e01b0319821663780e9d6360e01b1480610b2d5750610b2d82611dcb565b600060606000610b6786611829565b9050600084610b77600188612f89565b610b819190612f9c565b90506000610b8f8688612f9c565b905082821115610bb45750506040805160008152602081019091529092509050610c7b565b82811115610bbf5750815b6000610bcb8383612f89565b67ffffffffffffffff811115610be357610be3612d6a565b604051908082528060200260200182016040528015610c0c578160200160208202803683370190505b5090508260005b610c1d8585612f89565b811015610c71576000610c308c84611224565b905080848381518110610c4557610c45612fb3565b602090810291909101015282610c5a81612fc9565b935050508080610c6990612fc9565b915050610c13565b5093955093505050505b935093915050565b606060008054610c9290612fe2565b80601f0160208091040260200160405190810160405280929190818152602001828054610cbe90612fe2565b8015610d0b5780601f10610ce057610100808354040283529160200191610d0b565b820191906000526020600020905b815481529060010190602001808311610cee57829003601f168201915b5050505050905090565b6000610d2082611d6c565b506000908152600460205260409020546001600160a01b031690565b6000610d47826117c9565b9050806001600160a01b0316836001600160a01b031603610db95760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b60648201526084015b60405180910390fd5b336001600160a01b0382161480610dd55750610dd58133610ab3565b610e475760405162461bcd60e51b815260206004820152603e60248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f7420746f60448201527f6b656e206f776e6572206e6f7220617070726f76656420666f7220616c6c00006064820152608401610db0565b610e518383611e1b565b505050565b6002600b5403610e785760405162461bcd60e51b8152600401610db09061301c565b6002600b55610e85611e89565b333214610ea45760405162461bcd60e51b8152600401610db090613053565b610e10600e54610eb4919061307e565b421015610ed35760405162461bcd60e51b8152600401610db090613091565b601254610ee290602090612f9c565b6011541115610f035760405162461bcd60e51b8152600401610db0906130b4565b600c54610100900460ff166000908152601660209081526040808320338452909152902054600a11610f6d5760405162461bcd60e51b81526020600482015260136024820152726d696e74206c696d697420666f72206672656560681b6044820152606401610db0565b60118054906000610f7d83612fc9565b9091555050600c54610100900460ff1660009081526016602090815260408083203384529091528120805491610fb283612fc9565b9190505550610fc333601354611ecf565b601354610fd290602090612f5f565b60ff16601354336001600160a01b03167f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f60405160405180910390a46013805490600061101e83612fc9565b90915550506001600b55565b6002600b540361104c5760405162461bcd60e51b8152600401610db09061301c565b6002600b55611059611e89565b3332146110785760405162461bcd60e51b8152600401610db090613053565b600d5442101561109a5760405162461bcd60e51b8152600401610db090613091565b602060ff8216106110e15760405162461bcd60e51b815260206004820152601160248201527034b73b30b634b2103830b930b6b2ba32b960791b6044820152606401610db0565b60105460ff821660009081526014602052604090205411156111155760405162461bcd60e51b8152600401610db0906130b4565b600f54341461115c5760405162461bcd60e51b8152602060048201526013602482015272696e76616c6964204554482062616c616e636560681b6044820152606401610db0565b60ff8116600090815260146020908152604082205461117b9190612f9c565b6111889060ff841661307e565b60ff831660009081526014602052604081208054929350906111a983612fc9565b91905055506111b83382611ecf565b60405160ff831690829033907f1cbc5ab135991bd2b6a4b034a04aa2aa086dac1371cb9b16b8b5e2ed6b036bed90600090a450506001600b55565b6111fd3382611ee9565b6112195760405162461bcd60e51b8152600401610db0906130d6565b610e51838383611f68565b600061122f83611829565b82106112915760405162461bcd60e51b815260206004820152602b60248201527f455243373231456e756d657261626c653a206f776e657220696e646578206f7560448201526a74206f6620626f756e647360a81b6064820152608401610db0565b506001600160a01b03919091166000908152600660209081526040808320938352929052205490565b6112c261210f565b604051600090339047908381818185875af1925050503d8060008114611304576040519150601f19603f3d011682016040523d82523d6000602084013e611309565b606091505b50509050806113525760405162461bcd60e51b8152602060048201526015602482015274115d1a195c881d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610db0565b50565b61135d61210f565b600e55565b61136a61210f565b611372612169565b565b610e5183838360405180602001604052806000815250611a90565b600061139a60085490565b82106113fd5760405162461bcd60e51b815260206004820152602c60248201527f455243373231456e756d657261626c653a20676c6f62616c20696e646578206f60448201526b7574206f6620626f756e647360a01b6064820152608401610db0565b6008828154811061141057611410612fb3565b90600052602060002001549050919050565b61142a61210f565b600d55565b6002600b54036114515760405162461bcd60e51b8152600401610db09061301c565b6002600b5561145e611e89565b33321461147d5760405162461bcd60e51b8152600401610db090613053565b600e5442101561149f5760405162461bcd60e51b8152600401610db090613091565b6012546114ae90602090612f9c565b60115411156114cf5760405162461bcd60e51b8152600401610db0906130b4565b600c54610100900460ff1660009081526017602090815260408083203384529091529020546003116115435760405162461bcd60e51b815260206004820152601860248201527f6d696e74206c696d697420666f722077686974656c69737400000000000000006044820152606401610db0565b604080513360601b6bffffffffffffffffffffffff191660208083019190915282516014818403018152603490920190925280519101206115ba601554828585808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152506121bb92505050565b6116065760405162461bcd60e51b815260206004820152601a60248201527f6261642077686974656c697374206d65726b6c652070726f6f660000000000006044820152606401610db0565b6011805490600061161683612fc9565b9091555050600c54610100900460ff166000908152601760209081526040808320338452909152812080549161164b83612fc9565b919050555061165c33601354611ecf565b60135461166b90602090612f5f565b60ff16601354336001600160a01b03167f05b3423d4a1222ae84b0faa0c24a27a29ed0d9dfeda378324947c98213e6797e60405160405180910390a4601380549060006116b783612fc9565b90915550506001600b55505050565b6116ce61210f565b600c8054610100900460ff169060016116e683613124565b91906101000a81548160ff021916908360ff1602179055505082600e8190555081601254611714919061307e565b6012556015555050565b600a546001600160a01b031633148061174157506019546001600160a01b031633145b61175d5760405162461bcd60e51b8152600401610db090613143565b60008181526018602052604090205460ff166117b15760405162461bcd60e51b81526020600482015260136024820152721d1bdad95b881a5cc81b9bdd081b1bd8dad959606a1b6044820152606401610db0565b6000908152601860205260409020805460ff19169055565b6000818152600260205260408120546001600160a01b031680610b2d5760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610db0565b60006001600160a01b0382166118935760405162461bcd60e51b815260206004820152602960248201527f4552433732313a2061646472657373207a65726f206973206e6f7420612076616044820152683634b21037bbb732b960b91b6064820152608401610db0565b506001600160a01b031660009081526003602052604090205490565b6118b761210f565b61137260006121c8565b6118c961210f565b601255565b6118d661210f565b601a6118e282826131d8565b5050565b6118ee61210f565b6012546118fd90602090612f9c565b601154111561191e5760405162461bcd60e51b8152600401610db0906130b4565b600c54610100900460ff166000908152601660209081526040808320338452909152902054600a116119885760405162461bcd60e51b81526020600482015260136024820152726d696e74206c696d697420666f72206672656560681b6044820152606401610db0565b6011805490600061199883612fc9565b9091555050600c54610100900460ff16600090815260166020908152604080832033845290915281208054916119cd83612fc9565b91905055506119de33601354611ecf565b6013546119ed90602090612f5f565b60ff16601354336001600160a01b03167f4c209b5fc8ad50758f13e2e1088ba56a560dff690a1c6fef26394f4c03821c4f60405160405180910390a460138054906000611a3983612fc9565b9190505550565b6000601154602060ff16601254611a579190612f9c565b611a619190612f89565b905090565b611a6e61210f565b61137261221a565b606060018054610c9290612fe2565b6118e2338383612257565b611a9a3383611ee9565b611ab65760405162461bcd60e51b8152600401610db0906130d6565b611ac284848484612325565b50505050565b611ad061210f565b601555565b600c54610100900460ff1660009081526016602090815260408083206001600160a01b0385168452909152812054610b2d90600a612f89565b611b1661210f565b600c805460ff9092166101000261ff0019909216919091179055565b6060611b3d82611d6c565b601a611b4883612358565b604051602001611b59929190613298565b6040516020818303038152906040529050919050565b611b7761210f565b601980546001600160a01b0319166001600160a01b0392909216919091179055565b600c54610100900460ff1660009081526017602090815260408083206001600160a01b0385168452909152812054610b2d906003612f89565b611bda612a7e565b60005b602060ff82161015611c355760ff8116600090815260146020526040902054601054611c099190612f89565b828260ff1660208110611c1e57611c1e612fb3565b602002015280611c2d81613124565b915050611bdd565b5090565b600a546001600160a01b0316331480611c5c57506019546001600160a01b031633145b611c785760405162461bcd60e51b8152600401610db090613143565b60008181526018602052604090205460ff1615611cce5760405162461bcd60e51b81526020600482015260146024820152731d1bdad95b88185b1c9958591e481b1bd8dad95960621b6044820152606401610db0565b6000908152601860205260409020805460ff19166001179055565b611cf161210f565b601055565b611cfe61210f565b6001600160a01b038116611d635760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610db0565b611352816121c8565b6000818152600260205260409020546001600160a01b03166113525760405162461bcd60e51b8152602060048201526018602482015277115490cdcc8c4e881a5b9d985b1a59081d1bdad95b88125160421b6044820152606401610db0565b60006001600160e01b031982166380ac58cd60e01b1480611dfc57506001600160e01b03198216635b5e139f60e01b145b80610b2d57506301ffc9a760e01b6001600160e01b0319831614610b2d565b600081815260046020526040902080546001600160a01b0319166001600160a01b0384169081179091558190611e50826117c9565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b600c5460ff16156113725760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610db0565b6118e2828260405180602001604052806000815250612459565b600080611ef5836117c9565b9050806001600160a01b0316846001600160a01b03161480611f3c57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b80611f605750836001600160a01b0316611f5584610d15565b6001600160a01b0316145b949350505050565b826001600160a01b0316611f7b826117c9565b6001600160a01b031614611fdf5760405162461bcd60e51b815260206004820152602560248201527f4552433732313a207472616e736665722066726f6d20696e636f72726563742060448201526437bbb732b960d91b6064820152608401610db0565b6001600160a01b0382166120415760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610db0565b61204c83838361248c565b612057600082611e1b565b6001600160a01b0383166000908152600360205260408120805460019290612080908490612f89565b90915550506001600160a01b03821660009081526003602052604081208054600192906120ae90849061307e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600a546001600160a01b031633146113725760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610db0565b612171612509565b600c805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6000611f60828585612552565b600a80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b612222611e89565b600c805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861219e3390565b816001600160a01b0316836001600160a01b0316036122b85760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610db0565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612330848484611f68565b61233c84848484612568565b611ac25760405162461bcd60e51b8152600401610db09061331f565b60608160000361237f5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156123a9578061239381612fc9565b91506123a29050600a83613371565b9150612383565b60008167ffffffffffffffff8111156123c4576123c4612d6a565b6040519080825280601f01601f1916602001820160405280156123ee576020820181803683370190505b5090505b8415611f6057612403600183612f89565b9150612410600a86612f5f565b61241b90603061307e565b60f81b81838151811061243057612430612fb3565b60200101906001600160f81b031916908160001a905350612452600a86613371565b94506123f2565b6124638383612669565b6124706000848484612568565b610e515760405162461bcd60e51b8152600401610db09061331f565b6124978383836127b7565b6001600160a01b0383166124aa57505050565b60008181526018602052604090205460ff1615610e515760405162461bcd60e51b815260206004820152601a60248201527f746f6b656e206c6f636b656420696e2070726564696374696f6e0000000000006044820152606401610db0565b600c5460ff166113725760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610db0565b60008261255f858461286f565b14949350505050565b60006001600160a01b0384163b1561265e57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906125ac903390899088908890600401613385565b6020604051808303816000875af19250505080156125e7575060408051601f3d908101601f191682019092526125e4918101906133c2565b60015b612644573d808015612615576040519150601f19603f3d011682016040523d82523d6000602084013e61261a565b606091505b50805160000361263c5760405162461bcd60e51b8152600401610db09061331f565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611f60565b506001949350505050565b6001600160a01b0382166126bf5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610db0565b6000818152600260205260409020546001600160a01b0316156127245760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610db0565b6127306000838361248c565b6001600160a01b038216600090815260036020526040812080546001929061275990849061307e565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b6001600160a01b0383166128125761280d81600880546000838152600960205260408120829055600182018355919091527ff3f7a9fe364faab93b216da50a3214154f22a0a2b415b23a84c8169e8b636ee30155565b612835565b816001600160a01b0316836001600160a01b0316146128355761283583826128bc565b6001600160a01b03821661284c57610e5181612959565b826001600160a01b0316826001600160a01b031614610e5157610e518282612a08565b600081815b84518110156128b4576128a08286838151811061289357612893612fb3565b6020026020010151612a4c565b9150806128ac81612fc9565b915050612874565b509392505050565b600060016128c984611829565b6128d39190612f89565b600083815260076020526040902054909150808214612926576001600160a01b03841660009081526006602090815260408083208584528252808320548484528184208190558352600790915290208190555b5060009182526007602090815260408084208490556001600160a01b039094168352600681528383209183525290812055565b60085460009061296b90600190612f89565b6000838152600960205260408120546008805493945090928490811061299357612993612fb3565b9060005260206000200154905080600883815481106129b4576129b4612fb3565b60009182526020808320909101929092558281526009909152604080822084905585825281205560088054806129ec576129ec6133df565b6001900381819060005260206000200160009055905550505050565b6000612a1383611829565b6001600160a01b039093166000908152600660209081526040808320868452825280832085905593825260079052919091209190915550565b6000818310612a68576000828152602084905260409020612a77565b60008381526020839052604090205b9392505050565b6040518061040001604052806020906020820280368337509192915050565b600060208284031215612aaf57600080fd5b5035919050565b6001600160e01b03198116811461135257600080fd5b600060208284031215612ade57600080fd5b8135612a7781612ab6565b80356001600160a01b0381168114612b0057600080fd5b919050565b600080600060608486031215612b1a57600080fd5b612b2384612ae9565b95602085013595506040909401359392505050565b6000604082018483526020604081850152818551808452606086019150828701935060005b81811015612b7957845183529383019391830191600101612b5d565b5090979650505050505050565b60005b83811015612ba1578181015183820152602001612b89565b50506000910152565b60008151808452612bc2816020860160208601612b86565b601f01601f19169290920160200192915050565b602081526000612a776020830184612baa565b60008060408385031215612bfc57600080fd5b612c0583612ae9565b946020939093013593505050565b803560ff81168114612b0057600080fd5b600060208284031215612c3657600080fd5b612a7782612c13565b60008060408385031215612c5257600080fd5b612c5b83612c13565b9150612c6960208401612ae9565b90509250929050565b600080600060608486031215612c8757600080fd5b612c9084612ae9565b9250612c9e60208501612ae9565b9150604084013590509250925092565b60008060208385031215612cc157600080fd5b823567ffffffffffffffff80821115612cd957600080fd5b818501915085601f830112612ced57600080fd5b813581811115612cfc57600080fd5b8660208260051b8501011115612d1157600080fd5b60209290920196919550909350505050565b600080600060608486031215612d3857600080fd5b505081359360208301359350604090920135919050565b600060208284031215612d6157600080fd5b612a7782612ae9565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff80841115612d9b57612d9b612d6a565b604051601f8501601f19908116603f01168101908282118183101715612dc357612dc3612d6a565b81604052809350858152868686011115612ddc57600080fd5b858560208301376000602087830101525050509392505050565b600060208284031215612e0857600080fd5b813567ffffffffffffffff811115612e1f57600080fd5b8201601f81018413612e3057600080fd5b611f6084823560208401612d80565b60008060408385031215612e5257600080fd5b612e5b83612ae9565b915060208301358015158114612e7057600080fd5b809150509250929050565b60008060008060808587031215612e9157600080fd5b612e9a85612ae9565b9350612ea860208601612ae9565b925060408501359150606085013567ffffffffffffffff811115612ecb57600080fd5b8501601f81018713612edc57600080fd5b612eeb87823560208401612d80565b91505092959194509250565b6104008101818360005b6020808210612f105750612f24565b825184529283019290910190600101612f01565b50505092915050565b60008060408385031215612f4057600080fd5b612c5b83612ae9565b634e487b7160e01b600052601260045260246000fd5b600082612f6e57612f6e612f49565b500690565b634e487b7160e01b600052601160045260246000fd5b81810381811115610b2d57610b2d612f73565b8082028115828204841417610b2d57610b2d612f73565b634e487b7160e01b600052603260045260246000fd5b600060018201612fdb57612fdb612f73565b5060010190565b600181811c90821680612ff657607f821691505b60208210810361301657634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252601f908201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604082015260600190565b60208082526011908201527053656e646572206973206e6f7420454f4160781b604082015260600190565b80820180821115610b2d57610b2d612f73565b6020808252600990820152681b9bdd081cdd185c9d60ba1b604082015260600190565b6020808252600890820152671cdbdb19081bdd5d60c21b604082015260600190565b6020808252602e908201527f4552433732313a2063616c6c6572206973206e6f7420746f6b656e206f776e6560408201526d1c881b9bdc88185c1c1c9bdd995960921b606082015260800190565b600060ff821660ff810361313a5761313a612f73565b60010192915050565b60208082526027908201527f63616c6c6572206973206e6f74206f776e6572206f72207072656469637420636040820152661bdb9d1c9858dd60ca1b606082015260800190565b601f821115610e5157600081815260208120601f850160051c810160208610156131b15750805b601f850160051c820191505b818110156131d0578281556001016131bd565b505050505050565b815167ffffffffffffffff8111156131f2576131f2612d6a565b613206816132008454612fe2565b8461318a565b602080601f83116001811461323b57600084156132235750858301515b600019600386901b1c1916600185901b1785556131d0565b600085815260208120601f198616915b8281101561326a5788860151825594840194600190910190840161324b565b50858210156132885787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b60008084546132a681612fe2565b600182811680156132be57600181146132d357613302565b60ff1984168752821515830287019450613302565b8860005260208060002060005b858110156132f95781548a8201529084019082016132e0565b50505082870194505b505050508351613316818360208801612b86565b01949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60008261338057613380612f49565b500490565b6001600160a01b03858116825284166020820152604081018390526080606082018190526000906133b890830184612baa565b9695505050505050565b6000602082840312156133d457600080fd5b8151612a7781612ab6565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220e12b6d7d59188686163623d12e20035e51d0f16ca9a3f4a88101208e5dd4bbc964736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000400000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000000f4e466f6f5462616c6c2047726f7570000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054e46544247000000000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : name (string): NFooTball Group
Arg [1] : symbol (string): NFTBG
-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000040
Arg [1] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [2] : 000000000000000000000000000000000000000000000000000000000000000f
Arg [3] : 4e466f6f5462616c6c2047726f75700000000000000000000000000000000000
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [5] : 4e46544247000000000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
OVERVIEW
NFooTball is a new decentralized prediction platform based on ly2, introducing an Oracle Machine to unify third-party data and player predictions, and the purpose of our platform is to be efficient and self-made. As the most watched sport in the world, we started with the Worl...Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.