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
Latest 25 from a total of 2,438 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Claim Passport | 18602918 | 406 days ago | IN | 0 ETH | 0.00049554 | ||||
Claim Passport | 17832817 | 514 days ago | IN | 0 ETH | 0.00109633 | ||||
Claim Passport | 17808239 | 517 days ago | IN | 0 ETH | 0.00312583 | ||||
Claim Passport | 17801918 | 518 days ago | IN | 0 ETH | 0.00197196 | ||||
Claim Passport | 17799583 | 518 days ago | IN | 0 ETH | 0.00238026 | ||||
Claim Passport | 17798014 | 518 days ago | IN | 0 ETH | 0.00122409 | ||||
Claim Passport | 17797899 | 518 days ago | IN | 0 ETH | 0.00140818 | ||||
Claim Passport | 17797817 | 518 days ago | IN | 0 ETH | 0.00121354 | ||||
Claim Passport | 17796694 | 519 days ago | IN | 0 ETH | 0.00056623 | ||||
Claim Passport | 17796692 | 519 days ago | IN | 0 ETH | 0.00058479 | ||||
Claim Passport | 17795888 | 519 days ago | IN | 0 ETH | 0.00144469 | ||||
Claim Passport | 17795783 | 519 days ago | IN | 0 ETH | 0.00125154 | ||||
Claim Passport | 17795723 | 519 days ago | IN | 0 ETH | 0.00056511 | ||||
Claim Passport | 17795692 | 519 days ago | IN | 0 ETH | 0.00171922 | ||||
Claim Passport | 17795602 | 519 days ago | IN | 0 ETH | 0.0014897 | ||||
Claim Passport | 17795594 | 519 days ago | IN | 0 ETH | 0.00142498 | ||||
Claim Passport | 17766503 | 523 days ago | IN | 0 ETH | 0.00076113 | ||||
Claim Passport | 17766483 | 523 days ago | IN | 0 ETH | 0.00074972 | ||||
Claim Passport | 17748770 | 525 days ago | IN | 0 ETH | 0.00061012 | ||||
Claim Passport | 17747290 | 526 days ago | IN | 0 ETH | 0.00058255 | ||||
Claim Passport | 17735225 | 527 days ago | IN | 0 ETH | 0.00161545 | ||||
Claim Passport | 17637246 | 541 days ago | IN | 0 ETH | 0.00184617 | ||||
Claim Passport | 17527389 | 556 days ago | IN | 0 ETH | 0.00120909 | ||||
Claim Passport | 17516507 | 558 days ago | IN | 0 ETH | 0.00132519 | ||||
Claim Passport | 17397939 | 575 days ago | IN | 0 ETH | 0.00223969 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
SalesStore
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 "./interface/IAPPEggs.sol"; import "./interface/IERC721Pass.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; contract SalesStore is AccessControl, Ownable, Pausable { using Address for address payable; bytes32 public constant ADMIN = keccak256('ADMIN'); constructor() { _grantRole(ADMIN, msg.sender); _pause(); } // ================================================================== // Structs // ================================================================== struct Sale { uint8 saleId; uint248 mintCost; uint256 maxSupply; bytes32 merkleRoot; } struct SalesRecord { uint8 id; uint248 amount; } // ================================================================== // Event // ================================================================== event ChangeSale(uint8 oldId, uint8 newId); // ================================================================== // Variables // ================================================================== address payable public withdrawAddress; Sale internal _currentSale; uint256 public soldCount = 0; mapping(address => SalesRecord) internal _salesRecordByBuyer; bool sbtSameMint = true; bool sbtPause; // default:false IAPPEggs public eggs; IERC721Pass public passport; // ================================================================== // Modifier // ================================================================== modifier isNotOverMaxSaleSupply(uint256 amount) { require( amount + soldCount <= _currentSale.maxSupply, "claim is over the max sale supply." ); _; } modifier isNotOverAllowedAmount(uint248 amount, uint248 allowedAmount) { require( getBuyCount() + amount <= allowedAmount, "claim is over allowed amount." ); _; } modifier enoughEth(uint256 amount) { require(msg.value >= _currentSale.mintCost * amount, "not enough eth."); _; } modifier hasRight( uint256 tokenId, uint248 allowedAmount, bytes32[] calldata merkleProof ) { bytes32 node = keccak256( // abi.encodePacked(msg.sender, "-", tokenId, "-", allowedAmount) abi.encodePacked(msg.sender, tokenId, allowedAmount) ); require( MerkleProof.verifyCalldata( merkleProof, _currentSale.merkleRoot, node ), "invalid proof." ); _; } function claim( uint256 tokenId, uint248 amount, uint248 allowedAmount, bytes32[] calldata merkleProof ) external payable whenNotPaused hasRight(tokenId, allowedAmount, merkleProof) isNotOverMaxSaleSupply(amount) enoughEth(amount) isNotOverAllowedAmount(amount, allowedAmount) { SalesRecord storage record = _salesRecordByBuyer[msg.sender]; if (record.id == _currentSale.saleId) { record.amount += amount; } else { record.id = _currentSale.saleId; record.amount = amount; } soldCount += amount; // PassportSBT if(sbtSameMint == true){ claimPassport(); } eggs.mint(msg.sender, tokenId, amount); } function claimPassport() public{ require(sbtPause == false,"PassportSBT is pause."); if(passport.balanceOf(msg.sender) == 0){ passport.minterMint(msg.sender,1); } } // ================================================================== // Functions // ================================================================== function getCurrentSale() external view virtual returns ( uint8, uint256, uint256 ) { return ( _currentSale.saleId, _currentSale.mintCost, _currentSale.maxSupply ); } function setCurrentSale(Sale calldata sale) external onlyRole(ADMIN) { uint8 oldId = _currentSale.saleId; _currentSale = sale; soldCount = 0; emit ChangeSale(oldId, sale.saleId); } function getBuyCount() public view returns (uint256) { SalesRecord storage record = _salesRecordByBuyer[msg.sender]; if (record.id == _currentSale.saleId) { return record.amount; } else { return 0; } } function getSbtTotalSupply() external view returns (uint256) { return passport.totalSupply(); } function withdraw() external onlyRole(ADMIN) { require( withdrawAddress != address(0), "withdraw address is 0 address." ); withdrawAddress.sendValue(address(this).balance); } function setWithdrawAddress(address payable value) external onlyRole(ADMIN) { withdrawAddress = value; } function setEggs(address value) external onlyRole(ADMIN) { eggs = IAPPEggs(value); } function setPassport(address value) external onlyRole(ADMIN) { passport = IERC721Pass(value); } function pause() external onlyRole(ADMIN) { _pause(); } function unpause() external onlyRole(ADMIN) { _unpause(); } function setSbtSameMint(bool _value) external onlyRole(ADMIN) { sbtSameMint = _value; } function setSbtPause(bool _value) external onlyRole(ADMIN) { sbtPause = _value; } // ================================================================== // override AccessControl // ================================================================== function grantRole(bytes32 role, address account) public override onlyOwner { _grantRole(role, account); } function revokeRole(bytes32 role, address account) public override onlyOwner { _revokeRole(role, 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.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata, errorMessage); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling * the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract. * * _Available since v4.8._ */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata, string memory errorMessage ) internal view returns (bytes memory) { if (success) { if (returndata.length == 0) { // only check isContract if the call was successful and the return data is empty // otherwise we already know that it was a contract require(isContract(target), "Address: call to non-contract"); } return returndata; } else { _revert(returndata, errorMessage); } } /** * @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason or using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { _revert(returndata, errorMessage); } } function _revert(bytes memory returndata, string memory errorMessage) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The tree and the proofs can be generated using our * https://github.com/OpenZeppelin/merkle-tree[JavaScript library]. * You will find a quickstart guide in the readme. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. * OpenZeppelin's JavaScript library generates merkle trees that are safe * against this attack out of the box. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be simultaneously proven to be a part of a merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and sibling nodes in `proof`. The reconstruction * proceeds by incrementally reconstructing all inner nodes by combining a leaf/inner node with either another * leaf/inner node or a proof sibling node, depending on whether each `proofFlags` item is true or false * respectively. * * CAUTION: Not all merkle trees admit multiproofs. To use multiproofs, it is sufficient to ensure that: 1) the tree * is complete (but not necessarily perfect), 2) the leaves to be proven are in the opposite order they are in the * tree (i.e., as seen from right to left starting at the deepest layer and continuing at the next layer). * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof}. * * CAUTION: Not all merkle trees admit multiproofs. See {processMultiProof} for details. * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.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 IAPPEggs { function mint( address to, uint256 id, uint256 amount ) external; function burn( address from, uint256 id, uint256 amount ) external; }
// 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: UNLICENSED pragma solidity ^0.8.17; import "./IEnjoyPassport.sol"; interface IERC721Pass is IEnjoyPassport{ function ownerOf(uint256 tokenId) external view returns(address); function balanceOf(address owner) external view returns (uint256); function totalSupply() external view returns (uint256); }
{ "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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"oldId","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"newId","type":"uint8"}],"name":"ChangeSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"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":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"ADMIN","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":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint248","name":"amount","type":"uint248"},{"internalType":"uint248","name":"allowedAmount","type":"uint248"},{"internalType":"bytes32[]","name":"merkleProof","type":"bytes32[]"}],"name":"claim","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"claimPassport","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"eggs","outputs":[{"internalType":"contract IAPPEggs","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBuyCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getCurrentSale","outputs":[{"internalType":"uint8","name":"","type":"uint8"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getSbtTotalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"passport","outputs":[{"internalType":"contract IERC721Pass","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","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":[{"components":[{"internalType":"uint8","name":"saleId","type":"uint8"},{"internalType":"uint248","name":"mintCost","type":"uint248"},{"internalType":"uint256","name":"maxSupply","type":"uint256"},{"internalType":"bytes32","name":"merkleRoot","type":"bytes32"}],"internalType":"struct SalesStore.Sale","name":"sale","type":"tuple"}],"name":"setCurrentSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"value","type":"address"}],"name":"setEggs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"value","type":"address"}],"name":"setPassport","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_value","type":"bool"}],"name":"setSbtPause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_value","type":"bool"}],"name":"setSbtSameMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"value","type":"address"}],"name":"setWithdrawAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"soldCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060408181523461017b57600180549260009190336001600160a01b0386167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08580a360ff60a01b19948533169060018060a81b0319161782558260065560ff1992828460085416176008557fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec4290818152602094818652868220338352865260ff878320541615610133575b50505081549060ff8260a01c166100fe57507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2589394600160a01b91161790558251338152a151611f5690816101818239f35b62461bcd60e51b815260048101849052601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606490fd5b8282528186528682203383528652848783209182541617905533917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d339280a43880806100ac565b600080fdfe608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a7146114b1575080631581b6001461147d57806317ba9c4d146114495780632483415f146113ed578063248a9ca3146113c15780632a0acc6a146113865780632f2ff15d146112bd57806336568abe146111f657806339f9c82c146111d85780633ab1a494146111715780633ccfd60b14610f855780633f4ba83a14610ead57806345c1afc314610dda5780634de034d014610d325780635c64bb7214610d005780635c975abb14610cda5780636c670d7014610c76578063715018a614610bf65780638456cb5914610b695780638da5cb5b14610b355780638f10fd4514610b1257806391d1485414610abe57806392f6ed3a14610a67578063a217fddf14610a4b578063b1a6bcc0146109e0578063c7504230146109c7578063d547741f14610997578063e33f76cf14610960578063ecd26b88146102865763f2fde38b1461016b57600080fd5b346102835760206003193601126102835761018461157d565b61018c611640565b73ffffffffffffffffffffffffffffffffffffffff8091169081156101ff57600154827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b80fd5b506080600319360112610283577effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6024351660243503610283576044357effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116810361095c5767ffffffffffffffff6064351161095c5736602360643501121561095c5767ffffffffffffffff606435600401351161095c573660246064356004013560051b60643501011161095c5761033c61176b565b6040513360601b602082015260043560348201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008260081b1660548201526053815280608081011067ffffffffffffffff60808301111761092f57608081016040526020815191012060055490835b6064356004013581106108a1575003610843576103ee6006547effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6024351661172f565b600454106107bf57600354906024357effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600883901c818102918115918304141715610792573410610734577effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1661048e7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60243516610489611ef3565b61172f565b116106d65733825260076020526040822060ff815492168060ff8416146000146106a2575090507effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60243516815460081c01907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8211610675579061053d919060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083549260081b169116179055565b61056c7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6024351660065461172f565b600655600160ff60085416151514610668575b8073ffffffffffffffffffffffffffffffffffffffff60085460101c16803b156106655781906064604051809481937f156e29f600000000000000000000000000000000000000000000000000000000835233600484015260043560248401527effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6024351660448401525af1801561065a57610618575080f35b67ffffffffffffffff811161062d5760405280f35b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6040513d84823e3d90fd5b50fd5b6106706117d8565b61057f565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b60ff1660243560081b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00161790555061053d565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f636c61696d206973206f76657220616c6c6f77656420616d6f756e742e0000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6e6f7420656e6f756768206574682e00000000000000000000000000000000006044820152fd5b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f636c61696d206973206f76657220746865206d61782073616c6520737570706c60448201527f792e0000000000000000000000000000000000000000000000000000000000006064820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f696e76616c69642070726f6f662e0000000000000000000000000000000000006044820152fd5b9060248260051b60643501013590818110600014610920578552602052604084205b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146108f3576001016103ac565b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b908552602052604084206108c3565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b5080fd5b5034610283578060031936011261028357602073ffffffffffffffffffffffffffffffffffffffff60085460101c16604051908152f35b5034610283576040600319360112610283576109c46109b4611555565b6109bc611640565b6004356115a0565b80f35b50346102835780600319360112610283576109c46117d8565b5034610283576020600319360112610283576109fa61157d565b610a0261195d565b7fffffffffffffffffffff0000000000000000000000000000000000000000ffff75ffffffffffffffffffffffffffffffffffffffff00006008549260101b1691161760085580f35b5034610283578060031936011261028357602090604051908152f35b50346102835760206003193601126102835760043580151580910361095c57610a8e61195d565b60ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff006008541691161760085580f35b50346102835760406003193601126102835760ff6040602092610adf611555565b600435825281855273ffffffffffffffffffffffffffffffffffffffff8383209116825284522054166040519015158152f35b50346102835780600319360112610283576020610b2d611ef3565b604051908152f35b5034610283578060031936011261028357602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b5034610283578060031936011261028357610b8261195d565b610b8a61176b565b740100000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff60015416176001557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a180f35b5034610283578060031936011261028357610c0f611640565b8073ffffffffffffffffffffffffffffffffffffffff6001547fffffffffffffffffffffffff00000000000000000000000000000000000000008116600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b50346102835760206003193601126102835773ffffffffffffffffffffffffffffffffffffffff610ca561157d565b610cad61195d565b167fffffffffffffffffffffffff0000000000000000000000000000000000000000600954161760095580f35b5034610283578060031936011261028357602060ff60015460a01c166040519015158152f35b503461028357806003193601126102835760606003546004546040519160ff8116835260081c60208301526040820152f35b50346102835780600319360112610283576004602073ffffffffffffffffffffffffffffffffffffffff60095416604051928380927f18160ddd0000000000000000000000000000000000000000000000000000000082525afa90811561065a578291610da5575b602082604051908152f35b90506020813d8211610dd2575b81610dbf602093836116bf565b8101031261095c57602091505138610d9a565b3d9150610db2565b503461028357608060031936011261028357610df461195d565b60ff6003541660ff610e0461194d565b1690602435907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82168203610ea9577f75e3689da7799229d232f2c15fc530f1a386e47a961aea8ccc86ed74cfb4bd4f927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0060409360081b16176003556044356004556064356005558360065560ff610e9a61194d565b8351928352166020820152a180f35b8380fd5b5034610283578060031936011261028357610ec661195d565b60015460ff8160a01c1615610f27577fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff166001557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a180f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152fd5b5034610283578060031936011261028357610f9e61195d565b73ffffffffffffffffffffffffffffffffffffffff6002541680156111135747908147106110b5578280809381935af13d156110b0573d67ffffffffffffffff811161092f576040519061101a60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836116bf565b81528260203d92013e5b1561102c5780f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152fd5b611024565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f77697468647261772061646472657373206973203020616464726573732e00006044820152fd5b50346102835760206003193601126102835760043573ffffffffffffffffffffffffffffffffffffffff811680910361095c576111ac61195d565b7fffffffffffffffffffffffff0000000000000000000000000000000000000000600254161760025580f35b50346102835780600319360112610283576020600654604051908152f35b503461028357604060031936011261028357611210611555565b3373ffffffffffffffffffffffffffffffffffffffff821603611239576109c4906004356115a0565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152fd5b5034610283576040600319360112610283576004356112da611555565b6112e2611640565b8183528260205273ffffffffffffffffffffffffffffffffffffffff6040842091169081845260205260ff6040842054161561131c578280f35b81835282602052604083208184526020526040832060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905533917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a438808280f35b503461028357806003193601126102835760206040517fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec428152f35b503461028357602060031936011261028357600160406020926004358152808452200154604051908152f35b50346102835760206003193601126102835760043580151580910361095c5761141461195d565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff61ff006008549260081b1691161760085580f35b5034610283578060031936011261028357602073ffffffffffffffffffffffffffffffffffffffff60095416604051908152f35b5034610283578060031936011261028357602073ffffffffffffffffffffffffffffffffffffffff60025416604051908152f35b90503461095c57602060031936011261095c576004357fffffffff00000000000000000000000000000000000000000000000000000000811680910361155157602092507f7965db0b000000000000000000000000000000000000000000000000000000008114908115611527575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501438611520565b8280fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361157857565b600080fd5b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361157857565b906000918083528260205273ffffffffffffffffffffffffffffffffffffffff6040842092169182845260205260ff6040842054166115de57505050565b8083528260205260408320828452602052604083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b339380a4565b73ffffffffffffffffffffffffffffffffffffffff60015416330361166157565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761170057604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b9190820180921161173c57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60ff60015460a01c1661177a57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152fd5b60ff60085460081c166118ef5773ffffffffffffffffffffffffffffffffffffffff600954166040517f70a08231000000000000000000000000000000000000000000000000000000008152336004820152602081602481855afa9081156118b2576000916118be575b501561184b5750565b803b1561157857600080916044604051809481937f21f314ca000000000000000000000000000000000000000000000000000000008352336004840152600160248401525af180156118b25761189e5750565b67ffffffffffffffff811161170057604052565b6040513d6000823e3d90fd5b906020823d82116118e7575b816118d7602093836116bf565b8101031261028357505138611842565b3d91506118ca565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f50617373706f72745342542069732070617573652e00000000000000000000006044820152fd5b60043560ff811681036115785790565b3360009081527f5cbfc8ee58ca47855df7bcf648dd304ddb6b932f9b87878bdf6318d7ec7ee5b760209081526040808320547fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec429060ff16156119bf5750505050565b81519367ffffffffffffffff336060870182811188821017611e63578552602a87528587019385368637875115611e365760308553875191600192831015611e0957607860218a015360295b838111611d425750611ce65790855192608084019084821090821117611cb957865260428352868301936060368637835115611c8c57603085538351821015611c8c5790607860218501536041915b818311611bc157505050611b655794611b5c84611b1e60487fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe096601f96611b0f9b60449b9a519c8d93611ada8d86019a7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008c525180926037880190611e90565b8401917f206973206d697373696e6720726f6c6520000000000000000000000000000000603784015251809386840190611e90565b0103602881018b5201896116bf565b519687957f08c379a0000000000000000000000000000000000000000000000000000000008752600487015251809281602488015287870190611e90565b01168101030190fd5b6064858551907f08c379a000000000000000000000000000000000000000000000000000000000825280600483015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b909192600f81166010811015611c5f577f3031323334353637383961626364656600000000000000000000000000000000901a611bfe8587611eb3565b5360041c928015611c32577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019190611a5a565b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526032600452fd5b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6064878751907f08c379a000000000000000000000000000000000000000000000000000000000825280600483015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b90600f81166010811015611ddc577f3031323334353637383961626364656600000000000000000000000000000000901a611d7d838c611eb3565b5360041c908015611daf577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01611a0b565b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b6024877f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b60005b838110611ea35750506000910152565b8181015183820152602001611e93565b908151811015611ec4570160200190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b33600052600760205260406000205460ff6003541660ff821614600014611f1a5760081c90565b5060009056fea2646970667358221220a3809d31d0049f18585ffdde259efbe1c33fd3d84bc00953da3ac044b21c720064736f6c63430008110033
Deployed Bytecode
0x608080604052600436101561001357600080fd5b600090813560e01c90816301ffc9a7146114b1575080631581b6001461147d57806317ba9c4d146114495780632483415f146113ed578063248a9ca3146113c15780632a0acc6a146113865780632f2ff15d146112bd57806336568abe146111f657806339f9c82c146111d85780633ab1a494146111715780633ccfd60b14610f855780633f4ba83a14610ead57806345c1afc314610dda5780634de034d014610d325780635c64bb7214610d005780635c975abb14610cda5780636c670d7014610c76578063715018a614610bf65780638456cb5914610b695780638da5cb5b14610b355780638f10fd4514610b1257806391d1485414610abe57806392f6ed3a14610a67578063a217fddf14610a4b578063b1a6bcc0146109e0578063c7504230146109c7578063d547741f14610997578063e33f76cf14610960578063ecd26b88146102865763f2fde38b1461016b57600080fd5b346102835760206003193601126102835761018461157d565b61018c611640565b73ffffffffffffffffffffffffffffffffffffffff8091169081156101ff57600154827fffffffffffffffffffffffff0000000000000000000000000000000000000000821617600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152fd5b80fd5b506080600319360112610283577effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6024351660243503610283576044357effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8116810361095c5767ffffffffffffffff6064351161095c5736602360643501121561095c5767ffffffffffffffff606435600401351161095c573660246064356004013560051b60643501011161095c5761033c61176b565b6040513360601b602082015260043560348201527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff008260081b1660548201526053815280608081011067ffffffffffffffff60808301111761092f57608081016040526020815191012060055490835b6064356004013581106108a1575003610843576103ee6006547effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6024351661172f565b600454106107bf57600354906024357effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600883901c818102918115918304141715610792573410610734577effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1661048e7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60243516610489611ef3565b61172f565b116106d65733825260076020526040822060ff815492168060ff8416146000146106a2575090507effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff60243516815460081c01907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8211610675579061053d919060ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0083549260081b169116179055565b61056c7effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6024351660065461172f565b600655600160ff60085416151514610668575b8073ffffffffffffffffffffffffffffffffffffffff60085460101c16803b156106655781906064604051809481937f156e29f600000000000000000000000000000000000000000000000000000000835233600484015260043560248401527effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff6024351660448401525af1801561065a57610618575080f35b67ffffffffffffffff811161062d5760405280f35b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6040513d84823e3d90fd5b50fd5b6106706117d8565b61057f565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b60ff1660243560081b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00161790555061053d565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f636c61696d206973206f76657220616c6c6f77656420616d6f756e742e0000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600f60248201527f6e6f7420656e6f756768206574682e00000000000000000000000000000000006044820152fd5b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f636c61696d206973206f76657220746865206d61782073616c6520737570706c60448201527f792e0000000000000000000000000000000000000000000000000000000000006064820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152600e60248201527f696e76616c69642070726f6f662e0000000000000000000000000000000000006044820152fd5b9060248260051b60643501013590818110600014610920578552602052604084205b907fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff81146108f3576001016103ac565b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b908552602052604084206108c3565b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b5080fd5b5034610283578060031936011261028357602073ffffffffffffffffffffffffffffffffffffffff60085460101c16604051908152f35b5034610283576040600319360112610283576109c46109b4611555565b6109bc611640565b6004356115a0565b80f35b50346102835780600319360112610283576109c46117d8565b5034610283576020600319360112610283576109fa61157d565b610a0261195d565b7fffffffffffffffffffff0000000000000000000000000000000000000000ffff75ffffffffffffffffffffffffffffffffffffffff00006008549260101b1691161760085580f35b5034610283578060031936011261028357602090604051908152f35b50346102835760206003193601126102835760043580151580910361095c57610a8e61195d565b60ff7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff006008541691161760085580f35b50346102835760406003193601126102835760ff6040602092610adf611555565b600435825281855273ffffffffffffffffffffffffffffffffffffffff8383209116825284522054166040519015158152f35b50346102835780600319360112610283576020610b2d611ef3565b604051908152f35b5034610283578060031936011261028357602073ffffffffffffffffffffffffffffffffffffffff60015416604051908152f35b5034610283578060031936011261028357610b8261195d565b610b8a61176b565b740100000000000000000000000000000000000000007fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff60015416176001557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586020604051338152a180f35b5034610283578060031936011261028357610c0f611640565b8073ffffffffffffffffffffffffffffffffffffffff6001547fffffffffffffffffffffffff00000000000000000000000000000000000000008116600155167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b50346102835760206003193601126102835773ffffffffffffffffffffffffffffffffffffffff610ca561157d565b610cad61195d565b167fffffffffffffffffffffffff0000000000000000000000000000000000000000600954161760095580f35b5034610283578060031936011261028357602060ff60015460a01c166040519015158152f35b503461028357806003193601126102835760606003546004546040519160ff8116835260081c60208301526040820152f35b50346102835780600319360112610283576004602073ffffffffffffffffffffffffffffffffffffffff60095416604051928380927f18160ddd0000000000000000000000000000000000000000000000000000000082525afa90811561065a578291610da5575b602082604051908152f35b90506020813d8211610dd2575b81610dbf602093836116bf565b8101031261095c57602091505138610d9a565b3d9150610db2565b503461028357608060031936011261028357610df461195d565b60ff6003541660ff610e0461194d565b1690602435907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82168203610ea9577f75e3689da7799229d232f2c15fc530f1a386e47a961aea8ccc86ed74cfb4bd4f927fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0060409360081b16176003556044356004556064356005558360065560ff610e9a61194d565b8351928352166020820152a180f35b8380fd5b5034610283578060031936011261028357610ec661195d565b60015460ff8160a01c1615610f27577fffffffffffffffffffffff00ffffffffffffffffffffffffffffffffffffffff166001557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa6020604051338152a180f35b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601460248201527f5061757361626c653a206e6f74207061757365640000000000000000000000006044820152fd5b5034610283578060031936011261028357610f9e61195d565b73ffffffffffffffffffffffffffffffffffffffff6002541680156111135747908147106110b5578280809381935af13d156110b0573d67ffffffffffffffff811161092f576040519061101a60207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f84011601836116bf565b81528260203d92013e5b1561102c5780f35b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152fd5b611024565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152fd5b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601e60248201527f77697468647261772061646472657373206973203020616464726573732e00006044820152fd5b50346102835760206003193601126102835760043573ffffffffffffffffffffffffffffffffffffffff811680910361095c576111ac61195d565b7fffffffffffffffffffffffff0000000000000000000000000000000000000000600254161760025580f35b50346102835780600319360112610283576020600654604051908152f35b503461028357604060031936011261028357611210611555565b3373ffffffffffffffffffffffffffffffffffffffff821603611239576109c4906004356115a0565b60846040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201527f20726f6c657320666f722073656c6600000000000000000000000000000000006064820152fd5b5034610283576040600319360112610283576004356112da611555565b6112e2611640565b8183528260205273ffffffffffffffffffffffffffffffffffffffff6040842091169081845260205260ff6040842054161561131c578280f35b81835282602052604083208184526020526040832060017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0082541617905533917f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d8480a438808280f35b503461028357806003193601126102835760206040517fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec428152f35b503461028357602060031936011261028357600160406020926004358152808452200154604051908152f35b50346102835760206003193601126102835760043580151580910361095c5761141461195d565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff61ff006008549260081b1691161760085580f35b5034610283578060031936011261028357602073ffffffffffffffffffffffffffffffffffffffff60095416604051908152f35b5034610283578060031936011261028357602073ffffffffffffffffffffffffffffffffffffffff60025416604051908152f35b90503461095c57602060031936011261095c576004357fffffffff00000000000000000000000000000000000000000000000000000000811680910361155157602092507f7965db0b000000000000000000000000000000000000000000000000000000008114908115611527575b5015158152f35b7f01ffc9a70000000000000000000000000000000000000000000000000000000091501438611520565b8280fd5b6024359073ffffffffffffffffffffffffffffffffffffffff8216820361157857565b600080fd5b6004359073ffffffffffffffffffffffffffffffffffffffff8216820361157857565b906000918083528260205273ffffffffffffffffffffffffffffffffffffffff6040842092169182845260205260ff6040842054166115de57505050565b8083528260205260408320828452602052604083207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0081541690557ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b339380a4565b73ffffffffffffffffffffffffffffffffffffffff60015416330361166157565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602060248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152fd5b90601f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0910116810190811067ffffffffffffffff82111761170057604052565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b9190820180921161173c57565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60ff60015460a01c1661177a57565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601060248201527f5061757361626c653a20706175736564000000000000000000000000000000006044820152fd5b60ff60085460081c166118ef5773ffffffffffffffffffffffffffffffffffffffff600954166040517f70a08231000000000000000000000000000000000000000000000000000000008152336004820152602081602481855afa9081156118b2576000916118be575b501561184b5750565b803b1561157857600080916044604051809481937f21f314ca000000000000000000000000000000000000000000000000000000008352336004840152600160248401525af180156118b25761189e5750565b67ffffffffffffffff811161170057604052565b6040513d6000823e3d90fd5b906020823d82116118e7575b816118d7602093836116bf565b8101031261028357505138611842565b3d91506118ca565b60646040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601560248201527f50617373706f72745342542069732070617573652e00000000000000000000006044820152fd5b60043560ff811681036115785790565b3360009081527f5cbfc8ee58ca47855df7bcf648dd304ddb6b932f9b87878bdf6318d7ec7ee5b760209081526040808320547fdf8b4c520ffe197c5343c6f5aec59570151ef9a492f2c624fd45ddde6135ec429060ff16156119bf5750505050565b81519367ffffffffffffffff336060870182811188821017611e63578552602a87528587019385368637875115611e365760308553875191600192831015611e0957607860218a015360295b838111611d425750611ce65790855192608084019084821090821117611cb957865260428352868301936060368637835115611c8c57603085538351821015611c8c5790607860218501536041915b818311611bc157505050611b655794611b5c84611b1e60487fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe096601f96611b0f9b60449b9a519c8d93611ada8d86019a7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008c525180926037880190611e90565b8401917f206973206d697373696e6720726f6c6520000000000000000000000000000000603784015251809386840190611e90565b0103602881018b5201896116bf565b519687957f08c379a0000000000000000000000000000000000000000000000000000000008752600487015251809281602488015287870190611e90565b01168101030190fd5b6064858551907f08c379a000000000000000000000000000000000000000000000000000000000825280600483015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b909192600f81166010811015611c5f577f3031323334353637383961626364656600000000000000000000000000000000901a611bfe8587611eb3565b5360041c928015611c32577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff019190611a5a565b6024827f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b6024837f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b807f4e487b7100000000000000000000000000000000000000000000000000000000602492526032600452fd5b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b6064878751907f08c379a000000000000000000000000000000000000000000000000000000000825280600483015260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152fd5b90600f81166010811015611ddc577f3031323334353637383961626364656600000000000000000000000000000000901a611d7d838c611eb3565b5360041c908015611daf577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff01611a0b565b6024867f4e487b710000000000000000000000000000000000000000000000000000000081526011600452fd5b6024877f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b6024857f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526032600452fd5b6024847f4e487b710000000000000000000000000000000000000000000000000000000081526041600452fd5b60005b838110611ea35750506000910152565b8181015183820152602001611e93565b908151811015611ec4570160200190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b33600052600760205260406000205460ff6003541660ff821614600014611f1a5760081c90565b5060009056fea2646970667358221220a3809d31d0049f18585ffdde259efbe1c33fd3d84bc00953da3ac044b21c720064736f6c63430008110033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.