ETH Price: $3,128.00 (+0.26%)
Gas: 3 Gwei

Contract

0x409741E6a15c1B7F9f54eBf877a917296a635A06
 

Overview

ETH Balance

12.09943901 ETH

Eth Value

$37,847.08 (@ $3,128.00/ETH)

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Value
Transfer181316712023-09-14 2:53:35249 days ago1694660015IN
0x409741E6...96a635A06
11.99943901 ETH0.0003165412.10560456
Transfer181273112023-09-13 12:13:59249 days ago1694607239IN
0x409741E6...96a635A06
0.05 ETH0.0006339824.24511411
Transfer181272942023-09-13 12:10:35249 days ago1694607035IN
0x409741E6...96a635A06
0.05 ETH0.0009381621.69208976
0x60c06040181249232023-09-13 4:11:59250 days ago1694578319IN
 Create: HashBet
0 ETH0.0354801915

Advanced mode:
Parent Transaction Hash Block From To Value
View All Internal Transactions
Loading...
Loading

Contract Source Code Verified (Exact Match)

Contract Name:
HashBet

Compiler Version
v0.8.10+commit.fc410830

Optimization Enabled:
Yes with 1000 runs

Other Settings:
default evmVersion
File 1 of 11 : HashBet.sol
// SPDX-License-Identifier: MIT

pragma solidity ^0.8.10;

import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@chainlink/contracts/src/v0.8/VRFV2WrapperConsumerBase.sol";
import "@chainlink/contracts/src/v0.8/interfaces/AggregatorV2V3Interface.sol";
import "./ChainSpecificUtil.sol";

contract HashBet is Ownable, ReentrancyGuard, VRFV2WrapperConsumerBase {
    // Modulo is the number of equiprobable outcomes in a game:
    //  2 for coin flip
    //  6 for dice roll
    //  6*6 = 36 for double dice
    //  37 for roulette
    //  100 for hashroll
    uint constant MAX_MODULO = 100;

    // Modulos below MAX_MASK_MODULO are checked against a bit mask, allowing betting on specific outcomes.
    // For example in a dice roll (modolo = 6),
    // 000001 mask means betting on 1. 000001 converted from binary to decimal becomes 1.
    // 101000 mask means betting on 4 and 6. 101000 converted from binary to decimal becomes 40.
    // The specific value is dictated by the fact that 256-bit intermediate
    // multiplication result allows implementing population count efficiently
    // for numbers that are up to 42 bits, and 40 is the highest multiple of
    // eight below 42.
    uint constant MAX_MASK_MODULO = 40;

    // EVM BLOCKHASH opcode can query no further than 256 blocks into the
    // past. Given that settleBet uses block hash of placeBet as one of
    // complementary entropy sources, we cannot process bets older than this
    // threshold. On rare occasions dice2.win croupier may fail to invoke
    // settleBet in this timespan due to technical issues or extreme Ethereum
    // congestion; such bets can be refunded via invoking refundBet.
    uint constant BET_EXPIRATION_BLOCKS = 250;

    // This is a check on bet mask overflow. Maximum mask is equivalent to number of possible binary outcomes for maximum modulo.
    uint constant MAX_BET_MASK = 2 ** MAX_MASK_MODULO;

    // These are constants taht make O(1) population count in placeBet possible.
    uint constant POPCNT_MULT =
        0x0000000000002000000000100000000008000000000400000000020000000001;
    uint constant POPCNT_MASK =
        0x0001041041041041041041041041041041041041041041041041041041041041;
    uint constant POPCNT_MODULO = 0x3F;

    uint256 private constant GRACE_PERIOD_TIME = 3600;

    // Sum of all historical deposits and withdrawals. Used for calculating profitability. Profit = Balance - cumulativeDeposit + cumulativeWithdrawal
    uint public cumulativeDeposit;
    uint public cumulativeWithdrawal;

    // In addition to house edge, wealth tax is added every time the bet amount exceeds a multiple of a threshold.
    // For example, if wealthTaxIncrementThreshold = 3000 ether,
    // A bet amount of 3000 ether will have a wealth tax of 1% in addition to house edge.
    // A bet amount of 6000 ether will have a wealth tax of 2% in addition to house edge.
    uint public wealthTaxIncrementThreshold = 3000 ether;
    uint public wealthTaxIncrementPercent = 1;

    // The minimum and maximum bets.
    uint public minBetAmount = 0.01 ether;
    uint public maxBetAmount = 10000 ether;

    // max bet profit. Used to cap bets against dynamic odds.
    uint public maxProfit = 300000 ether;

    // Funds that are locked in potentially winning bets. Prevents contract from committing to new bets that it cannot pay out.
    uint public lockedInBets;

    // The minimum larger comparison value.
    uint public minOverValue = 1;

    // The maximum smaller comparison value.
    uint public maxUnderValue = 98;

    // Depends on the number of requested values that you want sent to the
    // fulfillRandomWords() function. Test and adjust
    // this limit based on the network that you select, the size of the request,
    // and the processing of the callback request in the fulfillRandomWords()
    // function.
    uint32 constant callbackGasLimit = 1000000;

    // The default is 3, but you can set this higher.
    uint16 constant requestConfirmations = 3;

    // retrieve 1 random value in one request.
    // Cannot exceed VRFV2Wrapper.getConfig().maxNumWords.
    uint32 constant numWords = 1;

    // Address LINK
    address linkAddress;

    //Data Feed: LINK/NATIVE TOKEN
    AggregatorV2V3Interface internal dataFeed;
    //L2 sequencer feeds
    AggregatorV2V3Interface internal sequencerUptimeFeed;

    // Info of each bet.
    struct Bet {
        // Wager amount in wei.
        uint amount;
        // Modulo of a game.
        uint8 modulo;
        // Number of winning outcomes, used to compute winning payment (* modulo/rollEdge),
        // and used instead of mask for games with modulo > MAX_MASK_MODULO.
        uint8 rollEdge;
        // Bit mask representing winning bet outcomes (see MAX_MASK_MODULO comment).
        uint40 mask;
        // Block number of placeBet tx.
        uint placeBlockNumber;
        // Address of a gambler, used to pay out winning bets.
        address payable gambler;
        // Status of bet settlement.
        bool isSettled;
        // Outcome of bet.
        uint outcome;
        // Win amount.
        uint winAmount;
        // Random number used to settle bet.
        uint randomNumber;
        // Comparison method.
        bool isLarger;
        // VRF request id
        uint256 requestID;
    }

    // Each bet is deducted
    uint public defaultHouseEdgePercent = 2;

    uint256 public requestCounter;
    mapping(uint256 => uint256) s_requestIDToRequestIndex;
    // bet place time
    mapping(uint256 => uint256) betPlaceTime;
    // bet data
    mapping(uint256 => Bet) public bets;

    mapping(uint32 => uint32) public houseEdgePercents;

    // Events
    event BetPlaced(
        address indexed gambler,
        uint amount,
        uint indexed betID,
        uint8 indexed modulo,
        uint8 rollEdge,
        uint40 mask,
        bool isLarger
    );
    event BetSettled(
        address indexed gambler,
        uint amount,
        uint indexed betID,
        uint8 indexed modulo,
        uint8 rollEdge,
        uint40 mask,
        uint outcome,
        uint winAmount
    );
    event BetRefunded(address indexed gambler, uint amount);

    error OnlyCoordinatorCanFulfill(address have, address want);
    error NotAwaitingVRF();
    error AwaitingVRF(uint256 requestID);
    error RefundFailed();
    error InvalidValue(uint256 required, uint256 sent);
    error TransferFailed();
    error SequencerDown();
    error GracePeriodNotOver();

    constructor(
        address _linkAddress,
        address _vrfV2Wrapper,
        address _dataFeed,
        address _sequencerUptimeFeed
    ) VRFV2WrapperConsumerBase(_linkAddress, _vrfV2Wrapper) {
        linkAddress = _linkAddress;
        dataFeed = AggregatorV2V3Interface(_dataFeed);
        sequencerUptimeFeed = AggregatorV2V3Interface(_sequencerUptimeFeed);
        houseEdgePercents[2] = 1;
        houseEdgePercents[6] = 1;
        houseEdgePercents[36] = 1;
        houseEdgePercents[37] = 3;
        houseEdgePercents[100] = 5;
    }

    // Fallback payable function used to top up the bank roll.
    fallback() external payable {
        cumulativeDeposit += msg.value;
    }

    receive() external payable {
        cumulativeDeposit += msg.value;
    }

    // See ETH balance.
    function getBalance() external view returns (uint) {
        return address(this).balance;
    }

    // Owner can withdraw funds not exceeding balance minus potential win prizes by open bets
    function withdrawFunds(uint withdrawAmount) external onlyOwner {
        require(
            withdrawAmount <= address(this).balance,
            "Withdrawal amount larger than balance."
        );
        require(
            withdrawAmount <= address(this).balance - lockedInBets,
            "Withdrawal amount larger than balance minus lockedInBets"
        );
        address payable beneficiary = payable(msg.sender);
        beneficiary.transfer(withdrawAmount);
        cumulativeWithdrawal += withdrawAmount;
    }

    function emitBetPlacedEvent(
        address gambler,
        uint amount,
        uint betID,
        uint8 modulo,
        uint8 rollEdge,
        uint40 mask,
        bool isLarger
    ) private {
        // Record bet in event logs
        emit BetPlaced(
            gambler,
            amount,
            betID,
            uint8(modulo),
            uint8(rollEdge),
            uint40(mask),
            isLarger
        );
    }

    // Place bet
    function placeBet(
        uint betAmount,
        uint betMask,
        uint modulo,
        bool isLarger
    ) external payable nonReentrant {
        address msgSender = _msgSender();

        checkVRFFee(betAmount, tx.gasprice);

        validateArguments(betAmount, betMask, modulo);

        uint rollEdge;
        uint mask;

        if (modulo <= MAX_MASK_MODULO) {
            // Small modulo games can specify exact bet outcomes via bit mask.
            // rollEdge is a number of 1 bits in this mask (population count).
            // This magic looking formula is an efficient way to compute population
            // count on EVM for numbers below 2**40.
            rollEdge = ((betMask * POPCNT_MULT) & POPCNT_MASK) % POPCNT_MODULO;
            mask = betMask;
        } else {
            // Larger modulos games specify the right edge of half-open interval of winning bet outcomes.
            rollEdge = betMask;
        }

        // Winning amount.
        uint possibleWinAmount = getDiceWinAmount(
            betAmount,
            modulo,
            rollEdge,
            isLarger
        );

        // Check whether contract has enough funds to accept this bet.
        require(
            lockedInBets + possibleWinAmount <= address(this).balance,
            "Unable to accept bet due to insufficient funds"
        );

        uint256 requestID = _requestRandomWords();

        // Update lock funds.
        lockedInBets += possibleWinAmount;

        s_requestIDToRequestIndex[requestID] = requestCounter;
        betPlaceTime[requestCounter] = block.timestamp;
        bets[requestCounter] = Bet({
            amount: betAmount,
            modulo: uint8(modulo),
            rollEdge: uint8(rollEdge),
            mask: uint40(mask),
            placeBlockNumber: ChainSpecificUtil.getBlockNumber(),
            gambler: payable(msgSender),
            isSettled: false,
            outcome: 0,
            winAmount: possibleWinAmount,
            randomNumber: 0,
            isLarger: isLarger,
            requestID: requestID
        });

        // Record bet in event logs
        emitBetPlacedEvent(
            msgSender,
            betAmount,
            requestCounter,
            uint8(modulo),
            uint8(rollEdge),
            uint40(mask),
            isLarger
        );

        requestCounter += 1;
    }

    // Get the expected win amount after house edge is subtracted.
    function getDiceWinAmount(
        uint amount,
        uint modulo,
        uint rollEdge,
        bool isLarger
    ) private view returns (uint winAmount) {
        require(
            0 < rollEdge && rollEdge <= modulo,
            "Win probability out of range."
        );
        uint houseEdge = (amount *
            (getModuloHouseEdgePercent(uint32(modulo)) +
                getWealthTax(amount))) / 100;
        uint realRollEdge = rollEdge;
        if (modulo == MAX_MODULO && isLarger) {
            realRollEdge = MAX_MODULO - rollEdge - 1;
        }
        winAmount = ((amount - houseEdge) * modulo) / realRollEdge;

        // round down to multiple 1000Gweis
        winAmount = (winAmount / 1e12) * 1e12;

        uint maxWinAmount = amount + maxProfit;

        if (winAmount > maxWinAmount) {
            winAmount = maxWinAmount;
        }
    }

    // Get wealth tax
    function getWealthTax(uint amount) private view returns (uint wealthTax) {
        wealthTax =
            (amount / wealthTaxIncrementThreshold) *
            wealthTaxIncrementPercent;
    }

    // Common settlement code for settleBet.
    function settleBetCommon(
        Bet storage bet,
        uint reveal
    ) private {
        // Fetch bet parameters into local variables (to save gas).
        uint amount = bet.amount;

        // Validation check
        require(amount > 0, "Bet does not exist."); // Check that bet exists
        require(bet.isSettled == false, "Bet is settled already"); // Check that bet is not settled yet

        // Fetch bet parameters into local variables (to save gas).
        uint modulo = bet.modulo;
        uint rollEdge = bet.rollEdge;
        address payable gambler = bet.gambler;
        bool isLarger = bet.isLarger;

        // The RNG - combine "reveal" and blockhash of placeBet using Keccak256. Miners
        // are not aware of "reveal" and cannot deduce it from "commit" (as Keccak256
        // preimage is intractable), and house is unable to alter the "reveal" after
        // placeBet have been mined (as Keccak256 collision finding is also intractable).
        bytes32 entropy = keccak256(abi.encodePacked(reveal));

        // Do a roll by taking a modulo of entropy. Compute winning amount.
        uint outcome = uint(entropy) % modulo;

        // Win amount if gambler wins this bet
        uint possibleWinAmount = bet.winAmount;

        // Actual win amount by gambler
        uint winAmount = 0;

        // Determine dice outcome.
        if (modulo <= MAX_MASK_MODULO) {
            // For small modulo games, check the outcome against a bit mask.
            if ((2 ** outcome) & bet.mask != 0) {
                winAmount = possibleWinAmount;
            }
        } else {
            // For larger modulos, check inclusion into half-open interval.
            if (isLarger) {
                if (outcome > rollEdge) {
                    winAmount = possibleWinAmount;
                }
            } else {
                if (outcome < rollEdge) {
                    winAmount = possibleWinAmount;
                }
            }
        }

        // Unlock possibleWinAmount from lockedInBets, regardless of the outcome.
        lockedInBets -= possibleWinAmount;

        // Update bet records
        bet.isSettled = true;
        bet.winAmount = winAmount;
        bet.randomNumber = reveal;
        bet.outcome = outcome;

        // Send win amount to gambler.
        if (bet.winAmount > 0) {
            gambler.transfer(bet.winAmount);
        }

        emitSettledEvent(bet);
    }

    function emitSettledEvent(Bet storage bet) private {
        uint amount = bet.amount;
        uint outcome = bet.outcome;
        uint winAmount = bet.winAmount;
        // Fetch bet parameters into local variables (to save gas).
        uint modulo = bet.modulo;
        uint rollEdge = bet.rollEdge;
        address payable gambler = bet.gambler;
        // Record bet settlement in event log.
        emit BetSettled(
            gambler,
            amount,
            s_requestIDToRequestIndex[bet.requestID],
            uint8(modulo),
            uint8(rollEdge),
            bet.mask,
            outcome,
            winAmount
        );
    }

    // Return the bet in extremely unlikely scenario it was not settled by Chainlink VRF.
    // In case you ever find yourself in a situation like this, just contact hashbet support.
    // However, nothing precludes you from calling this method yourself.
    function refundBet(uint256 betID) external payable nonReentrant {
        Bet storage bet = bets[betID];
        uint amount = bet.amount;
        uint betTime = betPlaceTime[betID];

        // Validation check
        require(amount > 0, "Bet does not exist."); // Check that bet exists
        require(bet.isSettled == false, "Bet is settled already."); // Check that bet is still open
        require(
            block.timestamp >= (betTime + 1 hours),
            "Wait after placing bet before requesting refund."
        );

        uint possibleWinAmount = bet.winAmount;

        // Unlock possibleWinAmount from lockedInBets, regardless of the outcome.
        lockedInBets -= possibleWinAmount;

        // Update bet records
        bet.isSettled = true;
        bet.winAmount = amount;

        // Send the refund.
        bet.gambler.transfer(amount);

        // Record refund in event logs
        emit BetRefunded(bet.gambler, amount);

        delete (s_requestIDToRequestIndex[bet.requestID]);
        delete (betPlaceTime[betID]);
    }

    /**
     * Allow withdraw of Link tokens from the contract
     */
    function withdrawLink() public onlyOwner {
        LinkTokenInterface link = LinkTokenInterface(linkAddress);
        require(
            link.transfer(msg.sender, link.balanceOf(address(this))),
            "Unable to transfer"
        );
    }

    /**
     * @dev calculates in form of native token the fee charged by chainlink VRF
     * @return VRFfee amount of fee user has to pay
     */
    function getVRFFee(uint gasPrice) public view returns (uint256 VRFfee) {
        uint link = VRF_V2_WRAPPER.estimateRequestPrice(
            callbackGasLimit,
            gasPrice
        );
        VRFfee = (link * uint256(getLatestData())) / 1e18;
    }

    // Check the sequencer status (L2 networks) and return the latest data
    function getLatestData() public view returns (int) {
        if (sequencerUptimeFeed != AggregatorV2V3Interface(address(0))) {
            // prettier-ignore
            (
                /*uint80 roundID*/,
                int256 answer,
                uint256 startedAt,
                /*uint256 updatedAt*/,
                /*uint80 answeredInRound*/
            ) = sequencerUptimeFeed.latestRoundData();

            // Answer == 0: Sequencer is up
            // Answer == 1: Sequencer is down
            bool isSequencerUp = answer == 0;
            if (!isSequencerUp) {
                revert SequencerDown();
            }

            // Make sure the grace period has passed after the
            // sequencer is back up.
            uint256 timeSinceUp = block.timestamp - startedAt;
            if (timeSinceUp <= GRACE_PERIOD_TIME) {
                revert GracePeriodNotOver();
            }
        }

        // prettier-ignore
        (
            uint80 roundID,
            int256 price,
            , 
            ,
            uint80 answeredInRound
        ) = dataFeed.latestRoundData();
        require(answeredInRound >= roundID, "Stale price");
        require(price > 0, "Invalid price");

        return price;
    }

    // Check arguments
    function validateArguments(
        uint amount,
        uint betMask,
        uint modulo
    ) private view {
        // Validate input data.
        require(
            modulo == 2 ||
                modulo == 6 ||
                modulo == 36 ||
                modulo == 37 ||
                modulo == 100,
            "Modulo should be valid value."
        );
        require(
            amount >= minBetAmount && amount <= maxBetAmount,
            "Bet amount should be within range."
        );

        if (modulo <= MAX_MASK_MODULO) {
            require(
                betMask > 0 && betMask < MAX_BET_MASK,
                "Mask should be within range."
            );
        }

        if (modulo == MAX_MODULO) {
            require(
                betMask >= minOverValue && betMask <= maxUnderValue,
                "High modulo range, Mask should be within range."
            );
        }
    }

    /**
     * @dev function to send the request for randomness to chainlink
     */
    function _requestRandomWords() internal returns (uint256 requestID) {
        requestID = requestRandomness(
            callbackGasLimit,
            requestConfirmations,
            numWords
        );
    }

    function fulfillRandomWords(
        uint256 requestID,
        uint256[] memory randomWords
    ) internal override {
        uint256 betID = s_requestIDToRequestIndex[requestID];
        Bet storage bet = bets[betID];
        if (bet.gambler == address(0)) revert();
        uint placeBlockNumber = bet.placeBlockNumber;
        uint betTime = betPlaceTime[betID];

        // Settle bet must be within one hour
        require(
            block.timestamp < (betTime + 1 hours),
            "settleBet has expired."
        );

        // Check that bet has not expired yet (see comment to BET_EXPIRATION_BLOCKS).
        require(
            ChainSpecificUtil.getBlockNumber() > placeBlockNumber,
            "settleBet before placeBet"
        );

        // Settle bet using reveal and blockHash as entropy sources.
        settleBetCommon(
            bet,
            randomWords[0]
        );

        delete (s_requestIDToRequestIndex[requestID]);
        delete (betPlaceTime[betID]);
    }

    /**
     * @dev returns to user the excess fee sent to pay for the VRF
     * @param refund amount to send back to user
     */
    function refundExcessValue(uint256 refund) internal {
        if (refund == 0) {
            return;
        }
        (bool success, ) = payable(msg.sender).call{value: refund}("");
        if (!success) {
            revert RefundFailed();
        }
    }

    function checkVRFFee(uint betAmount, uint gasPrice) internal {
        uint256 VRFfee = getVRFFee(gasPrice);

        if (msg.value < betAmount + VRFfee) {
            revert InvalidValue(betAmount + VRFfee, msg.value);
        }
        refundExcessValue(msg.value - (VRFfee + betAmount));
    }

    function getModuloHouseEdgePercent(
        uint32 modulo
    ) internal view returns (uint32 houseEdgePercent) {
        houseEdgePercent = houseEdgePercents[modulo];
        if (houseEdgePercent == 0) {
            houseEdgePercent = uint32(defaultHouseEdgePercent);
        }
    }
}

File 2 of 11 : AggregatorInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorInterface {
  function latestAnswer() external view returns (int256);

  function latestTimestamp() external view returns (uint256);

  function latestRound() external view returns (uint256);

  function getAnswer(uint256 roundId) external view returns (int256);

  function getTimestamp(uint256 roundId) external view returns (uint256);

  event AnswerUpdated(int256 indexed current, uint256 indexed roundId, uint256 updatedAt);

  event NewRound(uint256 indexed roundId, address indexed startedBy, uint256 startedAt);
}

File 3 of 11 : AggregatorV2V3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./AggregatorInterface.sol";
import "./AggregatorV3Interface.sol";

interface AggregatorV2V3Interface is AggregatorInterface, AggregatorV3Interface {}

File 4 of 11 : AggregatorV3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface AggregatorV3Interface {
  function decimals() external view returns (uint8);

  function description() external view returns (string memory);

  function version() external view returns (uint256);

  function getRoundData(uint80 _roundId)
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

  function latestRoundData()
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );
}

File 5 of 11 : LinkTokenInterface.sol
// 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);
}

File 6 of 11 : VRFV2WrapperInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

interface VRFV2WrapperInterface {
  /**
   * @return the request ID of the most recent VRF V2 request made by this wrapper. This should only
   * be relied option within the same transaction that the request was made.
   */
  function lastRequestId() external view returns (uint256);

  /**
   * @notice Calculates the price of a VRF request with the given callbackGasLimit at the current
   * @notice block.
   *
   * @dev This function relies on the transaction gas price which is not automatically set during
   * @dev simulation. To estimate the price at a specific gas price, use the estimatePrice function.
   *
   * @param _callbackGasLimit is the gas limit used to estimate the price.
   */
  function calculateRequestPrice(uint32 _callbackGasLimit) external view returns (uint256);

  /**
   * @notice Estimates the price of a VRF request with a specific gas limit and gas price.
   *
   * @dev This is a convenience function that can be called in simulation to better understand
   * @dev pricing.
   *
   * @param _callbackGasLimit is the gas limit used to estimate the price.
   * @param _requestGasPriceWei is the gas price in wei used for the estimation.
   */
  function estimateRequestPrice(uint32 _callbackGasLimit, uint256 _requestGasPriceWei) external view returns (uint256);
}

File 7 of 11 : VRFV2WrapperConsumerBase.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

import "./interfaces/LinkTokenInterface.sol";
import "./interfaces/VRFV2WrapperInterface.sol";

/** *******************************************************************************
 * @notice Interface for contracts using VRF randomness through the VRF V2 wrapper
 * ********************************************************************************
 * @dev PURPOSE
 *
 * @dev Create VRF V2 requests without the need for subscription management. Rather than creating
 * @dev and funding a VRF V2 subscription, a user can use this wrapper to create one off requests,
 * @dev paying up front rather than at fulfillment.
 *
 * @dev Since the price is determined using the gas price of the request transaction rather than
 * @dev the fulfillment transaction, the wrapper charges an additional premium on callback gas
 * @dev usage, in addition to some extra overhead costs associated with the VRFV2Wrapper contract.
 * *****************************************************************************
 * @dev USAGE
 *
 * @dev Calling contracts must inherit from VRFV2WrapperConsumerBase. The consumer must be funded
 * @dev with enough LINK to make the request, otherwise requests will revert. To request randomness,
 * @dev call the 'requestRandomness' function with the desired VRF parameters. This function handles
 * @dev paying for the request based on the current pricing.
 *
 * @dev Consumers must implement the fullfillRandomWords function, which will be called during
 * @dev fulfillment with the randomness result.
 */
abstract contract VRFV2WrapperConsumerBase {
  LinkTokenInterface internal immutable LINK;
  VRFV2WrapperInterface internal immutable VRF_V2_WRAPPER;

  /**
   * @param _link is the address of LinkToken
   * @param _vrfV2Wrapper is the address of the VRFV2Wrapper contract
   */
  constructor(address _link, address _vrfV2Wrapper) {
    LINK = LinkTokenInterface(_link);
    VRF_V2_WRAPPER = VRFV2WrapperInterface(_vrfV2Wrapper);
  }

  /**
   * @dev Requests randomness from the VRF V2 wrapper.
   *
   * @param _callbackGasLimit is the gas limit that should be used when calling the consumer's
   *        fulfillRandomWords function.
   * @param _requestConfirmations is the number of confirmations to wait before fulfilling the
   *        request. A higher number of confirmations increases security by reducing the likelihood
   *        that a chain re-org changes a published randomness outcome.
   * @param _numWords is the number of random words to request.
   *
   * @return requestId is the VRF V2 request ID of the newly created randomness request.
   */
  function requestRandomness(
    uint32 _callbackGasLimit,
    uint16 _requestConfirmations,
    uint32 _numWords
  ) internal returns (uint256 requestId) {
    LINK.transferAndCall(
      address(VRF_V2_WRAPPER),
      VRF_V2_WRAPPER.calculateRequestPrice(_callbackGasLimit),
      abi.encode(_callbackGasLimit, _requestConfirmations, _numWords)
    );
    return VRF_V2_WRAPPER.lastRequestId();
  }

  /**
   * @notice fulfillRandomWords handles the VRF V2 wrapper response. The consuming contract must
   * @notice implement it.
   *
   * @param _requestId is the VRF V2 request ID.
   * @param _randomWords is the randomness result.
   */
  function fulfillRandomWords(uint256 _requestId, uint256[] memory _randomWords) internal virtual;

  function rawFulfillRandomWords(uint256 _requestId, uint256[] memory _randomWords) external {
    require(msg.sender == address(VRF_V2_WRAPPER), "only VRF V2 wrapper can fulfill");
    fulfillRandomWords(_requestId, _randomWords);
  }
}

File 8 of 11 : Ownable.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.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. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby disabling 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 9 of 11 : ReentrancyGuard.sol
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)

pragma solidity ^0.8.0;

/**
 * @dev Contract module that helps prevent reentrant calls to a function.
 *
 * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
 * available, which can be applied to functions to make sure there are no nested
 * (reentrant) calls to them.
 *
 * Note that because there is a single `nonReentrant` guard, functions marked as
 * `nonReentrant` may not call one another. This can be worked around by making
 * those functions `private`, and then adding `external` `nonReentrant` entry
 * points to them.
 *
 * TIP: If you would like to learn more about reentrancy and alternative ways
 * to protect against it, check out our blog post
 * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
 */
abstract contract ReentrancyGuard {
    // Booleans are more expensive than uint256 or any type that takes up a full
    // word because each write operation emits an extra SLOAD to first read the
    // slot's contents, replace the bits taken up by the boolean, and then write
    // back. This is the compiler's defense against contract upgrades and
    // pointer aliasing, and it cannot be disabled.

    // The values being non-zero value makes deployment a bit more expensive,
    // but in exchange the refund on every call to nonReentrant will be lower in
    // amount. Since refunds are capped to a percentage of the total
    // transaction's gas, it is best to keep them low in cases like this one, to
    // increase the likelihood of the full refund coming into effect.
    uint256 private constant _NOT_ENTERED = 1;
    uint256 private constant _ENTERED = 2;

    uint256 private _status;

    constructor() {
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Prevents a contract from calling itself, directly or indirectly.
     * Calling a `nonReentrant` function from another `nonReentrant`
     * function is not supported. It is possible to prevent this from happening
     * by making the `nonReentrant` function external, and making it call a
     * `private` function that does the actual work.
     */
    modifier nonReentrant() {
        _nonReentrantBefore();
        _;
        _nonReentrantAfter();
    }

    function _nonReentrantBefore() private {
        // On the first call to nonReentrant, _status will be _NOT_ENTERED
        require(_status != _ENTERED, "ReentrancyGuard: reentrant call");

        // Any calls to nonReentrant after this point will fail
        _status = _ENTERED;
    }

    function _nonReentrantAfter() private {
        // By storing the original value once again, a refund is triggered (see
        // https://eips.ethereum.org/EIPS/eip-2200)
        _status = _NOT_ENTERED;
    }

    /**
     * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
     * `nonReentrant` function in the call stack.
     */
    function _reentrancyGuardEntered() internal view returns (bool) {
        return _status == _ENTERED;
    }
}

File 10 of 11 : 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 11 of 11 : ChainSpecificUtil.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.10;

interface ArbGasInfo {
    // return gas prices in wei, assuming the specified aggregator is used
    //        (
    //            per L2 tx,
    //            per L1 calldata unit, (zero byte = 4 units, nonzero byte = 16 units)
    //            per storage allocation,
    //            per ArbGas base,
    //            per ArbGas congestion,
    //            per ArbGas total
    //        )
    function getPricesInWeiWithAggregator(
        address aggregator
    ) external view returns (uint, uint, uint, uint, uint, uint);

    // return gas prices in wei, as described above, assuming the caller's preferred aggregator is used
    //     if the caller hasn't specified a preferred aggregator, the default aggregator is assumed
    function getPricesInWei()
        external
        view
        returns (uint, uint, uint, uint, uint, uint);

    // return prices in ArbGas (per L2 tx, per L1 calldata unit, per storage allocation),
    //       assuming the specified aggregator is used
    function getPricesInArbGasWithAggregator(
        address aggregator
    ) external view returns (uint, uint, uint);

    // return gas prices in ArbGas, as described above, assuming the caller's preferred aggregator is used
    //     if the caller hasn't specified a preferred aggregator, the default aggregator is assumed
    function getPricesInArbGas() external view returns (uint, uint, uint);

    // return gas accounting parameters (speedLimitPerSecond, gasPoolMax, maxTxGasLimit)
    function getGasAccountingParams() external view returns (uint, uint, uint);

    // get ArbOS's estimate of the L1 gas price in wei
    function getL1GasPriceEstimate() external view returns (uint);

    // set ArbOS's estimate of the L1 gas price in wei
    // reverts unless called by chain owner or designated gas oracle (if any)
    function setL1GasPriceEstimate(uint priceInWei) external;

    // get L1 gas fees paid by the current transaction (txBaseFeeWei, calldataFeeWei)
    function getCurrentTxL1GasFees() external view returns (uint);
}

interface ArbSys {
    /**
     * @notice Get Arbitrum block number (distinct from L1 block number; Arbitrum genesis block has block number 0)
     * @return block number as int
     */
    function arbBlockNumber() external view returns (uint256);

    /**
     * @notice Get Arbitrum block hash (reverts unless currentBlockNum-256 <= arbBlockNum < currentBlockNum)
     * @return block hash
     */
    function arbBlockHash(uint256 arbBlockNum) external view returns (bytes32);

    /**
     * @notice Gets the rollup's unique chain identifier
     * @return Chain identifier as int
     */
    function arbChainID() external view returns (uint256);

    /**
     * @notice Get internal version number identifying an ArbOS build
     * @return version number as int
     */
    function arbOSVersion() external view returns (uint256);

    /**
     * @notice Returns 0 since Nitro has no concept of storage gas
     * @return uint 0
     */
    function getStorageGasAvailable() external view returns (uint256);

    /**
     * @notice (deprecated) check if current call is top level (meaning it was triggered by an EoA or a L1 contract)
     * @dev this call has been deprecated and may be removed in a future release
     * @return true if current execution frame is not a call by another L2 contract
     */
    function isTopLevelCall() external view returns (bool);

    /**
     * @notice map L1 sender contract address to its L2 alias
     * @param sender sender address
     * @param unused argument no longer used
     * @return aliased sender address
     */
    function mapL1SenderContractAddressToL2Alias(
        address sender,
        address unused
    ) external pure returns (address);

    /**
     * @notice check if the caller (of this caller of this) is an aliased L1 contract address
     * @return true iff the caller's address is an alias for an L1 contract address
     */
    function wasMyCallersAddressAliased() external view returns (bool);

    /**
     * @notice return the address of the caller (of this caller of this), without applying L1 contract address aliasing
     * @return address of the caller's caller, without applying L1 contract address aliasing
     */
    function myCallersAddressWithoutAliasing() external view returns (address);

    /**
     * @notice Send given amount of Eth to dest from sender.
     * This is a convenience function, which is equivalent to calling sendTxToL1 with empty data.
     * @param destination recipient address on L1
     * @return unique identifier for this L2-to-L1 transaction.
     */
    function withdrawEth(
        address destination
    ) external payable returns (uint256);

    /**
     * @notice Send a transaction to L1
     * @dev it is not possible to execute on the L1 any L2-to-L1 transaction which contains data
     * to a contract address without any code (as enforced by the Bridge contract).
     * @param destination recipient address on L1
     * @param data (optional) calldata for L1 contract call
     * @return a unique identifier for this L2-to-L1 transaction.
     */
    function sendTxToL1(
        address destination,
        bytes calldata data
    ) external payable returns (uint256);

    /**
     * @notice Get send Merkle tree state
     * @return size number of sends in the history
     * @return root root hash of the send history
     * @return partials hashes of partial subtrees in the send history tree
     */
    function sendMerkleTreeState()
        external
        view
        returns (uint256 size, bytes32 root, bytes32[] memory partials);

    /**
     * @notice creates a send txn from L2 to L1
     * @param position = (level << 192) + leaf = (0 << 192) + leaf = leaf
     */
    event L2ToL1Tx(
        address caller,
        address indexed destination,
        uint256 indexed hash,
        uint256 indexed position,
        uint256 arbBlockNum,
        uint256 ethBlockNum,
        uint256 timestamp,
        uint256 callvalue,
        bytes data
    );

    /// @dev DEPRECATED in favour of the new L2ToL1Tx event above after the nitro upgrade
    event L2ToL1Transaction(
        address caller,
        address indexed destination,
        uint256 indexed uniqueId,
        uint256 indexed batchNumber,
        uint256 indexInBatch,
        uint256 arbBlockNum,
        uint256 ethBlockNum,
        uint256 timestamp,
        uint256 callvalue,
        bytes data
    );

    /**
     * @notice logs a merkle branch for proof synthesis
     * @param reserved an index meant only to align the 4th index with L2ToL1Transaction's 4th event
     * @param hash the merkle hash
     * @param position = (level << 192) + leaf
     */
    event SendMerkleUpdate(
        uint256 indexed reserved,
        bytes32 indexed hash,
        uint256 indexed position
    );
}

//@dev A library that abstracts out opcodes that behave differently across chains.
//@dev The methods below return values that are pertinent to the given chain.
//@dev For instance, ChainSpecificUtil.getBlockNumber() returns L2 block number in L2 chains
library ChainSpecificUtil {
    address private constant ARBSYS_ADDR =
        address(0x0000000000000000000000000000000000000064);
    ArbSys private constant ARBSYS = ArbSys(ARBSYS_ADDR);
    address private constant ARBGAS_ADDR =
        address(0x000000000000000000000000000000000000006C);
    ArbGasInfo private constant ARBGAS = ArbGasInfo(ARBGAS_ADDR);
    uint256 private constant ARB_MAINNET_CHAIN_ID = 42161;
    uint256 private constant ARB_GOERLI_TESTNET_CHAIN_ID = 421613;

    function getBlockhash(uint256 blockNumber) internal view returns (bytes32) {
        uint256 chainid = block.chainid;
        if (
            chainid == ARB_MAINNET_CHAIN_ID ||
            chainid == ARB_GOERLI_TESTNET_CHAIN_ID
        ) {
            if (
                (getBlockNumber() - blockNumber) > 256 ||
                blockNumber >= getBlockNumber()
            ) {
                return "";
            }
            return ARBSYS.arbBlockHash(blockNumber);
        }
        return blockhash(blockNumber);
    }

    function getBlockNumber() internal view returns (uint256) {
        uint256 chainid = block.chainid;
        if (
            chainid == ARB_MAINNET_CHAIN_ID ||
            chainid == ARB_GOERLI_TESTNET_CHAIN_ID
        ) {
            return ARBSYS.arbBlockNumber();
        }
        return block.number;
    }

    function getCurrentTxL1GasFees() internal view returns (uint256) {
        uint256 chainid = block.chainid;
        if (
            chainid == ARB_MAINNET_CHAIN_ID ||
            chainid == ARB_GOERLI_TESTNET_CHAIN_ID
        ) {
            return ARBGAS.getCurrentTxL1GasFees();
        }
        return 0;
    }
}

Settings
{
  "optimizer": {
    "enabled": true,
    "runs": 1000
  },
  "outputSelection": {
    "*": {
      "*": [
        "evm.bytecode",
        "evm.deployedBytecode",
        "devdoc",
        "userdoc",
        "metadata",
        "abi"
      ]
    }
  },
  "libraries": {}
}

Contract Security Audit

Contract ABI

[{"inputs":[{"internalType":"address","name":"_linkAddress","type":"address"},{"internalType":"address","name":"_vrfV2Wrapper","type":"address"},{"internalType":"address","name":"_dataFeed","type":"address"},{"internalType":"address","name":"_sequencerUptimeFeed","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"uint256","name":"requestID","type":"uint256"}],"name":"AwaitingVRF","type":"error"},{"inputs":[],"name":"GracePeriodNotOver","type":"error"},{"inputs":[{"internalType":"uint256","name":"required","type":"uint256"},{"internalType":"uint256","name":"sent","type":"uint256"}],"name":"InvalidValue","type":"error"},{"inputs":[],"name":"NotAwaitingVRF","type":"error"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"inputs":[],"name":"RefundFailed","type":"error"},{"inputs":[],"name":"SequencerDown","type":"error"},{"inputs":[],"name":"TransferFailed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"gambler","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"betID","type":"uint256"},{"indexed":true,"internalType":"uint8","name":"modulo","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"rollEdge","type":"uint8"},{"indexed":false,"internalType":"uint40","name":"mask","type":"uint40"},{"indexed":false,"internalType":"bool","name":"isLarger","type":"bool"}],"name":"BetPlaced","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"gambler","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"BetRefunded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"gambler","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"betID","type":"uint256"},{"indexed":true,"internalType":"uint8","name":"modulo","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"rollEdge","type":"uint8"},{"indexed":false,"internalType":"uint40","name":"mask","type":"uint40"},{"indexed":false,"internalType":"uint256","name":"outcome","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"winAmount","type":"uint256"}],"name":"BetSettled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"bets","outputs":[{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint8","name":"modulo","type":"uint8"},{"internalType":"uint8","name":"rollEdge","type":"uint8"},{"internalType":"uint40","name":"mask","type":"uint40"},{"internalType":"uint256","name":"placeBlockNumber","type":"uint256"},{"internalType":"address payable","name":"gambler","type":"address"},{"internalType":"bool","name":"isSettled","type":"bool"},{"internalType":"uint256","name":"outcome","type":"uint256"},{"internalType":"uint256","name":"winAmount","type":"uint256"},{"internalType":"uint256","name":"randomNumber","type":"uint256"},{"internalType":"bool","name":"isLarger","type":"bool"},{"internalType":"uint256","name":"requestID","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cumulativeDeposit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"cumulativeWithdrawal","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultHouseEdgePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestData","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"gasPrice","type":"uint256"}],"name":"getVRFFee","outputs":[{"internalType":"uint256","name":"VRFfee","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"","type":"uint32"}],"name":"houseEdgePercents","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockedInBets","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxBetAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxProfit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxUnderValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minBetAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minOverValue","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":"betAmount","type":"uint256"},{"internalType":"uint256","name":"betMask","type":"uint256"},{"internalType":"uint256","name":"modulo","type":"uint256"},{"internalType":"bool","name":"isLarger","type":"bool"}],"name":"placeBet","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_requestId","type":"uint256"},{"internalType":"uint256[]","name":"_randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"betID","type":"uint256"}],"name":"refundBet","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"requestCounter","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wealthTaxIncrementPercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wealthTaxIncrementThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"withdrawAmount","type":"uint256"}],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawLink","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]

60c060405268a2a15d09519be000006004556001600555662386f26fc1000060065569021e19e0c9bab2400000600755693f870857a3e0e38000006008556001600a556062600b556002600f553480156200005957600080fd5b50604051620025a7380380620025a78339810160408190526200007c9162000231565b83836200008933620001c4565b60018080556001600160a01b0392831660805290821660a052600c80549683166001600160a01b0319978816179055600d805494831694871694909417909355600e80549290911691909416179092555060146020527fa1930aa930426c54c34daad2b9ada7c5d0ef0c96078a3c5bb79f6fa6602c4a7a805463ffffffff1990811683179091557fe1f6b6a5fb7e47dad87547d4b0671e7e995a1dae22fbe5b3b5d10e2a77ed7aff80548216831790557ff52d072e422547a931960ab6d28f98d3019dd5c3472bf76524038986c75cbc55805482169092179091557fc81738ba21ce613eaa6756547d83d3d300b6ce1800505043ca467e4565df51d080548216600317905560646000527fb2e9ce6931314ffc4144ef8c71db8cbd6728850d87f4700f92e2ec3e3d968838805490911660051790556200028e565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200022c57600080fd5b919050565b600080600080608085870312156200024857600080fd5b620002538562000214565b9350620002636020860162000214565b9250620002736040860162000214565b9150620002836060860162000214565b905092959194509250565b60805160a0516122de620002c9600039600081816106b00152818161078401528181611c270152611d3001526000611bfd01526122de6000f3fe60806040526004361061019a5760003560e01c80638da5cb5b116100e1578063cab11d5d1161008a578063e1fdb4b411610064578063e1fdb4b4146104f9578063f2fde38b1461050c578063f87aba301461052c578063fa968eea1461053f576101b8565b8063cab11d5d146104b7578063d98e6ae6146104cd578063df88126f146104e3576101b8565b8063ab757d61116100bb578063ab757d6114610476578063b539cd551461048b578063b844a12a146104a1576101b8565b80638da5cb5b146104235780638dc654a21461044b578063973a814e14610460576101b8565b80632adcd34f11610143578063715018a61161011d578063715018a6146103d857806372318cf9146103ed5780638bd1611414610403576101b8565b80632adcd34f14610364578063386d5fe6146103ac57806370d8c578146103c2576101b8565b8063177c55c811610174578063177c55c8146102285780631fe543e31461023e57806322af00fa1461025e576101b8565b80630c531f27146101ca57806312065fe0146101f3578063155dd5ee14610206576101b8565b366101b85734600260008282546101b19190611e72565b9091555050005b34600260008282546101b19190611e72565b3480156101d657600080fd5b506101e060025481565b6040519081526020015b60405180910390f35b3480156101ff57600080fd5b50476101e0565b34801561021257600080fd5b50610226610221366004611e8a565b610555565b005b34801561023457600080fd5b506101e0600b5481565b34801561024a57600080fd5b50610226610259366004611eb9565b6106a5565b34801561026a57600080fd5b506102f2610279366004611e8a565b601360205260009081526040902080546001820154600283015460038401546004850154600586015460068701546007880154600890980154969760ff80881698610100890482169862010000900464ffffffffff1697966001600160a01b03811696600160a01b90910483169590949093909216908c565b604080519c8d5260ff9b8c1660208e01529a909916998b019990995264ffffffffff90961660608a015260808901949094526001600160a01b0390921660a0880152151560c087015260e0860152610100850152610120840152901515610140830152610160820152610180016101ea565b34801561037057600080fd5b5061039761037f366004611f83565b60146020526000908152604090205463ffffffff1681565b60405163ffffffff90911681526020016101ea565b3480156103b857600080fd5b506101e060055481565b3480156103ce57600080fd5b506101e060045481565b3480156103e457600080fd5b5061022661072b565b3480156103f957600080fd5b506101e060035481565b34801561040f57600080fd5b506101e061041e366004611e8a565b61073f565b34801561042f57600080fd5b506000546040516001600160a01b0390911681526020016101ea565b34801561045757600080fd5b5061022661081d565b34801561046c57600080fd5b506101e060105481565b34801561048257600080fd5b506101e061098c565b34801561049757600080fd5b506101e060085481565b3480156104ad57600080fd5b506101e0600f5481565b3480156104c357600080fd5b506101e060075481565b3480156104d957600080fd5b506101e0600a5481565b3480156104ef57600080fd5b506101e060095481565b610226610507366004611e8a565b610bed565b34801561051857600080fd5b50610226610527366004611fa9565b610e23565b61022661053a366004611fe0565b610eb0565b34801561054b57600080fd5b506101e060065481565b61055d6111cf565b478111156105d85760405162461bcd60e51b815260206004820152602660248201527f5769746864726177616c20616d6f756e74206c6172676572207468616e20626160448201527f6c616e63652e000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6009546105e59047612021565b81111561065a5760405162461bcd60e51b815260206004820152603860248201527f5769746864726177616c20616d6f756e74206c6172676572207468616e20626160448201527f6c616e6365206d696e7573206c6f636b6564496e42657473000000000000000060648201526084016105cf565b6040513390819083156108fc029084906000818181858888f19350505050158015610689573d6000803e3d6000fd5b50816003600082825461069c9190611e72565b90915550505050565b336001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000161461071d5760405162461bcd60e51b815260206004820152601f60248201527f6f6e6c792056524620563220777261707065722063616e2066756c66696c6c0060448201526064016105cf565b6107278282611229565b5050565b6107336111cf565b61073d600061136c565b565b6040517f7fb5d19d000000000000000000000000000000000000000000000000000000008152620f424060048201526024810182905260009081906001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690637fb5d19d90604401602060405180830381865afa1580156107cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ef9190612038565b9050670de0b6b3a764000061080261098c565b61080c9083612051565b6108169190612086565b9392505050565b6108256111cf565b600c546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0390911690819063a9059cbb90339083906370a0823190602401602060405180830381865afa158015610892573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b69190612038565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610919573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093d919061209a565b6109895760405162461bcd60e51b815260206004820152601260248201527f556e61626c6520746f207472616e73666572000000000000000000000000000060448201526064016105cf565b50565b600e546000906001600160a01b031615610aaa57600080600e60009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156109f6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1a91906120d1565b509194509250508215905080610a5c576040517f032b3d0000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610a688342612021565b9050610e108111610aa5576040517fd15f73b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505b6000806000600d60009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610b02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2691906120d1565b94505050925092508269ffffffffffffffffffff168169ffffffffffffffffffff161015610b965760405162461bcd60e51b815260206004820152600b60248201527f5374616c6520707269636500000000000000000000000000000000000000000060448201526064016105cf565b60008213610be65760405162461bcd60e51b815260206004820152600d60248201527f496e76616c69642070726963650000000000000000000000000000000000000060448201526064016105cf565b5092915050565b610bf56113d4565b60008181526013602090815260408083208054601290935292205481610c5d5760405162461bcd60e51b815260206004820152601360248201527f42657420646f6573206e6f742065786973742e0000000000000000000000000060448201526064016105cf565b6003830154600160a01b900460ff1615610cb95760405162461bcd60e51b815260206004820152601760248201527f42657420697320736574746c656420616c72656164792e00000000000000000060448201526064016105cf565b610cc581610e10611e72565b421015610d3a5760405162461bcd60e51b815260206004820152603060248201527f5761697420616674657220706c6163696e6720626574206265666f726520726560448201527f7175657374696e6720726566756e642e0000000000000000000000000000000060648201526084016105cf565b6000836005015490508060096000828254610d559190612021565b909155505060038401805460ff60a01b198116600160a01b17909155600585018490556040516001600160a01b039091169084156108fc029085906000818181858888f19350505050158015610daf573d6000803e3d6000fd5b5060038401546040518481526001600160a01b03909116907f95a7aa5c378b3f64e4945d7b72f659200d9fa121b2fabc0a521125f46267ab229060200160405180910390a2505050600801546000908152601160209081526040808320839055838352601290915281205561098960018055565b610e2b6111cf565b6001600160a01b038116610ea75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016105cf565b6109898161136c565b610eb86113d4565b33610ec3853a61142e565b610ece8585856114b3565b60008060288511610f3457603f7e01041041041041041041041041041041041041041041041041041041041041610f1f79200000000010000000000800000000040000000002000000000189612051565b16610f2a9190612121565b9150859050610f38565b8591505b6000610f46888785886116b2565b90504781600954610f579190611e72565b1115610fcb5760405162461bcd60e51b815260206004820152602e60248201527f556e61626c6520746f20616363657074206265742064756520746f20696e737560448201527f6666696369656e742066756e647300000000000000000000000000000000000060648201526084016105cf565b6000610fd56117e4565b90508160096000828254610fe99190611e72565b9091555050601054600082815260116020908152604080832084905592825260128152908290204290558151610180810183528b815260ff808b16928201929092529086169181019190915264ffffffffff841660608201526080810161104e6117fb565b81526001600160a01b0380881660208084019190915260006040808501829052606080860183905260808087018a905260a08088018590528e151560c0808a019190915260e09889018b905260108054875260138852958590208a518155968a0151600188018054968c0151958c015164ffffffffff16620100000266ffffffffff00001960ff97881661010090810261ffff19909a169890941697909717979097179590951695909517909355908801516002860155870151600385018054928901511515600160a01b027fffffffffffffffffffffff000000000000000000000000000000000000000000909316919096161717909355928401516004820155908301516005820155610120830151600682015561014083015160078201805491151560ff199290921691909117905561016090920151600890920191909155546111a29086908b908a88888c611885565b6001601060008282546111b59190611e72565b909155505060018055506111c99350505050565b50505050565b6000546001600160a01b0316331461073d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105cf565b600082815260116020908152604080832054808452601390925290912060038101546001600160a01b031661125d57600080fd5b600281015460008381526012602052604090205461127d81610e10611e72565b42106112cb5760405162461bcd60e51b815260206004820152601660248201527f736574746c654265742068617320657870697265642e0000000000000000000060448201526064016105cf565b816112d46117fb565b116113215760405162461bcd60e51b815260206004820152601960248201527f736574746c65426574206265666f726520706c6163654265740000000000000060448201526064016105cf565b611345838660008151811061133857611338612135565b60200260200101516118f5565b50505060009283526011602090815260408085208590559184526012905282209190915550565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600260015414156114275760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105cf565b6002600155565b60006114398261073f565b90506114458184611e72565b341015611492576114568184611e72565b6040517fde9b74a100000000000000000000000000000000000000000000000000000000815260048101919091523460248201526044016105cf565b6114ae61149f8483611e72565b6114a99034612021565b611aea565b505050565b80600214806114c25750806006145b806114cd5750806024145b806114d85750806025145b806114e35750806064145b61152f5760405162461bcd60e51b815260206004820152601d60248201527f4d6f64756c6f2073686f756c642062652076616c69642076616c75652e00000060448201526064016105cf565b600654831015801561154357506007548311155b6115b55760405162461bcd60e51b815260206004820152602260248201527f42657420616d6f756e742073686f756c642062652077697468696e2072616e6760448201527f652e00000000000000000000000000000000000000000000000000000000000060648201526084016105cf565b60288111611623576000821180156115d757506115d46028600261222f565b82105b6116235760405162461bcd60e51b815260206004820152601c60248201527f4d61736b2073686f756c642062652077697468696e2072616e67652e0000000060448201526064016105cf565b60648114156114ae57600a5482101580156116405750600b548211155b6114ae5760405162461bcd60e51b815260206004820152602f60248201527f48696768206d6f64756c6f2072616e67652c204d61736b2073686f756c64206260448201527f652077697468696e2072616e67652e000000000000000000000000000000000060648201526084016105cf565b60008260001080156116c45750838311155b6117105760405162461bcd60e51b815260206004820152601d60248201527f57696e2070726f626162696c697479206f7574206f662072616e67652e00000060448201526064016105cf565b6000606461171d87611b74565b61172687611b97565b63ffffffff166117369190611e72565b6117409088612051565b61174a9190612086565b90508360648614801561175a5750835b1561177957600161176c866064612021565b6117769190612021565b90505b8086611785848a612021565b61178f9190612051565b6117999190612086565b92506117aa64e8d4a5100084612086565b6117b99064e8d4a51000612051565b92506000600854886117cb9190611e72565b9050808411156117d9578093505b505050949350505050565b60006117f6620f424060036001611bbe565b905090565b60004661a4b1811480611810575062066eed81145b1561187e5760646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611854573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118789190612038565b91505090565b4391505090565b6040805187815260ff858116602083015264ffffffffff85169282019290925282151560608201529085169086906001600160a01b038a16907fa3fb4d19da73425c3952f0e9548a94e66794d58e3fb04ebcb3adeeb433bab77e906080015b60405180910390a450505050505050565b8154806119445760405162461bcd60e51b815260206004820152601360248201527f42657420646f6573206e6f742065786973742e0000000000000000000000000060448201526064016105cf565b6003830154600160a01b900460ff16156119a05760405162461bcd60e51b815260206004820152601660248201527f42657420697320736574746c656420616c72656164790000000000000000000060448201526064016105cf565b600183015460038401546007850154604080516020808201889052825180830382018152918301909252805191012060ff8085169461010090048116936001600160a01b031692169060006119f58683612121565b60058a0154909150600060288811611a325760018b015462010000900464ffffffffff16611a2484600261222f565b1615611a2d5750805b611a52565b8415611a475786831115611a2d575080611a52565b86831015611a525750805b8160096000828254611a649190612021565b909155505060038b01805460ff60a01b1916600160a01b17905560058b0181905560068b018a905560048b018390558015611ad45760058b01546040516001600160a01b0388169180156108fc02916000818181858888f19350505050158015611ad2573d6000803e3d6000fd5b505b611add8b611db8565b5050505050505050505050565b80611af25750565b604051600090339083908381818185875af1925050503d8060008114611b34576040519150601f19603f3d011682016040523d82523d6000602084013e611b39565b606091505b5050905080610727576040517ff0c49d4400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060055460045483611b879190612086565b611b919190612051565b92915050565b63ffffffff8082166000908152601460205260409020541680611bb95750600f545b919050565b6040517f4306d35400000000000000000000000000000000000000000000000000000000815263ffffffff841660048201526000906001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000811691634000aea0917f00000000000000000000000000000000000000000000000000000000000000009190821690634306d35490602401602060405180830381865afa158015611c71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c959190612038565b6040805163ffffffff808b16602083015261ffff8a169282019290925290871660608201526080016040516020818303038152906040526040518463ffffffff1660e01b8152600401611cea9392919061223b565b6020604051808303816000875af1158015611d09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d2d919061209a565b507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663fc2a88c36040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db09190612038565b949350505050565b80546004820154600583015460018401546003850154600886015460009081526011602090815260409182902054825188815260ff6101008704811693820184905264ffffffffff62010000880416948201949094526060810188905260808101879052929094169390926001600160a01b03169184919083907f3823dc9bbda5a1f18c6c6d138a07bc99eba1fbc83dc9f64d290bd4bf518d2ff19060a0016118e4565b634e487b7160e01b600052601160045260246000fd5b60008219821115611e8557611e85611e5c565b500190565b600060208284031215611e9c57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215611ecc57600080fd5b8235915060208084013567ffffffffffffffff80821115611eec57600080fd5b818601915086601f830112611f0057600080fd5b813581811115611f1257611f12611ea3565b8060051b604051601f19603f83011681018181108582111715611f3757611f37611ea3565b604052918252848201925083810185019189831115611f5557600080fd5b938501935b82851015611f7357843584529385019392850192611f5a565b8096505050505050509250929050565b600060208284031215611f9557600080fd5b813563ffffffff8116811461081657600080fd5b600060208284031215611fbb57600080fd5b81356001600160a01b038116811461081657600080fd5b801515811461098957600080fd5b60008060008060808587031215611ff657600080fd5b843593506020850135925060408501359150606085013561201681611fd2565b939692955090935050565b60008282101561203357612033611e5c565b500390565b60006020828403121561204a57600080fd5b5051919050565b600081600019048311821515161561206b5761206b611e5c565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261209557612095612070565b500490565b6000602082840312156120ac57600080fd5b815161081681611fd2565b805169ffffffffffffffffffff81168114611bb957600080fd5b600080600080600060a086880312156120e957600080fd5b6120f2866120b7565b9450602086015193506040860151925060608601519150612115608087016120b7565b90509295509295909350565b60008261213057612130612070565b500690565b634e487b7160e01b600052603260045260246000fd5b600181815b8085111561218657816000190482111561216c5761216c611e5c565b8085161561217957918102915b93841c9390800290612150565b509250929050565b60008261219d57506001611b91565b816121aa57506000611b91565b81600181146121c057600281146121ca576121e6565b6001915050611b91565b60ff8411156121db576121db611e5c565b50506001821b611b91565b5060208310610133831016604e8410600b8410161715612209575081810a611b91565b612213838361214b565b806000190482111561222757612227611e5c565b029392505050565b6000610816838361218e565b6001600160a01b038416815260006020848184015260606040840152835180606085015260005b8181101561227e57858101830151858201608001528201612262565b81811115612290576000608083870101525b50601f01601f1916929092016080019594505050505056fea2646970667358221220ede169dcc4bd325b28a7caf4a4b101b79c1b69de0be21c09fc7a572ab2a1b59f64736f6c634300080a0033000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000005a861794b927983406fce1d062e00b9368d97df6000000000000000000000000dc530d9457755926550b59e8eccdae76241815570000000000000000000000000000000000000000000000000000000000000000

Deployed Bytecode

0x60806040526004361061019a5760003560e01c80638da5cb5b116100e1578063cab11d5d1161008a578063e1fdb4b411610064578063e1fdb4b4146104f9578063f2fde38b1461050c578063f87aba301461052c578063fa968eea1461053f576101b8565b8063cab11d5d146104b7578063d98e6ae6146104cd578063df88126f146104e3576101b8565b8063ab757d61116100bb578063ab757d6114610476578063b539cd551461048b578063b844a12a146104a1576101b8565b80638da5cb5b146104235780638dc654a21461044b578063973a814e14610460576101b8565b80632adcd34f11610143578063715018a61161011d578063715018a6146103d857806372318cf9146103ed5780638bd1611414610403576101b8565b80632adcd34f14610364578063386d5fe6146103ac57806370d8c578146103c2576101b8565b8063177c55c811610174578063177c55c8146102285780631fe543e31461023e57806322af00fa1461025e576101b8565b80630c531f27146101ca57806312065fe0146101f3578063155dd5ee14610206576101b8565b366101b85734600260008282546101b19190611e72565b9091555050005b34600260008282546101b19190611e72565b3480156101d657600080fd5b506101e060025481565b6040519081526020015b60405180910390f35b3480156101ff57600080fd5b50476101e0565b34801561021257600080fd5b50610226610221366004611e8a565b610555565b005b34801561023457600080fd5b506101e0600b5481565b34801561024a57600080fd5b50610226610259366004611eb9565b6106a5565b34801561026a57600080fd5b506102f2610279366004611e8a565b601360205260009081526040902080546001820154600283015460038401546004850154600586015460068701546007880154600890980154969760ff80881698610100890482169862010000900464ffffffffff1697966001600160a01b03811696600160a01b90910483169590949093909216908c565b604080519c8d5260ff9b8c1660208e01529a909916998b019990995264ffffffffff90961660608a015260808901949094526001600160a01b0390921660a0880152151560c087015260e0860152610100850152610120840152901515610140830152610160820152610180016101ea565b34801561037057600080fd5b5061039761037f366004611f83565b60146020526000908152604090205463ffffffff1681565b60405163ffffffff90911681526020016101ea565b3480156103b857600080fd5b506101e060055481565b3480156103ce57600080fd5b506101e060045481565b3480156103e457600080fd5b5061022661072b565b3480156103f957600080fd5b506101e060035481565b34801561040f57600080fd5b506101e061041e366004611e8a565b61073f565b34801561042f57600080fd5b506000546040516001600160a01b0390911681526020016101ea565b34801561045757600080fd5b5061022661081d565b34801561046c57600080fd5b506101e060105481565b34801561048257600080fd5b506101e061098c565b34801561049757600080fd5b506101e060085481565b3480156104ad57600080fd5b506101e0600f5481565b3480156104c357600080fd5b506101e060075481565b3480156104d957600080fd5b506101e0600a5481565b3480156104ef57600080fd5b506101e060095481565b610226610507366004611e8a565b610bed565b34801561051857600080fd5b50610226610527366004611fa9565b610e23565b61022661053a366004611fe0565b610eb0565b34801561054b57600080fd5b506101e060065481565b61055d6111cf565b478111156105d85760405162461bcd60e51b815260206004820152602660248201527f5769746864726177616c20616d6f756e74206c6172676572207468616e20626160448201527f6c616e63652e000000000000000000000000000000000000000000000000000060648201526084015b60405180910390fd5b6009546105e59047612021565b81111561065a5760405162461bcd60e51b815260206004820152603860248201527f5769746864726177616c20616d6f756e74206c6172676572207468616e20626160448201527f6c616e6365206d696e7573206c6f636b6564496e42657473000000000000000060648201526084016105cf565b6040513390819083156108fc029084906000818181858888f19350505050158015610689573d6000803e3d6000fd5b50816003600082825461069c9190611e72565b90915550505050565b336001600160a01b037f0000000000000000000000005a861794b927983406fce1d062e00b9368d97df6161461071d5760405162461bcd60e51b815260206004820152601f60248201527f6f6e6c792056524620563220777261707065722063616e2066756c66696c6c0060448201526064016105cf565b6107278282611229565b5050565b6107336111cf565b61073d600061136c565b565b6040517f7fb5d19d000000000000000000000000000000000000000000000000000000008152620f424060048201526024810182905260009081906001600160a01b037f0000000000000000000000005a861794b927983406fce1d062e00b9368d97df61690637fb5d19d90604401602060405180830381865afa1580156107cb573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107ef9190612038565b9050670de0b6b3a764000061080261098c565b61080c9083612051565b6108169190612086565b9392505050565b6108256111cf565b600c546040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b0390911690819063a9059cbb90339083906370a0823190602401602060405180830381865afa158015610892573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108b69190612038565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610919573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061093d919061209a565b6109895760405162461bcd60e51b815260206004820152601260248201527f556e61626c6520746f207472616e73666572000000000000000000000000000060448201526064016105cf565b50565b600e546000906001600160a01b031615610aaa57600080600e60009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa1580156109f6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a1a91906120d1565b509194509250508215905080610a5c576040517f032b3d0000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000610a688342612021565b9050610e108111610aa5576040517fd15f73b500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b505050505b6000806000600d60009054906101000a90046001600160a01b03166001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a060405180830381865afa158015610b02573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b2691906120d1565b94505050925092508269ffffffffffffffffffff168169ffffffffffffffffffff161015610b965760405162461bcd60e51b815260206004820152600b60248201527f5374616c6520707269636500000000000000000000000000000000000000000060448201526064016105cf565b60008213610be65760405162461bcd60e51b815260206004820152600d60248201527f496e76616c69642070726963650000000000000000000000000000000000000060448201526064016105cf565b5092915050565b610bf56113d4565b60008181526013602090815260408083208054601290935292205481610c5d5760405162461bcd60e51b815260206004820152601360248201527f42657420646f6573206e6f742065786973742e0000000000000000000000000060448201526064016105cf565b6003830154600160a01b900460ff1615610cb95760405162461bcd60e51b815260206004820152601760248201527f42657420697320736574746c656420616c72656164792e00000000000000000060448201526064016105cf565b610cc581610e10611e72565b421015610d3a5760405162461bcd60e51b815260206004820152603060248201527f5761697420616674657220706c6163696e6720626574206265666f726520726560448201527f7175657374696e6720726566756e642e0000000000000000000000000000000060648201526084016105cf565b6000836005015490508060096000828254610d559190612021565b909155505060038401805460ff60a01b198116600160a01b17909155600585018490556040516001600160a01b039091169084156108fc029085906000818181858888f19350505050158015610daf573d6000803e3d6000fd5b5060038401546040518481526001600160a01b03909116907f95a7aa5c378b3f64e4945d7b72f659200d9fa121b2fabc0a521125f46267ab229060200160405180910390a2505050600801546000908152601160209081526040808320839055838352601290915281205561098960018055565b610e2b6111cf565b6001600160a01b038116610ea75760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016105cf565b6109898161136c565b610eb86113d4565b33610ec3853a61142e565b610ece8585856114b3565b60008060288511610f3457603f7e01041041041041041041041041041041041041041041041041041041041041610f1f79200000000010000000000800000000040000000002000000000189612051565b16610f2a9190612121565b9150859050610f38565b8591505b6000610f46888785886116b2565b90504781600954610f579190611e72565b1115610fcb5760405162461bcd60e51b815260206004820152602e60248201527f556e61626c6520746f20616363657074206265742064756520746f20696e737560448201527f6666696369656e742066756e647300000000000000000000000000000000000060648201526084016105cf565b6000610fd56117e4565b90508160096000828254610fe99190611e72565b9091555050601054600082815260116020908152604080832084905592825260128152908290204290558151610180810183528b815260ff808b16928201929092529086169181019190915264ffffffffff841660608201526080810161104e6117fb565b81526001600160a01b0380881660208084019190915260006040808501829052606080860183905260808087018a905260a08088018590528e151560c0808a019190915260e09889018b905260108054875260138852958590208a518155968a0151600188018054968c0151958c015164ffffffffff16620100000266ffffffffff00001960ff97881661010090810261ffff19909a169890941697909717979097179590951695909517909355908801516002860155870151600385018054928901511515600160a01b027fffffffffffffffffffffff000000000000000000000000000000000000000000909316919096161717909355928401516004820155908301516005820155610120830151600682015561014083015160078201805491151560ff199290921691909117905561016090920151600890920191909155546111a29086908b908a88888c611885565b6001601060008282546111b59190611e72565b909155505060018055506111c99350505050565b50505050565b6000546001600160a01b0316331461073d5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105cf565b600082815260116020908152604080832054808452601390925290912060038101546001600160a01b031661125d57600080fd5b600281015460008381526012602052604090205461127d81610e10611e72565b42106112cb5760405162461bcd60e51b815260206004820152601660248201527f736574746c654265742068617320657870697265642e0000000000000000000060448201526064016105cf565b816112d46117fb565b116113215760405162461bcd60e51b815260206004820152601960248201527f736574746c65426574206265666f726520706c6163654265740000000000000060448201526064016105cf565b611345838660008151811061133857611338612135565b60200260200101516118f5565b50505060009283526011602090815260408085208590559184526012905282209190915550565b600080546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600260015414156114275760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016105cf565b6002600155565b60006114398261073f565b90506114458184611e72565b341015611492576114568184611e72565b6040517fde9b74a100000000000000000000000000000000000000000000000000000000815260048101919091523460248201526044016105cf565b6114ae61149f8483611e72565b6114a99034612021565b611aea565b505050565b80600214806114c25750806006145b806114cd5750806024145b806114d85750806025145b806114e35750806064145b61152f5760405162461bcd60e51b815260206004820152601d60248201527f4d6f64756c6f2073686f756c642062652076616c69642076616c75652e00000060448201526064016105cf565b600654831015801561154357506007548311155b6115b55760405162461bcd60e51b815260206004820152602260248201527f42657420616d6f756e742073686f756c642062652077697468696e2072616e6760448201527f652e00000000000000000000000000000000000000000000000000000000000060648201526084016105cf565b60288111611623576000821180156115d757506115d46028600261222f565b82105b6116235760405162461bcd60e51b815260206004820152601c60248201527f4d61736b2073686f756c642062652077697468696e2072616e67652e0000000060448201526064016105cf565b60648114156114ae57600a5482101580156116405750600b548211155b6114ae5760405162461bcd60e51b815260206004820152602f60248201527f48696768206d6f64756c6f2072616e67652c204d61736b2073686f756c64206260448201527f652077697468696e2072616e67652e000000000000000000000000000000000060648201526084016105cf565b60008260001080156116c45750838311155b6117105760405162461bcd60e51b815260206004820152601d60248201527f57696e2070726f626162696c697479206f7574206f662072616e67652e00000060448201526064016105cf565b6000606461171d87611b74565b61172687611b97565b63ffffffff166117369190611e72565b6117409088612051565b61174a9190612086565b90508360648614801561175a5750835b1561177957600161176c866064612021565b6117769190612021565b90505b8086611785848a612021565b61178f9190612051565b6117999190612086565b92506117aa64e8d4a5100084612086565b6117b99064e8d4a51000612051565b92506000600854886117cb9190611e72565b9050808411156117d9578093505b505050949350505050565b60006117f6620f424060036001611bbe565b905090565b60004661a4b1811480611810575062066eed81145b1561187e5760646001600160a01b031663a3b1b31d6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611854573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906118789190612038565b91505090565b4391505090565b6040805187815260ff858116602083015264ffffffffff85169282019290925282151560608201529085169086906001600160a01b038a16907fa3fb4d19da73425c3952f0e9548a94e66794d58e3fb04ebcb3adeeb433bab77e906080015b60405180910390a450505050505050565b8154806119445760405162461bcd60e51b815260206004820152601360248201527f42657420646f6573206e6f742065786973742e0000000000000000000000000060448201526064016105cf565b6003830154600160a01b900460ff16156119a05760405162461bcd60e51b815260206004820152601660248201527f42657420697320736574746c656420616c72656164790000000000000000000060448201526064016105cf565b600183015460038401546007850154604080516020808201889052825180830382018152918301909252805191012060ff8085169461010090048116936001600160a01b031692169060006119f58683612121565b60058a0154909150600060288811611a325760018b015462010000900464ffffffffff16611a2484600261222f565b1615611a2d5750805b611a52565b8415611a475786831115611a2d575080611a52565b86831015611a525750805b8160096000828254611a649190612021565b909155505060038b01805460ff60a01b1916600160a01b17905560058b0181905560068b018a905560048b018390558015611ad45760058b01546040516001600160a01b0388169180156108fc02916000818181858888f19350505050158015611ad2573d6000803e3d6000fd5b505b611add8b611db8565b5050505050505050505050565b80611af25750565b604051600090339083908381818185875af1925050503d8060008114611b34576040519150601f19603f3d011682016040523d82523d6000602084013e611b39565b606091505b5050905080610727576040517ff0c49d4400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600060055460045483611b879190612086565b611b919190612051565b92915050565b63ffffffff8082166000908152601460205260409020541680611bb95750600f545b919050565b6040517f4306d35400000000000000000000000000000000000000000000000000000000815263ffffffff841660048201526000906001600160a01b037f000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca811691634000aea0917f0000000000000000000000005a861794b927983406fce1d062e00b9368d97df69190821690634306d35490602401602060405180830381865afa158015611c71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611c959190612038565b6040805163ffffffff808b16602083015261ffff8a169282019290925290871660608201526080016040516020818303038152906040526040518463ffffffff1660e01b8152600401611cea9392919061223b565b6020604051808303816000875af1158015611d09573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611d2d919061209a565b507f0000000000000000000000005a861794b927983406fce1d062e00b9368d97df66001600160a01b031663fc2a88c36040518163ffffffff1660e01b8152600401602060405180830381865afa158015611d8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db09190612038565b949350505050565b80546004820154600583015460018401546003850154600886015460009081526011602090815260409182902054825188815260ff6101008704811693820184905264ffffffffff62010000880416948201949094526060810188905260808101879052929094169390926001600160a01b03169184919083907f3823dc9bbda5a1f18c6c6d138a07bc99eba1fbc83dc9f64d290bd4bf518d2ff19060a0016118e4565b634e487b7160e01b600052601160045260246000fd5b60008219821115611e8557611e85611e5c565b500190565b600060208284031215611e9c57600080fd5b5035919050565b634e487b7160e01b600052604160045260246000fd5b60008060408385031215611ecc57600080fd5b8235915060208084013567ffffffffffffffff80821115611eec57600080fd5b818601915086601f830112611f0057600080fd5b813581811115611f1257611f12611ea3565b8060051b604051601f19603f83011681018181108582111715611f3757611f37611ea3565b604052918252848201925083810185019189831115611f5557600080fd5b938501935b82851015611f7357843584529385019392850192611f5a565b8096505050505050509250929050565b600060208284031215611f9557600080fd5b813563ffffffff8116811461081657600080fd5b600060208284031215611fbb57600080fd5b81356001600160a01b038116811461081657600080fd5b801515811461098957600080fd5b60008060008060808587031215611ff657600080fd5b843593506020850135925060408501359150606085013561201681611fd2565b939692955090935050565b60008282101561203357612033611e5c565b500390565b60006020828403121561204a57600080fd5b5051919050565b600081600019048311821515161561206b5761206b611e5c565b500290565b634e487b7160e01b600052601260045260246000fd5b60008261209557612095612070565b500490565b6000602082840312156120ac57600080fd5b815161081681611fd2565b805169ffffffffffffffffffff81168114611bb957600080fd5b600080600080600060a086880312156120e957600080fd5b6120f2866120b7565b9450602086015193506040860151925060608601519150612115608087016120b7565b90509295509295909350565b60008261213057612130612070565b500690565b634e487b7160e01b600052603260045260246000fd5b600181815b8085111561218657816000190482111561216c5761216c611e5c565b8085161561217957918102915b93841c9390800290612150565b509250929050565b60008261219d57506001611b91565b816121aa57506000611b91565b81600181146121c057600281146121ca576121e6565b6001915050611b91565b60ff8411156121db576121db611e5c565b50506001821b611b91565b5060208310610133831016604e8410600b8410161715612209575081810a611b91565b612213838361214b565b806000190482111561222757612227611e5c565b029392505050565b6000610816838361218e565b6001600160a01b038416815260006020848184015260606040840152835180606085015260005b8181101561227e57858101830151858201608001528201612262565b81811115612290576000608083870101525b50601f01601f1916929092016080019594505050505056fea2646970667358221220ede169dcc4bd325b28a7caf4a4b101b79c1b69de0be21c09fc7a572ab2a1b59f64736f6c634300080a0033

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

000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca0000000000000000000000005a861794b927983406fce1d062e00b9368d97df6000000000000000000000000dc530d9457755926550b59e8eccdae76241815570000000000000000000000000000000000000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _linkAddress (address): 0x514910771AF9Ca656af840dff83E8264EcF986CA
Arg [1] : _vrfV2Wrapper (address): 0x5A861794B927983406fCE1D062e00b9368d97Df6
Arg [2] : _dataFeed (address): 0xDC530D9457755926550b59e8ECcdaE7624181557
Arg [3] : _sequencerUptimeFeed (address): 0x0000000000000000000000000000000000000000

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000514910771af9ca656af840dff83e8264ecf986ca
Arg [1] : 0000000000000000000000005a861794b927983406fce1d062e00b9368d97df6
Arg [2] : 000000000000000000000000dc530d9457755926550b59e8eccdae7624181557
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000


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  ]

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.