Overview
APE Balance
APE Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 17 from a total of 17 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Start Dungeon Ru... | 11195582 | 26 hrs ago | IN | 0.001 APE | 0.01184022 | ||||
Start Dungeon Ru... | 11195582 | 26 hrs ago | IN | 0.001 APE | 0.01184022 | ||||
Start Dungeon Ru... | 11195580 | 26 hrs ago | IN | 0.001 APE | 0.01191139 | ||||
Start Dungeon Ru... | 11195580 | 26 hrs ago | IN | 0.001 APE | 0.01191139 | ||||
Start Dungeon Ru... | 11195580 | 26 hrs ago | IN | 0.001 APE | 0.01191139 | ||||
Start Dungeon Ru... | 11195580 | 26 hrs ago | IN | 0.001 APE | 0.01191139 | ||||
Start Dungeon Ru... | 11195579 | 26 hrs ago | IN | 0.001 APE | 0.01191139 | ||||
Start Dungeon Ru... | 11195579 | 26 hrs ago | IN | 0.001 APE | 0.01016758 | ||||
Start Dungeon Ru... | 11195579 | 26 hrs ago | IN | 0.001 APE | 0.01191139 | ||||
Start Dungeon Ru... | 11195578 | 26 hrs ago | IN | 0.001 APE | 0.01016758 | ||||
Start Dungeon Ru... | 11195578 | 26 hrs ago | IN | 0.001 APE | 0.01191139 | ||||
Start Dungeon Ru... | 11195578 | 26 hrs ago | IN | 0.001 APE | 0.01191139 | ||||
Start Dungeon Ru... | 11195578 | 26 hrs ago | IN | 0.001 APE | 0.01016758 | ||||
Start Dungeon Ru... | 11195577 | 26 hrs ago | IN | 0.001 APE | 0.01191139 | ||||
Start Dungeon Ru... | 11195577 | 26 hrs ago | IN | 0.001 APE | 0.01191139 | ||||
Start Dungeon Ru... | 11195577 | 26 hrs ago | IN | 0.001 APE | 0.01321547 | ||||
Initialize | 11195576 | 26 hrs ago | IN | 0 APE | 0.00179251 |
Latest 16 internal transactions
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
11195582 | 26 hrs ago | 0.001 APE | ||||
11195582 | 26 hrs ago | 0.001 APE | ||||
11195580 | 26 hrs ago | 0.001 APE | ||||
11195580 | 26 hrs ago | 0.001 APE | ||||
11195580 | 26 hrs ago | 0.001 APE | ||||
11195580 | 26 hrs ago | 0.001 APE | ||||
11195579 | 26 hrs ago | 0.001 APE | ||||
11195579 | 26 hrs ago | 0.001 APE | ||||
11195579 | 26 hrs ago | 0.001 APE | ||||
11195578 | 26 hrs ago | 0.001 APE | ||||
11195578 | 26 hrs ago | 0.001 APE | ||||
11195578 | 26 hrs ago | 0.001 APE | ||||
11195578 | 26 hrs ago | 0.001 APE | ||||
11195577 | 26 hrs ago | 0.001 APE | ||||
11195577 | 26 hrs ago | 0.001 APE | ||||
11195577 | 26 hrs ago | 0.001 APE |
Loading...
Loading
Contract Source Code Verified (Exact Match)
Contract Name:
DungeonEntry
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.23; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./interfaces/IDungeonEntry.sol"; import "./interfaces/IDungeonGame.sol"; import "./interfaces/INFTStats.sol"; import "./interfaces/IPrizePool.sol"; import "./interfaces/ICollectionRegistry.sol"; /// @title DungeonEntry /// @notice Manages dungeon entry and active run state for NFTs contract DungeonEntry is IDungeonEntry, Ownable, ReentrancyGuard { // Core contract references ICollectionRegistry public immutable collectionRegistry; INFTStats public immutable nftStats; IPrizePool public prizePool; IDungeonGame public dungeonGame; bool private initialized; // Entry fee in wei uint256 private entryFee; // Maximum time allowed for a dungeon run (24 hours) uint256 private constant MAX_RUN_DURATION = 24 hours; // Mapping to track NFTs in the dungeon mapping(address => mapping(uint256 => bool)) private inDungeon; // Events event EntryFeeUpdated(uint256 newFee); event RunExpired(address indexed collection, uint256 indexed tokenId); event DungeonEntryInitialized(address indexed prizePool, address indexed dungeonGame); constructor( address _collectionRegistry, address _nftStats, uint256 _initialEntryFee ) Ownable() { require(_collectionRegistry != address(0), "Invalid registry address"); require(_nftStats != address(0), "Invalid stats address"); collectionRegistry = ICollectionRegistry(_collectionRegistry); nftStats = INFTStats(_nftStats); entryFee = _initialEntryFee; } /// @notice Initialize the DungeonEntry with required contract addresses /// @param _prizePool Address of the PrizePool contract /// @param _dungeonGame Address of the DungeonGame contract function initialize( address _prizePool, address _dungeonGame ) external onlyOwner { require(!initialized, "Already initialized"); require(_prizePool != address(0), "Invalid prize pool address"); require(_dungeonGame != address(0), "Invalid dungeon game address"); prizePool = IPrizePool(_prizePool); dungeonGame = IDungeonGame(_dungeonGame); initialized = true; emit DungeonEntryInitialized(_prizePool, _dungeonGame); } /// @notice Start a new dungeon run for an NFT /// @param collection Address of the NFT collection /// @param tokenId Token ID of the NFT function startDungeonRun( address collection, uint256 tokenId ) external payable nonReentrant { require(initialized, "Not initialized"); // Check entry fee require(msg.value >= entryFee, "Insufficient entry fee"); // Verify collection is whitelisted require(collectionRegistry.isWhitelisted(collection), "Collection not whitelisted"); // Verify NFT ownership require(IERC721(collection).ownerOf(tokenId) == msg.sender, "Not NFT owner"); // Check if NFT is already in dungeon require(!inDungeon[collection][tokenId], "Already in dungeon"); // Initialize stats if needed if (!nftStats.isInitialized(collection, tokenId)) { nftStats.initializeStats(collection, tokenId); } // Add character to dungeon queue dungeonGame.enterDungeon(collection, tokenId); // Mark NFT as in dungeon inDungeon[collection][tokenId] = true; // Forward entry fee to prize pool prizePool.depositEntryFee{value: entryFee}(); // Refund excess payment if any uint256 excess = msg.value - entryFee; if (excess > 0) { (bool success, ) = msg.sender.call{value: excess}(""); require(success, "Refund failed"); } emit DungeonRunStarted(collection, tokenId, msg.sender, entryFee); } /// @notice End an active dungeon run /// @param collection Address of the NFT collection /// @param tokenId Token ID of the NFT /// @param success Whether the run was successful function endDungeonRun( address collection, uint256 tokenId, bool success ) external { require(initialized, "Not initialized"); // Only DungeonGame contract can end runs require(msg.sender == address(dungeonGame), "Not authorized"); require(inDungeon[collection][tokenId], "Not in dungeon"); // Mark NFT as no longer in dungeon inDungeon[collection][tokenId] = false; emit DungeonRunEnded(collection, tokenId, success); } /// @notice Update the entry fee /// @param newFee New entry fee in wei function updateEntryFee(uint256 newFee) external onlyOwner { entryFee = newFee; emit EntryFeeUpdated(newFee); } /// @notice Check if an NFT has an active dungeon run /// @param collection Address of the NFT collection /// @param tokenId Token ID of the NFT /// @return bool True if NFT has an active run function hasActiveRun( address collection, uint256 tokenId ) public view returns (bool) { if (!inDungeon[collection][tokenId]) return false; uint256 roomNumber = dungeonGame.getCharacterRoomNumber(collection, tokenId); if (roomNumber == 0) return false; return true; } /// @notice Get the current entry fee for dungeon runs /// @return uint256 Current entry fee in wei function getEntryFee() external view returns (uint256) { return entryFee; } /// @notice Get time remaining for an active run /// @param collection Address of the NFT collection /// @param tokenId Token ID of the NFT /// @return uint256 Time remaining in seconds, 0 if no active run function getTimeRemaining( address collection, uint256 tokenId ) external view returns (uint256) { if (!inDungeon[collection][tokenId]) return 0; uint256 roomNumber = dungeonGame.getCharacterRoomNumber(collection, tokenId); if (roomNumber == 0) return 0; return 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.8.0) (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Note that the caller is responsible to confirm that the recipient is capable of receiving ERC721 * or else they may be permanently lost. Usage of {safeTransferFrom} prevents loss, though the caller must * understand this adds an external call which potentially creates a reentrancy vulnerability. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.8.0) (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() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be _NOT_ENTERED require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; } function _nonReentrantAfter() private { // 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 pragma solidity ^0.8.23; /// @title IDungeonEntry /// @notice Interface for managing dungeon entry and run initialization interface IDungeonEntry { /// @notice Structure for active dungeon run state struct DungeonRun { uint256 currentHp; uint256 currentRoom; bool isActive; } /// @notice Event emitted when a dungeon run is started event DungeonRunStarted( address indexed collection, uint256 indexed tokenId, address indexed player, uint256 entryFee ); /// @notice Event emitted when a dungeon run is ended event DungeonRunEnded( address indexed collection, uint256 indexed tokenId, bool success ); /// @notice Start a new dungeon run for an NFT /// @param collection Address of the NFT collection /// @param tokenId Token ID of the NFT function startDungeonRun(address collection, uint256 tokenId) external payable; /// @notice End an active dungeon run (called by DungeonGame) /// @param collection Address of the NFT collection /// @param tokenId Token ID of the NFT /// @param success Whether the run was successful function endDungeonRun(address collection, uint256 tokenId, bool success) external; /// @notice Check if an NFT has an active dungeon run /// @param collection Address of the NFT collection /// @param tokenId Token ID of the NFT /// @return bool True if NFT has an active run function hasActiveRun(address collection, uint256 tokenId) external view returns (bool); /// @notice Get the current entry fee for dungeon runs /// @return uint256 Current entry fee in wei function getEntryFee() external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.23; /// @title IDungeonGame /// @notice Interface for core dungeon game mechanics and progression interface IDungeonGame { /// @notice Structure for dungeon room state struct RoomState { address collection; uint256 tokenId; uint256 entryIndex; // Used for ordering characters uint256 currentHp; uint256 currentAttack; uint256 currentSpeed; bool isOccupied; } /// @notice Structure for encounter results struct EncounterResult { int256 hpChange; string encounterDescription; } /// @notice Structure for character state struct CharacterState { address collection; uint256 tokenId; uint256 currentHp; } /// @notice Event emitted when an encounter is completed event EncounterCompleted( address indexed collection, uint256 indexed tokenId, uint256 roomNumber, uint256 xpGained, bool survived, string encounterDescription ); /// @notice Event emitted when a dungeon run is completed event DungeonCompleted( address indexed collection, uint256 indexed tokenId ); /// @notice Add a new character to the dungeon queue /// @param collection Address of the NFT collection /// @param tokenId Token ID of the NFT function enterDungeon(address collection, uint256 tokenId) external; /// @notice Get the current room number for a character /// @param collection Address of the NFT collection /// @param tokenId Token ID of the NFT /// @return Current room number function getCharacterRoomNumber(address collection, uint256 tokenId) external view returns (uint8); /// @notice Get the current room state for a character /// @param collection Address of the NFT collection /// @param tokenId Token ID of the NFT /// @return Current room state function getCharacterState(address collection, uint256 tokenId) external view returns (CharacterState memory); /// @notice Get the state of a specific room /// @param roomNumber Room number to get state for /// @return CharacterState Memory of the room state function getRoomState(uint256 roomNumber) external view returns (CharacterState memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.23; /// @title INFTStats /// @notice Interface for managing individual NFT stats and progression interface INFTStats { /// @notice Structure for NFT permanent stats struct NFTStatsData { uint256 hp; uint256 attack; uint256 speed; uint256 level; uint256 currentXP; uint256 xpToNextLevel; uint256 dungeonRuns; uint256 successfulRuns; uint256 roomsCleared; bool initialized; } /// @notice Event emitted when an NFT's stats are initialized event StatsInitialized(address indexed collection, uint256 indexed tokenId, uint256 hp, uint256 attack, uint256 speed); /// @notice Event emitted when an NFT's stats are boosted event StatsBoosted(address indexed collection, uint256 indexed tokenId, uint256 newHp, uint256 newAttack, uint256 newSpeed); /// @notice Event emitted when XP is gained event XPGained(address indexed collection, uint256 indexed tokenId, uint256 xpGained, uint256 newTotalXP); /// @notice Event emitted when a level up occurs event LevelUp(address indexed collection, uint256 indexed tokenId, uint256 newLevel, uint256 newHp, uint256 newAttack, uint256 newSpeed); /// @notice Event emitted when a run is recorded event RunRecorded(address indexed collection, uint256 indexed tokenId, bool success, uint256 roomsCleared, uint256 xpGained); /// @notice Initialize stats for an NFT based on its collection's base stats /// @param collection Address of the NFT collection /// @param tokenId Token ID of the NFT function initializeStats(address collection, uint256 tokenId) external; /// @notice Award XP for dungeon progress /// @param collection Address of the NFT collection /// @param tokenId Token ID of the NFT /// @param xpAmount Amount of XP to award /// @param roomsCleared Number of rooms cleared in this run function awardXP( address collection, uint256 tokenId, uint256 xpAmount, uint256 roomsCleared ) external; /// @notice Calculate XP required for next level /// @param currentLevel Current level of the NFT /// @return uint256 XP required for next level function getXPForNextLevel(uint256 currentLevel) external pure returns (uint256); /// @notice Get the stat increases for a level up /// @param collection Address of the NFT collection /// @param tokenId Token ID of the NFT /// @return hpIncrease Amount HP increases /// @return attackIncrease Amount Attack increases /// @return speedIncrease Amount Speed increases function getLevelUpStats( address collection, uint256 tokenId ) external view returns ( uint256 hpIncrease, uint256 attackIncrease, uint256 speedIncrease ); /// @notice Record a dungeon run attempt /// @param collection Address of the NFT collection /// @param tokenId Token ID of the NFT /// @param success Whether the run was successful function recordRun(address collection, uint256 tokenId, bool success) external; /// @notice Get current stats for an NFT /// @param collection Address of the NFT collection /// @param tokenId Token ID of the NFT /// @return NFTStatsData struct containing current stats function getStats(address collection, uint256 tokenId) external view returns (NFTStatsData memory); /// @notice Check if an NFT has been initialized /// @param collection Address of the NFT collection /// @param tokenId Token ID of the NFT /// @return bool True if NFT has been initialized function isInitialized(address collection, uint256 tokenId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.23; /// @title IPrizePool /// @notice Interface for managing dungeon rewards and prize distribution interface IPrizePool { /// @notice Event emitted when entry fee is deposited event EntryFeeDeposited(address indexed collection, uint256 indexed tokenId, uint256 amount); /// @notice Event emitted when reward is claimed event RewardClaimed(address indexed collection, uint256 indexed tokenId, address indexed recipient, uint256 amount); /// @notice Event emitted when prize pool parameters are updated event PrizePoolParametersUpdated(uint256 entryFee, uint256 winnerShare); /// @notice Deposit entry fee for a dungeon run function depositEntryFee() external payable; /// @notice Register a winner and immediately transfer their prize /// @param collection Address of the NFT collection /// @param tokenId Token ID of the NFT function registerWinner(address collection, uint256 tokenId) external; /// @notice Get current prize pool amount /// @return uint256 Current prize pool amount function getCurrentPrizePool() external view returns (uint256); /// @notice Gets the current entry fee /// @return uint256 Current entry fee function getEntryFee() external view returns (uint256); /// @notice Gets total entry fees collected /// @return uint256 Total entry fees function getTotalEntryFees() external view returns (uint256); /// @notice Gets total prizes paid out /// @return uint256 Total prizes paid function getTotalPrizesPaid() external view returns (uint256); /// @notice Gets current treasury balance /// @return uint256 Current treasury balance function getTreasuryBalance() external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.23; /// @title ICollectionRegistry /// @notice Interface for managing whitelisted NFT collections and their base stats interface ICollectionRegistry { /// @notice Stats structure for NFT collections struct CollectionStats { uint256 baseHp; uint256 baseAttack; uint256 baseSpeed; bool isWhitelisted; } /// @notice Event emitted when a collection is whitelisted event CollectionWhitelisted(address indexed collection, uint256 baseHp, uint256 baseAttack, uint256 baseSpeed); /// @notice Event emitted when a collection's stats are updated event CollectionStatsUpdated(address indexed collection, uint256 baseHp, uint256 baseAttack, uint256 baseSpeed); /// @notice Event emitted when a collection is removed from whitelist event CollectionRemoved(address indexed collection); /// @notice Whitelist a new NFT collection with base stats /// @param collection Address of the NFT collection /// @param baseHp Initial HP for NFTs from this collection /// @param baseAttack Initial Attack for NFTs from this collection /// @param baseSpeed Initial Speed for NFTs from this collection function whitelistCollection( address collection, uint256 baseHp, uint256 baseAttack, uint256 baseSpeed ) external; /// @notice Update base stats for a whitelisted collection /// @param collection Address of the NFT collection /// @param baseHp New base HP /// @param baseAttack New base Attack /// @param baseSpeed New base Speed function updateCollectionStats( address collection, uint256 baseHp, uint256 baseAttack, uint256 baseSpeed ) external; /// @notice Remove a collection from the whitelist /// @param collection Address of the NFT collection to remove function removeCollection(address collection) external; /// @notice Check if a collection is whitelisted /// @param collection Address of the NFT collection to check /// @return bool True if collection is whitelisted function isWhitelisted(address collection) external view returns (bool); /// @notice Get base stats for a collection /// @param collection Address of the NFT collection /// @return CollectionStats struct containing base stats function getCollectionStats(address collection) external view returns (CollectionStats memory); }
// 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/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); }
{ "remappings": [ "@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/", "forge-std/=lib/forge-std/src/", "@pythnetwork/=lib/@pythnetwork/", "pyth-sdk-solidity/=lib/pyth-sdk-solidity/" ], "optimizer": { "enabled": true, "runs": 200 }, "metadata": { "useLiteralContent": false, "bytecodeHash": "ipfs", "appendCBOR": true }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "evmVersion": "paris", "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_collectionRegistry","type":"address"},{"internalType":"address","name":"_nftStats","type":"address"},{"internalType":"uint256","name":"_initialEntryFee","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"prizePool","type":"address"},{"indexed":true,"internalType":"address","name":"dungeonGame","type":"address"}],"name":"DungeonEntryInitialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collection","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"success","type":"bool"}],"name":"DungeonRunEnded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collection","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"player","type":"address"},{"indexed":false,"internalType":"uint256","name":"entryFee","type":"uint256"}],"name":"DungeonRunStarted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"EntryFeeUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"collection","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"RunExpired","type":"event"},{"inputs":[],"name":"collectionRegistry","outputs":[{"internalType":"contract ICollectionRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dungeonGame","outputs":[{"internalType":"contract IDungeonGame","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"success","type":"bool"}],"name":"endDungeonRun","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getEntryFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTimeRemaining","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"hasActiveRun","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_prizePool","type":"address"},{"internalType":"address","name":"_dungeonGame","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"nftStats","outputs":[{"internalType":"contract INFTStats","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"prizePool","outputs":[{"internalType":"contract IPrizePool","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"startDungeonRun","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"updateEntryFee","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60c06040523480156200001157600080fd5b506040516200126338038062001263833981016040819052620000349162000180565b6200003f3362000113565b600180556001600160a01b0383166200009f5760405162461bcd60e51b815260206004820152601860248201527f496e76616c69642072656769737472792061646472657373000000000000000060448201526064015b60405180910390fd5b6001600160a01b038216620000f75760405162461bcd60e51b815260206004820152601560248201527f496e76616c696420737461747320616464726573730000000000000000000000604482015260640162000096565b6001600160a01b03928316608052911660a052600455620001c1565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200017b57600080fd5b919050565b6000806000606084860312156200019657600080fd5b620001a18462000163565b9250620001b16020850162000163565b9150604084015190509250925092565b60805160a051611067620001fc6000396000818161027c015281816107d001526108650152600081816101cb01526105d901526110676000f3fe6080604052600436106100dd5760003560e01c80638da5cb5b1161007f578063e586a4f011610059578063e586a4f01461024b578063e602ef361461026a578063f2fde38b1461029e578063f514b939146102be57600080fd5b80638da5cb5b146101ed578063aa1826261461020b578063ceef46bd1461022b57600080fd5b8063620973fd116100bb578063620973fd14610171578063715018a614610184578063719ce73e146101995780638c7cc5e3146101b957600080fd5b80632702abdf146100e25780634592ad0914610117578063485cc9551461014f575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610ec1565b6102de565b60405190151581526020015b60405180910390f35b34801561012357600080fd5b50600354610137906001600160a01b031681565b6040516001600160a01b03909116815260200161010e565b34801561015b57600080fd5b5061016f61016a366004610eed565b6103aa565b005b61016f61017f366004610ec1565b61051c565b34801561019057600080fd5b5061016f610aaf565b3480156101a557600080fd5b50600254610137906001600160a01b031681565b3480156101c557600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3480156101f957600080fd5b506000546001600160a01b0316610137565b34801561021757600080fd5b5061016f610226366004610f26565b610ac3565b34801561023757600080fd5b5061016f610246366004610f4d565b610b06565b34801561025757600080fd5b506004545b60405190815260200161010e565b34801561027657600080fd5b506101377f000000000000000000000000000000000000000000000000000000000000000081565b3480156102aa57600080fd5b5061016f6102b9366004610f8f565b610c66565b3480156102ca57600080fd5b5061025c6102d9366004610ec1565b610cdf565b6001600160a01b038216600090815260056020908152604080832084845290915281205460ff16610311575060006103a4565b6003546040516302f3972160e11b81526001600160a01b0385811660048301526024820185905260009216906305e72e4290604401602060405180830381865afa158015610363573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103879190610fb3565b60ff1690508060000361039e5760009150506103a4565b60019150505b92915050565b6103b2610da9565b600354600160a01b900460ff16156104075760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064015b60405180910390fd5b6001600160a01b03821661045d5760405162461bcd60e51b815260206004820152601a60248201527f496e76616c6964207072697a6520706f6f6c206164647265737300000000000060448201526064016103fe565b6001600160a01b0381166104b35760405162461bcd60e51b815260206004820152601c60248201527f496e76616c69642064756e67656f6e2067616d6520616464726573730000000060448201526064016103fe565b600280546001600160a01b038085166001600160a01b03199092168217909255600380546001600160a81b031916928416928317600160a01b1790556040517fd3d631c04a19be365c7a93f9ac2327474a453b62a6f88ba5de9d90a0519ba9f990600090a35050565b610524610e03565b600354600160a01b900460ff1661056f5760405162461bcd60e51b815260206004820152600f60248201526e139bdd081a5b9a5d1a585b1a5e9959608a1b60448201526064016103fe565b6004543410156105ba5760405162461bcd60e51b8152602060048201526016602482015275496e73756666696369656e7420656e7472792066656560501b60448201526064016103fe565b604051633af32abf60e01b81526001600160a01b0383811660048301527f00000000000000000000000000000000000000000000000000000000000000001690633af32abf90602401602060405180830381865afa158015610620573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106449190610fd6565b6106905760405162461bcd60e51b815260206004820152601a60248201527f436f6c6c656374696f6e206e6f742077686974656c697374656400000000000060448201526064016103fe565b6040516331a9108f60e11b81526004810182905233906001600160a01b03841690636352211e90602401602060405180830381865afa1580156106d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fb9190610ff3565b6001600160a01b0316146107415760405162461bcd60e51b815260206004820152600d60248201526c2737ba1027232a1037bbb732b960991b60448201526064016103fe565b6001600160a01b038216600090815260056020908152604080832084845290915290205460ff16156107aa5760405162461bcd60e51b815260206004820152601260248201527120b63932b0b23c9034b710323ab733b2b7b760711b60448201526064016103fe565b60405163994e4a1960e01b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063994e4a1990604401602060405180830381865afa158015610817573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083b9190610fd6565b6108c2576040516301d4d05b60e71b81526001600160a01b038381166004830152602482018390527f0000000000000000000000000000000000000000000000000000000000000000169063ea682d8090604401600060405180830381600087803b1580156108a957600080fd5b505af11580156108bd573d6000803e3d6000fd5b505050505b6003546040516304e8abf560e51b81526001600160a01b0384811660048301526024820184905290911690639d157ea090604401600060405180830381600087803b15801561091057600080fd5b505af1158015610924573d6000803e3d6000fd5b5050506001600160a01b038084166000908152600560209081526040808320868452909152808220805460ff19166001179055600254600480548351639e70b75f60e01b81529351929095169550639e70b75f9493838201939092919082900301818588803b15801561099657600080fd5b505af11580156109aa573d6000803e3d6000fd5b50505050506000600454346109bf9190611010565b90508015610a5157604051600090339083908381818185875af1925050503d8060008114610a09576040519150601f19603f3d011682016040523d82523d6000602084013e610a0e565b606091505b5050905080610a4f5760405162461bcd60e51b815260206004820152600d60248201526c1499599d5b990819985a5b1959609a1b60448201526064016103fe565b505b336001600160a01b031682846001600160a01b03167f9136aa41ac12d9cb2394fa7b07f6ec0f9ba99460a55f53bf992fa2d48f2502ae600454604051610a9991815260200190565b60405180910390a450610aab60018055565b5050565b610ab7610da9565b610ac16000610e5c565b565b610acb610da9565b60048190556040518181527f24a0b2e591795f2c27be52ff14a57d0a39ac957304305bc05e8b04be49e8fe159060200160405180910390a150565b600354600160a01b900460ff16610b515760405162461bcd60e51b815260206004820152600f60248201526e139bdd081a5b9a5d1a585b1a5e9959608a1b60448201526064016103fe565b6003546001600160a01b03163314610b9c5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b60448201526064016103fe565b6001600160a01b038316600090815260056020908152604080832085845290915290205460ff16610c005760405162461bcd60e51b815260206004820152600e60248201526d2737ba1034b710323ab733b2b7b760911b60448201526064016103fe565b6001600160a01b0383166000818152600560209081526040808320868452825291829020805460ff19169055905183151581528492917f9837bdef6316112d748f048a69f3dfe78e01cad7afc9ed2c69b63a94ec006a3d910160405180910390a3505050565b610c6e610da9565b6001600160a01b038116610cd35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103fe565b610cdc81610e5c565b50565b6001600160a01b038216600090815260056020908152604080832084845290915281205460ff16610d12575060006103a4565b6003546040516302f3972160e11b81526001600160a01b0385811660048301526024820185905260009216906305e72e4290604401602060405180830381865afa158015610d64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d889190610fb3565b60ff16905080600003610d9f5760009150506103a4565b5060009392505050565b6000546001600160a01b03163314610ac15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103fe565b600260015403610e555760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103fe565b6002600155565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114610cdc57600080fd5b60008060408385031215610ed457600080fd5b8235610edf81610eac565b946020939093013593505050565b60008060408385031215610f0057600080fd5b8235610f0b81610eac565b91506020830135610f1b81610eac565b809150509250929050565b600060208284031215610f3857600080fd5b5035919050565b8015158114610cdc57600080fd5b600080600060608486031215610f6257600080fd5b8335610f6d81610eac565b9250602084013591506040840135610f8481610f3f565b809150509250925092565b600060208284031215610fa157600080fd5b8135610fac81610eac565b9392505050565b600060208284031215610fc557600080fd5b815160ff81168114610fac57600080fd5b600060208284031215610fe857600080fd5b8151610fac81610f3f565b60006020828403121561100557600080fd5b8151610fac81610eac565b818103818111156103a457634e487b7160e01b600052601160045260246000fdfea2646970667358221220f9dc32b0d49eb2d607dd49b623bdc3a0f7195d33cd8e2aed453d2e4164df9cba64736f6c63430008170033000000000000000000000000bff2326178f200a1a310c1de10d0a2d6de15ebde000000000000000000000000a5cd051d6f21dfa44ae04ceafa6c64cead16d12900000000000000000000000000000000000000000000000000038d7ea4c68000
Deployed Bytecode
0x6080604052600436106100dd5760003560e01c80638da5cb5b1161007f578063e586a4f011610059578063e586a4f01461024b578063e602ef361461026a578063f2fde38b1461029e578063f514b939146102be57600080fd5b80638da5cb5b146101ed578063aa1826261461020b578063ceef46bd1461022b57600080fd5b8063620973fd116100bb578063620973fd14610171578063715018a614610184578063719ce73e146101995780638c7cc5e3146101b957600080fd5b80632702abdf146100e25780634592ad0914610117578063485cc9551461014f575b600080fd5b3480156100ee57600080fd5b506101026100fd366004610ec1565b6102de565b60405190151581526020015b60405180910390f35b34801561012357600080fd5b50600354610137906001600160a01b031681565b6040516001600160a01b03909116815260200161010e565b34801561015b57600080fd5b5061016f61016a366004610eed565b6103aa565b005b61016f61017f366004610ec1565b61051c565b34801561019057600080fd5b5061016f610aaf565b3480156101a557600080fd5b50600254610137906001600160a01b031681565b3480156101c557600080fd5b506101377f000000000000000000000000bff2326178f200a1a310c1de10d0a2d6de15ebde81565b3480156101f957600080fd5b506000546001600160a01b0316610137565b34801561021757600080fd5b5061016f610226366004610f26565b610ac3565b34801561023757600080fd5b5061016f610246366004610f4d565b610b06565b34801561025757600080fd5b506004545b60405190815260200161010e565b34801561027657600080fd5b506101377f000000000000000000000000a5cd051d6f21dfa44ae04ceafa6c64cead16d12981565b3480156102aa57600080fd5b5061016f6102b9366004610f8f565b610c66565b3480156102ca57600080fd5b5061025c6102d9366004610ec1565b610cdf565b6001600160a01b038216600090815260056020908152604080832084845290915281205460ff16610311575060006103a4565b6003546040516302f3972160e11b81526001600160a01b0385811660048301526024820185905260009216906305e72e4290604401602060405180830381865afa158015610363573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103879190610fb3565b60ff1690508060000361039e5760009150506103a4565b60019150505b92915050565b6103b2610da9565b600354600160a01b900460ff16156104075760405162461bcd60e51b8152602060048201526013602482015272105b1c9958591e481a5b9a5d1a585b1a5e9959606a1b60448201526064015b60405180910390fd5b6001600160a01b03821661045d5760405162461bcd60e51b815260206004820152601a60248201527f496e76616c6964207072697a6520706f6f6c206164647265737300000000000060448201526064016103fe565b6001600160a01b0381166104b35760405162461bcd60e51b815260206004820152601c60248201527f496e76616c69642064756e67656f6e2067616d6520616464726573730000000060448201526064016103fe565b600280546001600160a01b038085166001600160a01b03199092168217909255600380546001600160a81b031916928416928317600160a01b1790556040517fd3d631c04a19be365c7a93f9ac2327474a453b62a6f88ba5de9d90a0519ba9f990600090a35050565b610524610e03565b600354600160a01b900460ff1661056f5760405162461bcd60e51b815260206004820152600f60248201526e139bdd081a5b9a5d1a585b1a5e9959608a1b60448201526064016103fe565b6004543410156105ba5760405162461bcd60e51b8152602060048201526016602482015275496e73756666696369656e7420656e7472792066656560501b60448201526064016103fe565b604051633af32abf60e01b81526001600160a01b0383811660048301527f000000000000000000000000bff2326178f200a1a310c1de10d0a2d6de15ebde1690633af32abf90602401602060405180830381865afa158015610620573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106449190610fd6565b6106905760405162461bcd60e51b815260206004820152601a60248201527f436f6c6c656374696f6e206e6f742077686974656c697374656400000000000060448201526064016103fe565b6040516331a9108f60e11b81526004810182905233906001600160a01b03841690636352211e90602401602060405180830381865afa1580156106d7573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906106fb9190610ff3565b6001600160a01b0316146107415760405162461bcd60e51b815260206004820152600d60248201526c2737ba1027232a1037bbb732b960991b60448201526064016103fe565b6001600160a01b038216600090815260056020908152604080832084845290915290205460ff16156107aa5760405162461bcd60e51b815260206004820152601260248201527120b63932b0b23c9034b710323ab733b2b7b760711b60448201526064016103fe565b60405163994e4a1960e01b81526001600160a01b038381166004830152602482018390527f000000000000000000000000a5cd051d6f21dfa44ae04ceafa6c64cead16d129169063994e4a1990604401602060405180830381865afa158015610817573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061083b9190610fd6565b6108c2576040516301d4d05b60e71b81526001600160a01b038381166004830152602482018390527f000000000000000000000000a5cd051d6f21dfa44ae04ceafa6c64cead16d129169063ea682d8090604401600060405180830381600087803b1580156108a957600080fd5b505af11580156108bd573d6000803e3d6000fd5b505050505b6003546040516304e8abf560e51b81526001600160a01b0384811660048301526024820184905290911690639d157ea090604401600060405180830381600087803b15801561091057600080fd5b505af1158015610924573d6000803e3d6000fd5b5050506001600160a01b038084166000908152600560209081526040808320868452909152808220805460ff19166001179055600254600480548351639e70b75f60e01b81529351929095169550639e70b75f9493838201939092919082900301818588803b15801561099657600080fd5b505af11580156109aa573d6000803e3d6000fd5b50505050506000600454346109bf9190611010565b90508015610a5157604051600090339083908381818185875af1925050503d8060008114610a09576040519150601f19603f3d011682016040523d82523d6000602084013e610a0e565b606091505b5050905080610a4f5760405162461bcd60e51b815260206004820152600d60248201526c1499599d5b990819985a5b1959609a1b60448201526064016103fe565b505b336001600160a01b031682846001600160a01b03167f9136aa41ac12d9cb2394fa7b07f6ec0f9ba99460a55f53bf992fa2d48f2502ae600454604051610a9991815260200190565b60405180910390a450610aab60018055565b5050565b610ab7610da9565b610ac16000610e5c565b565b610acb610da9565b60048190556040518181527f24a0b2e591795f2c27be52ff14a57d0a39ac957304305bc05e8b04be49e8fe159060200160405180910390a150565b600354600160a01b900460ff16610b515760405162461bcd60e51b815260206004820152600f60248201526e139bdd081a5b9a5d1a585b1a5e9959608a1b60448201526064016103fe565b6003546001600160a01b03163314610b9c5760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b60448201526064016103fe565b6001600160a01b038316600090815260056020908152604080832085845290915290205460ff16610c005760405162461bcd60e51b815260206004820152600e60248201526d2737ba1034b710323ab733b2b7b760911b60448201526064016103fe565b6001600160a01b0383166000818152600560209081526040808320868452825291829020805460ff19169055905183151581528492917f9837bdef6316112d748f048a69f3dfe78e01cad7afc9ed2c69b63a94ec006a3d910160405180910390a3505050565b610c6e610da9565b6001600160a01b038116610cd35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103fe565b610cdc81610e5c565b50565b6001600160a01b038216600090815260056020908152604080832084845290915281205460ff16610d12575060006103a4565b6003546040516302f3972160e11b81526001600160a01b0385811660048301526024820185905260009216906305e72e4290604401602060405180830381865afa158015610d64573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d889190610fb3565b60ff16905080600003610d9f5760009150506103a4565b5060009392505050565b6000546001600160a01b03163314610ac15760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103fe565b600260015403610e555760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103fe565b6002600155565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b0381168114610cdc57600080fd5b60008060408385031215610ed457600080fd5b8235610edf81610eac565b946020939093013593505050565b60008060408385031215610f0057600080fd5b8235610f0b81610eac565b91506020830135610f1b81610eac565b809150509250929050565b600060208284031215610f3857600080fd5b5035919050565b8015158114610cdc57600080fd5b600080600060608486031215610f6257600080fd5b8335610f6d81610eac565b9250602084013591506040840135610f8481610f3f565b809150509250925092565b600060208284031215610fa157600080fd5b8135610fac81610eac565b9392505050565b600060208284031215610fc557600080fd5b815160ff81168114610fac57600080fd5b600060208284031215610fe857600080fd5b8151610fac81610f3f565b60006020828403121561100557600080fd5b8151610fac81610eac565b818103818111156103a457634e487b7160e01b600052601160045260246000fdfea2646970667358221220f9dc32b0d49eb2d607dd49b623bdc3a0f7195d33cd8e2aed453d2e4164df9cba64736f6c63430008170033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000bff2326178f200a1a310c1de10d0a2d6de15ebde000000000000000000000000a5cd051d6f21dfa44ae04ceafa6c64cead16d12900000000000000000000000000000000000000000000000000038d7ea4c68000
-----Decoded View---------------
Arg [0] : _collectionRegistry (address): 0xBFF2326178f200A1a310c1de10d0a2D6de15ebdE
Arg [1] : _nftStats (address): 0xa5CD051D6F21dFA44Ae04cEafa6c64ceAD16D129
Arg [2] : _initialEntryFee (uint256): 1000000000000000
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000bff2326178f200a1a310c1de10d0a2d6de15ebde
Arg [1] : 000000000000000000000000a5cd051d6f21dfa44ae04ceafa6c64cead16d129
Arg [2] : 00000000000000000000000000000000000000000000000000038d7ea4c68000
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 31 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
[ 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.