Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 34 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Panic Withdrawn | 18999877 | 358 days ago | IN | 0 ETH | 0.00061421 | ||||
Withdrawn From C... | 18991849 | 360 days ago | IN | 0 ETH | 0.00246835 | ||||
Withdrawn From C... | 18991837 | 360 days ago | IN | 0 ETH | 0.00223665 | ||||
Withdrawn From C... | 18991151 | 360 days ago | IN | 0 ETH | 0.00183255 | ||||
Withdrawn From C... | 18837318 | 381 days ago | IN | 0 ETH | 0.00191802 | ||||
Withdrawn From C... | 18833685 | 382 days ago | IN | 0 ETH | 0.0023452 | ||||
Withdrawn From C... | 18814639 | 385 days ago | IN | 0 ETH | 0.00385959 | ||||
Withdrawn From C... | 18812343 | 385 days ago | IN | 0 ETH | 0.00302367 | ||||
Withdrawn From C... | 18812192 | 385 days ago | IN | 0 ETH | 0.00244034 | ||||
Withdrawn From C... | 18812189 | 385 days ago | IN | 0 ETH | 0.00225582 | ||||
Withdrawn From C... | 18809816 | 385 days ago | IN | 0 ETH | 0.00313623 | ||||
Withdrawn From C... | 18808927 | 385 days ago | IN | 0 ETH | 0.00221557 | ||||
Withdrawn From C... | 18808817 | 385 days ago | IN | 0 ETH | 0.00225512 | ||||
Withdrawn From C... | 18807620 | 385 days ago | IN | 0 ETH | 0.00211209 | ||||
Withdrawn From C... | 18807550 | 385 days ago | IN | 0 ETH | 0.00223782 | ||||
Withdrawn From C... | 18806928 | 386 days ago | IN | 0 ETH | 0.00314497 | ||||
Withdrawn From C... | 18802775 | 386 days ago | IN | 0 ETH | 0.00218138 | ||||
Withdrawn From C... | 18802686 | 386 days ago | IN | 0 ETH | 0.00238719 | ||||
Withdrawn From C... | 18801021 | 386 days ago | IN | 0 ETH | 0.00284999 | ||||
Withdrawn From C... | 18798417 | 387 days ago | IN | 0 ETH | 0.00227139 | ||||
Withdrawn From C... | 18798169 | 387 days ago | IN | 0 ETH | 0.00230013 | ||||
Withdrawn From C... | 18797974 | 387 days ago | IN | 0 ETH | 0.0027033 | ||||
Withdrawn From C... | 18797499 | 387 days ago | IN | 0 ETH | 0.00275088 | ||||
Withdrawn From C... | 18796978 | 387 days ago | IN | 0 ETH | 0.00270843 | ||||
Withdrawn From C... | 18796800 | 387 days ago | IN | 0 ETH | 0.00341342 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
18999877 | 358 days ago | 5.17519062 ETH | ||||
18991849 | 360 days ago | 0.09409437 ETH | ||||
18991837 | 360 days ago | 0.18818875 ETH | ||||
18991151 | 360 days ago | 0.09409437 ETH | ||||
18837318 | 381 days ago | 0.18818875 ETH | ||||
18833685 | 382 days ago | 0.09409437 ETH | ||||
18814639 | 385 days ago | 0.18818875 ETH | ||||
18812343 | 385 days ago | 0.09409437 ETH | ||||
18812192 | 385 days ago | 0.09409437 ETH | ||||
18812189 | 385 days ago | 0.09409437 ETH | ||||
18809816 | 385 days ago | 0.09409437 ETH | ||||
18808927 | 385 days ago | 0.09409437 ETH | ||||
18808817 | 385 days ago | 0.18818875 ETH | ||||
18807620 | 385 days ago | 0.18818875 ETH | ||||
18807550 | 385 days ago | 0.28228312 ETH | ||||
18806928 | 386 days ago | 0.94094375 ETH | ||||
18802775 | 386 days ago | 0.09409437 ETH | ||||
18802686 | 386 days ago | 0.18818875 ETH | ||||
18801021 | 386 days ago | 0.09409437 ETH | ||||
18798417 | 387 days ago | 0.84684937 ETH | ||||
18798169 | 387 days ago | 0.18818875 ETH | ||||
18797974 | 387 days ago | 0.28228312 ETH | ||||
18797499 | 387 days ago | 0.09409437 ETH | ||||
18796978 | 387 days ago | 0.09409437 ETH | ||||
18796800 | 387 days ago | 0.65866062 ETH |
Loading...
Loading
Contract Name:
QueenETreasureClaim
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 600 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT /// @title Contract that handles QueenE's treasure claim from whitelisted holders /************************************************ * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░░░░░░░░░░░░░░░░██░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░██░░░░░░░░░░░░████░░░░░░░░░░░░██░░░░░░░ * * ░░░░░████░░░░░░░░░░██░░██░░░░░░░░░░████░░░░░░ * * ░░░░██████░░░░░░░░██░░░░██░░░░░░░░██████░░░░░ * * ░░░███░░███░░░░░░████░░████░░░░░░███░░███░░░░ * * ░░██████████░░░░████████████░░░░██████████░░░ * * ░░████░░█████████████░░█████████████░░████░░░ * * ░░███░░░░███████████░░░░███████████░░░░███░░░ * * ░░████░░█████████████░░█████████████░░████░░░ * * ░░████████████████████████████████████████░░░ * *************************************************/ pragma solidity ^0.8.9; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import {IQueenE} from "../interfaces/IQueenE.sol"; import {IQueenETreasureClaim} from "../interfaces/IQueenETreasureClaim.sol"; import {Pausable} from "@openzeppelin/contracts/security/Pausable.sol"; import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol"; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import {ERC165Storage} from "@openzeppelin/contracts/utils/introspection/ERC165Storage.sol"; import "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; contract QueenETreasureClaim is ERC165Storage, Pausable, ReentrancyGuard, Ownable, IQueenETreasureClaim { using EnumerableSet for EnumerableSet.AddressSet; uint256 private claimPoolBalance; EnumerableSet.AddressSet internal whitelist; mapping(address => bool) internal queenesClaimed; //wallet claim status mapping(address => uint256) internal internalWhitelist; //wallet and value available constructor() { _registerInterface(type(IQueenETreasureClaim).interfaceId); } /** * @notice Claim Pool Balance. */ function claimPool() external view returns (uint256) { return claimPoolBalance; } /** * @notice Claim Pool Balance. */ function walletStatus( address wallet ) external view returns (bool whiteListed, bool claimed, uint256 value) { return ( whitelist.contains(wallet), queenesClaimed[wallet], internalWhitelist[wallet] ); } /** * @notice Fetch WhiteList wallets. */ function walletsWhiteListed() external view returns (address[] memory list) { return whitelist.values(); } // fallback function fallback() external payable { _depositToClaimPool(msg.sender, msg.value); } // receive function receive() external payable { _depositToClaimPool(msg.sender, msg.value); } /** * @notice receive ETH to claim pool. */ function depositToClaimPool( address _sender, uint256 amount ) external payable { _depositToClaimPool(_sender, amount); } /** * @notice receive ETH to enrich claim pool. */ function _depositToClaimPool(address _sender, uint256 amount) private { require(amount > 0, "invalid amount"); claimPoolBalance += amount; emit ClaimPoolDeposit(_sender, amount); } /** * @notice withdraw balance from Claim Pool. */ function withdrawnFromClaimPool() external nonReentrant whenNotPaused { address payable to = payable(msg.sender); require(internalWhitelist[to] > 0, "Not Whitelisted"); require(!queenesClaimed[to], "Wallet already claimed from pool!"); uint256 valueToClaim = internalWhitelist[to]; require(valueToClaim <= claimPoolBalance, "Not enough funds in claim pool"); require(valueToClaim > 0, "Cant claim ZERO"); (bool success, ) = to.call{value: valueToClaim}(""); require(success, "Claim error! Not Completed"); queenesClaimed[to] = true; claimPoolBalance -= valueToClaim; emit ClaimPoolwithdraw(to, valueToClaim); } /** * @notice update white list. */ function updateWhiteList(sWhitelist[] calldata _list) external onlyOwner { for (uint256 idx = 0; idx < _list.length; idx++) { address wallet = _list[idx].wallet; uint256 value = _list[idx].value; //add to whitelist if (!whitelist.contains(wallet)) whitelist.add(wallet); //set value in internal list internalWhitelist[wallet] = value; } } /** * @notice drop wallets from white list. */ function dropFromWhiteList(sWhitelist[] calldata _list) external onlyOwner { for (uint256 idx = 0; idx < _list.length; idx++) { address wallet = _list[idx].wallet; //add to whitelist if (whitelist.contains(wallet)) whitelist.remove(wallet); //set value in internal list internalWhitelist[wallet] = 0; } } /** * @notice panic withdrawn of funds. */ function panicWithdrawn() external onlyOwner { require(claimPoolBalance > 0, "Cant claim ZERO"); address payable _owner = payable(owner()); (bool success, ) = _owner.call{value: claimPoolBalance}(""); require(success, "Panice Claim error! Not Completed"); claimPoolBalance = 0; } }
// 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.5.0) (governance/utils/IVotes.sol) pragma solidity ^0.8.0; /** * @dev Common interface for {ERC20Votes}, {ERC721Votes}, and other {Votes}-enabled contracts. * * _Available since v4.5._ */ interface IVotes { /** * @dev Emitted when an account changes their delegate. */ event DelegateChanged(address indexed delegator, address indexed fromDelegate, address indexed toDelegate); /** * @dev Emitted when a token transfer or delegate change results in changes to a delegate's number of votes. */ event DelegateVotesChanged(address indexed delegate, uint256 previousBalance, uint256 newBalance); /** * @dev Returns the current amount of votes that `account` has. */ function getVotes(address account) external view returns (uint256); /** * @dev Returns the amount of votes that `account` had at the end of a past block (`blockNumber`). */ function getPastVotes(address account, uint256 blockNumber) external view returns (uint256); /** * @dev Returns the total supply of votes available at the end of a past block (`blockNumber`). * * NOTE: This value is the sum of all available votes, which is not necessarily the sum of all delegated votes. * Votes that have not been delegated are still part of total supply, even though they would not participate in a * vote. */ function getPastTotalSupply(uint256 blockNumber) external view returns (uint256); /** * @dev Returns the delegate that `account` has chosen. */ function delegates(address account) external view returns (address); /** * @dev Delegates votes from the sender to `delegatee`. */ function delegate(address delegatee) external; /** * @dev Delegates votes from signer to `delegatee`. */ function delegateBySig( address delegatee, uint256 nonce, uint256 expiry, uint8 v, bytes32 r, bytes32 s ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor() { _paused = false; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { require(paused(), "Pausable: not paused"); } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts 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/ERC165Storage.sol) pragma solidity ^0.8.0; import "./ERC165.sol"; /** * @dev Storage based implementation of the {IERC165} interface. * * Contracts may inherit from this and call {_registerInterface} to declare * their support of an interface. */ abstract contract ERC165Storage is ERC165 { /** * @dev Mapping of interface ids to whether or not it's supported. */ mapping(bytes4 => bool) private _supportedInterfaces; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return super.supportsInterface(interfaceId) || _supportedInterfaces[interfaceId]; } /** * @dev Registers the contract as an implementer of the interface defined by * `interfaceId`. Support of the actual ERC165 interface is automatic and * registering its interface id is not required. * * See {IERC165-supportsInterface}. * * Requirements: * * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). */ function _registerInterface(bytes4 interfaceId) internal virtual { require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); _supportedInterfaces[interfaceId] = true; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/structs/EnumerableSet.sol) pragma solidity ^0.8.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. * * [WARNING] * ==== * Trying to delete such a structure from storage will likely result in data corruption, rendering the structure unusable. * See https://github.com/ethereum/solidity/pull/11843[ethereum/solidity#11843] for more info. * * In order to clean an EnumerableSet, you can either remove all elements one by one or create a fresh instance using an array of EnumerableSet. * ==== */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping(bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; if (lastIndex != toDeleteIndex) { bytes32 lastValue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastValue; // Update the index for the moved value set._indexes[lastValue] = valueIndex; // Replace lastValue's index to valueIndex } // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { return set._values[index]; } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function _values(Set storage set) private view returns (bytes32[] memory) { return set._values; } // Bytes32Set struct Bytes32Set { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, value); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, index); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(Bytes32Set storage set) internal view returns (bytes32[] memory) { return _values(set._inner); } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(uint160(value)))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint160(uint256(_at(set._inner, index)))); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(AddressSet storage set) internal view returns (address[] memory) { bytes32[] memory store = _values(set._inner); address[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } /** * @dev Return the entire set in an array * * WARNING: This operation will copy the entire storage to memory, which can be quite expensive. This is designed * to mostly be used by view accessors that are queried without any gas fees. Developers should keep in mind that * this function has an unbounded cost, and using it as part of a state-changing function may render the function * uncallable if the set grows to a point where copying to memory consumes too much gas to fit in a block. */ function values(UintSet storage set) internal view returns (uint256[] memory) { bytes32[] memory store = _values(set._inner); uint256[] memory result; /// @solidity memory-safe-assembly assembly { result := store } return result; } }
// SPDX-License-Identifier: MIT /// @title A library to hold our Queen's Royal Knowledge pragma solidity 0.8.9; import {EnumerableSet} from "@openzeppelin/contracts/utils/structs/EnumerableSet.sol"; library RoyalLibrary { struct sTRAIT { uint256 id; string traitName; uint8 enabled; //0 - disabled; 1 - enabled; } struct sRARITY { uint256 id; string rarityName; uint256 percentage; //1 ~ 100 } struct sART { uint256 traitId; uint256 rarityId; bytes artName; bytes uri; } struct sDNA { uint256 traitId; uint256 rarityId; uint256 trace; } struct sBLOOD { uint256 traitId; uint256 rarityId; string artName; string artUri; } struct sQUEEN { uint256 queeneId; uint256 description; //index of the description string finalArt; sDNA[] dna; uint8 queenesGallery; uint8 sirAward; } struct sSIR { address sirAddress; uint256 queene; } struct sAUCTION { uint256 queeneId; uint256 lastBidAmount; uint256 auctionStartTime; uint256 auctionEndTime; uint256 initialBidPrice; address payable bidder; bool ended; } enum queeneRarity { COMMON, RARE, SUPER_RARE, LEGENDARY } address constant burnAddress = 0x0000000000000000000000000000000000000000; uint8 constant houseOfLords = 1; uint8 constant houseOfCommons = 2; uint8 constant houseOfBanned = 3; error InvalidAddressError(string _caller, string _msg, address _address); error AuthorizationError(string _caller, string _msg, address _address); error MinterLockedError( string _caller, string _msg, address _minterAddress ); error StorageLockedError( string _caller, string _msg, address _storageAddress ); error LabLockedError(string _caller, string _msg, address _labAddress); error InvalidParametersError( string _caller, string _msg, string _arg1, string _arg2, string _arg3 ); function concat(string memory self, string memory part2) public pure returns (string memory) { return string(abi.encodePacked(self, part2)); } function stringEquals(string storage self, string memory b) public view returns (bool) { if (bytes(self).length != bytes(b).length) { return false; } else { return keccak256(abi.encodePacked(self)) == keccak256(abi.encodePacked(b)); } } function extractRevertReason(bytes memory _returnData) internal pure returns (string memory) { // If the _res length is less than 68, then the transaction failed silently (without a revert message) if (_returnData.length < 68) return "Transaction reverted silently"; assembly { // Slice the sighash. _returnData := add(_returnData, 0x04) } return abi.decode(_returnData, (string)); // All that remains is the revert string } }
// SPDX-License-Identifier: MIT /// @title IERC721 Interface /************************************************ * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░░░░░░░░░░░░░░░░██░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░██░░░░░░░░░░░░████░░░░░░░░░░░░██░░░░░░░ * * ░░░░░████░░░░░░░░░░██░░██░░░░░░░░░░████░░░░░░ * * ░░░░██████░░░░░░░░██░░░░██░░░░░░░░██████░░░░░ * * ░░░███░░███░░░░░░████░░████░░░░░░███░░███░░░░ * * ░░██████████░░░░████████████░░░░██████████░░░ * * ░░████░░█████████████░░█████████████░░████░░░ * * ░░███░░░░███████████░░░░███████████░░░░███░░░ * * ░░████░░█████████████░░█████████████░░████░░░ * * ░░████████████████████████████████████████░░░ * *************************************************/ // LICENSE // IERC721.sol modifies OpenZeppelin's interface IERC721.sol to user our own ERC165 standard: // https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC721/IERC721.sol // // MODIFICATIONS: // Its the latest `IERC721` interface from OpenZeppelin (v4.4.5) using our own ERC165 controller. pragma solidity ^0.8.9; import {IRoyalContractBase} from "../interfaces/IRoyalContractBase.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IRoyalContractBase { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer( address indexed from, address indexed to, uint256 indexed tokenId ); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval( address indexed owner, address indexed approved, uint256 indexed tokenId ); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll( address indexed owner, address indexed operator, bool approved ); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT /// @title Interface for QueenE NFT Token pragma solidity ^0.8.9; import "@openzeppelin/contracts/governance/utils/IVotes.sol"; import {IQueenTraits} from "./IQueenTraits.sol"; import {IQueenLab} from "./IQueenLab.sol"; import {RoyalLibrary} from "../contracts/lib/RoyalLibrary.sol"; import {IRoyalContractBase} from "./IRoyalContractBase.sol"; import {IERC721} from "./IERC721.sol"; interface IQueenE is IRoyalContractBase, IERC721 { function _currentAuctionQueenE() external view returns (uint256); function contractURI() external view returns (string memory); function mint() external returns (uint256); function getQueenE(uint256 _queeneId) external view returns (RoyalLibrary.sQUEEN memory); function burn(uint256 queeneId) external; function lockMinter() external; function lockQueenTraitStorage() external; function lockQueenLab() external; function nominateSir(address _sir) external returns (bool); function getHouseSeats(uint8 _seatType) external view returns (uint256); function getHouseSeat(address addr) external view returns (uint256); function IsSir(address _address) external view returns (bool); function isSirReward(uint256 queeneId) external view returns (bool); function isMuseum(uint256 queeneId) external view returns (bool); function dnaMapped(uint256 dnaHash) external view returns (bool); function isHouseOfLordsFull() external view returns (bool); }
// SPDX-License-Identifier: MIT /// @title Interface for QueenE Treasure Claim pragma solidity ^0.8.9; interface IQueenETreasureClaim { struct sWhitelist { address wallet; uint256 value; } event ClaimPoolwithdraw(address indexed claimer, uint256 value); event ClaimPoolDeposit(address indexed benefactor, uint256 value); function depositToClaimPool(address _sender, uint256 amount) external payable; function withdrawnFromClaimPool() external; }
// SPDX-License-Identifier: MIT /// @title Interface for Noun Auction Houses pragma solidity ^0.8.9; import {IRoyalContractBase} from "./IRoyalContractBase.sol"; import {RoyalLibrary} from "../contracts/lib//RoyalLibrary.sol"; import {IQueenTraits} from "./IQueenTraits.sol"; import {IQueenE} from "./IQueenE.sol"; interface IQueenLab is IRoyalContractBase { function buildDna(uint256 queeneId, bool isSir) external view returns (RoyalLibrary.sDNA[] memory dna); function produceBlueBlood(RoyalLibrary.sDNA[] memory dna) external view returns (RoyalLibrary.sBLOOD[] memory blood); function generateQueen(uint256 _queenId, bool isSir) external view returns (RoyalLibrary.sQUEEN memory); function getQueenRarity(RoyalLibrary.sDNA[] memory _dna) external pure returns (RoyalLibrary.queeneRarity finalRarity); function getQueenRarityBidIncrement( RoyalLibrary.sDNA[] memory _dna, uint256[] calldata map ) external pure returns (uint256 value); function getQueenRarityName(RoyalLibrary.sDNA[] memory _dna) external pure returns (string memory rarityName); function constructTokenUri( RoyalLibrary.sQUEEN memory _queene, string memory _ipfsUri ) external view returns (string memory); }
// SPDX-License-Identifier: MIT /// @title Interface for QueenE Traits contract pragma solidity ^0.8.9; //import {IERC165} from "@openzeppelin/contracts/utils/introspection/IERC165.sol"; import {IRoyalContractBase} from "../interfaces/IRoyalContractBase.sol"; import {RoyalLibrary} from "../contracts/lib/RoyalLibrary.sol"; interface IQueenTraits is IRoyalContractBase { event RarityCreated( uint256 indexed rarityId, string rarityName, uint256 _percentage ); event RarityUpdated( uint256 indexed rarityId, string rarityName, uint256 _percentage ); event TraitCreated( uint256 indexed traitId, string _traitName, uint8 _enabled ); event TraitEnabled(uint256 indexed traitId, string _traitName); event TraitDisabled(uint256 indexed traitId, string _traitName); event ArtCreated( uint256 traitId, uint256 rarityId, bytes artName, bytes artUri ); event ArtRemoved(uint256 traitId, uint256 rarityId, bytes artUri); function rarityPool() external view returns (uint256[] memory); function getRarityById(uint256 _rarityId) external view returns (RoyalLibrary.sRARITY memory rarity); function getRarityByName(string memory _rarityName) external returns (RoyalLibrary.sRARITY memory rarity); function getRarities(bool onlyWithArt, uint256 _traitId) external view returns (RoyalLibrary.sRARITY[] memory raritiesList); function getTrait(uint256 _id) external view returns (RoyalLibrary.sTRAIT memory trait); function getTraitByName(string memory _traitName) external returns (RoyalLibrary.sTRAIT memory trait); function getTraits(bool _onlyEnabled) external view returns (RoyalLibrary.sTRAIT[] memory _traits); function getDescriptionByIdx(uint256 _rarityId, uint256 _index) external view returns (bytes memory description); function getDescriptionsCount(uint256 _rarityId) external view returns (uint256); function getArtByUri( uint256 _traitId, uint256 _rarityId, bytes memory _artUri ) external returns (RoyalLibrary.sART memory art); function getArtCount(uint256 _traitId, uint256 _rarityId) external view returns (uint256 quantity); function getArt( uint256 _traitId, uint256 _rarityId, uint256 _artIdx ) external view returns (RoyalLibrary.sART memory art); function getArts(uint256 _traitId, uint256 _rarityId) external returns (RoyalLibrary.sART[] memory artsList); }
// SPDX-License-Identifier: MIT /// @title Interface for Base Contract Controller pragma solidity ^0.8.9; import {IERC165} from "@openzeppelin/contracts/interfaces/IERC165.sol"; interface IRoyalContractBase is IERC165 { //function supportsInterface(bytes4 interfaceID) external view returns (bool); function isOwner(address _address) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 600 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"benefactor","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"ClaimPoolDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"claimer","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"ClaimPoolwithdraw","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[],"name":"claimPool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_sender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"depositToClaimPool","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"components":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct IQueenETreasureClaim.sWhitelist[]","name":"_list","type":"tuple[]"}],"name":"dropFromWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"panicWithdrawn","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":"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":[{"components":[{"internalType":"address","name":"wallet","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"internalType":"struct IQueenETreasureClaim.sWhitelist[]","name":"_list","type":"tuple[]"}],"name":"updateWhiteList","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"wallet","type":"address"}],"name":"walletStatus","outputs":[{"internalType":"bool","name":"whiteListed","type":"bool"},{"internalType":"bool","name":"claimed","type":"bool"},{"internalType":"uint256","name":"value","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"walletsWhiteListed","outputs":[{"internalType":"address[]","name":"list","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawnFromClaimPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561001057600080fd5b506001805460ff191681556002556100273361003c565b6100376337f9ec3160e21b61008e565b610111565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160e01b031980821614156100ec5760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015260640160405180910390fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b610edd806101206000396000f3fe6080604052600436106100d65760003560e01c80638da5cb5b1161007f578063bb18721511610059578063bb18721514610220578063f244ad2014610240578063f2fde38b14610260578063f5ee999714610280576100e7565b80638da5cb5b146101c5578063adfbc243146101ed578063b6bfd24b14610202576100e7565b80635c975abb116100b05780635c975abb14610185578063715018a61461019d578063721c7287146101b2576100e7565b806301ffc9a7146100f15780634d6d0af81461012657806358f82e2414610163576100e7565b366100e7576100e53334610295565b005b6100e53334610295565b3480156100fd57600080fd5b5061011161010c366004610cce565b610343565b60405190151581526020015b60405180910390f35b34801561013257600080fd5b50610146610141366004610d14565b610383565b60408051931515845291151560208401529082015260600161011d565b34801561016f57600080fd5b506101786103c8565b60405161011d9190610d2f565b34801561019157600080fd5b5060015460ff16610111565b3480156101a957600080fd5b506100e56103d9565b6100e56101c0366004610d7c565b6103ed565b3480156101d157600080fd5b506003546040516001600160a01b03909116815260200161011d565b3480156101f957600080fd5b506100e56103fb565b34801561020e57600080fd5b5060045460405190815260200161011d565b34801561022c57600080fd5b506100e561023b366004610da6565b6106fa565b34801561024c57600080fd5b506100e561025b366004610da6565b6107af565b34801561026c57600080fd5b506100e561027b366004610d14565b610835565b34801561028c57600080fd5b506100e56108ae565b600081116102ea5760405162461bcd60e51b815260206004820152600e60248201527f696e76616c696420616d6f756e7400000000000000000000000000000000000060448201526064015b60405180910390fd5b80600460008282546102fc9190610e31565b90915550506040518181526001600160a01b038316907fa2adbfc3f6f9d6c1fb7ba9a130315a1048ac2ad33312bd2f59facdc909f691839060200160405180910390a25050565b60006301ffc9a760e01b6001600160e01b03198316148061037d57506001600160e01b0319821660009081526020819052604090205460ff165b92915050565b600080806103926005856109c8565b6001600160a01b03851660009081526007602090815260408083205460089092529091205491945060ff16925090509193909250565b60606103d460056109ed565b905090565b6103e16109fa565b6103eb6000610a54565b565b6103f78282610295565b5050565b60028054141561044d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102e1565b60028055610459610ab3565b336000818152600860205260409020546104b55760405162461bcd60e51b815260206004820152600f60248201527f4e6f742057686974656c6973746564000000000000000000000000000000000060448201526064016102e1565b6001600160a01b03811660009081526007602052604090205460ff16156105285760405162461bcd60e51b815260206004820152602160248201527f57616c6c657420616c726561647920636c61696d65642066726f6d20706f6f6c6044820152602160f81b60648201526084016102e1565b6001600160a01b0381166000908152600860205260409020546004548111156105935760405162461bcd60e51b815260206004820152601e60248201527f4e6f7420656e6f7567682066756e647320696e20636c61696d20706f6f6c000060448201526064016102e1565b600081116105d55760405162461bcd60e51b815260206004820152600f60248201526e43616e7420636c61696d205a45524f60881b60448201526064016102e1565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610622576040519150601f19603f3d011682016040523d82523d6000602084013e610627565b606091505b50509050806106785760405162461bcd60e51b815260206004820152601a60248201527f436c61696d206572726f7221204e6f7420436f6d706c6574656400000000000060448201526064016102e1565b6001600160a01b0383166000908152600760205260408120805460ff19166001179055600480548492906106ad908490610e49565b90915550506040518281526001600160a01b038416907f1b0964767517083063539f5248c0b6ac2f9332f33b2492d11afa974af3ba67c09060200160405180910390a25050600160025550565b6107026109fa565b60005b818110156107aa57600083838381811061072157610721610e60565b6107379260206040909202019081019150610d14565b9050600084848481811061074d5761074d610e60565b90506040020160200135905061076d8260056109c890919063ffffffff16565b61077e5761077c600583610b06565b505b6001600160a01b03909116600090815260086020526040902055806107a281610e76565b915050610705565b505050565b6107b76109fa565b60005b818110156107aa5760008383838181106107d6576107d6610e60565b6107ec9260206040909202019081019150610d14565b90506107f96005826109c8565b1561080b57610809600582610b1b565b505b6001600160a01b03166000908152600860205260408120558061082d81610e76565b9150506107ba565b61083d6109fa565b6001600160a01b0381166108a25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102e1565b6108ab81610a54565b50565b6108b66109fa565b6000600454116108fa5760405162461bcd60e51b815260206004820152600f60248201526e43616e7420636c61696d205a45524f60881b60448201526064016102e1565b600061090e6003546001600160a01b031690565b90506000816001600160a01b031660045460405160006040518083038185875af1925050503d806000811461095f576040519150601f19603f3d011682016040523d82523d6000602084013e610964565b606091505b50509050806109bf5760405162461bcd60e51b815260206004820152602160248201527f50616e69636520436c61696d206572726f7221204e6f7420436f6d706c6574656044820152601960fa1b60648201526084016102e1565b50506000600455565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b606060006109e683610b30565b6003546001600160a01b031633146103eb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e1565b600380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60015460ff16156103eb5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016102e1565b60006109e6836001600160a01b038416610b8c565b60006109e6836001600160a01b038416610bdb565b606081600001805480602002602001604051908101604052809291908181526020018280548015610b8057602002820191906000526020600020905b815481526020019060010190808311610b6c575b50505050509050919050565b6000818152600183016020526040812054610bd35750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561037d565b50600061037d565b60008181526001830160205260408120548015610cc4576000610bff600183610e49565b8554909150600090610c1390600190610e49565b9050818114610c78576000866000018281548110610c3357610c33610e60565b9060005260206000200154905080876000018481548110610c5657610c56610e60565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610c8957610c89610e91565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061037d565b600091505061037d565b600060208284031215610ce057600080fd5b81356001600160e01b0319811681146109e657600080fd5b80356001600160a01b0381168114610d0f57600080fd5b919050565b600060208284031215610d2657600080fd5b6109e682610cf8565b6020808252825182820181905260009190848201906040850190845b81811015610d705783516001600160a01b031683529284019291840191600101610d4b565b50909695505050505050565b60008060408385031215610d8f57600080fd5b610d9883610cf8565b946020939093013593505050565b60008060208385031215610db957600080fd5b823567ffffffffffffffff80821115610dd157600080fd5b818501915085601f830112610de557600080fd5b813581811115610df457600080fd5b8660208260061b8501011115610e0957600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610e4457610e44610e1b565b500190565b600082821015610e5b57610e5b610e1b565b500390565b634e487b7160e01b600052603260045260246000fd5b6000600019821415610e8a57610e8a610e1b565b5060010190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220d23e3768afcdcdc75cb10818d94fd4f8b3a13445944202dd9e71759e135ee6a164736f6c63430008090033
Deployed Bytecode
0x6080604052600436106100d65760003560e01c80638da5cb5b1161007f578063bb18721511610059578063bb18721514610220578063f244ad2014610240578063f2fde38b14610260578063f5ee999714610280576100e7565b80638da5cb5b146101c5578063adfbc243146101ed578063b6bfd24b14610202576100e7565b80635c975abb116100b05780635c975abb14610185578063715018a61461019d578063721c7287146101b2576100e7565b806301ffc9a7146100f15780634d6d0af81461012657806358f82e2414610163576100e7565b366100e7576100e53334610295565b005b6100e53334610295565b3480156100fd57600080fd5b5061011161010c366004610cce565b610343565b60405190151581526020015b60405180910390f35b34801561013257600080fd5b50610146610141366004610d14565b610383565b60408051931515845291151560208401529082015260600161011d565b34801561016f57600080fd5b506101786103c8565b60405161011d9190610d2f565b34801561019157600080fd5b5060015460ff16610111565b3480156101a957600080fd5b506100e56103d9565b6100e56101c0366004610d7c565b6103ed565b3480156101d157600080fd5b506003546040516001600160a01b03909116815260200161011d565b3480156101f957600080fd5b506100e56103fb565b34801561020e57600080fd5b5060045460405190815260200161011d565b34801561022c57600080fd5b506100e561023b366004610da6565b6106fa565b34801561024c57600080fd5b506100e561025b366004610da6565b6107af565b34801561026c57600080fd5b506100e561027b366004610d14565b610835565b34801561028c57600080fd5b506100e56108ae565b600081116102ea5760405162461bcd60e51b815260206004820152600e60248201527f696e76616c696420616d6f756e7400000000000000000000000000000000000060448201526064015b60405180910390fd5b80600460008282546102fc9190610e31565b90915550506040518181526001600160a01b038316907fa2adbfc3f6f9d6c1fb7ba9a130315a1048ac2ad33312bd2f59facdc909f691839060200160405180910390a25050565b60006301ffc9a760e01b6001600160e01b03198316148061037d57506001600160e01b0319821660009081526020819052604090205460ff165b92915050565b600080806103926005856109c8565b6001600160a01b03851660009081526007602090815260408083205460089092529091205491945060ff16925090509193909250565b60606103d460056109ed565b905090565b6103e16109fa565b6103eb6000610a54565b565b6103f78282610295565b5050565b60028054141561044d5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016102e1565b60028055610459610ab3565b336000818152600860205260409020546104b55760405162461bcd60e51b815260206004820152600f60248201527f4e6f742057686974656c6973746564000000000000000000000000000000000060448201526064016102e1565b6001600160a01b03811660009081526007602052604090205460ff16156105285760405162461bcd60e51b815260206004820152602160248201527f57616c6c657420616c726561647920636c61696d65642066726f6d20706f6f6c6044820152602160f81b60648201526084016102e1565b6001600160a01b0381166000908152600860205260409020546004548111156105935760405162461bcd60e51b815260206004820152601e60248201527f4e6f7420656e6f7567682066756e647320696e20636c61696d20706f6f6c000060448201526064016102e1565b600081116105d55760405162461bcd60e51b815260206004820152600f60248201526e43616e7420636c61696d205a45524f60881b60448201526064016102e1565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114610622576040519150601f19603f3d011682016040523d82523d6000602084013e610627565b606091505b50509050806106785760405162461bcd60e51b815260206004820152601a60248201527f436c61696d206572726f7221204e6f7420436f6d706c6574656400000000000060448201526064016102e1565b6001600160a01b0383166000908152600760205260408120805460ff19166001179055600480548492906106ad908490610e49565b90915550506040518281526001600160a01b038416907f1b0964767517083063539f5248c0b6ac2f9332f33b2492d11afa974af3ba67c09060200160405180910390a25050600160025550565b6107026109fa565b60005b818110156107aa57600083838381811061072157610721610e60565b6107379260206040909202019081019150610d14565b9050600084848481811061074d5761074d610e60565b90506040020160200135905061076d8260056109c890919063ffffffff16565b61077e5761077c600583610b06565b505b6001600160a01b03909116600090815260086020526040902055806107a281610e76565b915050610705565b505050565b6107b76109fa565b60005b818110156107aa5760008383838181106107d6576107d6610e60565b6107ec9260206040909202019081019150610d14565b90506107f96005826109c8565b1561080b57610809600582610b1b565b505b6001600160a01b03166000908152600860205260408120558061082d81610e76565b9150506107ba565b61083d6109fa565b6001600160a01b0381166108a25760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016102e1565b6108ab81610a54565b50565b6108b66109fa565b6000600454116108fa5760405162461bcd60e51b815260206004820152600f60248201526e43616e7420636c61696d205a45524f60881b60448201526064016102e1565b600061090e6003546001600160a01b031690565b90506000816001600160a01b031660045460405160006040518083038185875af1925050503d806000811461095f576040519150601f19603f3d011682016040523d82523d6000602084013e610964565b606091505b50509050806109bf5760405162461bcd60e51b815260206004820152602160248201527f50616e69636520436c61696d206572726f7221204e6f7420436f6d706c6574656044820152601960fa1b60648201526084016102e1565b50506000600455565b6001600160a01b038116600090815260018301602052604081205415155b9392505050565b606060006109e683610b30565b6003546001600160a01b031633146103eb5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016102e1565b600380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60015460ff16156103eb5760405162461bcd60e51b815260206004820152601060248201527f5061757361626c653a207061757365640000000000000000000000000000000060448201526064016102e1565b60006109e6836001600160a01b038416610b8c565b60006109e6836001600160a01b038416610bdb565b606081600001805480602002602001604051908101604052809291908181526020018280548015610b8057602002820191906000526020600020905b815481526020019060010190808311610b6c575b50505050509050919050565b6000818152600183016020526040812054610bd35750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561037d565b50600061037d565b60008181526001830160205260408120548015610cc4576000610bff600183610e49565b8554909150600090610c1390600190610e49565b9050818114610c78576000866000018281548110610c3357610c33610e60565b9060005260206000200154905080876000018481548110610c5657610c56610e60565b6000918252602080832090910192909255918252600188019052604090208390555b8554869080610c8957610c89610e91565b60019003818190600052602060002001600090559055856001016000868152602001908152602001600020600090556001935050505061037d565b600091505061037d565b600060208284031215610ce057600080fd5b81356001600160e01b0319811681146109e657600080fd5b80356001600160a01b0381168114610d0f57600080fd5b919050565b600060208284031215610d2657600080fd5b6109e682610cf8565b6020808252825182820181905260009190848201906040850190845b81811015610d705783516001600160a01b031683529284019291840191600101610d4b565b50909695505050505050565b60008060408385031215610d8f57600080fd5b610d9883610cf8565b946020939093013593505050565b60008060208385031215610db957600080fd5b823567ffffffffffffffff80821115610dd157600080fd5b818501915085601f830112610de557600080fd5b813581811115610df457600080fd5b8660208260061b8501011115610e0957600080fd5b60209290920196919550909350505050565b634e487b7160e01b600052601160045260246000fd5b60008219821115610e4457610e44610e1b565b500190565b600082821015610e5b57610e5b610e1b565b500390565b634e487b7160e01b600052603260045260246000fd5b6000600019821415610e8a57610e8a610e1b565b5060010190565b634e487b7160e01b600052603160045260246000fdfea2646970667358221220d23e3768afcdcdc75cb10818d94fd4f8b3a13445944202dd9e71759e135ee6a164736f6c63430008090033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.