Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
EnjoyPassport
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 30000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; import 'erc721a/contracts/ERC721A.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/access/AccessControl.sol'; // import '@openzeppelin/contracts/utils/Strings.sol'; import './interface/IEnjoyPassport.sol'; import './interface/IRouter.sol'; import "./interface/IWalletFamily.sol"; import "./interface/IERC4906.sol"; contract EnjoyPassport is IEnjoyPassport, Ownable, AccessControl, ERC721A, IERC4906{ // using Strings for uint256; bytes32 public constant ADMIN = keccak256('ADMIN'); bytes32 public constant MINTER = keccak256('MINTER'); bytes32 public constant BURNER = keccak256('BURNER'); bytes32 public constant UPDATER = keccak256("UPDATER"); IRouter public router; IWalletFamily public walletfamily; uint256 public targetId = 1; // defalt 1 constructor( ) ERC721A("APP Enjoy Passport", "APEP") { _grantRole(ADMIN, msg.sender); _setupRole(MINTER, _msgSender()); _setupRole(BURNER, _msgSender()); _setupRole(UPDATER, _msgSender()); _safeMint(_msgSender(), 1); } // ================================================================== // external contract // ================================================================== function mint(address to, uint256 quantity) external onlyRole(ADMIN) { _safeMint(to, quantity); } function minterMint(address _address, uint256 _amount) external onlyRole(MINTER) { _safeMint(_address, _amount); } function burnerBurn(address _address, uint256[] calldata tokenIds) external onlyRole(BURNER) { for (uint256 i = 0; i < tokenIds.length; i++) { uint256 tokenId = tokenIds[i]; require(_address == ownerOf(tokenId)); _burn(tokenId); } } function currentIndex() external view returns (uint256) { return _nextTokenId(); } function tokenOfOwner(address owner) external view returns (uint256) { if(balanceOf(owner) > 0){ for (uint256 tokenId = 0; tokenId < _nextTokenId(); tokenId++) { if (_exists(tokenId) && ownerOf(tokenId) == owner) { return tokenId; } } } return 0; } // ================================================================== // onlyAdimin Setting // ================================================================== function setRouter(IRouter _router) external onlyRole(ADMIN) { router = _router; } function setWalletfamily(IWalletFamily _walletFamily) external onlyRole(ADMIN) { walletfamily = _walletFamily; } function setTargetId(uint256 _value) external onlyRole(ADMIN){ targetId = _value; } // ================================================================== // ERC-4906 // ================================================================== function refreshMetadata(uint256 _tokenId) external onlyRole(UPDATER) { emit MetadataUpdate(_tokenId); } function refreshMetadata(uint256 _fromTokenId, uint256 _toTokenId) external onlyRole(UPDATER) { emit BatchMetadataUpdate(_fromTokenId, _toTokenId); } // ================================================================== // interface // ================================================================== function supportsInterface(bytes4 interfaceId) public view virtual override(ERC721A, AccessControl, IERC165) returns (bool) { return AccessControl.supportsInterface(interfaceId) || ERC165.supportsInterface(interfaceId) || super.supportsInterface(interfaceId); } // ================================================================== // override // ================================================================== function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); return router.tokenURI(tokenId, targetId); } // ================================================================== // internal // ================================================================== function _startTokenId() internal view virtual override returns (uint256) { return 1; } // ================================================================== // SBT // ================================================================== function setApprovalForAll(address, bool) public virtual override { require(false, "This token is SBT, so this can not approval."); } function approve(address, uint256) public payable virtual override { require(false, "This token is SBT, so this can not approval."); } function transferFrom(address from, address to, uint256 tokenId) public payable override { if(address(walletfamily) != address(0)){ // migration SBT if(walletfamily.isChild(to) == true){ super.transferFrom(from, to, tokenId); return; } } if(to == address(0x000000000000000000000000000000000000dEaD)){ // only deadAdress transfer super.transferFrom(from, to, tokenId); return; } require(false, "This token is SBT, so this can not transfer."); } // ================================================================== // override AccessControl // ================================================================== function grantRole(bytes32 role, address account) public override onlyRole(ADMIN) { require(role != ADMIN, "not admin only."); _grantRole(role, account); } function revokeRole(bytes32 role, address account) public override onlyRole(ADMIN) { require(role != ADMIN, "not admin only."); _revokeRole(role, account); } function grantAdmin(address account) external onlyOwner { _grantRole(ADMIN, account); } function revokeAdmin(address account) external onlyOwner { _revokeRole(ADMIN, account); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.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(account), " 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 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 (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.8.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: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/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 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.8.0) (utils/math/Math.sol) pragma solidity ^0.8.0; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { enum Rounding { Down, // Toward negative infinity Up, // Toward infinity Zero // Toward zero } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds up instead * of rounding down. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or denominator == 0 * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) * with further edits by Uniswap Labs also under MIT license. */ function mulDiv( uint256 x, uint256 y, uint256 denominator ) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod0 := mul(x, y) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. require(denominator > prod1); /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. Always >= 1. // See https://cs.stackexchange.com/q/138556/92363. // Does not overflow because the denominator cannot be zero at this stage in the function. uint256 twos = denominator & (~denominator + 1); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also works // in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv( uint256 x, uint256 y, uint256 denominator, Rounding rounding ) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (rounding == Rounding.Up && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded down. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (rounding == Rounding.Up && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2, rounded down, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (rounding == Rounding.Up && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10, rounded down, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10**64) { value /= 10**64; result += 64; } if (value >= 10**32) { value /= 10**32; result += 32; } if (value >= 10**16) { value /= 10**16; result += 16; } if (value >= 10**8) { value /= 10**8; result += 8; } if (value >= 10**4) { value /= 10**4; result += 4; } if (value >= 10**2) { value /= 10**2; result += 2; } if (value >= 10**1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (rounding == Rounding.Up && 10**result < value ? 1 : 0); } } /** * @dev Return the log in base 256, rounded down, of a positive value. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (rounding == Rounding.Up && 1 << (result * 8) < value ? 1 : 0); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Strings.sol) pragma solidity ^0.8.0; import "./math/Math.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant _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) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), _SYMBOLS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @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] = _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: UNLICENSED pragma solidity ^0.8.17; interface IEnjoyPassport { function minterMint(address _address, uint256 _amount) external; function burnerBurn(address _address, uint256[] calldata tokenIds) external; function tokenOfOwner(address owner) external view returns (uint256); function refreshMetadata(uint256 _tokenId) external; function refreshMetadata(uint256 _fromTokenId, uint256 _toTokenId) external; }
// SPDX-License-Identifier: CC0-1.0 pragma solidity >=0.7.0 <0.9.0; import { IERC165, ERC165 } from "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; /// @title EIP-721 Metadata Update Extension interface IERC4906 is IERC165 { /// @dev This event emits when the metadata of a token is changed. /// So that the third-party platforms such as NFT market could /// timely update the images and related attributes of the NFT. event MetadataUpdate(uint256 _tokenId); /// @dev This event emits when the metadata of a range of tokens is changed. /// So that the third-party platforms such as NFT market could /// timely update the images and related attributes of the NFTs. event BatchMetadataUpdate(uint256 _fromTokenId, uint256 _toTokenId); }
// SPDX-License-Identifier: MIT pragma solidity >=0.7.0 <0.9.0; interface IRouter{ function tokenURI(uint256 _tokenId,uint256 _id) external view returns(string memory); }
// SPDX-License-Identifier: MIT /* * Created by masataka.eth (@masataka_net) */ pragma solidity >=0.7.0 <0.9.0; interface IWalletFamily { // approve ---------------------------- function approveChild(address _parent,bytes32 _nonce, bytes memory _signature) external; function deleteApprove(address _parent,address _child) external returns (bool); function getApproveList() external view returns(address[] memory); // fix ---------------------------- function fixChild(address _child) external; function isChild(address _child) external view returns (bool); function isChildPair(address _parent, address _child) external view returns (bool); function getFixList(address _parent) external view returns (address[] memory); // VerifySignature ---------------------------- function getMessageHash(address _child,address _parent,bytes32 _nonce) external pure returns (bytes32); function getEthSignedMessageHash(bytes32 _messageHash) external pure returns (bytes32); function isVerify(address _parent,bytes32 _nonce,bytes memory signature) external view returns (bool); function recoverSigner(bytes32 _ethSignedMessageHash, bytes memory _signature) external pure returns (address); function splitSignature(bytes memory sig) external pure returns (bytes32 r, bytes32 s,uint8 v); }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; import './IERC721A.sol'; /** * @dev Interface of ERC721 token receiver. */ interface ERC721A__IERC721Receiver { function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); } /** * @title ERC721A * * @dev Implementation of the [ERC721](https://eips.ethereum.org/EIPS/eip-721) * Non-Fungible Token Standard, including the Metadata extension. * Optimized for lower gas during batch mints. * * Token IDs are minted in sequential order (e.g. 0, 1, 2, 3, ...) * starting from `_startTokenId()`. * * Assumptions: * * - An owner cannot have more than 2**64 - 1 (max value of uint64) of supply. * - The maximum token ID cannot exceed 2**256 - 1 (max value of uint256). */ contract ERC721A is IERC721A { // Bypass for a `--via-ir` bug (https://github.com/chiru-labs/ERC721A/pull/364). struct TokenApprovalRef { address value; } // ============================================================= // CONSTANTS // ============================================================= // Mask of an entry in packed address data. uint256 private constant _BITMASK_ADDRESS_DATA_ENTRY = (1 << 64) - 1; // The bit position of `numberMinted` in packed address data. uint256 private constant _BITPOS_NUMBER_MINTED = 64; // The bit position of `numberBurned` in packed address data. uint256 private constant _BITPOS_NUMBER_BURNED = 128; // The bit position of `aux` in packed address data. uint256 private constant _BITPOS_AUX = 192; // Mask of all 256 bits in packed address data except the 64 bits for `aux`. uint256 private constant _BITMASK_AUX_COMPLEMENT = (1 << 192) - 1; // The bit position of `startTimestamp` in packed ownership. uint256 private constant _BITPOS_START_TIMESTAMP = 160; // The bit mask of the `burned` bit in packed ownership. uint256 private constant _BITMASK_BURNED = 1 << 224; // The bit position of the `nextInitialized` bit in packed ownership. uint256 private constant _BITPOS_NEXT_INITIALIZED = 225; // The bit mask of the `nextInitialized` bit in packed ownership. uint256 private constant _BITMASK_NEXT_INITIALIZED = 1 << 225; // The bit position of `extraData` in packed ownership. uint256 private constant _BITPOS_EXTRA_DATA = 232; // Mask of all 256 bits in a packed ownership except the 24 bits for `extraData`. uint256 private constant _BITMASK_EXTRA_DATA_COMPLEMENT = (1 << 232) - 1; // The mask of the lower 160 bits for addresses. uint256 private constant _BITMASK_ADDRESS = (1 << 160) - 1; // The maximum `quantity` that can be minted with {_mintERC2309}. // This limit is to prevent overflows on the address data entries. // For a limit of 5000, a total of 3.689e15 calls to {_mintERC2309} // is required to cause an overflow, which is unrealistic. uint256 private constant _MAX_MINT_ERC2309_QUANTITY_LIMIT = 5000; // The `Transfer` event signature is given by: // `keccak256(bytes("Transfer(address,address,uint256)"))`. bytes32 private constant _TRANSFER_EVENT_SIGNATURE = 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef; // ============================================================= // STORAGE // ============================================================= // The next token ID to be minted. uint256 private _currentIndex; // The number of tokens burned. uint256 private _burnCounter; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to ownership details // An empty struct value does not necessarily mean the token is unowned. // See {_packedOwnershipOf} implementation for details. // // Bits Layout: // - [0..159] `addr` // - [160..223] `startTimestamp` // - [224] `burned` // - [225] `nextInitialized` // - [232..255] `extraData` mapping(uint256 => uint256) private _packedOwnerships; // Mapping owner address to address data. // // Bits Layout: // - [0..63] `balance` // - [64..127] `numberMinted` // - [128..191] `numberBurned` // - [192..255] `aux` mapping(address => uint256) private _packedAddressData; // Mapping from token ID to approved address. mapping(uint256 => TokenApprovalRef) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // ============================================================= // CONSTRUCTOR // ============================================================= constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; _currentIndex = _startTokenId(); } // ============================================================= // TOKEN COUNTING OPERATIONS // ============================================================= /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal view virtual returns (uint256) { return 0; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view virtual returns (uint256) { return _currentIndex; } /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() public view virtual override returns (uint256) { // Counter underflow is impossible as _burnCounter cannot be incremented // more than `_currentIndex - _startTokenId()` times. unchecked { return _currentIndex - _burnCounter - _startTokenId(); } } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view virtual returns (uint256) { // Counter underflow is impossible as `_currentIndex` does not decrement, // and it is initialized to `_startTokenId()`. unchecked { return _currentIndex - _startTokenId(); } } /** * @dev Returns the total number of tokens burned. */ function _totalBurned() internal view virtual returns (uint256) { return _burnCounter; } // ============================================================= // ADDRESS DATA OPERATIONS // ============================================================= /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) public view virtual override returns (uint256) { if (owner == address(0)) revert BalanceQueryForZeroAddress(); return _packedAddressData[owner] & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens minted by `owner`. */ function _numberMinted(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_MINTED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the number of tokens burned by or on behalf of `owner`. */ function _numberBurned(address owner) internal view returns (uint256) { return (_packedAddressData[owner] >> _BITPOS_NUMBER_BURNED) & _BITMASK_ADDRESS_DATA_ENTRY; } /** * Returns the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). */ function _getAux(address owner) internal view returns (uint64) { return uint64(_packedAddressData[owner] >> _BITPOS_AUX); } /** * Sets the auxiliary data for `owner`. (e.g. number of whitelist mint slots used). * If there are multiple variables, please pack them into a uint64. */ function _setAux(address owner, uint64 aux) internal virtual { uint256 packed = _packedAddressData[owner]; uint256 auxCasted; // Cast `aux` with assembly to avoid redundant masking. assembly { auxCasted := aux } packed = (packed & _BITMASK_AUX_COMPLEMENT) | (auxCasted << _BITPOS_AUX); _packedAddressData[owner] = packed; } // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { // The interface IDs are constants representing the first 4 bytes // of the XOR of all function selectors in the interface. // See: [ERC165](https://eips.ethereum.org/EIPS/eip-165) // (e.g. `bytes4(i.functionA.selector ^ i.functionB.selector ^ ...)`) return interfaceId == 0x01ffc9a7 || // ERC165 interface ID for ERC165. interfaceId == 0x80ac58cd || // ERC165 interface ID for ERC721. interfaceId == 0x5b5e139f; // ERC165 interface ID for ERC721Metadata. } // ============================================================= // IERC721Metadata // ============================================================= /** * @dev Returns the token collection name. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the token collection symbol. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { if (!_exists(tokenId)) revert URIQueryForNonexistentToken(); string memory baseURI = _baseURI(); return bytes(baseURI).length != 0 ? string(abi.encodePacked(baseURI, _toString(tokenId))) : ''; } /** * @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, it can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ''; } // ============================================================= // OWNERSHIPS OPERATIONS // ============================================================= /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { return address(uint160(_packedOwnershipOf(tokenId))); } /** * @dev Gas spent here starts off proportional to the maximum mint batch size. * It gradually moves to O(1) as tokens get transferred around over time. */ function _ownershipOf(uint256 tokenId) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnershipOf(tokenId)); } /** * @dev Returns the unpacked `TokenOwnership` struct at `index`. */ function _ownershipAt(uint256 index) internal view virtual returns (TokenOwnership memory) { return _unpackedOwnership(_packedOwnerships[index]); } /** * @dev Initializes the ownership slot minted at `index` for efficiency purposes. */ function _initializeOwnershipAt(uint256 index) internal virtual { if (_packedOwnerships[index] == 0) { _packedOwnerships[index] = _packedOwnershipOf(index); } } /** * Returns the packed ownership data of `tokenId`. */ function _packedOwnershipOf(uint256 tokenId) private view returns (uint256) { uint256 curr = tokenId; unchecked { if (_startTokenId() <= curr) if (curr < _currentIndex) { uint256 packed = _packedOwnerships[curr]; // If not burned. if (packed & _BITMASK_BURNED == 0) { // Invariant: // There will always be an initialized ownership slot // (i.e. `ownership.addr != address(0) && ownership.burned == false`) // before an unintialized ownership slot // (i.e. `ownership.addr == address(0) && ownership.burned == false`) // Hence, `curr` will not underflow. // // We can directly compare the packed value. // If the address is zero, packed will be zero. while (packed == 0) { packed = _packedOwnerships[--curr]; } return packed; } } } revert OwnerQueryForNonexistentToken(); } /** * @dev Returns the unpacked `TokenOwnership` struct from `packed`. */ function _unpackedOwnership(uint256 packed) private pure returns (TokenOwnership memory ownership) { ownership.addr = address(uint160(packed)); ownership.startTimestamp = uint64(packed >> _BITPOS_START_TIMESTAMP); ownership.burned = packed & _BITMASK_BURNED != 0; ownership.extraData = uint24(packed >> _BITPOS_EXTRA_DATA); } /** * @dev Packs ownership data into a single uint256. */ function _packOwnershipData(address owner, uint256 flags) private view returns (uint256 result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // `owner | (block.timestamp << _BITPOS_START_TIMESTAMP) | flags`. result := or(owner, or(shl(_BITPOS_START_TIMESTAMP, timestamp()), flags)) } } /** * @dev Returns the `nextInitialized` flag set if `quantity` equals 1. */ function _nextInitializedFlag(uint256 quantity) private pure returns (uint256 result) { // For branchless setting of the `nextInitialized` flag. assembly { // `(quantity == 1) << _BITPOS_NEXT_INITIALIZED`. result := shl(_BITPOS_NEXT_INITIALIZED, eq(quantity, 1)) } } // ============================================================= // APPROVAL OPERATIONS // ============================================================= /** * @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) public payable virtual override { address owner = ownerOf(tokenId); if (_msgSenderERC721A() != owner) if (!isApprovedForAll(owner, _msgSenderERC721A())) { revert ApprovalCallerNotOwnerNorApproved(); } _tokenApprovals[tokenId].value = to; emit Approval(owner, to, tokenId); } /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { if (!_exists(tokenId)) revert ApprovalQueryForNonexistentToken(); return _tokenApprovals[tokenId].value; } /** * @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) public virtual override { _operatorApprovals[_msgSenderERC721A()][operator] = approved; emit ApprovalForAll(_msgSenderERC721A(), operator, approved); } /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @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. See {_mint}. */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _startTokenId() <= tokenId && tokenId < _currentIndex && // If within bounds, _packedOwnerships[tokenId] & _BITMASK_BURNED == 0; // and not burned. } /** * @dev Returns whether `msgSender` is equal to `approvedAddress` or `owner`. */ function _isSenderApprovedOrOwner( address approvedAddress, address owner, address msgSender ) private pure returns (bool result) { assembly { // Mask `owner` to the lower 160 bits, in case the upper bits somehow aren't clean. owner := and(owner, _BITMASK_ADDRESS) // Mask `msgSender` to the lower 160 bits, in case the upper bits somehow aren't clean. msgSender := and(msgSender, _BITMASK_ADDRESS) // `msgSender == owner || msgSender == approvedAddress`. result := or(eq(msgSender, owner), eq(msgSender, approvedAddress)) } } /** * @dev Returns the storage slot and value for the approved address of `tokenId`. */ function _getApprovedSlotAndAddress(uint256 tokenId) private view returns (uint256 approvedAddressSlot, address approvedAddress) { TokenApprovalRef storage tokenApproval = _tokenApprovals[tokenId]; // The following is equivalent to `approvedAddress = _tokenApprovals[tokenId].value`. assembly { approvedAddressSlot := tokenApproval.slot approvedAddress := sload(approvedAddressSlot) } } // ============================================================= // TRANSFER OPERATIONS // ============================================================= /** * @dev Transfers `tokenId` from `from` to `to`. * * 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 ) public payable virtual override { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); if (address(uint160(prevOwnershipPacked)) != from) revert TransferFromIncorrectOwner(); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); if (to == address(0)) revert TransferToZeroAddress(); _beforeTokenTransfers(from, to, tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // We can directly increment and decrement the balances. --_packedAddressData[from]; // Updates: `balance -= 1`. ++_packedAddressData[to]; // Updates: `balance += 1`. // Updates: // - `address` to the next owner. // - `startTimestamp` to the timestamp of transfering. // - `burned` to `false`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( to, _BITMASK_NEXT_INITIALIZED | _nextExtraData(from, to, prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, to, tokenId); _afterTokenTransfers(from, to, tokenId, 1); } /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public payable virtual override { safeTransferFrom(from, to, tokenId, ''); } /** * @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 memory _data ) public payable virtual override { transferFrom(from, to, tokenId); if (to.code.length != 0) if (!_checkContractOnERC721Received(from, to, tokenId, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } /** * @dev Hook that is called before a set of serially-ordered token IDs * are about to be transferred. This includes minting. * And also called before burning one token. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * 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, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _beforeTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Hook that is called after a set of serially-ordered token IDs * have been transferred. This includes minting. * And also called after one token has been burned. * * `startTokenId` - the first token ID to be transferred. * `quantity` - the amount to be transferred. * * Calling conditions: * * - When `from` and `to` are both non-zero, `from`'s `tokenId` has been * transferred to `to`. * - When `from` is zero, `tokenId` has been minted for `to`. * - When `to` is zero, `tokenId` has been burned by `from`. * - `from` and `to` are never both zero. */ function _afterTokenTransfers( address from, address to, uint256 startTokenId, uint256 quantity ) internal virtual {} /** * @dev Private function to invoke {IERC721Receiver-onERC721Received} on a target contract. * * `from` - Previous owner of the given token ID. * `to` - Target address that will receive the token. * `tokenId` - Token ID to be transferred. * `_data` - Optional data to send along with the call. * * Returns whether the call correctly returned the expected magic value. */ function _checkContractOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { try ERC721A__IERC721Receiver(to).onERC721Received(_msgSenderERC721A(), from, tokenId, _data) returns ( bytes4 retval ) { return retval == ERC721A__IERC721Receiver(to).onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert TransferToNonERC721ReceiverImplementer(); } else { assembly { revert(add(32, reason), mload(reason)) } } } } // ============================================================= // MINT OPERATIONS // ============================================================= /** * @dev Mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {Transfer} event for each mint. */ function _mint(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (quantity == 0) revert MintZeroQuantity(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are incredibly unrealistic. // `balance` and `numberMinted` have a maximum limit of 2**64. // `tokenId` has a maximum limit of 2**256. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); uint256 toMasked; uint256 end = startTokenId + quantity; // Use assembly to loop and emit the `Transfer` event for gas savings. // The duplicated `log4` removes an extra check and reduces stack juggling. // The assembly, together with the surrounding Solidity code, have been // delicately arranged to nudge the compiler into producing optimized opcodes. assembly { // Mask `to` to the lower 160 bits, in case the upper bits somehow aren't clean. toMasked := and(to, _BITMASK_ADDRESS) // Emit the `Transfer` event. log4( 0, // Start of data (0, since no data). 0, // End of data (0, since no data). _TRANSFER_EVENT_SIGNATURE, // Signature. 0, // `address(0)`. toMasked, // `to`. startTokenId // `tokenId`. ) // The `iszero(eq(,))` check ensures that large values of `quantity` // that overflows uint256 will make the loop run out of gas. // The compiler will optimize the `iszero` away for performance. for { let tokenId := add(startTokenId, 1) } iszero(eq(tokenId, end)) { tokenId := add(tokenId, 1) } { // Emit the `Transfer` event. Similar to above. log4(0, 0, _TRANSFER_EVENT_SIGNATURE, 0, toMasked, tokenId) } } if (toMasked == 0) revert MintToZeroAddress(); _currentIndex = end; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Mints `quantity` tokens and transfers them to `to`. * * This function is intended for efficient minting only during contract creation. * * It emits only one {ConsecutiveTransfer} as defined in * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309), * instead of a sequence of {Transfer} event(s). * * Calling this function outside of contract creation WILL make your contract * non-compliant with the ERC721 standard. * For full ERC721 compliance, substituting ERC721 {Transfer} event(s) with the ERC2309 * {ConsecutiveTransfer} event is only permissible during contract creation. * * Requirements: * * - `to` cannot be the zero address. * - `quantity` must be greater than 0. * * Emits a {ConsecutiveTransfer} event. */ function _mintERC2309(address to, uint256 quantity) internal virtual { uint256 startTokenId = _currentIndex; if (to == address(0)) revert MintToZeroAddress(); if (quantity == 0) revert MintZeroQuantity(); if (quantity > _MAX_MINT_ERC2309_QUANTITY_LIMIT) revert MintERC2309QuantityExceedsLimit(); _beforeTokenTransfers(address(0), to, startTokenId, quantity); // Overflows are unrealistic due to the above check for `quantity` to be below the limit. unchecked { // Updates: // - `balance += quantity`. // - `numberMinted += quantity`. // // We can directly add to the `balance` and `numberMinted`. _packedAddressData[to] += quantity * ((1 << _BITPOS_NUMBER_MINTED) | 1); // Updates: // - `address` to the owner. // - `startTimestamp` to the timestamp of minting. // - `burned` to `false`. // - `nextInitialized` to `quantity == 1`. _packedOwnerships[startTokenId] = _packOwnershipData( to, _nextInitializedFlag(quantity) | _nextExtraData(address(0), to, 0) ); emit ConsecutiveTransfer(startTokenId, startTokenId + quantity - 1, address(0), to); _currentIndex = startTokenId + quantity; } _afterTokenTransfers(address(0), to, startTokenId, quantity); } /** * @dev Safely mints `quantity` tokens and transfers them to `to`. * * Requirements: * * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called for each safe transfer. * - `quantity` must be greater than 0. * * See {_mint}. * * Emits a {Transfer} event for each mint. */ function _safeMint( address to, uint256 quantity, bytes memory _data ) internal virtual { _mint(to, quantity); unchecked { if (to.code.length != 0) { uint256 end = _currentIndex; uint256 index = end - quantity; do { if (!_checkContractOnERC721Received(address(0), to, index++, _data)) { revert TransferToNonERC721ReceiverImplementer(); } } while (index < end); // Reentrancy protection. if (_currentIndex != end) revert(); } } } /** * @dev Equivalent to `_safeMint(to, quantity, '')`. */ function _safeMint(address to, uint256 quantity) internal virtual { _safeMint(to, quantity, ''); } // ============================================================= // BURN OPERATIONS // ============================================================= /** * @dev Equivalent to `_burn(tokenId, false)`. */ function _burn(uint256 tokenId) internal virtual { _burn(tokenId, false); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId, bool approvalCheck) internal virtual { uint256 prevOwnershipPacked = _packedOwnershipOf(tokenId); address from = address(uint160(prevOwnershipPacked)); (uint256 approvedAddressSlot, address approvedAddress) = _getApprovedSlotAndAddress(tokenId); if (approvalCheck) { // The nested ifs save around 20+ gas over a compound boolean condition. if (!_isSenderApprovedOrOwner(approvedAddress, from, _msgSenderERC721A())) if (!isApprovedForAll(from, _msgSenderERC721A())) revert TransferCallerNotOwnerNorApproved(); } _beforeTokenTransfers(from, address(0), tokenId, 1); // Clear approvals from the previous owner. assembly { if approvedAddress { // This is equivalent to `delete _tokenApprovals[tokenId]`. sstore(approvedAddressSlot, 0) } } // Underflow of the sender's balance is impossible because we check for // ownership above and the recipient's balance can't realistically overflow. // Counter overflow is incredibly unrealistic as `tokenId` would have to be 2**256. unchecked { // Updates: // - `balance -= 1`. // - `numberBurned += 1`. // // We can directly decrement the balance, and increment the number burned. // This is equivalent to `packed -= 1; packed += 1 << _BITPOS_NUMBER_BURNED;`. _packedAddressData[from] += (1 << _BITPOS_NUMBER_BURNED) - 1; // Updates: // - `address` to the last owner. // - `startTimestamp` to the timestamp of burning. // - `burned` to `true`. // - `nextInitialized` to `true`. _packedOwnerships[tokenId] = _packOwnershipData( from, (_BITMASK_BURNED | _BITMASK_NEXT_INITIALIZED) | _nextExtraData(from, address(0), prevOwnershipPacked) ); // If the next slot may not have been initialized (i.e. `nextInitialized == false`) . if (prevOwnershipPacked & _BITMASK_NEXT_INITIALIZED == 0) { uint256 nextTokenId = tokenId + 1; // If the next slot's address is zero and not burned (i.e. packed value is zero). if (_packedOwnerships[nextTokenId] == 0) { // If the next slot is within bounds. if (nextTokenId != _currentIndex) { // Initialize the next slot to maintain correctness for `ownerOf(tokenId + 1)`. _packedOwnerships[nextTokenId] = prevOwnershipPacked; } } } } emit Transfer(from, address(0), tokenId); _afterTokenTransfers(from, address(0), tokenId, 1); // Overflow not possible, as _burnCounter cannot be exceed _currentIndex times. unchecked { _burnCounter++; } } // ============================================================= // EXTRA DATA OPERATIONS // ============================================================= /** * @dev Directly sets the extra data for the ownership data `index`. */ function _setExtraDataAt(uint256 index, uint24 extraData) internal virtual { uint256 packed = _packedOwnerships[index]; if (packed == 0) revert OwnershipNotInitializedForExtraData(); uint256 extraDataCasted; // Cast `extraData` with assembly to avoid redundant masking. assembly { extraDataCasted := extraData } packed = (packed & _BITMASK_EXTRA_DATA_COMPLEMENT) | (extraDataCasted << _BITPOS_EXTRA_DATA); _packedOwnerships[index] = packed; } /** * @dev Called during each token transfer to set the 24bit `extraData` field. * Intended to be overridden by the cosumer contract. * * `previousExtraData` - the value of `extraData` before transfer. * * 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, `tokenId` will be burned by `from`. * - `from` and `to` are never both zero. */ function _extraData( address from, address to, uint24 previousExtraData ) internal view virtual returns (uint24) {} /** * @dev Returns the next extra data for the packed ownership data. * The returned result is shifted into position. */ function _nextExtraData( address from, address to, uint256 prevOwnershipPacked ) private view returns (uint256) { uint24 extraData = uint24(prevOwnershipPacked >> _BITPOS_EXTRA_DATA); return uint256(_extraData(from, to, extraData)) << _BITPOS_EXTRA_DATA; } // ============================================================= // OTHER OPERATIONS // ============================================================= /** * @dev Returns the message sender (defaults to `msg.sender`). * * If you are writing GSN compatible contracts, you need to override this function. */ function _msgSenderERC721A() internal view virtual returns (address) { return msg.sender; } /** * @dev Converts a uint256 to its ASCII string decimal representation. */ function _toString(uint256 value) internal pure virtual returns (string memory str) { assembly { // The maximum value of a uint256 contains 78 digits (1 byte per digit), but // we allocate 0xa0 bytes to keep the free memory pointer 32-byte word aligned. // We will need 1 word for the trailing zeros padding, 1 word for the length, // and 3 words for a maximum of 78 digits. Total: 5 * 0x20 = 0xa0. let m := add(mload(0x40), 0xa0) // Update the free memory pointer to allocate. mstore(0x40, m) // Assign the `str` to the end. str := sub(m, 0x20) // Zeroize the slot after the string. mstore(str, 0) // Cache the end of the memory to calculate the length later. let end := str // We write the string from rightmost digit to leftmost digit. // The following is essentially a do-while loop that also handles the zero case. // prettier-ignore for { let temp := value } 1 {} { str := sub(str, 1) // Write the character to the pointer. // The ASCII index of the '0' character is 48. mstore8(str, add(48, mod(temp, 10))) // Keep dividing `temp` until zero. temp := div(temp, 10) // prettier-ignore if iszero(temp) { break } } let length := sub(end, str) // Move the pointer 32 bytes leftwards to make room for the length. str := sub(str, 0x20) // Store the length. mstore(str, length) } } }
// SPDX-License-Identifier: MIT // ERC721A Contracts v4.2.3 // Creator: Chiru Labs pragma solidity ^0.8.4; /** * @dev Interface of ERC721A. */ interface IERC721A { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * The token does not exist. */ error ApprovalQueryForNonexistentToken(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * The token does not exist. */ error OwnerQueryForNonexistentToken(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from`. */ error TransferFromIncorrectOwner(); /** * Cannot safely transfer to a contract that does not implement the * ERC721Receiver interface. */ error TransferToNonERC721ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The token does not exist. */ error URIQueryForNonexistentToken(); /** * The `quantity` minted with ERC2309 exceeds the safety limit. */ error MintERC2309QuantityExceedsLimit(); /** * The `extraData` cannot be set on an unintialized ownership slot. */ error OwnershipNotInitializedForExtraData(); // ============================================================= // STRUCTS // ============================================================= struct TokenOwnership { // The address of the owner. address addr; // Stores the start time of ownership with minimal overhead for tokenomics. uint64 startTimestamp; // Whether the token has been burned. bool burned; // Arbitrary data similar to `startTimestamp` that can be set via {_extraData}. uint24 extraData; } // ============================================================= // TOKEN COUNTERS // ============================================================= /** * @dev Returns the total number of tokens in existence. * Burned tokens will reduce the count. * To get the total number of tokens minted, please see {_totalMinted}. */ function totalSupply() external view returns (uint256); // ============================================================= // IERC165 // ============================================================= /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * [EIP section](https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified) * to learn more about how these ids are created. * * This function call must use less than 30000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); // ============================================================= // IERC721 // ============================================================= /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables * (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in `owner`'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, * checking first that contract recipients are aware of the ERC721 protocol * to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move * this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement * {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external payable; /** * @dev Equivalent to `safeTransferFrom(from, to, tokenId, '')`. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external payable; /** * @dev Transfers `tokenId` 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 payable; /** * @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 payable; /** * @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); // ============================================================= // IERC721Metadata // ============================================================= /** * @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); // ============================================================= // IERC2309 // ============================================================= /** * @dev Emitted when tokens in `fromTokenId` to `toTokenId` * (inclusive) is transferred from `from` to `to`, as defined in the * [ERC2309](https://eips.ethereum.org/EIPS/eip-2309) standard. * * See {_mintERC2309} for more details. */ event ConsecutiveTransfer(uint256 indexed fromTokenId, uint256 toTokenId, address indexed from, address indexed to); }
{ "optimizer": { "enabled": true, "runs": 30000 }, "viaIR": true, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"ApprovalQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"MintERC2309QuantityExceedsLimit","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[],"name":"OwnerQueryForNonexistentToken","type":"error"},{"inputs":[],"name":"OwnershipNotInitializedForExtraData","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwner","type":"error"},{"inputs":[],"name":"TransferToNonERC721ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"inputs":[],"name":"URIQueryForNonexistentToken","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"BatchMetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"fromTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"toTokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"ConsecutiveTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"MetadataUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[],"name":"ADMIN","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"BURNER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MINTER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPDATER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"burnerBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentIndex","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"grantAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"minterMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fromTokenId","type":"uint256"},{"internalType":"uint256","name":"_toTokenId","type":"uint256"}],"name":"refreshMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"refreshMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"revokeAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"contract IRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"payable","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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bool","name":"","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IRouter","name":"_router","type":"address"}],"name":"setRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"setTargetId","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IWalletFamily","name":"_walletFamily","type":"address"}],"name":"setWalletfamily","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":[],"name":"targetId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokenOfOwner","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":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"walletfamily","outputs":[{"internalType":"contract IWalletFamily","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
6080806040523462000207576200001660c0604052565b601281527110541408115b9a9bde4814185cdcdc1bdc9d60721b60a052604051620000418162000223565b60048152630415045560e41b60208083019190915260008054336001600160a01b031982168117835591949291906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08680a38151916001600160401b038311620001f7575b620000c783620000c16004546200028e565b620002cb565b81601f8411600114620001675750620000fe949190836200015b575b50508160011b916000199060031b1c1916176004556200037d565b620001096001600255565b620001146001600c55565b6200011f3362000481565b6200012a336200054a565b6200013533620005ac565b62000140336200060e565b6200014b3362000670565b604051612ecb9081620009528239f35b015190503880620000e3565b600460005292947f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b93601f19871691905b828210620001de575050916001939186620000fe979410620001c4575b505050811b016004556200037d565b015160001960f88460031b161c19169055388080620001b5565b8060018697829497870151815501960194019062000198565b620002016200020c565b620000af565b600080fd5b50634e487b7160e01b600052604160045260246000fd5b604081019081106001600160401b038211176200023f57604052565b620002496200020c565b604052565b602081019081106001600160401b038211176200023f57604052565b601f909101601f19168101906001600160401b038211908210176200023f57604052565b90600182811c92168015620002c0575b6020831014620002aa57565b634e487b7160e01b600052602260045260246000fd5b91607f16916200029e565b601f8111620002d8575050565b6000906004825260208220906020601f850160051c8301941062000319575b601f0160051c01915b8281106200030d57505050565b81815560010162000300565b9092508290620002f7565b601f811162000331575050565b6000906005825260208220906020601f850160051c8301941062000372575b601f0160051c01915b8281106200036657505050565b81815560010162000359565b909250829062000350565b80519091906001600160401b03811162000471575b620003aa81620003a46005546200028e565b62000324565b602080601f8311600114620003e95750819293600092620003dd575b50508160011b916000199060031b1c191617600555565b015190503880620003c6565b6005600052601f198316949091907f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db0926000905b878210620004585750508360019596106200043e575b505050811b01600555565b015160001960f88460031b161c1916905538808062000433565b806001859682949686015181550195019301906200041d565b6200047b6200020c565b62000392565b6001600160a01b03811660009081527fd52cfefb3f6fd7766669e08a03d2ceb3243383019e3a5fed2a519df30ee55b92602052604081207fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec429060ff905b541615620004eb57505050565b8082526001602090815260408084206001600160a01b038616600090815292529020805460ff1916600117905533926001600160a01b0316917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d9080a4565b6001600160a01b03811660009081527ffe36a80dee87f02e45351a65c4bd3ccefd3fc5363e679b6e4b81a8004282b3fc602052604081207ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc99060ff90620004de565b6001600160a01b03811660009081527f193e3572123513c32b36f6267c30628a827495c35a3a55210b02c864b69a1fe2602052604081207f9667e80708b6eeeb0053fa0cca44e028ff548e2a9f029edfeac87c118b08b7c89060ff90620004de565b6001600160a01b03811660009081527f0345da471fed81e28f4ca5948c3071e559c89b9f6a2ea2196e8c3e85dbd1ab7d602052604081207fe7d07e22cc47e0674aa5610dfc0c7c09a0a3b7491679c731a125fba46498854e9060ff90620004de565b60409081519162000681836200024e565b60008084526002546001600160a01b03841680835260076020908152604080852080546801000000000000000101905583855260069091528320600160e11b4260a01b831717905591949160019182810191907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908289838180a483835b848103620007ad57505050156200079d57600255833b62000722575b5050505050565b6002549360001985019180805b62000751575b505050505050600254036200074e57808080806200071b565b80fd5b156200078e575b86620007716200076d8684870196866200089a565b1590565b6200077d57816200072f565b85516368d2bf6b60e11b8152600490fd5b85831062000758578062000735565b8351622e076360e81b8152600490fd5b80848b858180a4018490620006ff565b908160209103126200020757516001600160e01b031981168103620002075790565b9193929060018060a01b0316825260209360008584015260408301526080606083015280519081608084015260005b8281106200083157505060a09293506000838284010152601f8019910116010190565b81810186015184820160a0015285016200080e565b3d1562000895573d906001600160401b03821162000885575b6040519162000879601f8201601f1916602001846200026a565b82523d6000602084013e565b6200088f6200020c565b6200085f565b606090565b620008c560209160009394604051948580948193630a85bd0160e11b998a84523360048501620007df565b03926001600160a01b03165af1600091816200091a575b506200090c57620008ec62000846565b8051908162000907576040516368d2bf6b60e11b8152600490fd5b602001fd5b6001600160e01b0319161490565b6200094191925060203d811162000949575b6200093881836200026a565b810190620007bd565b9038620008dc565b503d6200092c56fe60806040526004361015610013575b600080fd5b60003560e01c806301ffc9a71461035b57806306fdde0314610352578063081812fc14610349578063095ea7b314610340578063118c4f131461033757806318160ddd1461032e5780631a8baec1146103255780631fffe2b01461031c57806321f314ca1461031357806323b872dd1461030a578063248a9ca31461030157806326987b60146102f8578063294cdf0d146102ef5780632a0acc6a146102e65780632d345670146102dd5780632f2ff15d146102d457806335bb3e16146102cb57806336568abe146102c257806340c10f19146102b957806342842e0e146102b0578063568583d5146102a75780636352211e1461029e57806369bfdcdf1461029557806370a082311461028c578063715018a61461028357806387fc5e061461027a5780638da5cb5b1461027157806391d148541461026857806394a686301461025f57806395d89b4114610256578063980b17d01461024d578063a217fddf14610244578063a22cb4651461023b578063b88d4fde14610232578063c0d7865514610229578063c87b56dd14610220578063d547741f14610217578063d95ba42f1461020e578063e985e9c514610205578063f2fde38b146101fc578063f887ea40146101f35763fe6d8124146101eb57600080fd5b61000e611a9a565b5061000e611a65565b5061000e611949565b5061000e6118d0565b5061000e611888565b5061000e61182b565b5061000e61170b565b5061000e6116a1565b5061000e611614565b5061000e611509565b5061000e6114e2565b5061000e611478565b5061000e6113b4565b5061000e611378565b5061000e611313565b5061000e6112de565b5061000e6112bf565b5061000e61123f565b5061000e611217565b5061000e6111c6565b5061000e611189565b5061000e611154565b5061000e611130565b5061000e610fbe565b5061000e610ef3565b5061000e610e5c565b5061000e610d21565b5061000e610be8565b5061000e610bac565b5061000e610b7c565b5061000e610b5d565b5061000e610b2d565b5061000e610b1a565b5061000e6108fe565b5061000e610896565b5061000e610874565b5061000e61082e565b5061000e6107f2565b5061000e610756565b5061000e6106bd565b5061000e61057d565b5061000e61038e565b7fffffffff0000000000000000000000000000000000000000000000000000000081160361000e57565b503461000e57602060031936011261000e5761041d7fffffffff000000000000000000000000000000000000000000000000000000006004356103d081610364565b167f7965db0b0000000000000000000000000000000000000000000000000000000081149081156104d9575b81156104af575b8115610421575b5060405190151581529081906020820190565b0390f35b7f01ffc9a700000000000000000000000000000000000000000000000000000000811491508115610485575b811561045b575b503861040a565b7f5b5e139f0000000000000000000000000000000000000000000000000000000091501438610454565b7f80ac58cd000000000000000000000000000000000000000000000000000000008114915061044d565b7f01ffc9a70000000000000000000000000000000000000000000000000000000081149150610403565b7f01ffc9a700000000000000000000000000000000000000000000000000000000811491506103fc565b60005b8381106105165750506000910152565b8181015183820152602001610506565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209361056281518092818752878088019101610503565b0116010190565b90602061057a928181520190610526565b90565b503461000e576000806003193601126106ba5760405190806004549060019180831c928082169283156106b0575b602092838610851461068357858852602088019490811561064457506001146105eb575b61041d876105df8189038261158a565b60405191829182610569565b600460005294509192917f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b83861061063357505050910190506105df8261041d38806105cf565b805485870152948201948101610617565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685525050505090151560051b0190506105df8261041d38806105cf565b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526022600452fd5b93607f16936105ab565b80fd5b503461000e57602060031936011261000e576004356106db816127d7565b1561070e576000526008602052602073ffffffffffffffffffffffffffffffffffffffff60406000205416604051908152f35b60046040517fcf4700e4000000000000000000000000000000000000000000000000000000008152fd5b73ffffffffffffffffffffffffffffffffffffffff81160361000e57565b50604060031936011261000e5761076e600435610738565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f5468697320746f6b656e206973205342542c20736f20746869732063616e206e60448201527f6f7420617070726f76616c2e00000000000000000000000000000000000000006064820152fd5b503461000e57600060031936011261000e5760206040517f9667e80708b6eeeb0053fa0cca44e028ff548e2a9f029edfeac87c118b08b7c88152f35b503461000e57600060031936011261000e5760207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600254600354900301604051908152f35b503461000e57602060031936011261000e5761088e611c33565b600435600c55005b503461000e57604060031936011261000e576004356108b481610738565b6024359067ffffffffffffffff9081831161000e573660238401121561000e57826004013591821161000e573660248360051b8501011161000e5760246108fc9301906122c5565b005b503461000e5760408060031936011261000e5760049081359161092083610738565b6024359161092c611d59565b805161093781611561565b600094858252600254908515610ac5576109718173ffffffffffffffffffffffffffffffffffffffff166000526007602052604060002090565b680100000000000000018702815401905560019173ffffffffffffffffffffffffffffffffffffffff821683881460e11b4260a01b1781176109bd836000526006602052604060002090565b558884808a85019480857fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef95868180a4015b848103610ab65750505015610a8e57600255803b610a0b578680f35b6002549586039180805b610a33575b50505050505050600254036106ba573880808080808680f35b15610a81575b87610a4f610a4b868487019686612bdc565b1590565b610a595781610a15565b8686517fd1a57ed6000000000000000000000000000000000000000000000000000000008152fd5b868310610a395780610a1a565b8585517f2e076300000000000000000000000000000000000000000000000000000000008152fd5b80848d858180a40185906109ef565b505050517fb562e8dd000000000000000000000000000000000000000000000000000000008152fd5b600319606091011261000e57600435610b0681610738565b90602435610b1381610738565b9060443590565b506108fc610b2736610aee565b91612525565b503461000e57602060031936011261000e5760043560005260016020526020600160406000200154604051908152f35b503461000e57600060031936011261000e576020600254604051908152f35b503461000e57602060031936011261000e576020610ba4600435610b9f81610738565b6123a5565b604051908152f35b503461000e57600060031936011261000e5760206040517fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec428152f35b503461000e57602060031936011261000e57600435610c0681610738565b610c0e611bb4565b73ffffffffffffffffffffffffffffffffffffffff811660009081527fd52cfefb3f6fd7766669e08a03d2ceb3243383019e3a5fed2a519df30ee55b9260205260408120549091907fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec429060ff16610c83578280f35b8083526001602052610cb882604085209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00815416905573ffffffffffffffffffffffffffffffffffffffff339216907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b8480a438808280f35b503461000e57604060031936011261000e57600435602435610d4281610738565b610d4a611c33565b610d767fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42831415612655565b600091808352600160205260ff610db083604086209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b541615610dbb578280f35b8083526001602052610df082604085209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a438808280f35b503461000e57602060031936011261000e57600435610e7a81610738565b610e82611bb4565b73ffffffffffffffffffffffffffffffffffffffff811660009081527fd52cfefb3f6fd7766669e08a03d2ceb3243383019e3a5fed2a519df30ee55b92602052604081209091907fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec429060ff90610db0565b503461000e57604060031936011261000e57602435610f1181610738565b3373ffffffffffffffffffffffffffffffffffffffff821603610f3a576108fc90600435611ad6565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152fd5b503461000e5760408060031936011261000e57600490813591610fe083610738565b60243591610fec611c33565b8051610ff781611561565b600094858252600254908515610ac5576110318173ffffffffffffffffffffffffffffffffffffffff166000526007602052604060002090565b680100000000000000018702815401905560019173ffffffffffffffffffffffffffffffffffffffff821683881460e11b4260a01b17811761107d836000526006602052604060002090565b558884808a85019480857fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef95868180a4015b8481036111215750505015610a8e57600255803b6110cb578680f35b6002549586039180805b6110f25750505050505050600254036106ba573880808080808680f35b15611114575b8761110a610a4b868487019686612bdc565b610a5957816110d5565b8683106110f85780610a1a565b80848d858180a40185906110af565b506108fc61113d36610aee565b906040519261114b84611561565b60008452612ac6565b503461000e57600060031936011261000e57602073ffffffffffffffffffffffffffffffffffffffff600b5416604051908152f35b503461000e57602060031936011261000e57602073ffffffffffffffffffffffffffffffffffffffff6111bd60043561271b565b16604051908152f35b503461000e57604060031936011261000e576111e0611dae565b60408051600435815260243560208201527f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c9190a1005b503461000e57602060031936011261000e576020610ba460043561123a81610738565b6126ba565b503461000e576000806003193601126106ba5761125a611bb4565b8073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461000e57600060031936011261000e576020600c54604051908152f35b503461000e57600060031936011261000e57602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b503461000e57604060031936011261000e57602060ff61136c60243561133881610738565b6004356000526001845260406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b54166040519015158152f35b503461000e57600060031936011261000e5760206040517fe7d07e22cc47e0674aa5610dfc0c7c09a0a3b7491679c731a125fba46498854e8152f35b503461000e576000806003193601126106ba5760405190806005549060019180831c9280821692831561146e575b602092838610851461068357858852602088019490811561064457506001146114155761041d876105df8189038261158a565b600560005294509192917f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db05b83861061145d57505050910190506105df8261041d38806105cf565b805485870152948201948101611441565b93607f16936113e2565b503461000e57602060031936011261000e5773ffffffffffffffffffffffffffffffffffffffff6004356114ab81610738565b6114b3611c33565b167fffffffffffffffffffffffff0000000000000000000000000000000000000000600b541617600b55600080f35b503461000e57600060031936011261000e57602060405160008152f35b8015150361000e57565b503461000e57604060031936011261000e57611526600435610738565b61076e6024356114ff565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6020810190811067ffffffffffffffff82111761157d57604052565b611585611531565b604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761157d57604052565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209267ffffffffffffffff8111611607575b01160190565b61160f611531565b611601565b50608060031936011261000e5760043561162d81610738565b60243561163981610738565b6064359167ffffffffffffffff831161000e573660238401121561000e57826004013591611666836115cb565b92611674604051948561158a565b808452366024828701011161000e5760208160009260246108fc9801838801378501015260443591612ac6565b503461000e57602060031936011261000e5773ffffffffffffffffffffffffffffffffffffffff6004356116d481610738565b6116dc611c33565b167fffffffffffffffffffffffff0000000000000000000000000000000000000000600a541617600a55600080f35b503461000e57602060031936011261000e57600435611729816127d7565b15611801576117b2600061041d9261176c73ffffffffffffffffffffffffffffffffffffffff600a541673ffffffffffffffffffffffffffffffffffffffff1690565b600c54916040518095819482937f92cb829d0000000000000000000000000000000000000000000000000000000084526004840160209093929193604081019481520152565b03915afa9081156117f4575b6000916117d3575b5060405191829182610569565b6117ee913d8091833e6117e6818361158a565b81019061241f565b386117c6565b6117fc61247e565b6117be565b60046040517fa14c4b50000000000000000000000000000000000000000000000000000000008152fd5b503461000e57604060031936011261000e576108fc60243560043561184f82610738565b611857611c33565b6118837fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42821415612655565b611ad6565b503461000e57602060031936011261000e576118a2611dae565b7ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce760206040516004358152a1005b503461000e57604060031936011261000e57602060ff61136c6004356118f581610738565b73ffffffffffffffffffffffffffffffffffffffff6024359161191783610738565b166000526009845260406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b503461000e57602060031936011261000e5760043561196781610738565b61196f611bb4565b73ffffffffffffffffffffffffffffffffffffffff80911680156119e1576000918254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b503461000e57600060031936011261000e57602073ffffffffffffffffffffffffffffffffffffffff600a5416604051908152f35b503461000e57600060031936011261000e5760206040517ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc98152f35b600090808252600160205260ff611b1084604085209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b5416611b1b57505050565b8082526001602052611b5083604084209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b73ffffffffffffffffffffffffffffffffffffffff3394169280a4565b73ffffffffffffffffffffffffffffffffffffffff600054163303611bd557565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b3360009081527fd52cfefb3f6fd7766669e08a03d2ceb3243383019e3a5fed2a519df30ee55b92602052604090205460ff1615611c6c57565b611d556048611d23611c7d33611f93565b611cf7611c88612055565b6040519485937f416363657373436f6e74726f6c3a206163636f756e74200000000000000000006020860152611cc8815180926020603789019101610503565b84017f206973206d697373696e6720726f6c652000000000000000000000000000000060378201520190611e03565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810183528261158a565b6040519182917f08c379a000000000000000000000000000000000000000000000000000000000835260048301610569565b0390fd5b3360009081527ffe36a80dee87f02e45351a65c4bd3ccefd3fc5363e679b6e4b81a8004282b3fc602052604090205460ff1615611d9257565b611d556048611d23611da333611f93565b611cf7611c886120f1565b3360009081527f0345da471fed81e28f4ca5948c3071e559c89b9f6a2ea2196e8c3e85dbd1ab7d602052604090205460ff1615611de757565b611d556048611d23611df833611f93565b611cf7611c8861218d565b90611e1660209282815194859201610503565b0190565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b604051906080820182811067ffffffffffffffff821117611e77575b604052604282526060366020840137565b611e7f611531565b611e66565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602090805115611ec2570190565b611e16611e84565b602190805160011015611ec2570190565b906020918051821015611eed57010190565b611ef5611e84565b010190565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff908015611f26570190565b611e16611e1a565b15611f3557565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b604051906060820182811067ffffffffffffffff821117612048575b604052602a825260403660208401376030611fc983611eb4565b536078611fd583611eca565b536029905b60018211611fed5761057a915015611f2e565b807f3031323334353637383961626364656600000000000000000000000000000000600f6120359316601081101561203b575b1a61202b8486611edb565b5360041c91611efa565b90611fda565b612043611e84565b612020565b612050611531565b611faf565b7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4261207e611e4a565b90603061208a83611eb4565b53607861209683611eca565b536041905b600182116120ae5761057a915015611f2e565b807f3031323334353637383961626364656600000000000000000000000000000000600f6120eb9316601081101561203b571a61202b8486611edb565b9061209b565b7ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc961211a611e4a565b90603061212683611eb4565b53607861213283611eca565b536041905b6001821161214a5761057a915015611f2e565b807f3031323334353637383961626364656600000000000000000000000000000000600f6121879316601081101561203b571a61202b8486611edb565b90612137565b7fe7d07e22cc47e0674aa5610dfc0c7c09a0a3b7491679c731a125fba46498854e6121b6611e4a565b9060306121c283611eb4565b5360786121ce83611eca565b536041905b600182116121e65761057a915015611f2e565b807f3031323334353637383961626364656600000000000000000000000000000000600f6122239316601081101561203b571a61202b8486611edb565b906121d3565b7f9667e80708b6eeeb0053fa0cca44e028ff548e2a9f029edfeac87c118b08b7c8612252611e4a565b90603061225e83611eb4565b53607861226a83611eca565b536041905b600182116122825761057a915015611f2e565b807f3031323334353637383961626364656600000000000000000000000000000000600f6122bf9316601081101561203b571a61202b8486611edb565b9061226f565b3360009081527f193e3572123513c32b36f6267c30628a827495c35a3a55210b02c864b69a1fe26020526040812054919392909160ff161561235b57815b838110612311575050505050565b8060051b82013573ffffffffffffffffffffffffffffffffffffffff806123378361271b565b1690871603612357579061234d61235292612d32565b612377565b612303565b8380fd5b611d556048611d2361236c33611f93565b611cf7611c88612229565b6001907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114611f26570190565b6123ae816126ba565b6123b9575b50600090565b6002549060005b8281106123ce5750506123b3565b6123d7816127d7565b806123f5575b6123ef576123ea90612377565b6123c0565b91505090565b5073ffffffffffffffffffffffffffffffffffffffff806124158361271b565b16908316146123dd565b60208183031261000e5780519067ffffffffffffffff821161000e570181601f8201121561000e578051612452816115cb565b92612460604051948561158a565b8184526020828401011161000e5761057a9160208085019101610503565b506040513d6000823e3d90fd5b9081602091031261000e575161057a816114ff565b5060846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f5468697320746f6b656e206973205342542c20736f20746869732063616e206e60448201527f6f74207472616e736665722e00000000000000000000000000000000000000006064820152fd5b9190612562612549600b5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff908181166125a1575b50811661dead14612598575050506125966124a0565b565b6125969261282b565b6040517ffc91a89700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152600191602090829060249082905afa908115612648575b60009161261a575b501515146126105738612580565b506125969261282b565b61263b915060203d8111612641575b612633818361158a565b81019061248b565b38612602565b503d612629565b61265061247e565b6125fa565b1561265c57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6e6f742061646d696e206f6e6c792e00000000000000000000000000000000006044820152fd5b73ffffffffffffffffffffffffffffffffffffffff1680156126f157600052600760205267ffffffffffffffff6040600020541690565b60046040517f8f4eb604000000000000000000000000000000000000000000000000000000008152fd5b808060011115612750575b60046040517fdf2d9b42000000000000000000000000000000000000000000000000000000008152fd5b600254811015612726576000526006602052604060002054907c01000000000000000000000000000000000000000000000000000000008216612726575b8115612798575090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9150016127d0816000526006602052604060002090565b549061278e565b8060011115908161281f575b816127ec575090565b905060005260066020527c0100000000000000000000000000000000000000000000000000000000604060002054161590565b600254811091506127e3565b906128358361271b565b73ffffffffffffffffffffffffffffffffffffffff808416928382841603612a9c5760008681526008602052604090208054909261288f73ffffffffffffffffffffffffffffffffffffffff881633908114908414171590565b612a0d575b82169586156129e35761291d936128d1926129d9575b5073ffffffffffffffffffffffffffffffffffffffff166000526007602052604060002090565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01905573ffffffffffffffffffffffffffffffffffffffff166000526007602052604060002090565b805460010190557c0200000000000000000000000000000000000000000000000000000000804260a01b85171761295e866000526006602052604060002090565b5581161561298f575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4565b600184016129a7816000526006602052604060002090565b54156129b4575b50612967565b60025481146129ae576129d1906000526006602052604060002090565b5538806129ae565b60009055386128aa565b60046040517fea553b34000000000000000000000000000000000000000000000000000000008152fd5b612a6d610a4b612a6633612a418b73ffffffffffffffffffffffffffffffffffffffff166000526009602052604060002090565b9073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b5460ff1690565b156128945760046040517f59c896be000000000000000000000000000000000000000000000000000000008152fd5b60046040517fa1148100000000000000000000000000000000000000000000000000000000008152fd5b929190612ad4828286612525565b803b612ae1575b50505050565b612aea93612cdb565b15612af85738808080612adb565b60046040517fd1a57ed6000000000000000000000000000000000000000000000000000000008152fd5b9081602091031261000e575161057a81610364565b61057a939273ffffffffffffffffffffffffffffffffffffffff6080931682526000602083015260408201528160608201520190610526565b909261057a949360809373ffffffffffffffffffffffffffffffffffffffff809216845216602083015260408201528160608201520190610526565b3d15612bd7573d90612bbd826115cb565b91612bcb604051938461158a565b82523d6000602084013e565b606090565b612c3360209173ffffffffffffffffffffffffffffffffffffffff939460006040519586809581947f150b7a02000000000000000000000000000000000000000000000000000000009a8b84523360048501612b37565b0393165af160009181612cab575b50612c8557612c4e612bac565b80519081612c805760046040517fd1a57ed6000000000000000000000000000000000000000000000000000000008152fd5b602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000161490565b612ccd91925060203d8111612cd4575b612cc5818361158a565b810190612b22565b9038612c41565b503d612cbb565b92602091612c3393600073ffffffffffffffffffffffffffffffffffffffff6040518097819682957f150b7a02000000000000000000000000000000000000000000000000000000009b8c85523360048601612b70565b6000612d3d8261271b565b73ffffffffffffffffffffffffffffffffffffffff811690612d6c846000526008602052604060002090815490565b612e8c575b50612d9c8273ffffffffffffffffffffffffffffffffffffffff166000526007602052604060002090565b6fffffffffffffffffffffffffffffffff81540190557c03000000000000000000000000000000000000000000000000000000004260a01b831717612deb856000526006602052604060002090565b557c0200000000000000000000000000000000000000000000000000000000811615612e42575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8280a4600160035401600355565b60018401612e5a816000526006602052604060002090565b5415612e67575b50612e12565b6002548114612e6157612e84906000526006602052604060002090565b553880612e61565b83905538612d7156fea26469706673582212208a0a6e4239f4932fac31bd29e41c1e7236fc2c90e482e2adbb216942eb86933e64736f6c63430008110033
Deployed Bytecode
0x60806040526004361015610013575b600080fd5b60003560e01c806301ffc9a71461035b57806306fdde0314610352578063081812fc14610349578063095ea7b314610340578063118c4f131461033757806318160ddd1461032e5780631a8baec1146103255780631fffe2b01461031c57806321f314ca1461031357806323b872dd1461030a578063248a9ca31461030157806326987b60146102f8578063294cdf0d146102ef5780632a0acc6a146102e65780632d345670146102dd5780632f2ff15d146102d457806335bb3e16146102cb57806336568abe146102c257806340c10f19146102b957806342842e0e146102b0578063568583d5146102a75780636352211e1461029e57806369bfdcdf1461029557806370a082311461028c578063715018a61461028357806387fc5e061461027a5780638da5cb5b1461027157806391d148541461026857806394a686301461025f57806395d89b4114610256578063980b17d01461024d578063a217fddf14610244578063a22cb4651461023b578063b88d4fde14610232578063c0d7865514610229578063c87b56dd14610220578063d547741f14610217578063d95ba42f1461020e578063e985e9c514610205578063f2fde38b146101fc578063f887ea40146101f35763fe6d8124146101eb57600080fd5b61000e611a9a565b5061000e611a65565b5061000e611949565b5061000e6118d0565b5061000e611888565b5061000e61182b565b5061000e61170b565b5061000e6116a1565b5061000e611614565b5061000e611509565b5061000e6114e2565b5061000e611478565b5061000e6113b4565b5061000e611378565b5061000e611313565b5061000e6112de565b5061000e6112bf565b5061000e61123f565b5061000e611217565b5061000e6111c6565b5061000e611189565b5061000e611154565b5061000e611130565b5061000e610fbe565b5061000e610ef3565b5061000e610e5c565b5061000e610d21565b5061000e610be8565b5061000e610bac565b5061000e610b7c565b5061000e610b5d565b5061000e610b2d565b5061000e610b1a565b5061000e6108fe565b5061000e610896565b5061000e610874565b5061000e61082e565b5061000e6107f2565b5061000e610756565b5061000e6106bd565b5061000e61057d565b5061000e61038e565b7fffffffff0000000000000000000000000000000000000000000000000000000081160361000e57565b503461000e57602060031936011261000e5761041d7fffffffff000000000000000000000000000000000000000000000000000000006004356103d081610364565b167f7965db0b0000000000000000000000000000000000000000000000000000000081149081156104d9575b81156104af575b8115610421575b5060405190151581529081906020820190565b0390f35b7f01ffc9a700000000000000000000000000000000000000000000000000000000811491508115610485575b811561045b575b503861040a565b7f5b5e139f0000000000000000000000000000000000000000000000000000000091501438610454565b7f80ac58cd000000000000000000000000000000000000000000000000000000008114915061044d565b7f01ffc9a70000000000000000000000000000000000000000000000000000000081149150610403565b7f01ffc9a700000000000000000000000000000000000000000000000000000000811491506103fc565b60005b8381106105165750506000910152565b8181015183820152602001610506565b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209361056281518092818752878088019101610503565b0116010190565b90602061057a928181520190610526565b90565b503461000e576000806003193601126106ba5760405190806004549060019180831c928082169283156106b0575b602092838610851461068357858852602088019490811561064457506001146105eb575b61041d876105df8189038261158a565b60405191829182610569565b600460005294509192917f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b83861061063357505050910190506105df8261041d38806105cf565b805485870152948201948101610617565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001685525050505090151560051b0190506105df8261041d38806105cf565b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526022600452fd5b93607f16936105ab565b80fd5b503461000e57602060031936011261000e576004356106db816127d7565b1561070e576000526008602052602073ffffffffffffffffffffffffffffffffffffffff60406000205416604051908152f35b60046040517fcf4700e4000000000000000000000000000000000000000000000000000000008152fd5b73ffffffffffffffffffffffffffffffffffffffff81160361000e57565b50604060031936011261000e5761076e600435610738565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f5468697320746f6b656e206973205342542c20736f20746869732063616e206e60448201527f6f7420617070726f76616c2e00000000000000000000000000000000000000006064820152fd5b503461000e57600060031936011261000e5760206040517f9667e80708b6eeeb0053fa0cca44e028ff548e2a9f029edfeac87c118b08b7c88152f35b503461000e57600060031936011261000e5760207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600254600354900301604051908152f35b503461000e57602060031936011261000e5761088e611c33565b600435600c55005b503461000e57604060031936011261000e576004356108b481610738565b6024359067ffffffffffffffff9081831161000e573660238401121561000e57826004013591821161000e573660248360051b8501011161000e5760246108fc9301906122c5565b005b503461000e5760408060031936011261000e5760049081359161092083610738565b6024359161092c611d59565b805161093781611561565b600094858252600254908515610ac5576109718173ffffffffffffffffffffffffffffffffffffffff166000526007602052604060002090565b680100000000000000018702815401905560019173ffffffffffffffffffffffffffffffffffffffff821683881460e11b4260a01b1781176109bd836000526006602052604060002090565b558884808a85019480857fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef95868180a4015b848103610ab65750505015610a8e57600255803b610a0b578680f35b6002549586039180805b610a33575b50505050505050600254036106ba573880808080808680f35b15610a81575b87610a4f610a4b868487019686612bdc565b1590565b610a595781610a15565b8686517fd1a57ed6000000000000000000000000000000000000000000000000000000008152fd5b868310610a395780610a1a565b8585517f2e076300000000000000000000000000000000000000000000000000000000008152fd5b80848d858180a40185906109ef565b505050517fb562e8dd000000000000000000000000000000000000000000000000000000008152fd5b600319606091011261000e57600435610b0681610738565b90602435610b1381610738565b9060443590565b506108fc610b2736610aee565b91612525565b503461000e57602060031936011261000e5760043560005260016020526020600160406000200154604051908152f35b503461000e57600060031936011261000e576020600254604051908152f35b503461000e57602060031936011261000e576020610ba4600435610b9f81610738565b6123a5565b604051908152f35b503461000e57600060031936011261000e5760206040517fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec428152f35b503461000e57602060031936011261000e57600435610c0681610738565b610c0e611bb4565b73ffffffffffffffffffffffffffffffffffffffff811660009081527fd52cfefb3f6fd7766669e08a03d2ceb3243383019e3a5fed2a519df30ee55b9260205260408120549091907fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec429060ff16610c83578280f35b8083526001602052610cb882604085209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00815416905573ffffffffffffffffffffffffffffffffffffffff339216907ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b8480a438808280f35b503461000e57604060031936011261000e57600435602435610d4281610738565b610d4a611c33565b610d767fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42831415612655565b600091808352600160205260ff610db083604086209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b541615610dbb578280f35b8083526001602052610df082604085209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b60017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905573ffffffffffffffffffffffffffffffffffffffff339216907f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a438808280f35b503461000e57602060031936011261000e57600435610e7a81610738565b610e82611bb4565b73ffffffffffffffffffffffffffffffffffffffff811660009081527fd52cfefb3f6fd7766669e08a03d2ceb3243383019e3a5fed2a519df30ee55b92602052604081209091907fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec429060ff90610db0565b503461000e57604060031936011261000e57602435610f1181610738565b3373ffffffffffffffffffffffffffffffffffffffff821603610f3a576108fc90600435611ad6565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152fd5b503461000e5760408060031936011261000e57600490813591610fe083610738565b60243591610fec611c33565b8051610ff781611561565b600094858252600254908515610ac5576110318173ffffffffffffffffffffffffffffffffffffffff166000526007602052604060002090565b680100000000000000018702815401905560019173ffffffffffffffffffffffffffffffffffffffff821683881460e11b4260a01b17811761107d836000526006602052604060002090565b558884808a85019480857fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef95868180a4015b8481036111215750505015610a8e57600255803b6110cb578680f35b6002549586039180805b6110f25750505050505050600254036106ba573880808080808680f35b15611114575b8761110a610a4b868487019686612bdc565b610a5957816110d5565b8683106110f85780610a1a565b80848d858180a40185906110af565b506108fc61113d36610aee565b906040519261114b84611561565b60008452612ac6565b503461000e57600060031936011261000e57602073ffffffffffffffffffffffffffffffffffffffff600b5416604051908152f35b503461000e57602060031936011261000e57602073ffffffffffffffffffffffffffffffffffffffff6111bd60043561271b565b16604051908152f35b503461000e57604060031936011261000e576111e0611dae565b60408051600435815260243560208201527f6bd5c950a8d8df17f772f5af37cb3655737899cbf903264b9795592da439661c9190a1005b503461000e57602060031936011261000e576020610ba460043561123a81610738565b6126ba565b503461000e576000806003193601126106ba5761125a611bb4565b8073ffffffffffffffffffffffffffffffffffffffff81547fffffffffffffffffffffffff000000000000000000000000000000000000000081168355167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b503461000e57600060031936011261000e576020600c54604051908152f35b503461000e57600060031936011261000e57602073ffffffffffffffffffffffffffffffffffffffff60005416604051908152f35b503461000e57604060031936011261000e57602060ff61136c60243561133881610738565b6004356000526001845260406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b54166040519015158152f35b503461000e57600060031936011261000e5760206040517fe7d07e22cc47e0674aa5610dfc0c7c09a0a3b7491679c731a125fba46498854e8152f35b503461000e576000806003193601126106ba5760405190806005549060019180831c9280821692831561146e575b602092838610851461068357858852602088019490811561064457506001146114155761041d876105df8189038261158a565b600560005294509192917f036b6384b5eca791c62761152d0c79bb0604c104a5fb6f4eb0703f3154bb3db05b83861061145d57505050910190506105df8261041d38806105cf565b805485870152948201948101611441565b93607f16936113e2565b503461000e57602060031936011261000e5773ffffffffffffffffffffffffffffffffffffffff6004356114ab81610738565b6114b3611c33565b167fffffffffffffffffffffffff0000000000000000000000000000000000000000600b541617600b55600080f35b503461000e57600060031936011261000e57602060405160008152f35b8015150361000e57565b503461000e57604060031936011261000e57611526600435610738565b61076e6024356114ff565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b6020810190811067ffffffffffffffff82111761157d57604052565b611585611531565b604052565b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761157d57604052565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f60209267ffffffffffffffff8111611607575b01160190565b61160f611531565b611601565b50608060031936011261000e5760043561162d81610738565b60243561163981610738565b6064359167ffffffffffffffff831161000e573660238401121561000e57826004013591611666836115cb565b92611674604051948561158a565b808452366024828701011161000e5760208160009260246108fc9801838801378501015260443591612ac6565b503461000e57602060031936011261000e5773ffffffffffffffffffffffffffffffffffffffff6004356116d481610738565b6116dc611c33565b167fffffffffffffffffffffffff0000000000000000000000000000000000000000600a541617600a55600080f35b503461000e57602060031936011261000e57600435611729816127d7565b15611801576117b2600061041d9261176c73ffffffffffffffffffffffffffffffffffffffff600a541673ffffffffffffffffffffffffffffffffffffffff1690565b600c54916040518095819482937f92cb829d0000000000000000000000000000000000000000000000000000000084526004840160209093929193604081019481520152565b03915afa9081156117f4575b6000916117d3575b5060405191829182610569565b6117ee913d8091833e6117e6818361158a565b81019061241f565b386117c6565b6117fc61247e565b6117be565b60046040517fa14c4b50000000000000000000000000000000000000000000000000000000008152fd5b503461000e57604060031936011261000e576108fc60243560043561184f82610738565b611857611c33565b6118837fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec42821415612655565b611ad6565b503461000e57602060031936011261000e576118a2611dae565b7ff8e1a15aba9398e019f0b49df1a4fde98ee17ae345cb5f6b5e2c27f5033e8ce760206040516004358152a1005b503461000e57604060031936011261000e57602060ff61136c6004356118f581610738565b73ffffffffffffffffffffffffffffffffffffffff6024359161191783610738565b166000526009845260406000209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b503461000e57602060031936011261000e5760043561196781610738565b61196f611bb4565b73ffffffffffffffffffffffffffffffffffffffff80911680156119e1576000918254827fffffffffffffffffffffffff00000000000000000000000000000000000000008216178455167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08380a380f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b503461000e57600060031936011261000e57602073ffffffffffffffffffffffffffffffffffffffff600a5416604051908152f35b503461000e57600060031936011261000e5760206040517ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc98152f35b600090808252600160205260ff611b1084604085209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b5416611b1b57505050565b8082526001602052611b5083604084209073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b73ffffffffffffffffffffffffffffffffffffffff3394169280a4565b73ffffffffffffffffffffffffffffffffffffffff600054163303611bd557565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b3360009081527fd52cfefb3f6fd7766669e08a03d2ceb3243383019e3a5fed2a519df30ee55b92602052604090205460ff1615611c6c57565b611d556048611d23611c7d33611f93565b611cf7611c88612055565b6040519485937f416363657373436f6e74726f6c3a206163636f756e74200000000000000000006020860152611cc8815180926020603789019101610503565b84017f206973206d697373696e6720726f6c652000000000000000000000000000000060378201520190611e03565b037fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0810183528261158a565b6040519182917f08c379a000000000000000000000000000000000000000000000000000000000835260048301610569565b0390fd5b3360009081527ffe36a80dee87f02e45351a65c4bd3ccefd3fc5363e679b6e4b81a8004282b3fc602052604090205460ff1615611d9257565b611d556048611d23611da333611f93565b611cf7611c886120f1565b3360009081527f0345da471fed81e28f4ca5948c3071e559c89b9f6a2ea2196e8c3e85dbd1ab7d602052604090205460ff1615611de757565b611d556048611d23611df833611f93565b611cf7611c8861218d565b90611e1660209282815194859201610503565b0190565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b604051906080820182811067ffffffffffffffff821117611e77575b604052604282526060366020840137565b611e7f611531565b611e66565b507f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b602090805115611ec2570190565b611e16611e84565b602190805160011015611ec2570190565b906020918051821015611eed57010190565b611ef5611e84565b010190565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff908015611f26570190565b611e16611e1a565b15611f3557565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b604051906060820182811067ffffffffffffffff821117612048575b604052602a825260403660208401376030611fc983611eb4565b536078611fd583611eca565b536029905b60018211611fed5761057a915015611f2e565b807f3031323334353637383961626364656600000000000000000000000000000000600f6120359316601081101561203b575b1a61202b8486611edb565b5360041c91611efa565b90611fda565b612043611e84565b612020565b612050611531565b611faf565b7fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4261207e611e4a565b90603061208a83611eb4565b53607861209683611eca565b536041905b600182116120ae5761057a915015611f2e565b807f3031323334353637383961626364656600000000000000000000000000000000600f6120eb9316601081101561203b571a61202b8486611edb565b9061209b565b7ff0887ba65ee2024ea881d91b74c2450ef19e1557f03bed3ea9f16b037cbe2dc961211a611e4a565b90603061212683611eb4565b53607861213283611eca565b536041905b6001821161214a5761057a915015611f2e565b807f3031323334353637383961626364656600000000000000000000000000000000600f6121879316601081101561203b571a61202b8486611edb565b90612137565b7fe7d07e22cc47e0674aa5610dfc0c7c09a0a3b7491679c731a125fba46498854e6121b6611e4a565b9060306121c283611eb4565b5360786121ce83611eca565b536041905b600182116121e65761057a915015611f2e565b807f3031323334353637383961626364656600000000000000000000000000000000600f6122239316601081101561203b571a61202b8486611edb565b906121d3565b7f9667e80708b6eeeb0053fa0cca44e028ff548e2a9f029edfeac87c118b08b7c8612252611e4a565b90603061225e83611eb4565b53607861226a83611eca565b536041905b600182116122825761057a915015611f2e565b807f3031323334353637383961626364656600000000000000000000000000000000600f6122bf9316601081101561203b571a61202b8486611edb565b9061226f565b3360009081527f193e3572123513c32b36f6267c30628a827495c35a3a55210b02c864b69a1fe26020526040812054919392909160ff161561235b57815b838110612311575050505050565b8060051b82013573ffffffffffffffffffffffffffffffffffffffff806123378361271b565b1690871603612357579061234d61235292612d32565b612377565b612303565b8380fd5b611d556048611d2361236c33611f93565b611cf7611c88612229565b6001907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8114611f26570190565b6123ae816126ba565b6123b9575b50600090565b6002549060005b8281106123ce5750506123b3565b6123d7816127d7565b806123f5575b6123ef576123ea90612377565b6123c0565b91505090565b5073ffffffffffffffffffffffffffffffffffffffff806124158361271b565b16908316146123dd565b60208183031261000e5780519067ffffffffffffffff821161000e570181601f8201121561000e578051612452816115cb565b92612460604051948561158a565b8184526020828401011161000e5761057a9160208085019101610503565b506040513d6000823e3d90fd5b9081602091031261000e575161057a816114ff565b5060846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602c60248201527f5468697320746f6b656e206973205342542c20736f20746869732063616e206e60448201527f6f74207472616e736665722e00000000000000000000000000000000000000006064820152fd5b9190612562612549600b5473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff908181166125a1575b50811661dead14612598575050506125966124a0565b565b6125969261282b565b6040517ffc91a89700000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84166004820152600191602090829060249082905afa908115612648575b60009161261a575b501515146126105738612580565b506125969261282b565b61263b915060203d8111612641575b612633818361158a565b81019061248b565b38612602565b503d612629565b61265061247e565b6125fa565b1561265c57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6e6f742061646d696e206f6e6c792e00000000000000000000000000000000006044820152fd5b73ffffffffffffffffffffffffffffffffffffffff1680156126f157600052600760205267ffffffffffffffff6040600020541690565b60046040517f8f4eb604000000000000000000000000000000000000000000000000000000008152fd5b808060011115612750575b60046040517fdf2d9b42000000000000000000000000000000000000000000000000000000008152fd5b600254811015612726576000526006602052604060002054907c01000000000000000000000000000000000000000000000000000000008216612726575b8115612798575090565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff9150016127d0816000526006602052604060002090565b549061278e565b8060011115908161281f575b816127ec575090565b905060005260066020527c0100000000000000000000000000000000000000000000000000000000604060002054161590565b600254811091506127e3565b906128358361271b565b73ffffffffffffffffffffffffffffffffffffffff808416928382841603612a9c5760008681526008602052604090208054909261288f73ffffffffffffffffffffffffffffffffffffffff881633908114908414171590565b612a0d575b82169586156129e35761291d936128d1926129d9575b5073ffffffffffffffffffffffffffffffffffffffff166000526007602052604060002090565b80547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01905573ffffffffffffffffffffffffffffffffffffffff166000526007602052604060002090565b805460010190557c0200000000000000000000000000000000000000000000000000000000804260a01b85171761295e866000526006602052604060002090565b5581161561298f575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef600080a4565b600184016129a7816000526006602052604060002090565b54156129b4575b50612967565b60025481146129ae576129d1906000526006602052604060002090565b5538806129ae565b60009055386128aa565b60046040517fea553b34000000000000000000000000000000000000000000000000000000008152fd5b612a6d610a4b612a6633612a418b73ffffffffffffffffffffffffffffffffffffffff166000526009602052604060002090565b9073ffffffffffffffffffffffffffffffffffffffff16600052602052604060002090565b5460ff1690565b156128945760046040517f59c896be000000000000000000000000000000000000000000000000000000008152fd5b60046040517fa1148100000000000000000000000000000000000000000000000000000000008152fd5b929190612ad4828286612525565b803b612ae1575b50505050565b612aea93612cdb565b15612af85738808080612adb565b60046040517fd1a57ed6000000000000000000000000000000000000000000000000000000008152fd5b9081602091031261000e575161057a81610364565b61057a939273ffffffffffffffffffffffffffffffffffffffff6080931682526000602083015260408201528160608201520190610526565b909261057a949360809373ffffffffffffffffffffffffffffffffffffffff809216845216602083015260408201528160608201520190610526565b3d15612bd7573d90612bbd826115cb565b91612bcb604051938461158a565b82523d6000602084013e565b606090565b612c3360209173ffffffffffffffffffffffffffffffffffffffff939460006040519586809581947f150b7a02000000000000000000000000000000000000000000000000000000009a8b84523360048501612b37565b0393165af160009181612cab575b50612c8557612c4e612bac565b80519081612c805760046040517fd1a57ed6000000000000000000000000000000000000000000000000000000008152fd5b602001fd5b7fffffffff00000000000000000000000000000000000000000000000000000000161490565b612ccd91925060203d8111612cd4575b612cc5818361158a565b810190612b22565b9038612c41565b503d612cbb565b92602091612c3393600073ffffffffffffffffffffffffffffffffffffffff6040518097819682957f150b7a02000000000000000000000000000000000000000000000000000000009b8c85523360048601612b70565b6000612d3d8261271b565b73ffffffffffffffffffffffffffffffffffffffff811690612d6c846000526008602052604060002090815490565b612e8c575b50612d9c8273ffffffffffffffffffffffffffffffffffffffff166000526007602052604060002090565b6fffffffffffffffffffffffffffffffff81540190557c03000000000000000000000000000000000000000000000000000000004260a01b831717612deb856000526006602052604060002090565b557c0200000000000000000000000000000000000000000000000000000000811615612e42575b507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8280a4600160035401600355565b60018401612e5a816000526006602052604060002090565b5415612e67575b50612e12565b6002548114612e6157612e84906000526006602052604060002090565b553880612e61565b83905538612d7156fea26469706673582212208a0a6e4239f4932fac31bd29e41c1e7236fc2c90e482e2adbb216942eb86933e64736f6c63430008110033
Loading...
Loading
Loading...
Loading
OVERVIEW
PANDAOでユーティリティを受けることができるパスポートになります。楽しもう!It will be a passport to receive utilities at PANDAO. Enjoy!Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.