More Info
Private Name Tags
ContractCreator
Multichain Info
No addresses found
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Deposit To DAO T... | 15478992 | 955 days ago | IN | 0.1825 ETH | 0.00071808 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
Transfer | 18770082 | 492 days ago | 0.28 ETH | ||||
Transfer | 18770082 | 492 days ago | 12.04408 ETH | ||||
Transfer | 17344491 | 692 days ago | 0.52 ETH | ||||
Transfer | 16885829 | 756 days ago | 0.357 ETH | ||||
Transfer | 15983955 | 883 days ago | 0.6 ETH | ||||
Transfer | 15919591 | 892 days ago | 0.005 ETH | ||||
Deposit To DAO T... | 15708403 | 921 days ago | 0.13 ETH | ||||
Transfer | 15700438 | 922 days ago | 0.0005 ETH | ||||
Deposit To DAO T... | 15700417 | 922 days ago | 0.018 ETH | ||||
Deposit To DAO T... | 15681253 | 925 days ago | 0.033 ETH | ||||
Deposit To DAO T... | 15674112 | 926 days ago | 0.0388 ETH | ||||
Deposit To DAO T... | 15657441 | 928 days ago | 0.021 ETH | ||||
Deposit To DAO T... | 15631358 | 932 days ago | 0.0179 ETH | ||||
Deposit To DAO T... | 15624165 | 933 days ago | 0.02 ETH | ||||
Deposit To DAO T... | 15617022 | 934 days ago | 0.05 ETH | ||||
Deposit To DAO T... | 15607636 | 935 days ago | 0.03 ETH | ||||
Deposit To DAO T... | 15600393 | 936 days ago | 0.02 ETH | ||||
Deposit To DAO T... | 15593174 | 937 days ago | 0.0116 ETH | ||||
Deposit To DAO T... | 15581749 | 939 days ago | 0.0168 ETH | ||||
Deposit To DAO T... | 15565054 | 941 days ago | 0.016 ETH | ||||
Deposit To DAO T... | 15553515 | 943 days ago | 0.0158 ETH | ||||
Deposit To DAO T... | 15545617 | 944 days ago | 0.0725 ETH | ||||
Deposit To DAO T... | 15538501 | 945 days ago | 0.0263 ETH | ||||
Deposit To DAO T... | 15532389 | 946 days ago | 0.014 ETH | ||||
Deposit To DAO T... | 15526370 | 947 days ago | 0.055 ETH |
Loading...
Loading
Contract Name:
RoyalTower
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 700 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT /// @title Contract that handles Queen's Palace maintenance /************************************************ * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░░░░░░░░░░░░░░░░██░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░██░░░░░░░░░░░░████░░░░░░░░░░░░██░░░░░░░ * * ░░░░░████░░░░░░░░░░██░░██░░░░░░░░░░████░░░░░░ * * ░░░░██████░░░░░░░░██░░░░██░░░░░░░░██████░░░░░ * * ░░░███░░███░░░░░░████░░████░░░░░░███░░███░░░░ * * ░░██████████░░░░████████████░░░░██████████░░░ * * ░░████░░█████████████░░█████████████░░████░░░ * * ░░███░░░░███████████░░░░███████████░░░░███░░░ * * ░░████░░█████████████░░█████████████░░████░░░ * * ░░████████████████████████████████████████░░░ * *************************************************/ pragma solidity ^0.8.9; import {Address} from "@openzeppelin/contracts/utils/Address.sol"; import {BaseContractController} from "./base/BaseContractController.sol"; import {IRoyalTower} from "../interfaces/IRoyalTower.sol"; import {IQueenPalace} from "../interfaces/IQueenPalace.sol"; contract RoyalTower is IRoyalTower, BaseContractController { uint256 private nextWithdraw; uint256 private daoBalance; constructor(IQueenPalace _queenPalace) { _registerInterface(type(IRoyalTower).interfaceId); nextWithdraw = 1; queenPalace = _queenPalace; } /** * @notice DAO Treasure Balance. */ function daoTreasure() external view returns (uint256) { return daoBalance; } // fallback function fallback() external payable onlyOwnerOrAuctionHouseProxy { _depositToDAOTreasure(msg.sender, 0, msg.value); } // receive function receive() external payable onlyOwnerOrAuctionHouseProxy { _depositToDAOTreasure(msg.sender, 0, msg.value); } /** * @notice receive ETH to enrich DAO treasure. */ function depositToDAOTreasure(uint256 _queeneAuctionId) external payable nonReentrant { _depositToDAOTreasure(msg.sender, _queeneAuctionId, msg.value); } /** * @notice receive ETH to enrich palace treasure. */ function _depositToDAOTreasure( address _sender, uint256 _queeneAuctionId, uint256 amount ) private { require(amount > 0, "invalid amount"); daoBalance += amount; emit DAOTreasureDeposit(_sender, _queeneAuctionId, amount); } /** * @notice withdraw balance for Propose fund. */ function withdrawFromTreasure(uint256 _amount, address payable _funded) external nonReentrant whenNotPaused onlyDAO { _withdrawFromTreasure(_funded, _amount); } /** * @notice withdraw balance for Palace Maintenance. */ function _withdrawFromTreasure(address payable to, uint256 _amount) private { require(_amount <= daoBalance, "Not enough balance on treasure!"); Address.sendValue(to, _amount); daoBalance -= _amount; emit DAOTreasureWithdraw(to, nextWithdraw++, _amount); } /** * @notice retrieve auction funds that went to fallback. */ function retrieveAuctionFallbackFunds() external nonReentrant whenNotPaused onlyOwner { (bool success, ) = queenPalace.QueenAuctionHouseProxyAddr().call( abi.encodeWithSignature("withdrawFallbackFund()") ); require(success, "Error retrieving fallback funds"); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT /// @title A base contract with implementation control /************************************************ * ░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░░░░░░░░░░░░░░░░██░░░░░░░░░░░░░░░░░░░░░░ * * ░░░░░░██░░░░░░░░░░░░████░░░░░░░░░░░░██░░░░░░░ * * ░░░░░████░░░░░░░░░░██░░██░░░░░░░░░░████░░░░░░ * * ░░░░██████░░░░░░░░██░░░░██░░░░░░░░██████░░░░░ * * ░░░███░░███░░░░░░████░░████░░░░░░███░░███░░░░ * * ░░██████████░░░░████████████░░░░██████████░░░ * * ░░████░░█████████████░░█████████████░░████░░░ * * ░░███░░░░███████████░░░░███████████░░░░███░░░ * * ░░████░░█████████████░░█████████████░░████░░░ * * ░░████████████████████████████████████████░░░ * *************************************************/ pragma solidity ^0.8.9; //import {ERC165} from "@openzeppelin/contracts/utils/introspection/ERC165.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 {RoyalLibrary} from "../lib/RoyalLibrary.sol"; import {IBaseContractController} from "../../interfaces/IBaseContractController.sol"; import {IQueenPalace} from "../../interfaces/IQueenPalace.sol"; contract BaseContractController is ERC165Storage, IBaseContractController, Pausable, ReentrancyGuard, Ownable { IQueenPalace internal queenPalace; /************************** vCONTROLLER REGION *************************************************** */ /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function pause() external virtual onlyOwner whenNotPaused { _pause(); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function unpause() external virtual onlyOwner whenPaused { _unpause(); } /** *IN *_queenPalace: address of queen palace contract *OUT */ function setQueenPalace(IQueenPalace _queenPalace) external nonReentrant whenPaused onlyOwnerOrDAO onlyOnImplementationOrDAO { _setQueenPalace(_queenPalace); } /** *IN *_queenPalace: address of queen palace contract *OUT */ function _setQueenPalace(IQueenPalace _queenPalace) internal { queenPalace = _queenPalace; } /************************** ^vCONTROLLER REGION *************************************************** */ /************************** vMODIFIERS REGION ***************************************************** */ modifier onlyDAO() { isDAO(); _; } modifier onlyChiefArtist() { isChiefArtist(); _; } modifier onlyArtist() { isArtist(); _; } modifier onlyChiefDeveloper() { isChiefDeveloper(); _; } modifier onlyDeveloper() { isDeveloper(); _; } modifier onlyMinter() { isMinter(); _; } modifier onlyActor() { isActor(); _; } modifier onlyActorOrDAO() { isActorOrDAO(); _; } modifier onlyOwnerOrChiefArtist() { isOwnerOrChiefArtist(); _; } modifier onlyOwnerOrArtist() { isOwnerOrArtist(); _; } modifier onlyOwnerOrChiefDeveloper() { isOwnerOrChiefDeveloper(); _; } modifier onlyOwnerOrDeveloper() { isOwnerOrDeveloper(); _; } modifier onlyOwnerOrChiefDeveloperOrDAO() { isOwnerOrChiefDeveloperOrDAO(); _; } modifier onlyOwnerOrDeveloperOrDAO() { isOwnerOrDeveloperOrDAO(); _; } modifier onlyOwnerOrChiefArtistOrDAO() { isOwnerOrChiefArtistOrDAO(); _; } modifier onlyOwnerOrArtistOrDAO() { isOwnerOrArtistOrDAO(); _; } modifier onlyOwnerOrDAO() { isOwnerOrDAO(); _; } modifier onlyOwnerOrMinter() { isOwnerOrMinter(); _; } modifier onlyOwnerOrAuctionHouse() { isOwnerOrAuctionHouse(); _; } modifier onlyOwnerOrAuctionHouseProxy() { isOwnerOrAuctionHouseProxy(); _; } modifier onlyOwnerOrQueenPalace() { isOwnerOrQueenPalace(); _; } modifier onlyOnImplementation() { isOnImplementation(); _; } modifier onlyOnImplementationOrDAO() { isOnImplementationOrDAO(); _; } modifier onlyOnImplementationOrPaused() { isOnImplementationOrPaused(); _; } /************************** ^MODIFIERS REGION ***************************************************** */ /** *IN *OUT *if given address is owner */ function isOwner(address _address) external view override returns (bool) { return owner() == _address; } function isOwnerOrChiefArtistOrDAO() internal view { require( msg.sender == owner() || msg.sender == queenPalace.artist() || msg.sender == queenPalace.daoExecutor(), "Not Owner, Artist, DAO" ); } function isChiefArtist() internal view { require(msg.sender == queenPalace.artist(), "Not Chief Artist"); } function isArtist() internal view { require(queenPalace.isArtist(msg.sender), "Not Artist"); } function isChiefDeveloper() internal view { require(msg.sender == queenPalace.developer(), "Not Chief Dev"); } function isDeveloper() internal view { require(queenPalace.isDeveloper(msg.sender), "Not Dev"); } function isMinter() internal view { require(msg.sender == queenPalace.minter(), "Not Minter"); } function isActor() internal view { require( msg.sender == owner() || queenPalace.isArtist(msg.sender) || queenPalace.isDeveloper(msg.sender), "Invalid Actor" ); } function isActorOrDAO() internal view { require( msg.sender == owner() || queenPalace.isArtist(msg.sender) || queenPalace.isDeveloper(msg.sender) || msg.sender == queenPalace.daoExecutor(), "Invalid Actor, DAO" ); } function isOwnerOrChiefArtist() internal view { require( msg.sender == owner() || msg.sender == queenPalace.artist(), "Not Owner, Chief Artist" ); } function isOwnerOrArtist() internal view { require( msg.sender == owner() || queenPalace.isArtist(msg.sender), "Not Owner, Artist" ); } function isOwnerOrChiefDeveloper() internal view { require( msg.sender == owner() || msg.sender == queenPalace.developer(), "Not Owner, Chief Developer" ); } function isOwnerOrDeveloper() internal view { require( msg.sender == owner() || queenPalace.isDeveloper(msg.sender), "Not Owner, Developer" ); } function isOwnerOrChiefDeveloperOrDAO() internal view { require( msg.sender == owner() || msg.sender == queenPalace.developer() || msg.sender == queenPalace.daoExecutor(), "Not Owner, Chief Developer, DAO" ); } function isOwnerOrDeveloperOrDAO() internal view { require( msg.sender == owner() || queenPalace.isDeveloper(msg.sender) || msg.sender == queenPalace.daoExecutor(), "Not Owner, Developer, DAO" ); } function isOwnerOrArtistOrDAO() internal view { require( msg.sender == owner() || queenPalace.isArtist(msg.sender) || msg.sender == queenPalace.daoExecutor(), "Not Owner, Artist, DAO" ); } function isOwnerOrDAO() internal view { require( msg.sender == owner() || msg.sender == queenPalace.daoExecutor(), "Not Owner, DAO" ); } function isDAO() internal view { require(msg.sender == queenPalace.daoExecutor(), "Not DAO"); } function isOwnerOrMinter() internal view { require( msg.sender == owner() || msg.sender == queenPalace.minter(), "Not Owner, Minter" ); } function isOwnerOrAuctionHouse() internal view { require( msg.sender == owner() || msg.sender == address(queenPalace.QueenAuctionHouse()), "Not Owner, Auction House" ); } function isOwnerOrAuctionHouseProxy() internal view { require( msg.sender == owner() || msg.sender == address(queenPalace.QueenAuctionHouseProxyAddr()), "Not Owner, Auction House" ); } function isOwnerOrQueenPalace() internal view { require( msg.sender == owner() || msg.sender == address(queenPalace), "Not Owner,Queen Palace" ); } function isOnImplementation() internal view { require(queenPalace.isOnImplementation(), "Not On Implementation"); } function isOnImplementationOrDAO() internal view { require( queenPalace.isOnImplementation() || msg.sender == queenPalace.daoExecutor(), "Not On Implementation sender not DAO" ); } function isOnImplementationOrPaused() internal view { require( queenPalace.isOnImplementation() || paused(), "Not On Implementation,Paused" ); } }
// SPDX-License-Identifier: MIT /// @title Interface for QueenE NFT Token pragma solidity ^0.8.9; import {IBaseContractController} from "./IBaseContractController.sol"; interface IRoyalTower is IBaseContractController { event DAOTreasureDeposit( address indexed sender, uint256 queeneAuctionId, uint256 value ); event DAOTreasureWithdraw( address indexed payed, uint256 withdrawId, uint256 value ); function depositToDAOTreasure(uint256 _queeneAuctionId) external payable; function retrieveAuctionFallbackFunds() external; }
// SPDX-License-Identifier: MIT /// @title Interface for Queen Staff Contract pragma solidity ^0.8.9; import {IQueenLab} from "../interfaces/IQueenLab.sol"; import {IQueenTraits} from "../interfaces/IQueenTraits.sol"; import {IQueenE} from "../interfaces/IQueenE.sol"; import {IQueenAuctionHouse} from "../interfaces/IQueenAuctionHouse.sol"; interface IQueenPalace { function royalMuseum() external view returns (address); function isOnImplementation() external view returns (bool status); function artist() external view returns (address); function isArtist(address addr) external view returns (bool); function dao() external view returns (address); function daoExecutor() external view returns (address); function RoyalTowerAddr() external view returns (address); function developer() external view returns (address); function isDeveloper(address devAddr) external view returns (bool); function minter() external view returns (address); function QueenLab() external view returns (IQueenLab); function QueenTraits() external view returns (IQueenTraits); function QueenAuctionHouse() external view returns (IQueenAuctionHouse); function QueenE() external view returns (IQueenE); function whiteListed() external view returns (uint256); function isWhiteListed(address _addr) external view returns (bool); function QueenAuctionHouseProxyAddr() external view returns (address); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { 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 v4.4.1 (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 Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (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 /// @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 Interface for Base Contract Controller pragma solidity ^0.8.9; import {IERC165} from "@openzeppelin/contracts/interfaces/IERC165.sol"; interface IBaseContractController is IERC165 { //function supportsInterface(bytes4 interfaceID) external view returns (bool); function isOwner(address _address) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.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. */ 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; 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; assembly { result := store } return result; } }
// 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 /// @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 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 NFT Token pragma solidity ^0.8.9; import {IBaseContractControllerUpgradeable} from "./IBaseContractControllerUpgradeable.sol"; interface IQueenAuctionHouse is IBaseContractControllerUpgradeable { event WithdrawnFallbackFunds(address withdrawer, uint256 amount); event AuctionSettled( uint256 indexed queeneId, address settler, uint256 amount ); event AuctionStarted( uint256 indexed queeneId, uint256 startTime, uint256 endTime, uint256 initialBid ); event AuctionExtended(uint256 indexed queeneId, uint256 endTime); event AuctionBid( uint256 indexed queeneId, address sender, uint256 value, bool extended ); event AuctionEnded(uint256 indexed queeneId, address winner, uint256 amount); event AuctionTimeToleranceUpdated(uint256 timeBuffer); event AuctionInitialBidUpdated(uint256 initialBid); event AuctionDurationUpdated(uint256 duration); event AuctionMinBidIncrementPercentageUpdated( uint256 minBidIncrementPercentage ); function endAuction() external; function bid(uint256 queeneId) external payable; function pause() external; function unpause() external; function setTimeTolerance(uint256 _timeTolerance) external; function setBidRaiseRate(uint8 _bidRaiseRate) external; function setInitialBid(uint256 _initialBid) external; function setDuration(uint256 _duration) external; }
// 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); }
// 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 /// @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 Base Contract Controller pragma solidity ^0.8.9; import {IERC165Upgradeable} from "@openzeppelin/contracts-upgradeable/interfaces/IERC165Upgradeable.sol"; interface IBaseContractControllerUpgradeable is IERC165Upgradeable { //function supportsInterface(bytes4 interfaceID) external view returns (bool); function isOwner(address _address) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC165.sol) pragma solidity ^0.8.0; import "../utils/introspection/IERC165Upgradeable.sol";
// 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 IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 700 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"contract IQueenPalace","name":"_queenPalace","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"queeneAuctionId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"DAOTreasureDeposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"payed","type":"address"},{"indexed":false,"internalType":"uint256","name":"withdrawId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"DAOTreasureWithdraw","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":"daoTreasure","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_queeneAuctionId","type":"uint256"}],"name":"depositToDAOTreasure","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isOwner","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":"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":[],"name":"retrieveAuctionFallbackFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IQueenPalace","name":"_queenPalace","type":"address"}],"name":"setQueenPalace","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":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"address payable","name":"_funded","type":"address"}],"name":"withdrawFromTreasure","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561001057600080fd5b5060405161152938038061152983398101604081905261002f91610154565b6001805460ff191681556002556100453361007f565b61005563c515960360e01b6100d1565b6001600555600480546001600160a01b0319166001600160a01b0392909216919091179055610184565b600380546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160e01b0319808216141561012f5760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015260640160405180910390fd5b6001600160e01b0319166000908152602081905260409020805460ff19166001179055565b60006020828403121561016657600080fd5b81516001600160a01b038116811461017d57600080fd5b9392505050565b611396806101936000396000f3fe6080604052600436106100d65760003560e01c80635c975abb1161007f5780638456cb59116100595780638456cb59146102035780638da5cb5b14610218578063bc7321ab14610240578063f2fde38b14610253576100f1565b80635c975abb146101c1578063715018a6146101d95780637966b7a8146101ee576100f1565b806337e4a5f8116100b057806337e4a5f81461016e578063395062ce1461018c5780633f4ba83a146101ac576100f1565b806301ffc9a7146100f95780631adca4b41461012e5780632f54bf6e1461014e576100f1565b366100f1576100e3610273565b6100ef33600034610369565b005b6100e3610273565b34801561010557600080fd5b506101196101143660046111da565b610419565b60405190151581526020015b60405180910390f35b34801561013a57600080fd5b506100ef610149366004611220565b610459565b34801561015a57600080fd5b50610119610169366004611250565b610510565b34801561017a57600080fd5b50600654604051908152602001610125565b34801561019857600080fd5b506100ef6101a7366004611250565b61053e565b3480156101b857600080fd5b506100ef61061e565b3480156101cd57600080fd5b5060015460ff16610119565b3480156101e557600080fd5b506100ef6106c9565b3480156101fa57600080fd5b506100ef61072d565b34801561020f57600080fd5b506100ef610994565b34801561022457600080fd5b506003546040516001600160a01b039091168152602001610125565b6100ef61024e36600461126d565b610a3c565b34801561025f57600080fd5b506100ef61026e366004611250565b610a9d565b6003546001600160a01b0316331480610316575060048054604080516307e5342960e41b815290516001600160a01b0390921692637e534290928282019260209290829003018186803b1580156102c957600080fd5b505afa1580156102dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103019190611286565b6001600160a01b0316336001600160a01b0316145b6103675760405162461bcd60e51b815260206004820152601860248201527f4e6f74204f776e65722c2041756374696f6e20486f757365000000000000000060448201526064015b60405180910390fd5b565b600081116103b95760405162461bcd60e51b815260206004820152600e60248201527f696e76616c696420616d6f756e74000000000000000000000000000000000000604482015260640161035e565b80600660008282546103cb91906112b9565b909155505060408051838152602081018390526001600160a01b038516917f01577fc82376a680533f8b6ccf8346bab1114a23ca3dd7b959a542304ea642c4910160405180910390a2505050565b60006301ffc9a760e01b6001600160e01b03198316148061045357506001600160e01b0319821660009081526020819052604090205460ff165b92915050565b6002805414156104ab5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161035e565b6002805560015460ff16156104f55760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161035e565b6104fd610b68565b6105078183610c2c565b50506001600255565b6000816001600160a01b031661052e6003546001600160a01b031690565b6001600160a01b03161492915050565b6002805414156105905760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161035e565b6002805560015460ff166105dd5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161035e565b6105e5610cfb565b6105ed610dea565b6004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383161790555b506001600255565b6003546001600160a01b031633146106785760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161035e565b60015460ff166106c15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161035e565b610367610f51565b6003546001600160a01b031633146107235760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161035e565b6103676000610fe4565b60028054141561077f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161035e565b6002805560015460ff16156107c95760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161035e565b6003546001600160a01b031633146108235760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161035e565b6000600460009054906101000a90046001600160a01b03166001600160a01b0316637e5342906040518163ffffffff1660e01b815260040160206040518083038186803b15801561087357600080fd5b505afa158015610887573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ab9190611286565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166317b2a8c560e01b17905290516001600160a01b03929092169161090191906112d1565b6000604051808303816000865af19150503d806000811461093e576040519150601f19603f3d011682016040523d82523d6000602084013e610943565b606091505b50509050806106165760405162461bcd60e51b815260206004820152601f60248201527f4572726f722072657472696576696e672066616c6c6261636b2066756e647300604482015260640161035e565b6003546001600160a01b031633146109ee5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161035e565b60015460ff1615610a345760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161035e565b610367611043565b600280541415610a8e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161035e565b60028055610616338234610369565b6003546001600160a01b03163314610af75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161035e565b6001600160a01b038116610b5c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161035e565b610b6581610fe4565b50565b600480546040805163406194c560e01b815290516001600160a01b039092169263406194c5928282019260209290829003018186803b158015610baa57600080fd5b505afa158015610bbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be29190611286565b6001600160a01b0316336001600160a01b0316146103675760405162461bcd60e51b81526020600482015260076024820152664e6f742044414f60c81b604482015260640161035e565b600654811115610c7e5760405162461bcd60e51b815260206004820152601f60248201527f4e6f7420656e6f7567682062616c616e6365206f6e2074726561737572652100604482015260640161035e565b610c8882826110bc565b8060066000828254610c9a919061130c565b9091555050600580546001600160a01b038416917ffa0bf26cd71c034a7a50d653a0d786707baa27046bafad7f3c0b64667b91670d91906000610cdc83611323565b9091555060408051918252602082018590520160405180910390a25050565b6003546001600160a01b0316331480610d9e5750600480546040805163406194c560e01b815290516001600160a01b039092169263406194c5928282019260209290829003018186803b158015610d5157600080fd5b505afa158015610d65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d899190611286565b6001600160a01b0316336001600160a01b0316145b6103675760405162461bcd60e51b815260206004820152600e60248201527f4e6f74204f776e65722c2044414f000000000000000000000000000000000000604482015260640161035e565b60048054604080516302b2897560e11b815290516001600160a01b039092169263056512ea928282019260209290829003018186803b158015610e2c57600080fd5b505afa158015610e40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e64919061133e565b80610ef95750600480546040805163406194c560e01b815290516001600160a01b039092169263406194c5928282019260209290829003018186803b158015610eac57600080fd5b505afa158015610ec0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee49190611286565b6001600160a01b0316336001600160a01b0316145b6103675760405162461bcd60e51b8152602060048201526024808201527f4e6f74204f6e20496d706c656d656e746174696f6e2073656e646572206e6f746044820152632044414f60e01b606482015260840161035e565b60015460ff16610f9a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161035e565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60015460ff16156110895760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161035e565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833610fc7565b8047101561110c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161035e565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611159576040519150601f19603f3d011682016040523d82523d6000602084013e61115e565b606091505b50509050806111d55760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161035e565b505050565b6000602082840312156111ec57600080fd5b81356001600160e01b03198116811461120457600080fd5b9392505050565b6001600160a01b0381168114610b6557600080fd5b6000806040838503121561123357600080fd5b8235915060208301356112458161120b565b809150509250929050565b60006020828403121561126257600080fd5b81356112048161120b565b60006020828403121561127f57600080fd5b5035919050565b60006020828403121561129857600080fd5b81516112048161120b565b634e487b7160e01b600052601160045260246000fd5b600082198211156112cc576112cc6112a3565b500190565b6000825160005b818110156112f257602081860181015185830152016112d8565b81811115611301576000828501525b509190910192915050565b60008282101561131e5761131e6112a3565b500390565b6000600019821415611337576113376112a3565b5060010190565b60006020828403121561135057600080fd5b8151801515811461120457600080fdfea2646970667358221220d9a42d8d3a297217d81c48b17c514792b6884022ad92c69d4f1e6e487afc5d3864736f6c634300080900330000000000000000000000002fa631c48374a280eb04cd41490665eca635a355
Deployed Bytecode
0x6080604052600436106100d65760003560e01c80635c975abb1161007f5780638456cb59116100595780638456cb59146102035780638da5cb5b14610218578063bc7321ab14610240578063f2fde38b14610253576100f1565b80635c975abb146101c1578063715018a6146101d95780637966b7a8146101ee576100f1565b806337e4a5f8116100b057806337e4a5f81461016e578063395062ce1461018c5780633f4ba83a146101ac576100f1565b806301ffc9a7146100f95780631adca4b41461012e5780632f54bf6e1461014e576100f1565b366100f1576100e3610273565b6100ef33600034610369565b005b6100e3610273565b34801561010557600080fd5b506101196101143660046111da565b610419565b60405190151581526020015b60405180910390f35b34801561013a57600080fd5b506100ef610149366004611220565b610459565b34801561015a57600080fd5b50610119610169366004611250565b610510565b34801561017a57600080fd5b50600654604051908152602001610125565b34801561019857600080fd5b506100ef6101a7366004611250565b61053e565b3480156101b857600080fd5b506100ef61061e565b3480156101cd57600080fd5b5060015460ff16610119565b3480156101e557600080fd5b506100ef6106c9565b3480156101fa57600080fd5b506100ef61072d565b34801561020f57600080fd5b506100ef610994565b34801561022457600080fd5b506003546040516001600160a01b039091168152602001610125565b6100ef61024e36600461126d565b610a3c565b34801561025f57600080fd5b506100ef61026e366004611250565b610a9d565b6003546001600160a01b0316331480610316575060048054604080516307e5342960e41b815290516001600160a01b0390921692637e534290928282019260209290829003018186803b1580156102c957600080fd5b505afa1580156102dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103019190611286565b6001600160a01b0316336001600160a01b0316145b6103675760405162461bcd60e51b815260206004820152601860248201527f4e6f74204f776e65722c2041756374696f6e20486f757365000000000000000060448201526064015b60405180910390fd5b565b600081116103b95760405162461bcd60e51b815260206004820152600e60248201527f696e76616c696420616d6f756e74000000000000000000000000000000000000604482015260640161035e565b80600660008282546103cb91906112b9565b909155505060408051838152602081018390526001600160a01b038516917f01577fc82376a680533f8b6ccf8346bab1114a23ca3dd7b959a542304ea642c4910160405180910390a2505050565b60006301ffc9a760e01b6001600160e01b03198316148061045357506001600160e01b0319821660009081526020819052604090205460ff165b92915050565b6002805414156104ab5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161035e565b6002805560015460ff16156104f55760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161035e565b6104fd610b68565b6105078183610c2c565b50506001600255565b6000816001600160a01b031661052e6003546001600160a01b031690565b6001600160a01b03161492915050565b6002805414156105905760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161035e565b6002805560015460ff166105dd5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161035e565b6105e5610cfb565b6105ed610dea565b6004805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383161790555b506001600255565b6003546001600160a01b031633146106785760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161035e565b60015460ff166106c15760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161035e565b610367610f51565b6003546001600160a01b031633146107235760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161035e565b6103676000610fe4565b60028054141561077f5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161035e565b6002805560015460ff16156107c95760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161035e565b6003546001600160a01b031633146108235760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161035e565b6000600460009054906101000a90046001600160a01b03166001600160a01b0316637e5342906040518163ffffffff1660e01b815260040160206040518083038186803b15801561087357600080fd5b505afa158015610887573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108ab9190611286565b60408051600481526024810182526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff166317b2a8c560e01b17905290516001600160a01b03929092169161090191906112d1565b6000604051808303816000865af19150503d806000811461093e576040519150601f19603f3d011682016040523d82523d6000602084013e610943565b606091505b50509050806106165760405162461bcd60e51b815260206004820152601f60248201527f4572726f722072657472696576696e672066616c6c6261636b2066756e647300604482015260640161035e565b6003546001600160a01b031633146109ee5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161035e565b60015460ff1615610a345760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161035e565b610367611043565b600280541415610a8e5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00604482015260640161035e565b60028055610616338234610369565b6003546001600160a01b03163314610af75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604482015260640161035e565b6001600160a01b038116610b5c5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161035e565b610b6581610fe4565b50565b600480546040805163406194c560e01b815290516001600160a01b039092169263406194c5928282019260209290829003018186803b158015610baa57600080fd5b505afa158015610bbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610be29190611286565b6001600160a01b0316336001600160a01b0316146103675760405162461bcd60e51b81526020600482015260076024820152664e6f742044414f60c81b604482015260640161035e565b600654811115610c7e5760405162461bcd60e51b815260206004820152601f60248201527f4e6f7420656e6f7567682062616c616e6365206f6e2074726561737572652100604482015260640161035e565b610c8882826110bc565b8060066000828254610c9a919061130c565b9091555050600580546001600160a01b038416917ffa0bf26cd71c034a7a50d653a0d786707baa27046bafad7f3c0b64667b91670d91906000610cdc83611323565b9091555060408051918252602082018590520160405180910390a25050565b6003546001600160a01b0316331480610d9e5750600480546040805163406194c560e01b815290516001600160a01b039092169263406194c5928282019260209290829003018186803b158015610d5157600080fd5b505afa158015610d65573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d899190611286565b6001600160a01b0316336001600160a01b0316145b6103675760405162461bcd60e51b815260206004820152600e60248201527f4e6f74204f776e65722c2044414f000000000000000000000000000000000000604482015260640161035e565b60048054604080516302b2897560e11b815290516001600160a01b039092169263056512ea928282019260209290829003018186803b158015610e2c57600080fd5b505afa158015610e40573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e64919061133e565b80610ef95750600480546040805163406194c560e01b815290516001600160a01b039092169263406194c5928282019260209290829003018186803b158015610eac57600080fd5b505afa158015610ec0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ee49190611286565b6001600160a01b0316336001600160a01b0316145b6103675760405162461bcd60e51b8152602060048201526024808201527f4e6f74204f6e20496d706c656d656e746174696f6e2073656e646572206e6f746044820152632044414f60e01b606482015260840161035e565b60015460ff16610f9a5760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161035e565b6001805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b600380546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b60015460ff16156110895760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161035e565b6001805460ff1916811790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25833610fc7565b8047101561110c5760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161035e565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611159576040519150601f19603f3d011682016040523d82523d6000602084013e61115e565b606091505b50509050806111d55760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161035e565b505050565b6000602082840312156111ec57600080fd5b81356001600160e01b03198116811461120457600080fd5b9392505050565b6001600160a01b0381168114610b6557600080fd5b6000806040838503121561123357600080fd5b8235915060208301356112458161120b565b809150509250929050565b60006020828403121561126257600080fd5b81356112048161120b565b60006020828403121561127f57600080fd5b5035919050565b60006020828403121561129857600080fd5b81516112048161120b565b634e487b7160e01b600052601160045260246000fd5b600082198211156112cc576112cc6112a3565b500190565b6000825160005b818110156112f257602081860181015185830152016112d8565b81811115611301576000828501525b509190910192915050565b60008282101561131e5761131e6112a3565b500390565b6000600019821415611337576113376112a3565b5060010190565b60006020828403121561135057600080fd5b8151801515811461120457600080fdfea2646970667358221220d9a42d8d3a297217d81c48b17c514792b6884022ad92c69d4f1e6e487afc5d3864736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000002fa631c48374a280eb04cd41490665eca635a355
-----Decoded View---------------
Arg [0] : _queenPalace (address): 0x2fa631c48374A280Eb04cd41490665ecA635A355
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000002fa631c48374a280eb04cd41490665eca635a355
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.