ETH Price: $1,960.99 (+0.96%)

Contract

0xFc9Ab31a5EAA41B22f59C83De71f024E10a62ec0
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Toggle Claim Ope...152073822022-07-24 20:10:431323 days ago1658693443IN
0xFc9Ab31a...E10a62ec0
0 ETH0.0004457415.67089069
Claim Prize151933752022-07-22 16:05:021325 days ago1658505902IN
0xFc9Ab31a...E10a62ec0
0 ETH0.0029493125.81777253
Claim Prize151933662022-07-22 16:03:181325 days ago1658505798IN
0xFc9Ab31a...E10a62ec0
0 ETH0.0032414321.27319667
Bulk Claim Prize...151928472022-07-22 14:15:551325 days ago1658499355IN
0xFc9Ab31a...E10a62ec0
0 ETH0.0053729727.30765983
Claim Prize151887682022-07-21 22:49:261326 days ago1658443766IN
0xFc9Ab31a...E10a62ec0
0 ETH0.0014573212.75711806
Claim Prize151774212022-07-20 4:35:231327 days ago1658291723IN
0xFc9Ab31a...E10a62ec0
0 ETH0.0024225321.20638638
Claim Prize151372822022-07-13 23:40:511334 days ago1657755651IN
0xFc9Ab31a...E10a62ec0
0 ETH0.0032071228.07453627
Claim Prize151191082022-07-11 4:07:081336 days ago1657512428IN
0xFc9Ab31a...E10a62ec0
0 ETH0.0020640218.06617799
Claim Prize151147832022-07-10 12:02:011337 days ago1657454521IN
0xFc9Ab31a...E10a62ec0
0 ETH0.0016410214.36374201
Claim Prize150934032022-07-07 4:58:221340 days ago1657169902IN
0xFc9Ab31a...E10a62ec0
0 ETH0.0016661614.58530445
Bulk Claim Prize...150838012022-07-05 17:13:241342 days ago1657041204IN
0xFc9Ab31a...E10a62ec0
0 ETH0.0129732173.28214932
Claim Prize150835812022-07-05 16:24:561342 days ago1657038296IN
0xFc9Ab31a...E10a62ec0
0 ETH0.00308627.01431698
Claim Prize150785732022-07-04 21:46:501343 days ago1656971210IN
0xFc9Ab31a...E10a62ec0
0 ETH0.0017509915.3262437
Claim Prize150755642022-07-04 10:45:191343 days ago1656931519IN
0xFc9Ab31a...E10a62ec0
0 ETH0.0024126121.11954463
Claim Prize150735522022-07-04 3:12:191343 days ago1656904339IN
0xFc9Ab31a...E10a62ec0
0 ETH0.0012991111.37103325
Claim Prize150696132022-07-03 12:33:231344 days ago1656851603IN
0xFc9Ab31a...E10a62ec0
0 ETH0.001817715.91019148
Claim Prize150688062022-07-03 9:37:301344 days ago1656841050IN
0xFc9Ab31a...E10a62ec0
0 ETH0.0014734412.89824287
Bulk Claim Prize...150649852022-07-02 19:27:051345 days ago1656790025IN
0xFc9Ab31a...E10a62ec0
0 ETH0.0031232315.87354806
Claim Prize150625002022-07-02 10:15:001345 days ago1656756900IN
0xFc9Ab31a...E10a62ec0
0 ETH0.0012743311.1553164
Claim Prize150622642022-07-02 9:18:191345 days ago1656753499IN
0xFc9Ab31a...E10a62ec0
0 ETH0.001118369.7889498
Claim Prize150592342022-07-01 22:27:361346 days ago1656714456IN
0xFc9Ab31a...E10a62ec0
0 ETH0.0039504134.58116525
Claim Prize150543462022-07-01 4:10:331346 days ago1656648633IN
0xFc9Ab31a...E10a62ec0
0 ETH0.003244128.39526862
Claim Prize150543422022-07-01 4:09:411346 days ago1656648581IN
0xFc9Ab31a...E10a62ec0
0 ETH0.0035235430.84115778
Claim Prize150529452022-06-30 22:49:251347 days ago1656629365IN
0xFc9Ab31a...E10a62ec0
0 ETH0.0091032679.67988263
Claim Prize150523322022-06-30 20:27:001347 days ago1656620820IN
0xFc9Ab31a...E10a62ec0
0 ETH0.0069196960.57366768
View all transactions

View more zero value Internal Transactions in Advanced View mode

Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

Transaction Hash Block Value Eth2 PubKey Valid
View All Deposits
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
ClaimGiftOfMidas

Compiler Version
v0.8.14+commit.80d49f37

Optimization Enabled:
Yes with 200 runs

Other Settings:
default evmVersion
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;


import "@chainlink/VRFConsumerBaseV2.sol";
import "@chainlink/interfaces/LinkTokenInterface.sol";
import "@chainlink/interfaces/VRFCoordinatorV2Interface.sol";
import "@ERC721A/contracts/interfaces/IERC721ABurnable.sol";
import "@openzeppelin/contracts/token/ERC721/IERC721.sol";
import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol";
import "@openzeppelin/contracts/access/Ownable.sol";


/**
 *  _______ __               _______                            __               __
 * |_     _|  |--.-----.    |   _   |.-----.----.-----.-----.--|  |.---.-.-----.|  |_.-----.
 *   |   | |     |  -__|    |       ||__ --|  __|  -__|     |  _  ||  _  |     ||   _|__ --|
 *   |___| |__|__|_____|    |___|___||_____|____|_____|__|__|_____||___._|__|__||____|_____|
**/

contract ClaimGiftOfMidas is VRFConsumerBaseV2, Ownable {

    IERC721ABurnable giftOfMidasInterface;
    uint256 totalGOMTokens;

    uint256 commonPrizeCounter;
    uint256[] commonPrizes;
    mapping(uint256 => commonPrize) public idToCommonPrize;

    struct commonPrize {
        IERC1155 IAddress;
        uint tokenId;
        uint amountRemaining;
    }

    uint256 legendaryPrizeCounter = 1; // start at 1 to keep zero as empty value in mapping GOMTokenIdToLegendaryPrizeId
    uint256[] public legendaryPrizes;
    mapping(uint256 => legendaryPrize) public idToLegendaryPrize;
    mapping(uint256 => uint256) public GOMTokenIdToLegendaryPrizeId;

    struct legendaryPrize {
        IERC721 IAddress;
        uint tokenId;
    }

    address holderAddress; // address which holds nfts that would be given out
    bool claimOpen;
    uint nonce;

    VRFCoordinatorV2Interface immutable COORDINATOR;
    LinkTokenInterface immutable LINKTOKEN;
    uint64 immutable s_subscriptionId;
    bytes32 immutable s_keyHash;
    uint16 immutable s_requestConfirmations = 3;
    uint256[] public s_randomWords;
    uint256 public s_requestId;
    address s_owner;

    error RandomNumbersDontMatchPrizePoolLength();
    error NotAuthorisedToAddPrizes();
    error NotOpenYet();

    event WinnerSet(uint256 indexed tokenId, uint256 prizeId);
    event PrizeClaimed(address indexed user, address indexed nftContract, uint256 tokenId);
    event ReturnedRandomness(uint256[] randomWords);
    event ReRollPrize(uint256 prizeIndex);

    /**
     * @notice Constructor inherits VRFConsumerBaseV2
     *
     * @param giftOfMidas - contract of NFTs to be burnt to claim
     * @param _holderAddress - address which holds the NFT prizes to be given out
     * @param subscriptionId - the subscription ID that this contract uses for funding requests
     * @param vrfCoordinator - coordinator, check https://docs.chain.link/docs/vrf-contracts/#configurations
     * @param keyHash - the gas lane to use, which specifies the maximum gas price to bump to
     */
    constructor(
        address giftOfMidas,
        address _holderAddress,
        uint64 subscriptionId,
        address vrfCoordinator,
        address link,
        bytes32 keyHash
    ) VRFConsumerBaseV2(vrfCoordinator) {
        giftOfMidasInterface = IERC721ABurnable(giftOfMidas);
        totalGOMTokens = giftOfMidasInterface.totalSupply();
        holderAddress = _holderAddress;
        COORDINATOR = VRFCoordinatorV2Interface(vrfCoordinator);
        LINKTOKEN = LinkTokenInterface(link);
        s_keyHash = keyHash;
        s_owner = msg.sender;
        s_subscriptionId = subscriptionId;
    }

    /**
      * @notice Set a winner for each random number generated from VRF for the legendary prize pool
     */
    function generateWinners() external onlyOwner {
        if (legendaryPrizes.length != s_randomWords.length) revert RandomNumbersDontMatchPrizePoolLength();
        for (uint i = 0; i < s_randomWords.length; i++) {
            setWinner(i, i);
        }
    }

    /**
     * @notice function for setting random token id from chain links VRF
     * We leave this public encase we have to re-roll a number in the very unlikely chance we get a duplicated winner
     * @param sWordsIndex - index of s_randomWords from VRF
     * @param prizeIndex - index of prize list
     */
    function setWinner(uint256 sWordsIndex, uint256 prizeIndex) public onlyOwner {
        uint256 randomTokenId = s_randomWords[sWordsIndex] % totalGOMTokens;
        s_randomWords[sWordsIndex] = randomTokenId;
        // Encase unlikely event a tokenId is selected twice
        if (GOMTokenIdToLegendaryPrizeId[randomTokenId] == 0) {
            GOMTokenIdToLegendaryPrizeId[randomTokenId] = legendaryPrizes[prizeIndex];
            emit WinnerSet(randomTokenId, legendaryPrizes[prizeIndex]);
        } else {
            emit ReRollPrize(prizeIndex);
        }
    }

    /**
     * @notice claim prize for given tokenId
     *
     * @param tokenId - Of GiftOfMidas
     */
    function claimPrize(uint256 tokenId) public {
        if (!claimOpen) revert NotOpenYet();
        giftOfMidasInterface.burn(tokenId);
        if (GOMTokenIdToLegendaryPrizeId[tokenId] != 0) {
            claimLegendaryPrize(tokenId);
        }
        else {
            claimCommonPrize();
        }
    }

    /**
     * @notice bulk claim prizes
     *
     * @param tokenIds - Of GiftOfMidas to claim
     */
    function bulkClaimPrizes(uint256[] memory tokenIds) external {
        if (!claimOpen) revert NotOpenYet();
        for (uint i = 0; i < tokenIds.length; i++) {
            claimPrize(tokenIds[i]);
        }

    }

    /**
     * @notice Claim legendary prize which has been set to tokenId
     *
     * @param tokenId - Of GiftOfMidas to be burned to claim prize
     */
    function claimLegendaryPrize(uint256 tokenId) internal {
        legendaryPrize memory prize = idToLegendaryPrize[GOMTokenIdToLegendaryPrizeId[tokenId]];
        prize.IAddress.safeTransferFrom(holderAddress, msg.sender, prize.tokenId, "");
        emit PrizeClaimed(msg.sender, address(prize.IAddress), prize.tokenId);
        delete GOMTokenIdToLegendaryPrizeId[tokenId];
    }

    /**
     * @notice Claim random common prize from common prize pool
     */
    function claimCommonPrize() internal {
        uint prizeIndexToClaim = generateRandomNumber(commonPrizes.length);
        uint commonPrizeId = commonPrizes[prizeIndexToClaim];
        commonPrize storage prize = idToCommonPrize[commonPrizeId];
        prize.amountRemaining--;
        if (prize.amountRemaining == 0) {
            _removePrize(prizeIndexToClaim, commonPrizes);
        }
        prize.IAddress.safeTransferFrom(holderAddress, msg.sender, prize.tokenId, 1, "");
        emit PrizeClaimed(msg.sender, address(prize.IAddress), prize.tokenId);
    }

    /**
      * @notice Add ERC721 legendary prize to the pool
      *
      * @param _address - address of nft
      * @param _tokenId - token id of prize
     */
    function addLegendaryPrize(address _address, uint _tokenId) external {
        if (msg.sender != holderAddress) revert NotAuthorisedToAddPrizes();
        legendaryPrize memory _prize = legendaryPrize(IERC721(_address), _tokenId);
        uint256 id = legendaryPrizeCounter++;
        idToLegendaryPrize[id] = _prize;
        legendaryPrizes.push(id);
    }

    /**
      * @notice Add ERC1155 to common prize to the pool
      *
      * @param _address - address of nft
      * @param _tokenId - token id of prize
      * @param _quantity - quantity of prizes
     */
    function addCommonPrize(address _address, uint _tokenId, uint _quantity) external {
        if (msg.sender != holderAddress) revert NotAuthorisedToAddPrizes();
        commonPrize memory _prize = commonPrize(IERC1155(_address), _tokenId, _quantity);
        uint256 id = commonPrizeCounter++;
        idToCommonPrize[id] = _prize;
        commonPrizes.push(id);
    }

    /**
      * @notice Remove a prize from a prize pool
      * swap and pop to remove element from array so it only contains active prizes without gaps in array
      * @param _index - index of prize in array
      * @param prizes - array of prizes to remove from
     */
    function _removePrize(uint256 _index, uint256[] storage prizes) internal {

        uint256 lastIndex = prizes.length - 1;
        prizes[_index] = prizes[lastIndex];
        prizes.pop();
    }


    /**
      * @notice Open claiming functionality
     */
    function toggleClaimOpen() onlyOwner external {
        claimOpen = !claimOpen;
    }

    /**
     * @notice generates a sudo random number
     * A sudo random number generator used for choosing common prizes where true randomness is not needed
     */
    function generateRandomNumber(uint maxNumber) internal returns (uint) {
        uint randomNumber = uint(keccak256(abi.encodePacked(block.timestamp, msg.sender, nonce))) % maxNumber;
        nonce++;
        return randomNumber;
    }

    /**
     * @notice Requests randomness
     * Assumes the subscription is funded sufficiently; "Words" refers to unit of data in Computer Science
     */
    function requestRandomWords(uint32 s_amount, uint32 s_callbackGasLimit) external onlyOwner {
        // Will revert if subscription is not set and funded.
        s_requestId = COORDINATOR.requestRandomWords(
            s_keyHash,
            s_subscriptionId,
            s_requestConfirmations,
            s_callbackGasLimit,
            s_amount
        );
    }

    /**
     * @notice Callback function used by VRF Coordinator
     *
     * @param requestId - id of the request
     * @param randomWords - array of random results from VRF Coordinator
     */
    function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords)
    internal
    override
    {
        s_randomWords = randomWords;
        emit ReturnedRandomness(randomWords);
    }

}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.4;

/** ****************************************************************************
 * @notice Interface for contracts using VRF randomness
 * *****************************************************************************
 * @dev PURPOSE
 *
 * @dev Reggie the Random Oracle (not his real job) wants to provide randomness
 * @dev to Vera the verifier in such a way that Vera can be sure he's not
 * @dev making his output up to suit himself. Reggie provides Vera a public key
 * @dev to which he knows the secret key. Each time Vera provides a seed to
 * @dev Reggie, he gives back a value which is computed completely
 * @dev deterministically from the seed and the secret key.
 *
 * @dev Reggie provides a proof by which Vera can verify that the output was
 * @dev correctly computed once Reggie tells it to her, but without that proof,
 * @dev the output is indistinguishable to her from a uniform random sample
 * @dev from the output space.
 *
 * @dev The purpose of this contract is to make it easy for unrelated contracts
 * @dev to talk to Vera the verifier about the work Reggie is doing, to provide
 * @dev simple access to a verifiable source of randomness. It ensures 2 things:
 * @dev 1. The fulfillment came from the VRFCoordinator
 * @dev 2. The consumer contract implements fulfillRandomWords.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFConsumerBase, and can
 * @dev initialize VRFConsumerBase's attributes in their constructor as
 * @dev shown:
 *
 * @dev   contract VRFConsumer {
 * @dev     constructor(<other arguments>, address _vrfCoordinator, address _link)
 * @dev       VRFConsumerBase(_vrfCoordinator) public {
 * @dev         <initialization with other arguments goes here>
 * @dev       }
 * @dev   }
 *
 * @dev The oracle will have given you an ID for the VRF keypair they have
 * @dev committed to (let's call it keyHash). Create subscription, fund it
 * @dev and your consumer contract as a consumer of it (see VRFCoordinatorInterface
 * @dev subscription management functions).
 * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations,
 * @dev callbackGasLimit, numWords),
 * @dev see (VRFCoordinatorInterface for a description of the arguments).
 *
 * @dev Once the VRFCoordinator has received and validated the oracle's response
 * @dev to your request, it will call your contract's fulfillRandomWords method.
 *
 * @dev The randomness argument to fulfillRandomWords is a set of random words
 * @dev generated from your requestId and the blockHash of the request.
 *
 * @dev If your contract could have concurrent requests open, you can use the
 * @dev requestId returned from requestRandomWords to track which response is associated
 * @dev with which randomness request.
 * @dev See "SECURITY CONSIDERATIONS" for principles to keep in mind,
 * @dev if your contract could have multiple requests in flight simultaneously.
 *
 * @dev Colliding `requestId`s are cryptographically impossible as long as seeds
 * @dev differ.
 *
 * *****************************************************************************
 * @dev SECURITY CONSIDERATIONS
 *
 * @dev A method with the ability to call your fulfillRandomness method directly
 * @dev could spoof a VRF response with any random value, so it's critical that
 * @dev it cannot be directly called by anything other than this base contract
 * @dev (specifically, by the VRFConsumerBase.rawFulfillRandomness method).
 *
 * @dev For your users to trust that your contract's random behavior is free
 * @dev from malicious interference, it's best if you can write it so that all
 * @dev behaviors implied by a VRF response are executed *during* your
 * @dev fulfillRandomness method. If your contract must store the response (or
 * @dev anything derived from it) and use it later, you must ensure that any
 * @dev user-significant behavior which depends on that stored value cannot be
 * @dev manipulated by a subsequent VRF request.
 *
 * @dev Similarly, both miners and the VRF oracle itself have some influence
 * @dev over the order in which VRF responses appear on the blockchain, so if
 * @dev your contract could have multiple VRF requests in flight simultaneously,
 * @dev you must ensure that the order in which the VRF responses arrive cannot
 * @dev be used to manipulate your contract's user-significant behavior.
 *
 * @dev Since the block hash of the block which contains the requestRandomness
 * @dev call is mixed into the input to the VRF *last*, a sufficiently powerful
 * @dev miner could, in principle, fork the blockchain to evict the block
 * @dev containing the request, forcing the request to be included in a
 * @dev different block with a different hash, and therefore a different input
 * @dev to the VRF. However, such an attack would incur a substantial economic
 * @dev cost. This cost scales with the number of blocks the VRF oracle waits
 * @dev until it calls responds to a request. It is for this reason that
 * @dev that you can signal to an oracle you'd like them to wait longer before
 * @dev responding to the request (however this is not enforced in the contract
 * @dev and so remains effective only in the case of unmodified oracle software).
 */
abstract contract VRFConsumerBaseV2 {
  error OnlyCoordinatorCanFulfill(address have, address want);
  address private immutable vrfCoordinator;

  /**
   * @param _vrfCoordinator address of VRFCoordinator contract
   */
  constructor(address _vrfCoordinator) {
    vrfCoordinator = _vrfCoordinator;
  }

  /**
   * @notice fulfillRandomness handles the VRF response. Your contract must
   * @notice implement it. See "SECURITY CONSIDERATIONS" above for important
   * @notice principles to keep in mind when implementing your fulfillRandomness
   * @notice method.
   *
   * @dev VRFConsumerBaseV2 expects its subcontracts to have a method with this
   * @dev signature, and will call it once it has verified the proof
   * @dev associated with the randomness. (It is triggered via a call to
   * @dev rawFulfillRandomness, below.)
   *
   * @param requestId The Id initially returned by requestRandomness
   * @param randomWords the VRF output expanded to the requested number of words
   */
  function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual;

  // rawFulfillRandomness is called by VRFCoordinator when it receives a valid VRF
  // proof. rawFulfillRandomness then calls fulfillRandomness, after validating
  // the origin of the call
  function rawFulfillRandomWords(uint256 requestId, uint256[] memory randomWords) external {
    if (msg.sender != vrfCoordinator) {
      revert OnlyCoordinatorCanFulfill(msg.sender, vrfCoordinator);
    }
    fulfillRandomWords(requestId, randomWords);
  }
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface LinkTokenInterface {
  function allowance(address owner, address spender) external view returns (uint256 remaining);

  function approve(address spender, uint256 value) external returns (bool success);

  function balanceOf(address owner) external view returns (uint256 balance);

  function decimals() external view returns (uint8 decimalPlaces);

  function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);

  function increaseApproval(address spender, uint256 subtractedValue) external;

  function name() external view returns (string memory tokenName);

  function symbol() external view returns (string memory tokenSymbol);

  function totalSupply() external view returns (uint256 totalTokensIssued);

  function transfer(address to, uint256 value) external returns (bool success);

  function transferAndCall(
    address to,
    uint256 value,
    bytes calldata data
  ) external returns (bool success);

  function transferFrom(
    address from,
    address to,
    uint256 value
  ) external returns (bool success);
}

// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface VRFCoordinatorV2Interface {
  /**
   * @notice Get configuration relevant for making requests
   * @return minimumRequestConfirmations global min for request confirmations
   * @return maxGasLimit global max for request gas limit
   * @return s_provingKeyHashes list of registered key hashes
   */
  function getRequestConfig()
    external
    view
    returns (
      uint16,
      uint32,
      bytes32[] memory
    );

  /**
   * @notice Request a set of random words.
   * @param keyHash - Corresponds to a particular oracle job which uses
   * that key for generating the VRF proof. Different keyHash's have different gas price
   * ceilings, so you can select a specific one to bound your maximum per request cost.
   * @param subId  - The ID of the VRF subscription. Must be funded
   * with the minimum subscription balance required for the selected keyHash.
   * @param minimumRequestConfirmations - How many blocks you'd like the
   * oracle to wait before responding to the request. See SECURITY CONSIDERATIONS
   * for why you may want to request more. The acceptable range is
   * [minimumRequestBlockConfirmations, 200].
   * @param callbackGasLimit - How much gas you'd like to receive in your
   * fulfillRandomWords callback. Note that gasleft() inside fulfillRandomWords
   * may be slightly less than this amount because of gas used calling the function
   * (argument decoding etc.), so you may need to request slightly more than you expect
   * to have inside fulfillRandomWords. The acceptable range is
   * [0, maxGasLimit]
   * @param numWords - The number of uint256 random values you'd like to receive
   * in your fulfillRandomWords callback. Note these numbers are expanded in a
   * secure way by the VRFCoordinator from a single random value supplied by the oracle.
   * @return requestId - A unique identifier of the request. Can be used to match
   * a request to a response in fulfillRandomWords.
   */
  function requestRandomWords(
    bytes32 keyHash,
    uint64 subId,
    uint16 minimumRequestConfirmations,
    uint32 callbackGasLimit,
    uint32 numWords
  ) external returns (uint256 requestId);

  /**
   * @notice Create a VRF subscription.
   * @return subId - A unique subscription id.
   * @dev You can manage the consumer set dynamically with addConsumer/removeConsumer.
   * @dev Note to fund the subscription, use transferAndCall. For example
   * @dev  LINKTOKEN.transferAndCall(
   * @dev    address(COORDINATOR),
   * @dev    amount,
   * @dev    abi.encode(subId));
   */
  function createSubscription() external returns (uint64 subId);

  /**
   * @notice Get a VRF subscription.
   * @param subId - ID of the subscription
   * @return balance - LINK balance of the subscription in juels.
   * @return reqCount - number of requests for this subscription, determines fee tier.
   * @return owner - owner of the subscription.
   * @return consumers - list of consumer address which are able to use this subscription.
   */
  function getSubscription(uint64 subId)
    external
    view
    returns (
      uint96 balance,
      uint64 reqCount,
      address owner,
      address[] memory consumers
    );

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @param newOwner - proposed new owner of the subscription
   */
  function requestSubscriptionOwnerTransfer(uint64 subId, address newOwner) external;

  /**
   * @notice Request subscription owner transfer.
   * @param subId - ID of the subscription
   * @dev will revert if original owner of subId has
   * not requested that msg.sender become the new owner.
   */
  function acceptSubscriptionOwnerTransfer(uint64 subId) external;

  /**
   * @notice Add a consumer to a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - New consumer which can use the subscription
   */
  function addConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Remove a consumer from a VRF subscription.
   * @param subId - ID of the subscription
   * @param consumer - Consumer to remove from the subscription
   */
  function removeConsumer(uint64 subId, address consumer) external;

  /**
   * @notice Cancel a subscription
   * @param subId - ID of the subscription
   * @param to - Where to send the remaining LINK to
   */
  function cancelSubscription(uint64 subId, address to) external;

  /*
   * @notice Check to see if there exists a request commitment consumers
   * for all consumers and keyhashes for a given sub.
   * @param subId - ID of the subscription
   * @return true if there exists at least one unfulfilled request for the subscription, false
   * otherwise.
   */
  function pendingRequestExists(uint64 subId) external view returns (bool);
}

File 5 of 12 : IERC721ABurnable.sol
// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.0.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '../extensions/IERC721ABurnable.sol';

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.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);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)

pragma solidity ^0.8.0;

import "../../utils/introspection/IERC165.sol";

/**
 * @dev Required interface of an ERC1155 compliant contract, as defined in the
 * https://eips.ethereum.org/EIPS/eip-1155[EIP].
 *
 * _Available since v3.1._
 */
interface IERC1155 is IERC165 {
    /**
     * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
     */
    event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);

    /**
     * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
     * transfers.
     */
    event TransferBatch(
        address indexed operator,
        address indexed from,
        address indexed to,
        uint256[] ids,
        uint256[] values
    );

    /**
     * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
     * `approved`.
     */
    event ApprovalForAll(address indexed account, address indexed operator, bool approved);

    /**
     * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
     *
     * If an {URI} event was emitted for `id`, the standard
     * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
     * returned by {IERC1155MetadataURI-uri}.
     */
    event URI(string value, uint256 indexed id);

    /**
     * @dev Returns the amount of tokens of token type `id` owned by `account`.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function balanceOf(address account, uint256 id) external view returns (uint256);

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
     *
     * Requirements:
     *
     * - `accounts` and `ids` must have the same length.
     */
    function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
        external
        view
        returns (uint256[] memory);

    /**
     * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
     *
     * Emits an {ApprovalForAll} event.
     *
     * Requirements:
     *
     * - `operator` cannot be the caller.
     */
    function setApprovalForAll(address operator, bool approved) external;

    /**
     * @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
     *
     * See {setApprovalForAll}.
     */
    function isApprovedForAll(address account, address operator) external view returns (bool);

    /**
     * @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
     *
     * Emits a {TransferSingle} event.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}.
     * - `from` must have a balance of tokens of type `id` of at least `amount`.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
     * acceptance magic value.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 id,
        uint256 amount,
        bytes calldata data
    ) external;

    /**
     * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
     *
     * Emits a {TransferBatch} event.
     *
     * Requirements:
     *
     * - `ids` and `amounts` must have the same length.
     * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
     * acceptance magic value.
     */
    function safeBatchTransferFrom(
        address from,
        address to,
        uint256[] calldata ids,
        uint256[] calldata amounts,
        bytes calldata data
    ) external;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)

pragma solidity ^0.8.0;

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

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor() {
        _transferOwnership(_msgSender());
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        _transferOwnership(address(0));
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        _transferOwnership(newOwner);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Internal function without access restriction.
     */
    function _transferOwnership(address newOwner) internal virtual {
        address oldOwner = _owner;
        _owner = newOwner;
        emit OwnershipTransferred(oldOwner, newOwner);
    }
}

// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.0.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

import '../IERC721A.sol';

/**
 * @dev Interface of an ERC721ABurnable compliant contract.
 */
interface IERC721ABurnable is IERC721A {
    /**
     * @dev Burns `tokenId`. See {ERC721A-_burn}.
     *
     * Requirements:
     *
     * - The caller must own `tokenId` or be an approved operator.
     */
    function burn(uint256 tokenId) external;
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC165 standard, as defined in the
 * https://eips.ethereum.org/EIPS/eip-165[EIP].
 *
 * Implementers can declare support of contract interfaces, which can then be
 * queried by others ({ERC165Checker}).
 *
 * For an implementation, see {ERC165}.
 */
interface IERC165 {
    /**
     * @dev Returns true if this contract implements the interface defined by
     * `interfaceId`. See the corresponding
     * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
     * to learn more about how these ids are created.
     *
     * This function call must use less than 30 000 gas.
     */
    function supportsInterface(bytes4 interfaceId) external view returns (bool);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)

pragma solidity ^0.8.0;

/**
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        return msg.data;
    }
}

// SPDX-License-Identifier: MIT
// ERC721A Contracts v4.0.0
// Creator: Chiru Labs

pragma solidity ^0.8.4;

/**
 * @dev Interface of an ERC721A compliant contract.
 */
interface IERC721A {
    /**
     * The caller must own the token or be an approved operator.
     */
    error ApprovalCallerNotOwnerNorApproved();

    /**
     * The token does not exist.
     */
    error ApprovalQueryForNonexistentToken();

    /**
     * The caller cannot approve to their own address.
     */
    error ApproveToCaller();

    /**
     * The caller cannot approve to the current owner.
     */
    error ApprovalToCurrentOwner();

    /**
     * Cannot query the balance for the zero address.
     */
    error BalanceQueryForZeroAddress();

    /**
     * Cannot mint to the zero address.
     */
    error MintToZeroAddress();

    /**
     * The quantity of tokens minted must be more than zero.
     */
    error MintZeroQuantity();

    /**
     * The token does not exist.
     */
    error OwnerQueryForNonexistentToken();

    /**
     * The caller must own the token or be an approved operator.
     */
    error TransferCallerNotOwnerNorApproved();

    /**
     * The token must be owned by `from`.
     */
    error TransferFromIncorrectOwner();

    /**
     * Cannot safely transfer to a contract that does not implement the ERC721Receiver interface.
     */
    error TransferToNonERC721ReceiverImplementer();

    /**
     * Cannot transfer to the zero address.
     */
    error TransferToZeroAddress();

    /**
     * The token does not exist.
     */
    error URIQueryForNonexistentToken();

    struct TokenOwnership {
        // The address of the owner.
        address addr;
        // Keeps track of the start time of ownership with minimal overhead for tokenomics.
        uint64 startTimestamp;
        // Whether the token has been burned.
        bool burned;
    }

    /**
     * @dev Returns the total amount of tokens stored by the contract.
     *
     * Burned tokens are calculated here, use `_totalMinted()` if you want to count just minted tokens.
     */
    function totalSupply() external view returns (uint256);

    // ==============================
    //            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);

    // ==============================
    //            IERC721
    // ==============================

    /**
     * @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 be have been allowed to move this token by either {approve} or {setApprovalForAll}.
     * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
     *
     * Emits a {Transfer} event.
     */
    function safeTransferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Transfers `tokenId` token from `from` to `to`.
     *
     * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `tokenId` token must be owned by `from`.
     * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 tokenId
    ) external;

    /**
     * @dev Gives permission to `to` to transfer `tokenId` token to another account.
     * The approval is cleared when the token is transferred.
     *
     * Only a single account can be approved at a time, so approving the zero address clears previous approvals.
     *
     * Requirements:
     *
     * - The caller must own the token or be an approved operator.
     * - `tokenId` must exist.
     *
     * Emits an {Approval} event.
     */
    function approve(address to, uint256 tokenId) external;

    /**
     * @dev 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);

    // ==============================
    //        IERC721Metadata
    // ==============================

    /**
     * @dev Returns the token collection name.
     */
    function name() external view returns (string memory);

    /**
     * @dev Returns the token collection symbol.
     */
    function symbol() external view returns (string memory);

    /**
     * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
     */
    function tokenURI(uint256 tokenId) external view returns (string memory);
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"address","name":"giftOfMidas","type":"address"},{"internalType":"address","name":"_holderAddress","type":"address"},{"internalType":"uint64","name":"subscriptionId","type":"uint64"},{"internalType":"address","name":"vrfCoordinator","type":"address"},{"internalType":"address","name":"link","type":"address"},{"internalType":"bytes32","name":"keyHash","type":"bytes32"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NotAuthorisedToAddPrizes","type":"error"},{"inputs":[],"name":"NotOpenYet","type":"error"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"inputs":[],"name":"RandomNumbersDontMatchPrizePoolLength","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":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"address","name":"nftContract","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"PrizeClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"prizeIndex","type":"uint256"}],"name":"ReRollPrize","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"ReturnedRandomness","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"prizeId","type":"uint256"}],"name":"WinnerSet","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"GOMTokenIdToLegendaryPrizeId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_quantity","type":"uint256"}],"name":"addCommonPrize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"}],"name":"addLegendaryPrize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"bulkClaimPrizes","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"claimPrize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"generateWinners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"idToCommonPrize","outputs":[{"internalType":"contract IERC1155","name":"IAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amountRemaining","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"idToLegendaryPrize","outputs":[{"internalType":"contract IERC721","name":"IAddress","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"legendaryPrizes","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"s_amount","type":"uint32"},{"internalType":"uint32","name":"s_callbackGasLimit","type":"uint32"}],"name":"requestRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"s_randomWords","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"s_requestId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"sWordsIndex","type":"uint256"},{"internalType":"uint256","name":"prizeIndex","type":"uint256"}],"name":"setWinner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"toggleClaimOpen","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]

61014060405260016006556003610120523480156200001d57600080fd5b506040516200155b3803806200155b833981016040819052620000409162000198565b6001600160a01b03831660805262000058336200012b565b600180546001600160a01b0319166001600160a01b038816908117909155604080516318160ddd60e01b815290516318160ddd916004808201926020929091908290030181865afa158015620000b2573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190620000d891906200021e565b600255600a80546001600160a01b039687166001600160a01b03199182161790915592851660a052931660c05261010092909252600e805490921633179091556001600160401b031660e0525062000238565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200019357600080fd5b919050565b60008060008060008060c08789031215620001b257600080fd5b620001bd876200017b565b9550620001cd602088016200017b565b60408801519095506001600160401b0381168114620001eb57600080fd5b9350620001fb606088016200017b565b92506200020b608088016200017b565b915060a087015190509295509295509295565b6000602082840312156200023157600080fd5b5051919050565b60805160a05160c05160e05161010051610120516112cf6200028c600039600061080c015260006107b3015260006107e20152600050506000610847015260008181610305015261034701526112cf6000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c80638dab7b7c116100a2578063e89e106a11610071578063e89e106a146102b0578063f2fde38b146102b9578063f6eaffc8146102cc578063fb5274e5146102df578063fcfe22e5146102e757600080fd5b80638dab7b7c14610254578063967b20171461025c578063b757ea081461026f578063d70981541461029d57600080fd5b80634b4ffdbf116100e95780634b4ffdbf146101f857806368cbce311461020b578063715018a61461021e5780637343b7a2146102265780638da5cb5b1461023957600080fd5b80631190cfc61461011b5780631fe543e3146101725780632a6a92ac146101875780632aa9a0f4146101e5575b600080fd5b61014e610129366004610f0a565b600860205260009081526040902080546001909101546001600160a01b039091169082565b604080516001600160a01b0390931683526020830191909152015b60405180910390f35b610185610180366004610fd4565b6102fa565b005b6101c0610195366004610f0a565b6005602052600090815260409020805460018201546002909201546001600160a01b03909116919083565b604080516001600160a01b039094168452602084019290925290820152606001610169565b6101856101f3366004611037565b610387565b610185610206366004611061565b610451565b610185610219366004611094565b610530565b61018561068f565b6101856102343660046110b6565b6106c5565b6000546040516001600160a01b039091168152602001610169565b61018561072f565b61018561026a366004611107565b61077a565b61028f61027d366004610f0a565b60096020526000908152604090205481565b604051908152602001610169565b6101856102ab366004610f0a565b6108c3565b61028f600d5481565b6101856102c736600461113a565b610974565b61028f6102da366004610f0a565b610a0c565b610185610a2d565b61028f6102f5366004610f0a565b610aa4565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146103795760405163073e64fd60e21b81523360048201526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001660248201526044015b60405180910390fd5b6103838282610ab4565b5050565b600a546001600160a01b031633146103b25760405163ec47b1a960e01b815260040160405180910390fd5b604080518082019091526001600160a01b03831681526020810182905260068054600091826103e083611172565b9091555060008181526008602090815260408220855181546001600160a01b0319166001600160a01b0390911617815594015160019485015560078054948501815590527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68890920191909155505050565b600a546001600160a01b0316331461047c5760405163ec47b1a960e01b815260040160405180910390fd5b604080516060810182526001600160a01b03851681526020810184905290810182905260038054600091826104b083611172565b909155506000818152600560209081526040808320865181546001600160a01b0319166001600160a01b039091161781559186015160018084019190915595015160029091015560048054948501815590527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9092019190915550505050565b6000546001600160a01b0316331461055a5760405162461bcd60e51b81526004016103709061118b565b6000600254600c8481548110610572576105726111c0565b906000526020600020015461058791906111d6565b905080600c848154811061059d5761059d6111c0565b9060005260206000200181905550600960008281526020019081526020016000205460000361065757600782815481106105d9576105d96111c0565b90600052602060002001546009600083815260200190815260200160002081905550807f7f0f81a678f0b087d4b9899a18cc992feeeb323099f038d0b82c5065f8b7b8b160078481548110610630576106306111c0565b906000526020600020015460405161064a91815260200190565b60405180910390a2505050565b6040518281527fec6d6d391af0ed0df8341f956833c8b42842d4e4a4ec35bb37858652cfd05b2b9060200160405180910390a1505050565b6000546001600160a01b031633146106b95760405162461bcd60e51b81526004016103709061118b565b6106c36000610b03565b565b600a54600160a01b900460ff166106ef5760405163e6dd1a3160e01b815260040160405180910390fd5b60005b81518110156103835761071d828281518110610710576107106111c0565b60200260200101516108c3565b8061072781611172565b9150506106f2565b6000546001600160a01b031633146107595760405162461bcd60e51b81526004016103709061118b565b600a805460ff60a01b198116600160a01b9182900460ff1615909102179055565b6000546001600160a01b031633146107a45760405162461bcd60e51b81526004016103709061118b565b6040516305d3b1d360e41b81527f0000000000000000000000000000000000000000000000000000000000000000600482015267ffffffffffffffff7f000000000000000000000000000000000000000000000000000000000000000016602482015261ffff7f000000000000000000000000000000000000000000000000000000000000000016604482015263ffffffff8083166064830152831660848201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690635d3b1d309060a4016020604051808303816000875af1158015610898573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bc91906111f8565b600d555050565b600a54600160a01b900460ff166108ed5760405163e6dd1a3160e01b815260040160405180910390fd5b600154604051630852cd8d60e31b8152600481018390526001600160a01b03909116906342966c6890602401600060405180830381600087803b15801561093357600080fd5b505af1158015610947573d6000803e3d6000fd5b50505060008281526009602052604090205415905061096c5761096981610b53565b50565b610969610c69565b6000546001600160a01b0316331461099e5760405162461bcd60e51b81526004016103709061118b565b6001600160a01b038116610a035760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610370565b61096981610b03565b600c8181548110610a1c57600080fd5b600091825260209091200154905081565b6000546001600160a01b03163314610a575760405162461bcd60e51b81526004016103709061118b565b600c5460075414610a7b576040516353fe586b60e11b815260040160405180910390fd5b60005b600c5481101561096957610a928182610530565b80610a9c81611172565b915050610a7e565b60078181548110610a1c57600080fd5b8051610ac790600c906020840190610eaa565b507fefb16d61046900da527008568620fb9f8420e2f5ed4de3bfbded5035c9362b0e81604051610af79190611211565b60405180910390a15050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000818152600960209081526040808320548352600882528083208151808301835281546001600160a01b03908116808352600190930154948201859052600a549351635c46a7ef60e11b815293166004840152336024840152604483019390935260806064830152608482019390935290919063b88d4fde9060a401600060405180830381600087803b158015610bea57600080fd5b505af1158015610bfe573d6000803e3d6000fd5b5050505080600001516001600160a01b0316336001600160a01b03167f2538f3c17332d99324c5fd2a595cca313ab5ea1035964178870177a92a186ce48360200151604051610c4f91815260200190565b60405180910390a350600090815260096020526040812055565b600454600090610c7890610db0565b9050600060048281548110610c8f57610c8f6111c0565b60009182526020808320909101548083526005909152604082206002810180549294509092610cbd83611255565b91905055508060020154600003610cd957610cd9836004610e2f565b8054600a54600180840154604051637921219560e11b81526001600160a01b0393841660048201523360248201526044810191909152606481019190915260a06084820152600060a482015291169063f242432a9060c401600060405180830381600087803b158015610d4b57600080fd5b505af1158015610d5f573d6000803e3d6000fd5b5050825460018401546040519081526001600160a01b0390911692503391507f2538f3c17332d99324c5fd2a595cca313ab5ea1035964178870177a92a186ce49060200160405180910390a3505050565b600080824233600b54604051602001610dee9392919092835260609190911b6bffffffffffffffffffffffff19166020830152603482015260540190565b6040516020818303038152906040528051906020012060001c610e1191906111d6565b600b80549192506000610e2383611172565b90915550909392505050565b8054600090610e409060019061126c565b9050818181548110610e5457610e546111c0565b9060005260206000200154828481548110610e7157610e716111c0565b906000526020600020018190555081805480610e8f57610e8f611283565b60019003818190600052602060002001600090559055505050565b828054828255906000526020600020908101928215610ee5579160200282015b82811115610ee5578251825591602001919060010190610eca565b50610ef1929150610ef5565b5090565b5b80821115610ef15760008155600101610ef6565b600060208284031215610f1c57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610f4a57600080fd5b8135602067ffffffffffffffff80831115610f6757610f67610f23565b8260051b604051601f19603f83011681018181108482111715610f8c57610f8c610f23565b604052938452858101830193838101925087851115610faa57600080fd5b83870191505b84821015610fc957813583529183019190830190610fb0565b979650505050505050565b60008060408385031215610fe757600080fd5b82359150602083013567ffffffffffffffff81111561100557600080fd5b61101185828601610f39565b9150509250929050565b80356001600160a01b038116811461103257600080fd5b919050565b6000806040838503121561104a57600080fd5b6110538361101b565b946020939093013593505050565b60008060006060848603121561107657600080fd5b61107f8461101b565b95602085013595506040909401359392505050565b600080604083850312156110a757600080fd5b50508035926020909101359150565b6000602082840312156110c857600080fd5b813567ffffffffffffffff8111156110df57600080fd5b6110eb84828501610f39565b949350505050565b803563ffffffff8116811461103257600080fd5b6000806040838503121561111a57600080fd5b611123836110f3565b9150611131602084016110f3565b90509250929050565b60006020828403121561114c57600080fd5b6111558261101b565b9392505050565b634e487b7160e01b600052601160045260246000fd5b6000600182016111845761118461115c565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000826111f357634e487b7160e01b600052601260045260246000fd5b500690565b60006020828403121561120a57600080fd5b5051919050565b6020808252825182820181905260009190848201906040850190845b818110156112495783518352928401929184019160010161122d565b50909695505050505050565b6000816112645761126461115c565b506000190190565b60008282101561127e5761127e61115c565b500390565b634e487b7160e01b600052603160045260246000fdfea264697066735822122097d245ac9450675aebf8b79243a73bda036f569202c00de2de8eed8dfa7d5bef64736f6c634300080e0033000000000000000000000000567bba33030f1e5373407f7dea1f02f45152757300000000000000000000000022cb118163568d05c1285d9649ca4f944ddc26d600000000000000000000000000000000000000000000000000000000000000bd000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106101165760003560e01c80638dab7b7c116100a2578063e89e106a11610071578063e89e106a146102b0578063f2fde38b146102b9578063f6eaffc8146102cc578063fb5274e5146102df578063fcfe22e5146102e757600080fd5b80638dab7b7c14610254578063967b20171461025c578063b757ea081461026f578063d70981541461029d57600080fd5b80634b4ffdbf116100e95780634b4ffdbf146101f857806368cbce311461020b578063715018a61461021e5780637343b7a2146102265780638da5cb5b1461023957600080fd5b80631190cfc61461011b5780631fe543e3146101725780632a6a92ac146101875780632aa9a0f4146101e5575b600080fd5b61014e610129366004610f0a565b600860205260009081526040902080546001909101546001600160a01b039091169082565b604080516001600160a01b0390931683526020830191909152015b60405180910390f35b610185610180366004610fd4565b6102fa565b005b6101c0610195366004610f0a565b6005602052600090815260409020805460018201546002909201546001600160a01b03909116919083565b604080516001600160a01b039094168452602084019290925290820152606001610169565b6101856101f3366004611037565b610387565b610185610206366004611061565b610451565b610185610219366004611094565b610530565b61018561068f565b6101856102343660046110b6565b6106c5565b6000546040516001600160a01b039091168152602001610169565b61018561072f565b61018561026a366004611107565b61077a565b61028f61027d366004610f0a565b60096020526000908152604090205481565b604051908152602001610169565b6101856102ab366004610f0a565b6108c3565b61028f600d5481565b6101856102c736600461113a565b610974565b61028f6102da366004610f0a565b610a0c565b610185610a2d565b61028f6102f5366004610f0a565b610aa4565b336001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e6990916146103795760405163073e64fd60e21b81523360048201526001600160a01b037f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699091660248201526044015b60405180910390fd5b6103838282610ab4565b5050565b600a546001600160a01b031633146103b25760405163ec47b1a960e01b815260040160405180910390fd5b604080518082019091526001600160a01b03831681526020810182905260068054600091826103e083611172565b9091555060008181526008602090815260408220855181546001600160a01b0319166001600160a01b0390911617815594015160019485015560078054948501815590527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c68890920191909155505050565b600a546001600160a01b0316331461047c5760405163ec47b1a960e01b815260040160405180910390fd5b604080516060810182526001600160a01b03851681526020810184905290810182905260038054600091826104b083611172565b909155506000818152600560209081526040808320865181546001600160a01b0319166001600160a01b039091161781559186015160018084019190915595015160029091015560048054948501815590527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b9092019190915550505050565b6000546001600160a01b0316331461055a5760405162461bcd60e51b81526004016103709061118b565b6000600254600c8481548110610572576105726111c0565b906000526020600020015461058791906111d6565b905080600c848154811061059d5761059d6111c0565b9060005260206000200181905550600960008281526020019081526020016000205460000361065757600782815481106105d9576105d96111c0565b90600052602060002001546009600083815260200190815260200160002081905550807f7f0f81a678f0b087d4b9899a18cc992feeeb323099f038d0b82c5065f8b7b8b160078481548110610630576106306111c0565b906000526020600020015460405161064a91815260200190565b60405180910390a2505050565b6040518281527fec6d6d391af0ed0df8341f956833c8b42842d4e4a4ec35bb37858652cfd05b2b9060200160405180910390a1505050565b6000546001600160a01b031633146106b95760405162461bcd60e51b81526004016103709061118b565b6106c36000610b03565b565b600a54600160a01b900460ff166106ef5760405163e6dd1a3160e01b815260040160405180910390fd5b60005b81518110156103835761071d828281518110610710576107106111c0565b60200260200101516108c3565b8061072781611172565b9150506106f2565b6000546001600160a01b031633146107595760405162461bcd60e51b81526004016103709061118b565b600a805460ff60a01b198116600160a01b9182900460ff1615909102179055565b6000546001600160a01b031633146107a45760405162461bcd60e51b81526004016103709061118b565b6040516305d3b1d360e41b81527f8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef600482015267ffffffffffffffff7f00000000000000000000000000000000000000000000000000000000000000bd16602482015261ffff7f000000000000000000000000000000000000000000000000000000000000000316604482015263ffffffff8083166064830152831660848201527f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699096001600160a01b031690635d3b1d309060a4016020604051808303816000875af1158015610898573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108bc91906111f8565b600d555050565b600a54600160a01b900460ff166108ed5760405163e6dd1a3160e01b815260040160405180910390fd5b600154604051630852cd8d60e31b8152600481018390526001600160a01b03909116906342966c6890602401600060405180830381600087803b15801561093357600080fd5b505af1158015610947573d6000803e3d6000fd5b50505060008281526009602052604090205415905061096c5761096981610b53565b50565b610969610c69565b6000546001600160a01b0316331461099e5760405162461bcd60e51b81526004016103709061118b565b6001600160a01b038116610a035760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610370565b61096981610b03565b600c8181548110610a1c57600080fd5b600091825260209091200154905081565b6000546001600160a01b03163314610a575760405162461bcd60e51b81526004016103709061118b565b600c5460075414610a7b576040516353fe586b60e11b815260040160405180910390fd5b60005b600c5481101561096957610a928182610530565b80610a9c81611172565b915050610a7e565b60078181548110610a1c57600080fd5b8051610ac790600c906020840190610eaa565b507fefb16d61046900da527008568620fb9f8420e2f5ed4de3bfbded5035c9362b0e81604051610af79190611211565b60405180910390a15050565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000818152600960209081526040808320548352600882528083208151808301835281546001600160a01b03908116808352600190930154948201859052600a549351635c46a7ef60e11b815293166004840152336024840152604483019390935260806064830152608482019390935290919063b88d4fde9060a401600060405180830381600087803b158015610bea57600080fd5b505af1158015610bfe573d6000803e3d6000fd5b5050505080600001516001600160a01b0316336001600160a01b03167f2538f3c17332d99324c5fd2a595cca313ab5ea1035964178870177a92a186ce48360200151604051610c4f91815260200190565b60405180910390a350600090815260096020526040812055565b600454600090610c7890610db0565b9050600060048281548110610c8f57610c8f6111c0565b60009182526020808320909101548083526005909152604082206002810180549294509092610cbd83611255565b91905055508060020154600003610cd957610cd9836004610e2f565b8054600a54600180840154604051637921219560e11b81526001600160a01b0393841660048201523360248201526044810191909152606481019190915260a06084820152600060a482015291169063f242432a9060c401600060405180830381600087803b158015610d4b57600080fd5b505af1158015610d5f573d6000803e3d6000fd5b5050825460018401546040519081526001600160a01b0390911692503391507f2538f3c17332d99324c5fd2a595cca313ab5ea1035964178870177a92a186ce49060200160405180910390a3505050565b600080824233600b54604051602001610dee9392919092835260609190911b6bffffffffffffffffffffffff19166020830152603482015260540190565b6040516020818303038152906040528051906020012060001c610e1191906111d6565b600b80549192506000610e2383611172565b90915550909392505050565b8054600090610e409060019061126c565b9050818181548110610e5457610e546111c0565b9060005260206000200154828481548110610e7157610e716111c0565b906000526020600020018190555081805480610e8f57610e8f611283565b60019003818190600052602060002001600090559055505050565b828054828255906000526020600020908101928215610ee5579160200282015b82811115610ee5578251825591602001919060010190610eca565b50610ef1929150610ef5565b5090565b5b80821115610ef15760008155600101610ef6565b600060208284031215610f1c57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b600082601f830112610f4a57600080fd5b8135602067ffffffffffffffff80831115610f6757610f67610f23565b8260051b604051601f19603f83011681018181108482111715610f8c57610f8c610f23565b604052938452858101830193838101925087851115610faa57600080fd5b83870191505b84821015610fc957813583529183019190830190610fb0565b979650505050505050565b60008060408385031215610fe757600080fd5b82359150602083013567ffffffffffffffff81111561100557600080fd5b61101185828601610f39565b9150509250929050565b80356001600160a01b038116811461103257600080fd5b919050565b6000806040838503121561104a57600080fd5b6110538361101b565b946020939093013593505050565b60008060006060848603121561107657600080fd5b61107f8461101b565b95602085013595506040909401359392505050565b600080604083850312156110a757600080fd5b50508035926020909101359150565b6000602082840312156110c857600080fd5b813567ffffffffffffffff8111156110df57600080fd5b6110eb84828501610f39565b949350505050565b803563ffffffff8116811461103257600080fd5b6000806040838503121561111a57600080fd5b611123836110f3565b9150611131602084016110f3565b90509250929050565b60006020828403121561114c57600080fd5b6111558261101b565b9392505050565b634e487b7160e01b600052601160045260246000fd5b6000600182016111845761118461115c565b5060010190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000826111f357634e487b7160e01b600052601260045260246000fd5b500690565b60006020828403121561120a57600080fd5b5051919050565b6020808252825182820181905260009190848201906040850190845b818110156112495783518352928401929184019160010161122d565b50909695505050505050565b6000816112645761126461115c565b506000190190565b60008282101561127e5761127e61115c565b500390565b634e487b7160e01b600052603160045260246000fdfea264697066735822122097d245ac9450675aebf8b79243a73bda036f569202c00de2de8eed8dfa7d5bef64736f6c634300080e0033

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

000000000000000000000000567bba33030f1e5373407f7dea1f02f45152757300000000000000000000000022cb118163568d05c1285d9649ca4f944ddc26d600000000000000000000000000000000000000000000000000000000000000bd000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef

-----Decoded View---------------
Arg [0] : giftOfMidas (address): 0x567bBA33030f1e5373407F7DeA1F02f451527573
Arg [1] : _holderAddress (address): 0x22cB118163568d05C1285d9649Ca4f944DDc26D6
Arg [2] : subscriptionId (uint64): 189
Arg [3] : vrfCoordinator (address): 0x271682DEB8C4E0901D1a1550aD2e64D568E69909
Arg [4] : link (address): 0x514910771AF9Ca656af840dff83E8264EcF986CA
Arg [5] : keyHash (bytes32): 0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef

-----Encoded View---------------
6 Constructor Arguments found :
Arg [0] : 000000000000000000000000567bba33030f1e5373407f7dea1f02f451527573
Arg [1] : 00000000000000000000000022cb118163568d05c1285d9649ca4f944ddc26d6
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000bd
Arg [3] : 000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909
Arg [4] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [5] : 8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef


Block Uncle Number Difficulty Gas Used Reward
View All Uncles
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export  ]

A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.