ETH Price: $3,381.17 (-1.92%)
Gas: 4 Gwei

Contract

0x05F9067205af1aFFA7DF1C076FC7209407EfcA60
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Start Unmasking ...201933932024-06-28 23:13:114 days ago1719616391IN
0x05F90672...407EfcA60
0 ETH0.001152671.87437627
Unmask Villains ...201933922024-06-28 23:12:594 days ago1719616379IN
0x05F90672...407EfcA60
0 ETH0.001079981.8711045
Start Unmasking ...201370042024-06-21 2:06:2312 days ago1718935583IN
0x05F90672...407EfcA60
0 ETH0.001771343.1022039
Unmask Villains ...201370022024-06-21 2:05:5912 days ago1718935559IN
0x05F90672...407EfcA60
0 ETH0.002376393.16069861
Mask Villains Ba...200652482024-06-11 1:16:5922 days ago1718068619IN
0x05F90672...407EfcA60
0 ETH0.000495294.4354599
Start Unmasking ...200652242024-06-11 1:12:1122 days ago1718068331IN
0x05F90672...407EfcA60
0 ETH0.000436034.97691361
Unmask Villains ...200467052024-06-08 11:06:2324 days ago1717844783IN
0x05F90672...407EfcA60
0 ETH0.006333636.23051065
Start Unmasking ...200176672024-06-04 9:49:3528 days ago1717494575IN
0x05F90672...407EfcA60
0 ETH0.005874138.02230914
Start Unmasking ...199857392024-05-30 22:49:2333 days ago1717109363IN
0x05F90672...407EfcA60
0 ETH0.004492947.30603771
Unmask Villains ...199717332024-05-28 23:46:1135 days ago1716939971IN
0x05F90672...407EfcA60
0 ETH0.009811286.94847457
Start Unmasking ...199717092024-05-28 23:41:1135 days ago1716939671IN
0x05F90672...407EfcA60
0 ETH0.002837936.46178532
Unmask Villains ...199109142024-05-20 11:43:2343 days ago1716205403IN
0x05F90672...407EfcA60
0 ETH0.003089626.9368621
Start Unmasking ...199081302024-05-20 2:23:1143 days ago1716171791IN
0x05F90672...407EfcA60
0 ETH0.003864482.74867472
Unmask Villains ...199081292024-05-20 2:22:5943 days ago1716171779IN
0x05F90672...407EfcA60
0 ETH0.00291012.63494737
Unmask Villains ...199050802024-05-19 16:09:2344 days ago1716134963IN
0x05F90672...407EfcA60
0 ETH0.000671273.67288267
Start Unmasking ...198588592024-05-13 4:58:4750 days ago1715576327IN
0x05F90672...407EfcA60
0 ETH0.001420613.23463909
Start Unmasking ...198465592024-05-11 11:41:4752 days ago1715427707IN
0x05F90672...407EfcA60
0 ETH0.000890015.07099489
Start Unmasking ...198354992024-05-09 22:34:4754 days ago1715294087IN
0x05F90672...407EfcA60
0 ETH0.001415583.58154606
Start Unmasking ...198211572024-05-07 22:26:1156 days ago1715120771IN
0x05F90672...407EfcA60
0 ETH0.001903964.33519961
Unmask Villains ...198211552024-05-07 22:25:4756 days ago1715120747IN
0x05F90672...407EfcA60
0 ETH0.001562984.37164093
Unmask Villains ...197975622024-05-04 15:13:4759 days ago1714835627IN
0x05F90672...407EfcA60
0 ETH0.004847256.8367848
Start Unmasking ...197975582024-05-04 15:12:5959 days ago1714835579IN
0x05F90672...407EfcA60
0 ETH0.001549667.06141674
Start Unmasking ...197571232024-04-28 23:34:2365 days ago1714347263IN
0x05F90672...407EfcA60
0 ETH0.001644714.68181447
Unmask Villains ...197389622024-04-26 10:33:3567 days ago1714127615IN
0x05F90672...407EfcA60
0 ETH0.002183936.93793732
Start Unmasking ...197310432024-04-25 7:58:5968 days ago1714031939IN
0x05F90672...407EfcA60
0 ETH0.006594069.38186214
View all transactions

Latest 1 internal transaction

Advanced mode:
Parent Transaction Hash Block From To Value
164936652023-01-26 21:25:35523 days ago1674768335
0x05F90672...407EfcA60
 Contract Creation0 ETH
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
VillainUnmaskingAdventure

Compiler Version
v0.8.9+commit.e5eed63a

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
File 1 of 15 : VillainUnmaskingAdventure.sol
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.9;

import "./IMintableVillain.sol";
import "./IMinterWhitelist.sol";
import "./VillainCustodian.sol";
import "@limit-break/adventures/IAdventure.sol";
import "@limit-break/adventures/IAdventurousERC721.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/Pausable.sol";
import "@openzeppelin/contracts/utils/introspection/ERC165.sol";

error CallbackNotImplemented();
error CallerDidNotCreateClaimId();
error CallerNotOwnerOfSuperVillainPotion();
error CallerNotOwnerOfMaskedVillain();
error CallerNotOwnerOfVillainPotion();
error CannotIncludeMoreThanOnePotion();
error CannotSpecifyZeroAddressForSuperVillainContract();
error CannotSpecifyZeroAddressForVillainContract();
error CannotSpecifyZeroAddressForSuperVillainPotionContract();
error CannotSpecifyZeroAddressForMaskedVillainContract();
error CannotSpecifyZeroAddressForVillainPotionContract();
error CompleteQuestToUnmaskVillain();
error InputArrayLengthMismatch();
error MustIncludeMaskedVillain();
error NewUnmaskingDurationMustBeLessThanCurrentDuration();
error NoUnmaskingQuestFoundForSpecifiedClaimId();
error PotionGreaterThanAllocatedSpace();
error QuantityMustBeGreaterThanZero();
error QuestCompleteVillainMustBeUnmasked();

/**
 * @title VillainUnmaskingAdventure
 * @author Limit Break, Inc.
 * @notice An adventure that unmasks villains based on the provided potion
 */
contract VillainUnmaskingAdventure is Ownable, Pausable, ERC165, IAdventure {

    struct UnmaskingQuest {
        uint64 startTimestamp;
        uint16 villainTokenId;
        uint16 potionBitmap;
        address adventurer;
    }

    /// @dev An unchangeable reference to the villain potion contract optionally used in an unmasking quest
    IAdventurousERC721 immutable public villainPotionContract;

    /// @dev An unchangeable reference to the super villain potion contract optionally used in an unmasking quest
    IAdventurousERC721 immutable public superVillainPotionContract;

    /// @dev An unchangeable reference to the masked villain contract to be unmasked
    IAdventurousERC721 immutable public maskedVillainContract;

    /// @dev An unchangeable reference to the villain contract unmasked at the end of a quest
    IMintableVillain immutable public villainContract;

    /// @dev An unchangeable reference to the super villain contract unmasked at the end of a quest
    IMintableVillain immutable public superVillainContract;

    /// @dev An unchangeable reference to a custodial holding contract for masked villains and potions
    VillainCustodian immutable public custodian;

    /// @dev A counter for claim ids
    uint256 public lastClaimId;

    /// @dev The amount of time the user must remain in a quest to complete it and receive their unmasked villain
    uint256 public unmaskingDuration = 7 days;
    
    /// @dev Map claim id to unmasking quest details
    mapping (uint256 => UnmaskingQuest) public unmaskingQuestLookup;

    /// @dev Designation of uint(1) to be used for bitmap functions
    uint constant private ONE = uint(1);

    /// @dev Maximum value stored in 15 bits.  Used to prevent falsely setting the 16th bit on the potionBitmap.
    uint256 constant private MAX_15_BIT_VALUE = 32767;

    /// @dev Emitted when an adventurer cancels a villain unmasking
    event VillainMasked(address indexed adventurer, uint256 indexed claimId, bool isSuperVillain);

    /// @dev Emitted when the unmaskingDuration is updated.
    event UnmaskingDurationUpdated(uint256 oldUnmaskingDuration, uint256 newUnmaskingDuration);

    /// @dev Emitted when an adventurer starts unmasking a villain
    event UnmaskingVillain(address indexed adventurer, uint256 indexed claimId, uint256 potionTokenId, uint256 villainTokenId, bool isSuperVillain);

    /// @dev Emitted when an adventurer unmasks their villain
    event UnmaskedVillain(address indexed adventurer, uint256 indexed claimId, bool isSuperVillain);

    constructor(address villainPotionAddress, address superVillainPotionAddress, address maskedVillainAddress, address villainAddress, address superVillainAddress) {
        if(villainPotionAddress == address(0)) {
            revert CannotSpecifyZeroAddressForVillainPotionContract();
        }

        if(superVillainPotionAddress == address(0)) {
            revert CannotSpecifyZeroAddressForSuperVillainPotionContract();
        }

        if(maskedVillainAddress == address(0)) {
            revert CannotSpecifyZeroAddressForMaskedVillainContract();
        }

        if(villainAddress == address(0)) { 
            revert CannotSpecifyZeroAddressForVillainContract();
        }

        if(superVillainAddress == address(0)) {
            revert CannotSpecifyZeroAddressForSuperVillainContract();
        }

        villainPotionContract = IAdventurousERC721(villainPotionAddress);
        superVillainPotionContract = IAdventurousERC721(superVillainPotionAddress);
        maskedVillainContract = IAdventurousERC721(maskedVillainAddress);
        
        villainContract = IMintableVillain(villainAddress);
        superVillainContract = IMintableVillain(superVillainAddress);

        custodian = new VillainCustodian(address(this), maskedVillainAddress, superVillainPotionAddress, villainPotionAddress);
    }

    /// @dev A callback function that AdventureERC721 must invoke when a quest has been successfully entered.
    /// Throws in all cases quest entry for this adventure is fulfilled via adventureTransferFrom instead of enterQuest, and this callback should not be triggered.
    function onQuestEntered(address /*adventurer*/, uint256 /*tokenId*/, uint256 /*questId*/) external override pure {
        revert CallbackNotImplemented();
    }

    /// @dev A callback function that AdventureERC721 must invoke when a quest has been successfully entered.
    /// Throws in all cases quest exit for this adventure is fulfilled via transferFrom or adventureBurn instead of exitQuest, and this callback should not be triggered.
    function onQuestExited(address /*adventurer*/, uint256 /*tokenId*/, uint256 /*questId*/, uint256 /*questStartTimestamp*/) external override pure {
        revert CallbackNotImplemented();
    }

    /// @dev Returns false - this quest uses hard staking
    function questsLockTokens() external override pure returns (bool) {
        return false;
    }

    /// @dev Pauses and blocks adventurers from starting new villain unmasking quests
    /// Throws if the adventure is already paused
    function pauseNewQuestEntries() external onlyOwner {
        _pause();
    }

    /// @dev Unpauses and allows adventurers to start new villain unmasking quests
    /// Throws if the adventure is already unpaused
    function unpauseNewQuestEntries() external onlyOwner {
        _unpause();
    }

    /// @dev Sets the unmasking duration for the quest
    /// Throws if the unmasking duration is greater than current unmasking duration
    ///
    /// Postconditions:
    /// ---------------
    /// The unmasking duration is updated to the provided new unmasking duration.
    function setUnmaskingDuration(uint256 unmaskingDuration_) external onlyOwner {
        uint256 currentUnmaskingDuration = unmaskingDuration;
        if(unmaskingDuration_ >= currentUnmaskingDuration) {
            revert NewUnmaskingDurationMustBeLessThanCurrentDuration();
        }
        emit UnmaskingDurationUpdated(currentUnmaskingDuration, unmaskingDuration_);
        unmaskingDuration = unmaskingDuration_;
    }

    /// @notice Returns the mask to multiple villains referenced by the specifed claim ids before the required unmasking duration has been met.
    ///
    /// Throws when `quantity` is zero, where `quantity` is the length of the claim id arrays.
    /// Throws when no unmasking quest is found for one or more of the specified claim ids (start timestamp is zero).
    /// Throws when the caller did not create one or more of the specified claim id (adventurer not the same as caller).
    /// Throws when the one or more of the villains are ready to redeem (required unmasking duration has been met or exceeded).
    ///  - This is invalid if any of the potions or masked villain contracts are removed from the adventure whitelist or the adventure is removed
    ///    as a whitelisted minter for the villain or super villain contracts.
    ///    In these cases, the user can remask the villain to recover their potion and masked villain since redemption is not possible.
    ///
    /// Postconditions:
    /// ---------------
    /// The masked villains that were in use to unmask have been returned to the adventurer that started the quest.
    /// The potions that were in use to unmask the villains have been returned to the adventurer that started the quest.
    /// The unmasking quest lookup entries for the specified claim ids have been removed.
    /// `quantity` VillainMasked events have been emitted, where `quantity` is the length of the claim id array.
    function maskVillainsBatch(uint256[] calldata claimIds) external {
        if(claimIds.length == 0) {
            revert QuantityMustBeGreaterThanZero();
        }

        for(uint256 i = 0; i < claimIds.length;) {
            _maskVillain(claimIds[i]);
            
            unchecked {
                ++i;
            }
        }
    }

    /// @notice Enters the villain unmasking quests with a batch of specified masked villains and optional potions.
    /// Villain Potion token ids may be 0, in which case it means no villain potion will be used to enhance the unmasking.
    /// Super Villain token ids may be 0, in which case it means no super villain potion will be used to enhance the unmasking.
    ///
    /// Throws when `quantity` is zero, where `quantity` is the length of the token id arrays.
    /// Throws when token id array lengths don't match.
    /// Throws when the caller does not own a specified masked villain token.
    /// Throws when the caller does not own a specified villain potion token.
    /// Throws when the caller does not own a specified super villain potion token.
    /// Throws when both a villain potion and super villain potion token are specified (non 0 values for both ids at the same array index).
    /// Throws when adventureTransferFrom throws, typically for one of the following reasons:
    ///   - This adventure contract is not in the adventure whitelist for included contracts.
    ///   - The caller has not set adventure approval for this contract.
    /// Throws when the contract is paused
    ///
    /// Postconditions:
    /// ---------------
    /// The specified masked villains are now owned by the custodian.
    /// The specified potions are now owned by the custodian.
    /// The value of the lastClaimId counter has increased by `quantity`, where `quantity` is the length of the token id arrays.
    /// The unmasking quest lookup for the newly created claim ids contains the following information:
    ///   - The block timestamp of this transaction (the time at which unmasking the villain began).
    ///   - The specified masked villain token id.
    ///   - A bitmap containing the potion token ID and an indicator in the 16th bit, `1` if it is a super villain, `0` otherwise.
    ///   - The address of the adventurer that is permitted to retrieve their masked villain and potion or unmask their villain.
    /// `quantity` UnmaskingVillain events have been emitted, where `quantity` is the length of the token id arrays.
    function startUnmaskingVillainsBatch(uint256[] calldata maskedVillainTokenIds, uint256[] calldata villainPotionTokenIds, uint256[] calldata superVillainPotionTokenIds) external whenNotPaused {
        if(maskedVillainTokenIds.length == 0) {
            revert QuantityMustBeGreaterThanZero();
        }

        if(maskedVillainTokenIds.length != villainPotionTokenIds.length || villainPotionTokenIds.length != superVillainPotionTokenIds.length) {
            revert InputArrayLengthMismatch();
        }

        uint256 claimId;
        unchecked {
            claimId = lastClaimId;
            lastClaimId = claimId + maskedVillainTokenIds.length;
            ++claimId;
        }

        for(uint256 i = 0; i < maskedVillainTokenIds.length;) {
            _startUnmaskingVillain(claimId + i, maskedVillainTokenIds[i], villainPotionTokenIds[i], superVillainPotionTokenIds[i]);

            unchecked {
                ++i;
            }
        }
    }

    /// @notice Unmasks multiple villains referenced by the specifed claim ids after the required unmasking duration has been met.
    ///
    /// Throws when `quantity` is zero, where `quantity` is the length of the claim id arrays.
    /// Throws when no unmasking quest is found for one or more of the specified claim ids (start timestamp is zero).
    /// Throws when the caller did not create one or more of the specified claim ids (adventurer not the same as caller).
    /// Throws when one or more of the villains is not ready to unmask (required unmasking duration has not been met).
    ///
    /// Postconditions:
    /// ---------------
    /// The villain or super villain potion that was in use to unmask the villain has been burnt.
    /// The masked villain that was in use to unmask has been burnt.
    /// The unmasking quest lookup entry for the specified claim id has been removed.
    /// An unmasked villain or super villain has been minted to the adventurer who completed the quest.
    /// `quantity` UnmaskedVillain events have been emitted, where `quantity` is the length of the claim id arrays.
    function unmaskVillainsBatch(uint256[] calldata claimIds) external {
        if(claimIds.length == 0) {
            revert QuantityMustBeGreaterThanZero();
        }

        uint256[] memory tempVillainTokenIds = new uint256[](claimIds.length);
        uint256[] memory tempSuperVillainTokenIds = new uint256[](claimIds.length);
        uint256[] memory potionTokenIds = new uint256[](claimIds.length);

        uint256 villainCounter = 0;
        uint256 superVillainCounter = 0;

        for(uint256 i = 0; i < claimIds.length;) {
            (uint256 villainTokenId, uint256 potionTokenId, bool isSuperVillain) = _unmaskVillain(claimIds[i]);
            unchecked {
                if (isSuperVillain) {
                    tempSuperVillainTokenIds[i] = villainTokenId;
                    ++superVillainCounter;
                } else {
                    tempVillainTokenIds[i] = villainTokenId;
                    ++villainCounter;
                }
                potionTokenIds[i] = potionTokenId;
                ++i;
            }
        }

        uint256[] memory villainTokenIds = new uint256[](villainCounter);
        uint256[] memory villainPotionTokenIds = new uint256[](villainCounter);

        uint256[] memory superVillainTokenIds = new uint256[](superVillainCounter);
        uint256[] memory superVillainPotionTokenIds = new uint256[](superVillainCounter);

        uint256 villainPotionCounter = 0;
        uint256 superVillainPotionCounter = 0;

        unchecked {
            for(uint256 i = 0; i < claimIds.length; ++i) {
                uint256 villainTokenId = tempVillainTokenIds[i];        
                uint256 superVillainTokenId = tempSuperVillainTokenIds[i];

                if(villainTokenId > 0) {
                    villainPotionTokenIds[villainPotionCounter] = potionTokenIds[i];
                    villainTokenIds[villainPotionCounter] = villainTokenId;
                    ++villainPotionCounter;
                } else {
                    superVillainPotionTokenIds[superVillainPotionCounter] = potionTokenIds[i];
                    superVillainTokenIds[superVillainPotionCounter] = superVillainTokenId;
                    ++superVillainPotionCounter;
                }
            }
        }

        if(villainCounter > 0) {
            villainContract.unmaskVillainsBatch(_msgSender(), villainTokenIds, villainPotionTokenIds);
        }

        if(superVillainCounter > 0) {
            superVillainContract.unmaskVillainsBatch(_msgSender(), superVillainTokenIds, superVillainPotionTokenIds);
        }
    }


    /// @dev Enumerates all specified claim ids and returns the unmasking quest details for each.
    /// Never use this function in a transaction context - it is fine for a read-only query for 
    /// external applications, but will consume a lot of gas when used in a transaction.
    function getUnmaskingQuestDetailsBatch(uint256[] calldata claimIds) external view returns (UnmaskingQuest[] memory unmaskingQuests) {
        unmaskingQuests = new UnmaskingQuest[](claimIds.length);
        unchecked {
             for(uint256 i = 0; i < claimIds.length; ++i) {
                 unmaskingQuests[i] = unmaskingQuestLookup[claimIds[i]];
             }
        }
    }

    /// @dev ERC-165 interface support
    function supportsInterface(bytes4 interfaceId) public view virtual override (ERC165, IERC165) returns (bool) {
        return interfaceId == type(IAdventure).interfaceId || super.supportsInterface(interfaceId);
    }

    /// @dev Records the details of an unmasking quest with the specified claim id and transfers
    /// specified masked villain token and potion to the custodian
    ///
    /// Throws when the caller does not own a specified masked villain token.
    /// Throws when the caller does not own a specified villain potion token.
    /// Throws when the caller does not own a specified super villain potion token.
    /// Throws when both a villain potion and super villain potion token are specified (non 0 values for both ids at the same array index).
    /// Throws when adventureTransferFrom throws, typically for one of the following reasons:
    ///   - This adventure contract is not in the adventure whitelist for included contracts.
    ///   - The caller has not set adventure approval for this contract.
    /// Throws when the contract is paused
    ///
    /// Postconditions:
    /// ---------------
    /// The specified masked villain is now owned by the custodian.
    /// The specified potion is now owned by the custodian.
    /// The unmasking quest lookup for the newly created claim ids contains the following information:
    ///   - The block timestamp of this transaction (the time at which unmasking the villain began).
    ///   - The specified masked villain token id.
    ///   - A bitmap containing the potion token ID and an indicator in the 16th bit `1` if it is a super villain, `0` otherwise.
    ///   - The address of the adventurer that is permitted to retrieve their masked villain and potion or unmask their villain.
    /// A UnmaskingVillain event has been emitted.
    function _startUnmaskingVillain(uint256 claimId, uint256 maskedVillainTokenId, uint256 villainPotionTokenId, uint256 superVillainPotionTokenId) private {
        if(villainPotionTokenId != 0 && superVillainPotionTokenId != 0) {
            revert CannotIncludeMoreThanOnePotion();
        }
        if(maskedVillainTokenId == 0) {
            revert MustIncludeMaskedVillain();
        }
        
        if(superVillainPotionTokenId > MAX_15_BIT_VALUE || villainPotionTokenId > MAX_15_BIT_VALUE) {
            revert PotionGreaterThanAllocatedSpace();
        }

        address caller = _msgSender();
        uint16 potionTokenId = villainPotionTokenId == 0 ? uint16(superVillainPotionTokenId) : uint16(villainPotionTokenId);
        uint16 potionBitmap = potionTokenId;
        if(superVillainPotionTokenId > 0) {
            potionBitmap = potionBitmap | uint16(ONE << 15);
        }

        unmaskingQuestLookup[claimId].startTimestamp =  uint64(block.timestamp);
        unmaskingQuestLookup[claimId].villainTokenId = uint16(maskedVillainTokenId);
        unmaskingQuestLookup[claimId].potionBitmap = potionBitmap;
        unmaskingQuestLookup[claimId].adventurer = caller;

        emit UnmaskingVillain(caller, claimId, potionTokenId, unmaskingQuestLookup[claimId].villainTokenId, superVillainPotionTokenId > 0);

        if (maskedVillainContract.ownerOf(maskedVillainTokenId) != caller) {
            revert CallerNotOwnerOfMaskedVillain();
        }
        maskedVillainContract.adventureTransferFrom(caller, address(custodian), maskedVillainTokenId);

        if (villainPotionTokenId > 0) {
            if (villainPotionContract.ownerOf(villainPotionTokenId) != caller) {
                revert CallerNotOwnerOfVillainPotion();
            }
            villainPotionContract.adventureTransferFrom(caller, address(custodian), villainPotionTokenId);
        }

        if (superVillainPotionTokenId > 0) {
            if (superVillainPotionContract.ownerOf(superVillainPotionTokenId) != caller) {
                revert CallerNotOwnerOfSuperVillainPotion();
            }
            superVillainPotionContract.adventureTransferFrom(caller, address(custodian), superVillainPotionTokenId);
        }
    }

    /// @dev Returns the mask to the villain referenced by the claim id before the required unmasking duration has been met.
    ///
    /// Throws when no unmasking quest is found for the specified claim id (start timestamp is zero).
    /// Throws when the caller did not create the specified claim id (adventurer not the same as caller).
    /// Throws when the villain is ready to unmask (required unmasking duration has been met or exceeded).
    ///  - This is invalid if any of the potions or masked villain contracts are removed from the adventure whitelist or the adventure is removed
    ///    as a whitelisted minter for the villain or super villain contracts.
    ///    In these cases, the user can remask the villain to recover their potion and masked villain since redemption is not possible.
    ///
    /// Postconditions:
    /// ---------------
    /// The masked villain that was in use to unmask has been returned to the adventurer that started the quest.
    /// The potion that was in use to unmask the villain has been returned to the adventurer that started the quest.
    /// The unmasking quest lookup entry for the specified claim id has been removed.
    /// A VillainMasked event has been emitted.
    function _maskVillain(uint256 claimId) private {
        (address adventurer, uint256 villainTokenId, uint256 potionTokenId, bool isSuperVillain, bool questCompleted) = _getAndClearUnmaskingQuestStatus(claimId);

        bool allowUserToReturnMaskAfterQuestCompleted = false;
        if(!IAdventureApproval(address(maskedVillainContract)).isAdventureWhitelisted(address(this)) || 
            !IAdventureApproval(address(villainPotionContract)).isAdventureWhitelisted(address(this)) || 
            !IAdventureApproval(address(superVillainPotionContract)).isAdventureWhitelisted(address(this)) || 
            !IMinterWhitelist(address(villainContract)).whitelistedMinters(address(this)) ||
            !IMinterWhitelist(address(superVillainContract)).whitelistedMinters(address(this))) {
            allowUserToReturnMaskAfterQuestCompleted = true;
        }

        if(questCompleted && !allowUserToReturnMaskAfterQuestCompleted) {
            revert QuestCompleteVillainMustBeUnmasked();
        }

        emit VillainMasked(adventurer, claimId, isSuperVillain);

        maskedVillainContract.transferFrom(address(custodian), adventurer, villainTokenId);

        if(potionTokenId > 0) {
            if(isSuperVillain) {
                superVillainPotionContract.transferFrom(address(custodian), adventurer, potionTokenId);
            } else {
                villainPotionContract.transferFrom(address(custodian), adventurer, potionTokenId);
            }
        }
    }

    /// @dev Unmasks a villain referenced by the claim id after the required unmasking duration has been met.
    ///
    /// Throws when no unmasking quest is found for the specified claim id (start timestamp is zero).
    /// Throws when the caller did not create the specified claim id (adventurer not the same as caller).
    /// Throws when the villain is not ready to unmask (required unmasking duration has not been met).
    ///
    /// Postconditions:
    /// ---------------
    /// The villain or super villain potion used to unmask has been burned.
    /// The masked villain has been burned.
    /// The unmasking quest lookup entry for the specified claim id has been removed.
    /// A villain or super villain has been minted to the adventurer who removed the mask.
    /// A UnmaskedVillain event has been emitted.
    function _unmaskVillain(uint256 claimId) private returns (uint256, uint256, bool) {
        (address adventurer, uint256 villainTokenId, uint256 potionTokenId, bool isSuperVillain, bool questCompleted) = _getAndClearUnmaskingQuestStatus(claimId);

        if(!questCompleted) {
            revert CompleteQuestToUnmaskVillain();
        }

        emit UnmaskedVillain(adventurer, claimId, isSuperVillain);

        if(isSuperVillain) {
            superVillainPotionContract.adventureBurn(potionTokenId);
        } else if(potionTokenId > 0) {
            villainPotionContract.adventureBurn(potionTokenId);
        }

        maskedVillainContract.adventureBurn(villainTokenId);

        return (villainTokenId, potionTokenId, isSuperVillain);
    }


    /// @dev Returns unmasking quest details and removes the lookup entry
    ///
    /// Throws when no unmasking quest is found
    /// Throws when the caller did not create the claim id (caller != adventurer)
    function _getAndClearUnmaskingQuestStatus(uint256 claimId) private returns (address adventurer, uint256 villainTokenId, uint256 potionTokenId, bool isSuperVillain, bool questCompleted) {
        UnmaskingQuest memory unmaskingQuest = unmaskingQuestLookup[claimId];

        uint256 startTimestamp = unmaskingQuest.startTimestamp;
        adventurer = unmaskingQuest.adventurer;
        villainTokenId = unmaskingQuest.villainTokenId;
        uint16 potionBitmap = unmaskingQuest.potionBitmap;
        isSuperVillain = potionBitmap >> 15 & 1 == 1;
        potionTokenId = potionBitmap & ~(ONE << 15);

        if (startTimestamp == 0) {
            revert NoUnmaskingQuestFoundForSpecifiedClaimId();
        }

        if (adventurer != _msgSender()) {
            revert CallerDidNotCreateClaimId();
        }

        unchecked {
            questCompleted = block.timestamp - startTimestamp >= unmaskingDuration;
        }

        delete unmaskingQuestLookup[claimId];
        return (adventurer, villainTokenId, potionTokenId, isSuperVillain, questCompleted);
    }

}

File 2 of 15 : IAdventure.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "@openzeppelin/contracts/utils/introspection/IERC165.sol";

/**
 * @title IAdventure
 * @author Limit Break, Inc.
 * @notice The base interface that all `Adventure` contracts must conform to.
 * @dev All contracts that implement the adventure/quest system and interact with an {IAdventurous} token are required to implement this interface.
 */
interface IAdventure is IERC165 {

    /**
     * @dev Returns whether or not quests on this adventure lock tokens.
     * Developers of adventure contract should ensure that this is immutable 
     * after deployment of the adventure contract.  Failure to do so
     * can lead to error that deadlock token transfers.
     */
    function questsLockTokens() external view returns (bool);

    /**
     * @dev A callback function that AdventureERC721 must invoke when a quest has been successfully entered.
     * Throws if the caller is not an expected AdventureERC721 contract designed to work with the Adventure.
     * Not permitted to throw in any other case, as this could lead to tokens being locked in quests.
     */
    function onQuestEntered(address adventurer, uint256 tokenId, uint256 questId) external;

    /**
     * @dev A callback function that AdventureERC721 must invoke when a quest has been successfully exited.
     * Throws if the caller is not an expected AdventureERC721 contract designed to work with the Adventure.
     * Not permitted to throw in any other case, as this could lead to tokens being locked in quests.
     */
    function onQuestExited(address adventurer, uint256 tokenId, uint256 questId, uint256 questStartTimestamp) external;
}

File 3 of 15 : IAdventurous.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "./Quest.sol";
import "@openzeppelin/contracts/utils/introspection/IERC165.sol";

/**
 * @title IAdventurous
 * @author Limit Break, Inc.
 * @notice The base interface that all `Adventurous` token contracts must conform to in order to support adventures and quests.
 * @dev All contracts that support adventures and quests are required to implement this interface.
 */
interface IAdventurous is IERC165 {

    /**
     * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets, for special in-game adventures.
     */ 
    event AdventureApprovalForAll(address indexed tokenOwner, address indexed operator, bool approved);

    /**
     * @dev Emitted when a token enters or exits a quest
     */
    event QuestUpdated(uint256 indexed tokenId, address indexed tokenOwner, address indexed adventure, uint256 questId, bool active, bool booted);

    /**
     * @notice Transfers a player's token if they have opted into an authorized, whitelisted adventure.
     */
    function adventureTransferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @notice Safe transfers a player's token if they have opted into an authorized, whitelisted adventure.
     */
    function adventureSafeTransferFrom(address from, address to, uint256 tokenId) external;

    /**
     * @notice Burns a player's token if they have opted into an authorized, whitelisted adventure.
     */
    function adventureBurn(uint256 tokenId) external;

    /**
     * @notice Enters a player's token into a quest if they have opted into an authorized, whitelisted adventure.
     */
    function enterQuest(uint256 tokenId, uint256 questId) external;

    /**
     * @notice Exits a player's token from a quest if they have opted into an authorized, whitelisted adventure.
     */
    function exitQuest(uint256 tokenId, uint256 questId) external;

    /**
     * @notice Returns the number of quests a token is actively participating in for a specified adventure
     */
    function getQuestCount(uint256 tokenId, address adventure) external view returns (uint256);

    /**
     * @notice Returns the amount of time a token has been participating in the specified quest
     */
    function getTimeOnQuest(uint256 tokenId, address adventure, uint256 questId) external view returns (uint256);

    /**
     * @notice Returns whether or not a token is currently participating in the specified quest as well as the time it was started and the quest index
     */
    function isParticipatingInQuest(uint256 tokenId, address adventure, uint256 questId) external view returns (bool participatingInQuest, uint256 startTimestamp, uint256 index);

    /**
     * @notice Returns a list of all active quests for the specified token id and adventure
     */
    function getActiveQuests(uint256 tokenId, address adventure) external view returns (Quest[] memory activeQuests);
}

File 4 of 15 : IAdventurousERC721.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

import "./IAdventurous.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

/**
 * @title IAdventurousERC721
 * @author Limit Break, Inc.
 * @notice Combines all {IAdventurous} and all {IERC721} functionality into a single, unified interface.
 * @dev This interface may be used as a convenience to interact with tokens that support both interface standards.
 */
interface IAdventurousERC721 is IERC721, IAdventurous {

}

File 5 of 15 : Quest.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/**
 * @title Quest
 * @author Limit Break, Inc.
 * @notice Quest data structure for {IAdventurous} contracts.
 */
struct Quest {
    bool isActive;
    uint32 questId;
    uint64 startTimestamp;
    uint32 arrayIndex;
}

File 6 of 15 : Ownable.sol
// 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);
    }
}

File 7 of 15 : Pausable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (security/Pausable.sol)

pragma solidity ^0.8.0;

import "../utils/Context.sol";

/**
 * @dev Contract module which allows children to implement an emergency stop
 * mechanism that can be triggered by an authorized account.
 *
 * This module is used through inheritance. It will make available the
 * modifiers `whenNotPaused` and `whenPaused`, which can be applied to
 * the functions of your contract. Note that they will not be pausable by
 * simply including this module, only once the modifiers are put in place.
 */
abstract contract Pausable is Context {
    /**
     * @dev Emitted when the pause is triggered by `account`.
     */
    event Paused(address account);

    /**
     * @dev Emitted when the pause is lifted by `account`.
     */
    event Unpaused(address account);

    bool private _paused;

    /**
     * @dev Initializes the contract in unpaused state.
     */
    constructor() {
        _paused = false;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is not paused.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    modifier whenNotPaused() {
        _requireNotPaused();
        _;
    }

    /**
     * @dev Modifier to make a function callable only when the contract is paused.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    modifier whenPaused() {
        _requirePaused();
        _;
    }

    /**
     * @dev Returns true if the contract is paused, and false otherwise.
     */
    function paused() public view virtual returns (bool) {
        return _paused;
    }

    /**
     * @dev Throws if the contract is paused.
     */
    function _requireNotPaused() internal view virtual {
        require(!paused(), "Pausable: paused");
    }

    /**
     * @dev Throws if the contract is not paused.
     */
    function _requirePaused() internal view virtual {
        require(paused(), "Pausable: not paused");
    }

    /**
     * @dev Triggers stopped state.
     *
     * Requirements:
     *
     * - The contract must not be paused.
     */
    function _pause() internal virtual whenNotPaused {
        _paused = true;
        emit Paused(_msgSender());
    }

    /**
     * @dev Returns to normal state.
     *
     * Requirements:
     *
     * - The contract must be paused.
     */
    function _unpause() internal virtual whenPaused {
        _paused = false;
        emit Unpaused(_msgSender());
    }
}

File 8 of 15 : IERC721.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.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: 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 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);
}

File 9 of 15 : Context.sol
// 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;
    }
}

File 10 of 15 : ERC165.sol
// 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;
    }
}

File 11 of 15 : IERC165.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 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);
}

File 12 of 15 : IAdventureApproval.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

interface IAdventureApproval {
    function setAdventuresApprovedForAll(address operator, bool approved) external;
    function areAdventuresApprovedForAll(address owner, address operator) external view returns (bool);
    function isAdventureWhitelisted(address account) external view returns (bool);
}

File 13 of 15 : IMintableVillain.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

/**
 * @dev Required interface of mintable villain contracts.
 */
interface IMintableVillain {

    /**
     * @notice Mints multiple villains unmasked with the specified masked villain token ids
     */
    function unmaskVillainsBatch(address to, uint256[] calldata villainTokenIds, uint256[] calldata potionTokenIds) external;
}

File 14 of 15 : IMinterWhitelist.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

/**
 * @dev Required interface to determine if a minter is whitelisted
 */
interface IMinterWhitelist {
    /**
     * @notice Determines if an address is a whitelisted minter
     */
    function whitelistedMinters(address account) external view returns (bool);
}

File 15 of 15 : VillainCustodian.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.8.9;

import "./IAdventureApproval.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";

/**
 * @title VillainCustodian
 * @author Limit Break, Inc.
 * @notice Holds masked villain and potion tokens that are currently on a villain unmasking adventure.
 */
contract VillainCustodian {

    /// @dev Specify the villain unmasking adventure, masked villain, super villain potion and villain potion contract addresses during creation
    constructor(address villainUnmaskingAdventure, address maskedVillainAddress, address superVillainPotionAddress, address villainPotionAddress) {
        IERC721(maskedVillainAddress).setApprovalForAll(villainUnmaskingAdventure, true);
        IERC721(superVillainPotionAddress).setApprovalForAll(villainUnmaskingAdventure, true);
        IERC721(villainPotionAddress).setApprovalForAll(villainUnmaskingAdventure, true);
        IAdventureApproval(maskedVillainAddress).setAdventuresApprovedForAll(villainUnmaskingAdventure, true);
        IAdventureApproval(superVillainPotionAddress).setAdventuresApprovedForAll(villainUnmaskingAdventure, true);
        IAdventureApproval(villainPotionAddress).setAdventuresApprovedForAll(villainUnmaskingAdventure, true);
    }
}

Settings
{
  "remappings": [
    "@limit-break/=lib/limit-break/",
    "@openzeppelin/=lib/openzeppelin-contracts/",
    "ds-test/=lib/forge-std/lib/ds-test/src/",
    "forge-std/=lib/forge-std/src/",
    "limit-break/=lib/limit-break/",
    "openzeppelin-contracts/=lib/openzeppelin-contracts/"
  ],
  "optimizer": {
    "enabled": true,
    "runs": 200
  },
  "metadata": {
    "bytecodeHash": "ipfs"
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "evmVersion": "london",
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"villainPotionAddress","type":"address"},{"internalType":"address","name":"superVillainPotionAddress","type":"address"},{"internalType":"address","name":"maskedVillainAddress","type":"address"},{"internalType":"address","name":"villainAddress","type":"address"},{"internalType":"address","name":"superVillainAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"CallbackNotImplemented","type":"error"},{"inputs":[],"name":"CallerDidNotCreateClaimId","type":"error"},{"inputs":[],"name":"CallerNotOwnerOfMaskedVillain","type":"error"},{"inputs":[],"name":"CallerNotOwnerOfSuperVillainPotion","type":"error"},{"inputs":[],"name":"CallerNotOwnerOfVillainPotion","type":"error"},{"inputs":[],"name":"CannotIncludeMoreThanOnePotion","type":"error"},{"inputs":[],"name":"CannotSpecifyZeroAddressForMaskedVillainContract","type":"error"},{"inputs":[],"name":"CannotSpecifyZeroAddressForSuperVillainContract","type":"error"},{"inputs":[],"name":"CannotSpecifyZeroAddressForSuperVillainPotionContract","type":"error"},{"inputs":[],"name":"CannotSpecifyZeroAddressForVillainContract","type":"error"},{"inputs":[],"name":"CannotSpecifyZeroAddressForVillainPotionContract","type":"error"},{"inputs":[],"name":"CompleteQuestToUnmaskVillain","type":"error"},{"inputs":[],"name":"InputArrayLengthMismatch","type":"error"},{"inputs":[],"name":"MustIncludeMaskedVillain","type":"error"},{"inputs":[],"name":"NewUnmaskingDurationMustBeLessThanCurrentDuration","type":"error"},{"inputs":[],"name":"NoUnmaskingQuestFoundForSpecifiedClaimId","type":"error"},{"inputs":[],"name":"PotionGreaterThanAllocatedSpace","type":"error"},{"inputs":[],"name":"QuantityMustBeGreaterThanZero","type":"error"},{"inputs":[],"name":"QuestCompleteVillainMustBeUnmasked","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"adventurer","type":"address"},{"indexed":true,"internalType":"uint256","name":"claimId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isSuperVillain","type":"bool"}],"name":"UnmaskedVillain","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"oldUnmaskingDuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newUnmaskingDuration","type":"uint256"}],"name":"UnmaskingDurationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"adventurer","type":"address"},{"indexed":true,"internalType":"uint256","name":"claimId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"potionTokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"villainTokenId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isSuperVillain","type":"bool"}],"name":"UnmaskingVillain","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"adventurer","type":"address"},{"indexed":true,"internalType":"uint256","name":"claimId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"isSuperVillain","type":"bool"}],"name":"VillainMasked","type":"event"},{"inputs":[],"name":"custodian","outputs":[{"internalType":"contract VillainCustodian","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"claimIds","type":"uint256[]"}],"name":"getUnmaskingQuestDetailsBatch","outputs":[{"components":[{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"uint16","name":"villainTokenId","type":"uint16"},{"internalType":"uint16","name":"potionBitmap","type":"uint16"},{"internalType":"address","name":"adventurer","type":"address"}],"internalType":"struct VillainUnmaskingAdventure.UnmaskingQuest[]","name":"unmaskingQuests","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastClaimId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"claimIds","type":"uint256[]"}],"name":"maskVillainsBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"maskedVillainContract","outputs":[{"internalType":"contract IAdventurousERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"onQuestEntered","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"onQuestExited","outputs":[],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pauseNewQuestEntries","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"questsLockTokens","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"unmaskingDuration_","type":"uint256"}],"name":"setUnmaskingDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"maskedVillainTokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"villainPotionTokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"superVillainPotionTokenIds","type":"uint256[]"}],"name":"startUnmaskingVillainsBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"superVillainContract","outputs":[{"internalType":"contract IMintableVillain","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"superVillainPotionContract","outputs":[{"internalType":"contract IAdventurousERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"claimIds","type":"uint256[]"}],"name":"unmaskVillainsBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unmaskingDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"unmaskingQuestLookup","outputs":[{"internalType":"uint64","name":"startTimestamp","type":"uint64"},{"internalType":"uint16","name":"villainTokenId","type":"uint16"},{"internalType":"uint16","name":"potionBitmap","type":"uint16"},{"internalType":"address","name":"adventurer","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpauseNewQuestEntries","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"villainContract","outputs":[{"internalType":"contract IMintableVillain","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"villainPotionContract","outputs":[{"internalType":"contract IAdventurousERC721","name":"","type":"address"}],"stateMutability":"view","type":"function"}]

61014060405262093a806002553480156200001957600080fd5b50604051620027da380380620027da8339810160408190526200003c9162000232565b6200004733620001b7565b6000805460ff60a01b191690556001600160a01b0385166200007c5760405163d0dec48960e01b815260040160405180910390fd5b6001600160a01b038416620000a457604051633b239a5960e11b815260040160405180910390fd5b6001600160a01b038316620000cc5760405163c1d78f8760e01b815260040160405180910390fd5b6001600160a01b038216620000f45760405163dce526fb60e01b815260040160405180910390fd5b6001600160a01b0381166200011c5760405163ec68ecdd60e01b815260040160405180910390fd5b6001600160a01b0380861660805284811660a05283811660c05282811660e0528116610100526040513090849086908890620001589062000207565b6001600160a01b039485168152928416602084015290831660408301529091166060820152608001604051809103906000f0801580156200019d573d6000803e3d6000fd5b506001600160a01b03166101205250620002a29350505050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b610341806200249983390190565b80516001600160a01b03811681146200022d57600080fd5b919050565b600080600080600060a086880312156200024b57600080fd5b620002568662000215565b9450620002666020870162000215565b9350620002766040870162000215565b9250620002866060870162000215565b9150620002966080870162000215565b90509295509295909350565b60805160a05160c05160e05161010051610120516120f8620003a16000396000818161019f01528181610fa70152818161112101528181611299015281816119aa01528181611a5b0152611b020152600081816101de01528181610b6a015261186a01526000818161021801528181610ae101526117cb01526000818161037f01528181610e9e01528181610f7801528181611548015281816115f9015261197d0152600081816103a6015281816111900152818161126a015281816114480152818161172c0152611a2e01526000818161025f01528181611018015281816110f2015281816114cd0152818161168e0152611ad501526120f86000f3fe608060405234801561001057600080fd5b50600436106101585760003560e01c80637119ca76116100c3578063a1abf77f1161007c578063a1abf77f146103c8578063a4d67809146103d1578063a7ce5a9b146103e4578063d1f6b202146103f7578063e24dc13e146103ff578063f2fde38b1461040757600080fd5b80637119ca7614610343578063715018a61461035a5780638da5cb5b1461036257806392b612941461037357806394d266e31461037a57806395c34e03146103a157600080fd5b80634e9f8e8f116101155780634e9f8e8f1461023a5780635380c1641461025a5780635c975abb14610281578063609b3ab314610293578063688a3741146103225780636d4229c91461033557600080fd5b806301ffc9a71461015d57806327603f3414610185578063375b74c31461019a5780633ef6da87146101d9578063465ac962146102005780634de7508614610213575b600080fd5b61017061016b366004611d04565b61041a565b60405190151581526020015b60405180910390f35b610198610193366004611d80565b610451565b005b6101c17f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161017c565b6101c17f000000000000000000000000000000000000000000000000000000000000000081565b61019861020e366004611e19565b610527565b6101c17f000000000000000000000000000000000000000000000000000000000000000081565b61024d610248366004611e32565b610591565b60405161017c9190611e73565b6101c17f000000000000000000000000000000000000000000000000000000000000000081565b600054600160a01b900460ff16610170565b6102e76102a1366004611e19565b6003602052600090815260409020546001600160401b0381169061ffff600160401b8204811691600160501b8104909116906001600160a01b03600160601b9091041684565b604080516001600160401b0395909516855261ffff938416602086015291909216908301526001600160a01b0316606082015260800161017c565b610198610330366004611f05565b6106bc565b610198610330366004611f3a565b61034c60015481565b60405190815260200161017c565b6101986106d5565b6000546001600160a01b03166101c1565b6000610170565b6101c17f000000000000000000000000000000000000000000000000000000000000000081565b6101c17f000000000000000000000000000000000000000000000000000000000000000081565b61034c60025481565b6101986103df366004611e32565b6106e9565b6101986103f2366004611e32565b610bed565b610198610c43565b610198610c53565b610198610415366004611f75565b610c63565b60006001600160e01b031982166325df830760e21b148061044b57506301ffc9a760e01b6001600160e01b03198316145b92915050565b610459610ce1565b84610476576040516266e68160e51b815260040160405180910390fd5b84831415806104855750828114155b156104a3576040516343714afd60e01b815260040160405180910390fd5b6001805486810182550160005b8681101561051d576105156104c58284611f92565b8989848181106104d7576104d7611fb8565b905060200201358888858181106104f0576104f0611fb8565b9050602002013587878681811061050957610509611fb8565b90506020020135610d2e565b6001016104b0565b5050505050505050565b61052f6112ff565b600254808210610552576040516397d46e7b60e01b815260040160405180910390fd5b60408051828152602081018490527fda0b3cfc04b85577884799375303a6fb55003f942faaec32a81be934a17ab69f910160405180910390a150600255565b6060816001600160401b038111156105ab576105ab611fce565b6040519080825280602002602001820160405280156105fd57816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816105c95790505b50905060005b828110156106b5576003600085858481811061062157610621611fb8565b60209081029290920135835250818101929092526040908101600020815160808101835290546001600160401b0381168252600160401b810461ffff90811694830194909452600160501b810490931691810191909152600160601b9091046001600160a01b0316606082015282518390839081106106a2576106a2611fb8565b6020908102919091010152600101610603565b5092915050565b6040516319367fa960e01b815260040160405180910390fd5b6106dd6112ff565b6106e76000611359565b565b80610706576040516266e68160e51b815260040160405180910390fd5b6000816001600160401b0381111561072057610720611fce565b604051908082528060200260200182016040528015610749578160200160208202803683370190505b5090506000826001600160401b0381111561076657610766611fce565b60405190808252806020026020018201604052801561078f578160200160208202803683370190505b5090506000836001600160401b038111156107ac576107ac611fce565b6040519080825280602002602001820160405280156107d5578160200160208202803683370190505b50905060008060005b8681101561089557600080600061080c8b8b8681811061080057610800611fb8565b905060200201356113a9565b9250925092508015610842578288858151811061082b5761082b611fb8565b602002602001018181525050846001019450610868565b8289858151811061085557610855611fb8565b6020026020010181815250508560010195505b8187858151811061087b5761087b611fb8565b6020026020010181815250508360010193505050506107de565b506000826001600160401b038111156108b0576108b0611fce565b6040519080825280602002602001820160405280156108d9578160200160208202803683370190505b5090506000836001600160401b038111156108f6576108f6611fce565b60405190808252806020026020018201604052801561091f578160200160208202803683370190505b5090506000836001600160401b0381111561093c5761093c611fce565b604051908082528060200260200182016040528015610965578160200160208202803683370190505b5090506000846001600160401b0381111561098257610982611fce565b6040519080825280602002602001820160405280156109ab578160200160208202803683370190505b50905060008060005b8c811015610acb5760008c82815181106109d0576109d0611fb8565b6020026020010151905060008c83815181106109ee576109ee611fb8565b602002602001015190506000821115610a63578b8381518110610a1357610a13611fb8565b6020026020010151888681518110610a2d57610a2d611fb8565b60200260200101818152505081898681518110610a4c57610a4c611fb8565b602002602001018181525050846001019450610ac1565b8b8381518110610a7557610a75611fb8565b6020026020010151868581518110610a8f57610a8f611fb8565b60200260200101818152505080878581518110610aae57610aae611fb8565b6020026020010181815250508360010193505b50506001016109b4565b508715610b5557604051632225750f60e21b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690638895d43c90610b229033908a908a9060040161201f565b600060405180830381600087803b158015610b3c57600080fd5b505af1158015610b50573d6000803e3d6000fd5b505050505b8615610bde57604051632225750f60e21b81527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690638895d43c90610bab9033908890889060040161201f565b600060405180830381600087803b158015610bc557600080fd5b505af1158015610bd9573d6000803e3d6000fd5b505050505b50505050505050505050505050565b80610c0a576040516266e68160e51b815260040160405180910390fd5b60005b81811015610c3e57610c36838383818110610c2a57610c2a611fb8565b905060200201356115bc565b600101610c0d565b505050565b610c4b6112ff565b6106e7611b2e565b610c5b6112ff565b6106e7611b8e565b610c6b6112ff565b6001600160a01b038116610cd55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b610cde81611359565b50565b600054600160a01b900460ff16156106e75760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610ccc565b8115801590610d3c57508015155b15610d5a57604051635f607c7b60e01b815260040160405180910390fd5b82610d7857604051630fc6d19360e01b815260040160405180910390fd5b617fff811180610d895750617fff82115b15610da75760405163af70c01d60e01b815260040160405180910390fd5b3360008315610db65783610db8565b825b9050808315610dc657618000175b6000878152600360209081526040918290208054426001600160401b031669ffffffffffffffffffff1990911617600160401b61ffff8b811682029290921769ffffffffffffffffffff16600160501b878416026bffffffffffffffffffffffff1617600160601b6001600160a01b038a169081029190911793849055855188841681529190930490911692810192909252861515928201929092528891907f6935deae4e3ea51c19570a2359d90508f7beab6bfb1ec3fd44a10ce05a0736f89060600160405180910390a3826001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636352211e886040518263ffffffff1660e01b8152600401610eea91815260200190565b60206040518083038186803b158015610f0257600080fd5b505afa158015610f16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3a919061205f565b6001600160a01b031614610f61576040516314d737cb60e01b815260040160405180910390fd5b6040516371b855a360e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e370ab4690610fd19086907f0000000000000000000000000000000000000000000000000000000000000000908b9060040161207c565b600060405180830381600087803b158015610feb57600080fd5b505af1158015610fff573d6000803e3d6000fd5b50505050600085111561117e57826001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636352211e876040518263ffffffff1660e01b815260040161106491815260200190565b60206040518083038186803b15801561107c57600080fd5b505afa158015611090573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b4919061205f565b6001600160a01b0316146110db576040516355f77cdb60e11b815260040160405180910390fd5b6040516371b855a360e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e370ab469061114b9086907f0000000000000000000000000000000000000000000000000000000000000000908a9060040161207c565b600060405180830381600087803b15801561116557600080fd5b505af1158015611179573d6000803e3d6000fd5b505050505b83156112f657826001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316636352211e866040518263ffffffff1660e01b81526004016111dc91815260200190565b60206040518083038186803b1580156111f457600080fd5b505afa158015611208573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061122c919061205f565b6001600160a01b03161461125357604051638cd32acb60e01b815260040160405180910390fd5b6040516371b855a360e11b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063e370ab46906112c39086907f000000000000000000000000000000000000000000000000000000000000000090899060040161207c565b600060405180830381600087803b1580156112dd57600080fd5b505af11580156112f1573d6000803e3d6000fd5b505050505b50505050505050565b6000546001600160a01b031633146106e75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ccc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806000806000806000806113be89611bca565b94509450945094509450806113e657604051633f04771560e21b815260040160405180910390fd5b88856001600160a01b03167fcbb6d73f9f07129d8c57927b8d97eb7e58900b8c6943027ae78b78c2f46e067c84604051611424911515815260200190565b60405180910390a381156114b1576040516326f05fa960e21b8152600481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639bc17ea490602401600060405180830381600087803b15801561149457600080fd5b505af11580156114a8573d6000803e3d6000fd5b50505050611532565b8215611532576040516326f05fa960e21b8152600481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639bc17ea490602401600060405180830381600087803b15801561151957600080fd5b505af115801561152d573d6000803e3d6000fd5b505050505b6040516326f05fa960e21b8152600481018590527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690639bc17ea490602401600060405180830381600087803b15801561159457600080fd5b505af11580156115a8573d6000803e3d6000fd5b50959b949a50929850929650505050505050565b60008060008060006115cd86611bca565b60405162c06f9d60e61b8152306004820152949950929750909550935091506000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063301be7409060240160206040518083038186803b15801561163b57600080fd5b505afa15801561164f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061167391906120a0565b1580611712575060405162c06f9d60e61b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063301be7409060240160206040518083038186803b1580156116d857600080fd5b505afa1580156116ec573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171091906120a0565b155b806117b0575060405162c06f9d60e61b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063301be7409060240160206040518083038186803b15801561177657600080fd5b505afa15801561178a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ae91906120a0565b155b8061184f575060405163ed1e008560e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ed1e00859060240160206040518083038186803b15801561181557600080fd5b505afa158015611829573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061184d91906120a0565b155b806118ee575060405163ed1e008560e01b81523060048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063ed1e00859060240160206040518083038186803b1580156118b457600080fd5b505afa1580156118c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ec91906120a0565b155b156118f7575060015b818015611902575080155b1561192057604051632874237d60e01b815260040160405180910390fd5b86866001600160a01b03167f3e583d96dc451462c8861b49a608d6c8aab11e997707155b619cfc0ee7ea13ac8560405161195e911515815260200190565b60405180910390a36040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906119d6907f0000000000000000000000000000000000000000000000000000000000000000908a908a9060040161207c565b600060405180830381600087803b1580156119f057600080fd5b505af1158015611a04573d6000803e3d6000fd5b5050505060008411156112f6578215611abe576040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd90611a87907f0000000000000000000000000000000000000000000000000000000000000000908a90899060040161207c565b600060405180830381600087803b158015611aa157600080fd5b505af1158015611ab5573d6000803e3d6000fd5b505050506112f6565b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016906323b872dd906112c3907f0000000000000000000000000000000000000000000000000000000000000000908a90899060040161207c565b611b36610ce1565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611b713390565b6040516001600160a01b03909116815260200160405180910390a1565b611b96611cb4565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611b71565b6000818152600360209081526040808320815160808101835290546001600160401b038116808352600160401b820461ffff908116958401869052600160501b8304908116948401859052600160601b9092046001600160a01b03166060840181905295617fff8316946001600f9490941c841690931493909290919081611c655760405163a15f264160e01b815260040160405180910390fd5b6001600160a01b0388163314611c8e5760405163294ed80560e21b815260040160405180910390fd5b506002546000898152600360205260408120554291909103101591505091939590929450565b600054600160a01b900460ff166106e75760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610ccc565b600060208284031215611d1657600080fd5b81356001600160e01b031981168114611d2e57600080fd5b9392505050565b60008083601f840112611d4757600080fd5b5081356001600160401b03811115611d5e57600080fd5b6020830191508360208260051b8501011115611d7957600080fd5b9250929050565b60008060008060008060608789031215611d9957600080fd5b86356001600160401b0380821115611db057600080fd5b611dbc8a838b01611d35565b90985096506020890135915080821115611dd557600080fd5b611de18a838b01611d35565b90965094506040890135915080821115611dfa57600080fd5b50611e0789828a01611d35565b979a9699509497509295939492505050565b600060208284031215611e2b57600080fd5b5035919050565b60008060208385031215611e4557600080fd5b82356001600160401b03811115611e5b57600080fd5b611e6785828601611d35565b90969095509350505050565b602080825282518282018190526000919060409081850190868401855b82811015611ee357815180516001600160401b031685528681015161ffff908116888701528682015116868601526060908101516001600160a01b03169085015260809093019290850190600101611e90565b5091979650505050505050565b6001600160a01b0381168114610cde57600080fd5b600080600060608486031215611f1a57600080fd5b8335611f2581611ef0565b95602085013595506040909401359392505050565b60008060008060808587031215611f5057600080fd5b8435611f5b81611ef0565b966020860135965060408601359560600135945092505050565b600060208284031215611f8757600080fd5b8135611d2e81611ef0565b60008219821115611fb357634e487b7160e01b600052601160045260246000fd5b500190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600081518084526020808501945080840160005b8381101561201457815187529582019590820190600101611ff8565b509495945050505050565b6001600160a01b038416815260606020820181905260009061204390830185611fe4565b82810360408401526120558185611fe4565b9695505050505050565b60006020828403121561207157600080fd5b8151611d2e81611ef0565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6000602082840312156120b257600080fd5b81518015158114611d2e57600080fdfea2646970667358221220c18671518d32c1d35b894961a141ba8e10a1c2877cd5bdadef34a479aeed07c364736f6c63430008090033608060405234801561001057600080fd5b5060405161034138038061034183398101604081905261002f916102a0565b60405163a22cb46560e01b81526001600160a01b0385811660048301526001602483015284169063a22cb46590604401600060405180830381600087803b15801561007957600080fd5b505af115801561008d573d6000803e3d6000fd5b505060405163a22cb46560e01b81526001600160a01b038781166004830152600160248301528516925063a22cb4659150604401600060405180830381600087803b1580156100db57600080fd5b505af11580156100ef573d6000803e3d6000fd5b505060405163a22cb46560e01b81526001600160a01b038781166004830152600160248301528416925063a22cb4659150604401600060405180830381600087803b15801561013d57600080fd5b505af1158015610151573d6000803e3d6000fd5b50506040516330178bd160e21b81526001600160a01b038781166004830152600160248301528616925063c05e2f449150604401600060405180830381600087803b15801561019f57600080fd5b505af11580156101b3573d6000803e3d6000fd5b50506040516330178bd160e21b81526001600160a01b038781166004830152600160248301528516925063c05e2f449150604401600060405180830381600087803b15801561020157600080fd5b505af1158015610215573d6000803e3d6000fd5b50506040516330178bd160e21b81526001600160a01b038781166004830152600160248301528416925063c05e2f449150604401600060405180830381600087803b15801561026357600080fd5b505af1158015610277573d6000803e3d6000fd5b50505050505050506102f4565b80516001600160a01b038116811461029b57600080fd5b919050565b600080600080608085870312156102b657600080fd5b6102bf85610284565b93506102cd60208601610284565b92506102db60408601610284565b91506102e960608601610284565b905092959194509250565b603f806103026000396000f3fe6080604052600080fdfea26469706673582212205b6ea39b0211c650aa00e5b3277251d7dc558bba8728596e6ac68ed13e997c1964736f6c63430008090033000000000000000000000000bbd3f1d05b3a0d9b281c7739c48c3ab3924824ac0000000000000000000000001ca97f9a77114a0a6759bd10c18097db8628cb7c000000000000000000000000812f5cf0d10539ef9534929940f3aeede3d3d96700000000000000000000000097abea635efdaf4cdc844b8677623cac8d7768140000000000000000000000005c2c9094bb47c6fee89abd4a6126fb3fb39de923

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101585760003560e01c80637119ca76116100c3578063a1abf77f1161007c578063a1abf77f146103c8578063a4d67809146103d1578063a7ce5a9b146103e4578063d1f6b202146103f7578063e24dc13e146103ff578063f2fde38b1461040757600080fd5b80637119ca7614610343578063715018a61461035a5780638da5cb5b1461036257806392b612941461037357806394d266e31461037a57806395c34e03146103a157600080fd5b80634e9f8e8f116101155780634e9f8e8f1461023a5780635380c1641461025a5780635c975abb14610281578063609b3ab314610293578063688a3741146103225780636d4229c91461033557600080fd5b806301ffc9a71461015d57806327603f3414610185578063375b74c31461019a5780633ef6da87146101d9578063465ac962146102005780634de7508614610213575b600080fd5b61017061016b366004611d04565b61041a565b60405190151581526020015b60405180910390f35b610198610193366004611d80565b610451565b005b6101c17f00000000000000000000000018910aeb9fe4f92734a38604541993a763dbd21a81565b6040516001600160a01b03909116815260200161017c565b6101c17f0000000000000000000000005c2c9094bb47c6fee89abd4a6126fb3fb39de92381565b61019861020e366004611e19565b610527565b6101c17f00000000000000000000000097abea635efdaf4cdc844b8677623cac8d77681481565b61024d610248366004611e32565b610591565b60405161017c9190611e73565b6101c17f000000000000000000000000bbd3f1d05b3a0d9b281c7739c48c3ab3924824ac81565b600054600160a01b900460ff16610170565b6102e76102a1366004611e19565b6003602052600090815260409020546001600160401b0381169061ffff600160401b8204811691600160501b8104909116906001600160a01b03600160601b9091041684565b604080516001600160401b0395909516855261ffff938416602086015291909216908301526001600160a01b0316606082015260800161017c565b610198610330366004611f05565b6106bc565b610198610330366004611f3a565b61034c60015481565b60405190815260200161017c565b6101986106d5565b6000546001600160a01b03166101c1565b6000610170565b6101c17f000000000000000000000000812f5cf0d10539ef9534929940f3aeede3d3d96781565b6101c17f0000000000000000000000001ca97f9a77114a0a6759bd10c18097db8628cb7c81565b61034c60025481565b6101986103df366004611e32565b6106e9565b6101986103f2366004611e32565b610bed565b610198610c43565b610198610c53565b610198610415366004611f75565b610c63565b60006001600160e01b031982166325df830760e21b148061044b57506301ffc9a760e01b6001600160e01b03198316145b92915050565b610459610ce1565b84610476576040516266e68160e51b815260040160405180910390fd5b84831415806104855750828114155b156104a3576040516343714afd60e01b815260040160405180910390fd5b6001805486810182550160005b8681101561051d576105156104c58284611f92565b8989848181106104d7576104d7611fb8565b905060200201358888858181106104f0576104f0611fb8565b9050602002013587878681811061050957610509611fb8565b90506020020135610d2e565b6001016104b0565b5050505050505050565b61052f6112ff565b600254808210610552576040516397d46e7b60e01b815260040160405180910390fd5b60408051828152602081018490527fda0b3cfc04b85577884799375303a6fb55003f942faaec32a81be934a17ab69f910160405180910390a150600255565b6060816001600160401b038111156105ab576105ab611fce565b6040519080825280602002602001820160405280156105fd57816020015b6040805160808101825260008082526020808301829052928201819052606082015282526000199092019101816105c95790505b50905060005b828110156106b5576003600085858481811061062157610621611fb8565b60209081029290920135835250818101929092526040908101600020815160808101835290546001600160401b0381168252600160401b810461ffff90811694830194909452600160501b810490931691810191909152600160601b9091046001600160a01b0316606082015282518390839081106106a2576106a2611fb8565b6020908102919091010152600101610603565b5092915050565b6040516319367fa960e01b815260040160405180910390fd5b6106dd6112ff565b6106e76000611359565b565b80610706576040516266e68160e51b815260040160405180910390fd5b6000816001600160401b0381111561072057610720611fce565b604051908082528060200260200182016040528015610749578160200160208202803683370190505b5090506000826001600160401b0381111561076657610766611fce565b60405190808252806020026020018201604052801561078f578160200160208202803683370190505b5090506000836001600160401b038111156107ac576107ac611fce565b6040519080825280602002602001820160405280156107d5578160200160208202803683370190505b50905060008060005b8681101561089557600080600061080c8b8b8681811061080057610800611fb8565b905060200201356113a9565b9250925092508015610842578288858151811061082b5761082b611fb8565b602002602001018181525050846001019450610868565b8289858151811061085557610855611fb8565b6020026020010181815250508560010195505b8187858151811061087b5761087b611fb8565b6020026020010181815250508360010193505050506107de565b506000826001600160401b038111156108b0576108b0611fce565b6040519080825280602002602001820160405280156108d9578160200160208202803683370190505b5090506000836001600160401b038111156108f6576108f6611fce565b60405190808252806020026020018201604052801561091f578160200160208202803683370190505b5090506000836001600160401b0381111561093c5761093c611fce565b604051908082528060200260200182016040528015610965578160200160208202803683370190505b5090506000846001600160401b0381111561098257610982611fce565b6040519080825280602002602001820160405280156109ab578160200160208202803683370190505b50905060008060005b8c811015610acb5760008c82815181106109d0576109d0611fb8565b6020026020010151905060008c83815181106109ee576109ee611fb8565b602002602001015190506000821115610a63578b8381518110610a1357610a13611fb8565b6020026020010151888681518110610a2d57610a2d611fb8565b60200260200101818152505081898681518110610a4c57610a4c611fb8565b602002602001018181525050846001019450610ac1565b8b8381518110610a7557610a75611fb8565b6020026020010151868581518110610a8f57610a8f611fb8565b60200260200101818152505080878581518110610aae57610aae611fb8565b6020026020010181815250508360010193505b50506001016109b4565b508715610b5557604051632225750f60e21b81527f00000000000000000000000097abea635efdaf4cdc844b8677623cac8d7768146001600160a01b031690638895d43c90610b229033908a908a9060040161201f565b600060405180830381600087803b158015610b3c57600080fd5b505af1158015610b50573d6000803e3d6000fd5b505050505b8615610bde57604051632225750f60e21b81527f0000000000000000000000005c2c9094bb47c6fee89abd4a6126fb3fb39de9236001600160a01b031690638895d43c90610bab9033908890889060040161201f565b600060405180830381600087803b158015610bc557600080fd5b505af1158015610bd9573d6000803e3d6000fd5b505050505b50505050505050505050505050565b80610c0a576040516266e68160e51b815260040160405180910390fd5b60005b81811015610c3e57610c36838383818110610c2a57610c2a611fb8565b905060200201356115bc565b600101610c0d565b505050565b610c4b6112ff565b6106e7611b2e565b610c5b6112ff565b6106e7611b8e565b610c6b6112ff565b6001600160a01b038116610cd55760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084015b60405180910390fd5b610cde81611359565b50565b600054600160a01b900460ff16156106e75760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610ccc565b8115801590610d3c57508015155b15610d5a57604051635f607c7b60e01b815260040160405180910390fd5b82610d7857604051630fc6d19360e01b815260040160405180910390fd5b617fff811180610d895750617fff82115b15610da75760405163af70c01d60e01b815260040160405180910390fd5b3360008315610db65783610db8565b825b9050808315610dc657618000175b6000878152600360209081526040918290208054426001600160401b031669ffffffffffffffffffff1990911617600160401b61ffff8b811682029290921769ffffffffffffffffffff16600160501b878416026bffffffffffffffffffffffff1617600160601b6001600160a01b038a169081029190911793849055855188841681529190930490911692810192909252861515928201929092528891907f6935deae4e3ea51c19570a2359d90508f7beab6bfb1ec3fd44a10ce05a0736f89060600160405180910390a3826001600160a01b03167f000000000000000000000000812f5cf0d10539ef9534929940f3aeede3d3d9676001600160a01b0316636352211e886040518263ffffffff1660e01b8152600401610eea91815260200190565b60206040518083038186803b158015610f0257600080fd5b505afa158015610f16573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f3a919061205f565b6001600160a01b031614610f61576040516314d737cb60e01b815260040160405180910390fd5b6040516371b855a360e11b81526001600160a01b037f000000000000000000000000812f5cf0d10539ef9534929940f3aeede3d3d967169063e370ab4690610fd19086907f00000000000000000000000018910aeb9fe4f92734a38604541993a763dbd21a908b9060040161207c565b600060405180830381600087803b158015610feb57600080fd5b505af1158015610fff573d6000803e3d6000fd5b50505050600085111561117e57826001600160a01b03167f000000000000000000000000bbd3f1d05b3a0d9b281c7739c48c3ab3924824ac6001600160a01b0316636352211e876040518263ffffffff1660e01b815260040161106491815260200190565b60206040518083038186803b15801561107c57600080fd5b505afa158015611090573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110b4919061205f565b6001600160a01b0316146110db576040516355f77cdb60e11b815260040160405180910390fd5b6040516371b855a360e11b81526001600160a01b037f000000000000000000000000bbd3f1d05b3a0d9b281c7739c48c3ab3924824ac169063e370ab469061114b9086907f00000000000000000000000018910aeb9fe4f92734a38604541993a763dbd21a908a9060040161207c565b600060405180830381600087803b15801561116557600080fd5b505af1158015611179573d6000803e3d6000fd5b505050505b83156112f657826001600160a01b03167f0000000000000000000000001ca97f9a77114a0a6759bd10c18097db8628cb7c6001600160a01b0316636352211e866040518263ffffffff1660e01b81526004016111dc91815260200190565b60206040518083038186803b1580156111f457600080fd5b505afa158015611208573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061122c919061205f565b6001600160a01b03161461125357604051638cd32acb60e01b815260040160405180910390fd5b6040516371b855a360e11b81526001600160a01b037f0000000000000000000000001ca97f9a77114a0a6759bd10c18097db8628cb7c169063e370ab46906112c39086907f00000000000000000000000018910aeb9fe4f92734a38604541993a763dbd21a90899060040161207c565b600060405180830381600087803b1580156112dd57600080fd5b505af11580156112f1573d6000803e3d6000fd5b505050505b50505050505050565b6000546001600160a01b031633146106e75760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610ccc565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806000806000806000806113be89611bca565b94509450945094509450806113e657604051633f04771560e21b815260040160405180910390fd5b88856001600160a01b03167fcbb6d73f9f07129d8c57927b8d97eb7e58900b8c6943027ae78b78c2f46e067c84604051611424911515815260200190565b60405180910390a381156114b1576040516326f05fa960e21b8152600481018490527f0000000000000000000000001ca97f9a77114a0a6759bd10c18097db8628cb7c6001600160a01b031690639bc17ea490602401600060405180830381600087803b15801561149457600080fd5b505af11580156114a8573d6000803e3d6000fd5b50505050611532565b8215611532576040516326f05fa960e21b8152600481018490527f000000000000000000000000bbd3f1d05b3a0d9b281c7739c48c3ab3924824ac6001600160a01b031690639bc17ea490602401600060405180830381600087803b15801561151957600080fd5b505af115801561152d573d6000803e3d6000fd5b505050505b6040516326f05fa960e21b8152600481018590527f000000000000000000000000812f5cf0d10539ef9534929940f3aeede3d3d9676001600160a01b031690639bc17ea490602401600060405180830381600087803b15801561159457600080fd5b505af11580156115a8573d6000803e3d6000fd5b50959b949a50929850929650505050505050565b60008060008060006115cd86611bca565b60405162c06f9d60e61b8152306004820152949950929750909550935091506000906001600160a01b037f000000000000000000000000812f5cf0d10539ef9534929940f3aeede3d3d967169063301be7409060240160206040518083038186803b15801561163b57600080fd5b505afa15801561164f573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061167391906120a0565b1580611712575060405162c06f9d60e61b81523060048201527f000000000000000000000000bbd3f1d05b3a0d9b281c7739c48c3ab3924824ac6001600160a01b03169063301be7409060240160206040518083038186803b1580156116d857600080fd5b505afa1580156116ec573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061171091906120a0565b155b806117b0575060405162c06f9d60e61b81523060048201527f0000000000000000000000001ca97f9a77114a0a6759bd10c18097db8628cb7c6001600160a01b03169063301be7409060240160206040518083038186803b15801561177657600080fd5b505afa15801561178a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906117ae91906120a0565b155b8061184f575060405163ed1e008560e01b81523060048201527f00000000000000000000000097abea635efdaf4cdc844b8677623cac8d7768146001600160a01b03169063ed1e00859060240160206040518083038186803b15801561181557600080fd5b505afa158015611829573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061184d91906120a0565b155b806118ee575060405163ed1e008560e01b81523060048201527f0000000000000000000000005c2c9094bb47c6fee89abd4a6126fb3fb39de9236001600160a01b03169063ed1e00859060240160206040518083038186803b1580156118b457600080fd5b505afa1580156118c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118ec91906120a0565b155b156118f7575060015b818015611902575080155b1561192057604051632874237d60e01b815260040160405180910390fd5b86866001600160a01b03167f3e583d96dc451462c8861b49a608d6c8aab11e997707155b619cfc0ee7ea13ac8560405161195e911515815260200190565b60405180910390a36040516323b872dd60e01b81526001600160a01b037f000000000000000000000000812f5cf0d10539ef9534929940f3aeede3d3d96716906323b872dd906119d6907f00000000000000000000000018910aeb9fe4f92734a38604541993a763dbd21a908a908a9060040161207c565b600060405180830381600087803b1580156119f057600080fd5b505af1158015611a04573d6000803e3d6000fd5b5050505060008411156112f6578215611abe576040516323b872dd60e01b81526001600160a01b037f0000000000000000000000001ca97f9a77114a0a6759bd10c18097db8628cb7c16906323b872dd90611a87907f00000000000000000000000018910aeb9fe4f92734a38604541993a763dbd21a908a90899060040161207c565b600060405180830381600087803b158015611aa157600080fd5b505af1158015611ab5573d6000803e3d6000fd5b505050506112f6565b6040516323b872dd60e01b81526001600160a01b037f000000000000000000000000bbd3f1d05b3a0d9b281c7739c48c3ab3924824ac16906323b872dd906112c3907f00000000000000000000000018910aeb9fe4f92734a38604541993a763dbd21a908a90899060040161207c565b611b36610ce1565b6000805460ff60a01b1916600160a01b1790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611b713390565b6040516001600160a01b03909116815260200160405180910390a1565b611b96611cb4565b6000805460ff60a01b191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611b71565b6000818152600360209081526040808320815160808101835290546001600160401b038116808352600160401b820461ffff908116958401869052600160501b8304908116948401859052600160601b9092046001600160a01b03166060840181905295617fff8316946001600f9490941c841690931493909290919081611c655760405163a15f264160e01b815260040160405180910390fd5b6001600160a01b0388163314611c8e5760405163294ed80560e21b815260040160405180910390fd5b506002546000898152600360205260408120554291909103101591505091939590929450565b600054600160a01b900460ff166106e75760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610ccc565b600060208284031215611d1657600080fd5b81356001600160e01b031981168114611d2e57600080fd5b9392505050565b60008083601f840112611d4757600080fd5b5081356001600160401b03811115611d5e57600080fd5b6020830191508360208260051b8501011115611d7957600080fd5b9250929050565b60008060008060008060608789031215611d9957600080fd5b86356001600160401b0380821115611db057600080fd5b611dbc8a838b01611d35565b90985096506020890135915080821115611dd557600080fd5b611de18a838b01611d35565b90965094506040890135915080821115611dfa57600080fd5b50611e0789828a01611d35565b979a9699509497509295939492505050565b600060208284031215611e2b57600080fd5b5035919050565b60008060208385031215611e4557600080fd5b82356001600160401b03811115611e5b57600080fd5b611e6785828601611d35565b90969095509350505050565b602080825282518282018190526000919060409081850190868401855b82811015611ee357815180516001600160401b031685528681015161ffff908116888701528682015116868601526060908101516001600160a01b03169085015260809093019290850190600101611e90565b5091979650505050505050565b6001600160a01b0381168114610cde57600080fd5b600080600060608486031215611f1a57600080fd5b8335611f2581611ef0565b95602085013595506040909401359392505050565b60008060008060808587031215611f5057600080fd5b8435611f5b81611ef0565b966020860135965060408601359560600135945092505050565b600060208284031215611f8757600080fd5b8135611d2e81611ef0565b60008219821115611fb357634e487b7160e01b600052601160045260246000fd5b500190565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b600081518084526020808501945080840160005b8381101561201457815187529582019590820190600101611ff8565b509495945050505050565b6001600160a01b038416815260606020820181905260009061204390830185611fe4565b82810360408401526120558185611fe4565b9695505050505050565b60006020828403121561207157600080fd5b8151611d2e81611ef0565b6001600160a01b039384168152919092166020820152604081019190915260600190565b6000602082840312156120b257600080fd5b81518015158114611d2e57600080fdfea2646970667358221220c18671518d32c1d35b894961a141ba8e10a1c2877cd5bdadef34a479aeed07c364736f6c63430008090033

Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)

000000000000000000000000bbd3f1d05b3a0d9b281c7739c48c3ab3924824ac0000000000000000000000001ca97f9a77114a0a6759bd10c18097db8628cb7c000000000000000000000000812f5cf0d10539ef9534929940f3aeede3d3d96700000000000000000000000097abea635efdaf4cdc844b8677623cac8d7768140000000000000000000000005c2c9094bb47c6fee89abd4a6126fb3fb39de923

-----Decoded View---------------
Arg [0] : villainPotionAddress (address): 0xBBD3f1D05B3A0D9B281c7739c48c3ab3924824aC
Arg [1] : superVillainPotionAddress (address): 0x1Ca97F9A77114a0A6759bd10C18097Db8628cb7C
Arg [2] : maskedVillainAddress (address): 0x812F5CF0D10539ef9534929940f3aeEde3d3d967
Arg [3] : villainAddress (address): 0x97ABEA635eFDAf4CdC844B8677623CAc8d776814
Arg [4] : superVillainAddress (address): 0x5c2C9094bB47C6feE89abD4a6126Fb3Fb39dE923

-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 000000000000000000000000bbd3f1d05b3a0d9b281c7739c48c3ab3924824ac
Arg [1] : 0000000000000000000000001ca97f9a77114a0a6759bd10c18097db8628cb7c
Arg [2] : 000000000000000000000000812f5cf0d10539ef9534929940f3aeede3d3d967
Arg [3] : 00000000000000000000000097abea635efdaf4cdc844b8677623cac8d776814
Arg [4] : 0000000000000000000000005c2c9094bb47c6fee89abd4a6126fb3fb39de923


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
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.