ETH Price: $1,972.62 (+0.55%)
 

Overview

ETH Balance

0 ETH

Eth Value

$0.00

Token Holdings

More Info

Private Name Tags

Multichain Info

No addresses found
Transaction Hash
Method
Block
From
To
Collect Revenue ...152732462022-08-04 2:35:381298 days ago1659580538IN
the888888
0 ETH0.0018790219.5629931
Collect Revenue ...152402082022-07-29 23:02:341303 days ago1659135754IN
the888888
0 ETH0.0002604810
Collect Fees152400492022-07-29 22:23:281303 days ago1659133408IN
the888888
0 ETH0.0005213611
Collect Revenue ...151095512022-07-09 16:42:241323 days ago1657384944IN
the888888
0 ETH0.0009237311.70024172
Collect Revenue ...150727752022-07-04 0:17:381329 days ago1656893858IN
the888888
0 ETH0.0013379813.93006666
Collect Fees149926742022-06-19 20:20:251343 days ago1655670025IN
the888888
0 ETH0.0017590537.11318
Collect Revenue ...149872862022-06-18 21:50:481344 days ago1655589048IN
the888888
0 ETH0.0042729354.1220006
Collect Revenue ...149344182022-06-09 19:58:501353 days ago1654804730IN
the888888
0 ETH0.007299876
Collect Revenue ...149292332022-06-08 22:42:091354 days ago1654728129IN
the888888
0 ETH0.0064012866.6453153
Collect Revenue ...148884632022-06-02 2:42:451361 days ago1654137765IN
the888888
0 ETH0.006175164.29051468
Collect Revenue ...148705112022-05-30 4:23:011363 days ago1653884581IN
the888888
0 ETH0.0021518822.40382499
Collect Revenue ...148511692022-05-27 1:01:111367 days ago1653613271IN
the888888
0 ETH0.0049524551.56121273
Collect Revenue ...148489322022-05-26 16:12:301367 days ago1653581550IN
the888888
0 ETH0.0054397756.63483683
Collect Revenue ...148302512022-05-23 15:01:381370 days ago1653318098IN
the888888
0 ETH0.001483718.79294713
Collect Revenue ...148273792022-05-23 4:04:421371 days ago1653278682IN
the888888
0 ETH0.003271634.06145771
Collect Revenue ...148176862022-05-21 14:06:311372 days ago1653141991IN
the888888
0 ETH0.001938220.17914808
Collect Revenue ...148176542022-05-21 13:58:401372 days ago1653141520IN
the888888
0 ETH0.0017333118.04599113
Collect Revenue ...148168382022-05-21 10:54:591372 days ago1653130499IN
the888888
0 ETH0.0009611512.17418559
Collect Revenue ...148153582022-05-21 5:01:281372 days ago1653109288IN
the888888
0 ETH0.0016215216.88205415
Collect Revenue ...148128882022-05-20 19:26:561373 days ago1653074816IN
the888888
0 ETH0.0041441643.14594509
Collect Revenue ...148115622022-05-20 14:11:431373 days ago1653055903IN
the888888
0 ETH0.0035542845.01944284
Collect Revenue ...148115252022-05-20 14:02:401373 days ago1653055360IN
the888888
0 ETH0.0055410257.6889381
Collect Revenue ...148115122022-05-20 13:58:561373 days ago1653055136IN
the888888
0 ETH0.0033563642.5125745
Collect Revenue ...148114802022-05-20 13:50:101373 days ago1653054610IN
the888888
0 ETH0.0039978241.62232979
Collect Revenue ...148114792022-05-20 13:50:061373 days ago1653054606IN
the888888
0 ETH0.0038732840.32568716
View all transactions

View more zero value Internal Transactions in Advanced View mode

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

Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

Validator Index Block Amount
View All Withdrawals

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

Contract Source Code Verified (Exact Match)

Contract Name:
Random

Compiler Version
v0.8.7+commit.e28d00a7

Optimization Enabled:
No with 200 runs

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

/**
*
        :'#######:::'#######:::'#######:::'#######:::'#######:::'#######::
        '##.... ##:'##.... ##:'##.... ##:'##.... ##:'##.... ##:'##.... ##:
        ##:::: ##: ##:::: ##: ##:::: ##: ##:::: ##: ##:::: ##: ##:::: ##:
        : #######::: #######::: #######::: #######::: #######::: #######::
        '##.... ##:'##.... ##:'##.... ##:'##.... ##:'##.... ##:'##.... ##:
        ##:::: ##: ##:::: ##: ##:::: ##: ##:::: ##: ##:::: ##: ##:::: ##:
        . #######::. #######::. #######::. #######::. #######::. #######::
        :.......::::.......::::.......::::.......::::.......::::.......:::  

                              A game of chance
*/
import "@chainlink/contracts/src/v0.8/interfaces/LinkTokenInterface.sol";
import "@chainlink/contracts/src/v0.8/interfaces/VRFCoordinatorV2Interface.sol";
import "@chainlink/contracts/src/v0.8/VRFConsumerBaseV2.sol";

import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";

contract Random is VRFConsumerBaseV2 {

  using SafeERC20 for ERC20;

  VRFCoordinatorV2Interface public COORDINATOR;
  LinkTokenInterface public LINKTOKEN;

  // Your subscription ID.
  uint64 s_subscriptionId;

  // WETH address
  ERC20 public weth;

  // Duration that game lasts
  uint public gameDuration;

  // Time when game starts - after bootstrap
  uint public startTime;

  // Cost per dice roll
  uint public ticketSize = 88 * 10 ** 15; // 0.088

  // Percentage precision
  uint public percentagePrecision = 10 ** 2;

  // Fees earmarked for VRF requests
  uint public linkFeePercent = 20 * percentagePrecision;

  // Fees for the house
  uint public houseFeePercent = 5 * percentagePrecision; // 5%

  // Fee % (10**2 precision)
  uint public feePercentage = linkFeePercent + houseFeePercent; // 25%

  // Revenue split % (10**2 precision) - all depositors with a roll above 600k get a revenue split 
  uint public revenueSplitPercentage = 20 * percentagePrecision; // 20%

  // Threshold roll above which rollers get revenue split
  uint public revenueSplitRollThreshold = 60 * 10 ** 4; // 600k

  // Total revenue collected from all dice rolls
  uint public revenue;

  // Total revenue split shares for rolls above revenue split threshold
  uint public totalRevenueSplitShares;

  // Maps users to amount earned via revenue splits shares
  mapping(address => uint) public revenueSplitSharesPerUser;

  // Tracks revenue split collected per user
  mapping (address => uint) public revenueSplitCollectedPerUser;

  // Total fees collected from all dice rolls
  uint public feesCollected;

  // Winnings distributed at bootstrap
  uint public bootstrapWinnings;

  // Toggled to true to begin the game
  bool public isBootstrapped;

  // Roll with number closest to winning number
  DiceRoll public currentWinner;

  // Winning roll
  DiceRoll public winner;

  // Number to win
  uint public winningNumber = 888888;

  // Maps request IDs to addresses that rolled dice
  mapping (uint => address) public rollRequests;

  // Tracks number of rolls - used as auto-incrementing roll ID
  uint public rollCount;

  // Store dice rolls by roll ID here
  mapping (uint => DiceRoll) public diceRolls;

  address public vrfCoordinator;

  address public link = 0x514910771AF9Ca656af840dff83E8264EcF986CA;
  // 200 gwei
  bytes32 public keyHash = 0x8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef;
  
  uint32 public callbackGasLimit = 1000000;

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

  // Toggled to true if single rolls are enabled
  bool public isSingleRollEnabled = false;

  // Contract owner
  address owner;

  struct DiceRoll {
    // Random number on roll
    uint roll;
    // Address of roller
    address roller;
  }

  event LogNewRollRequest(uint requestId, address indexed roller);
  event LogOnRollResult(uint requestId, uint rollId, uint roll, address indexed roller);
  event LogNewCurrentWinner(uint requestId, uint rollId, uint roll, address indexed roller);
  event LogDiscardedRollResult(uint requestId, uint rollId, address indexed roller);
  event LogGameOver(address indexed winner, uint winnings); 
  event LogOnCollectRevenueSplit(address indexed user, uint split);
  event LogAddToRevenue(uint amount);
  event LogToggleEnableSingleRoll(bool enabled);

  constructor(
    uint64 subscriptionId,
    address _weth,
    address _vrfCoordinator,
    uint _gameDuration
  ) VRFConsumerBaseV2(_vrfCoordinator) {
    COORDINATOR = VRFCoordinatorV2Interface(_vrfCoordinator);
    LINKTOKEN = LinkTokenInterface(link);
    owner = msg.sender;
    s_subscriptionId = subscriptionId;
    vrfCoordinator = _vrfCoordinator;
    weth = ERC20(_weth);
    gameDuration = _gameDuration;
  }

  // Set a new coordinator address
  function setCoordinator(address _coordinator) 
  public
  onlyOwner 
  returns (bool) {
    require(!isBootstrapped, "Contract is already bootstrapped");
    vrfCoordinator = _coordinator;
    COORDINATOR = VRFCoordinatorV2Interface(vrfCoordinator);
    return true;
  }

  // Called initially to bootstrap the game
  function bootstrap(
    uint _bootstrapWinnings
  )
  public
  onlyOwner
  returns (bool) {
    require(!isBootstrapped, "Game already bootstrapped");
    bootstrapWinnings = _bootstrapWinnings;
    revenue += _bootstrapWinnings;
    isBootstrapped = true;
    startTime = block.timestamp;
    weth.safeTransferFrom(msg.sender, address(this), _bootstrapWinnings);
    return true;
  }

  // Allows owner to collect fees
  function collectFees() 
  public
  returns (bool) {
    uint fees = getFees();
    feesCollected += fees;
    weth.safeTransfer(owner, fees);
    return true;
  }

  // Process random words from chainlink VRF2
  function fulfillRandomWords(
    uint256 requestId, /* requestId */
    uint256[] memory randomWords
  ) internal override {
    for (uint i = 0; i < randomWords.length; i++) {
      diceRolls[++rollCount].roll = getFormattedNumber(randomWords[i]);
      diceRolls[rollCount].roller = rollRequests[requestId];

      // If the game was over between rolls - don't perform any of the below logic
      if (!isGameOver()) {
        if (diceRolls[rollCount].roll == winningNumber) {
          // User wins
          winner = diceRolls[rollCount];
          // Transfer revenue to winner
          collectFees();
          uint revenueSplit = getRevenueSplit();
          uint winnings = revenue - feesCollected - revenueSplit;
          weth.safeTransfer(winner.roller, winnings);
          emit LogGameOver(winner.roller, winnings);
        } else if (diceRolls[rollCount].roll >= revenueSplitRollThreshold) {
          totalRevenueSplitShares += 1;
          revenueSplitSharesPerUser[diceRolls[rollCount].roller] += 1;
        }

        if (diceRolls[rollCount].roll != winningNumber) {
          int diff = getDiff(diceRolls[rollCount].roll, winningNumber);
          int currentWinnerDiff = getDiff(currentWinner.roll, winningNumber);

          if (diff <= currentWinnerDiff)  {
            currentWinner = diceRolls[rollCount];
            emit LogNewCurrentWinner(requestId, rollCount, diceRolls[rollCount].roll, diceRolls[rollCount].roller);
          }
        }
      } else
        emit LogDiscardedRollResult(requestId, rollCount, diceRolls[rollCount].roller);

      emit LogOnRollResult(requestId, rollCount, diceRolls[rollCount].roll, diceRolls[rollCount].roller);
    }
  }

  // Returns difference between 2 dice rolls
  function getDiff(uint a, uint b) private pure returns (int) {
    unchecked {
      int x = int(a-b);
      return x >= 0 ? x : -x;
    }
  }

  // Ends a game that is past it's duration without a winner
  function endGame()
  public
  returns (bool) {
    require(
      hasGameDurationElapsed() && winner.roller == address(0), 
      "Game duration hasn't elapsed without a winner"
    );
    winner = currentWinner;
    // Transfer revenue to winner
    collectFees();
    uint revenueSplit = getRevenueSplit();
    uint winnings = revenue - feesCollected - revenueSplit;
    weth.safeTransfer(winner.roller, winnings);
    emit LogGameOver(winner.roller, winnings);
    return true;
  }

  // Allows users to collect their share of revenue split after a game is over  
  function collectRevenueSplit() external {
    require(isGameOver(), "Game isn't over");
    require(revenueSplitSharesPerUser[msg.sender] > 0, "User does not have any revenue split shares");
    require(revenueSplitCollectedPerUser[msg.sender] == 0, "User has already collected revenue split");
    uint revenueSplit = getRevenueSplit();
    uint userRevenueSplit = revenueSplit * revenueSplitSharesPerUser[msg.sender] / totalRevenueSplitShares; 
    revenueSplitCollectedPerUser[msg.sender] = userRevenueSplit;
    weth.safeTransfer(msg.sender, userRevenueSplit);
    emit LogOnCollectRevenueSplit(msg.sender, userRevenueSplit);
  }

  // Roll dice once
  function rollDice() external {
    require(isSingleRollEnabled, "Single rolls are not currently enabled");
    require(isBootstrapped, "Game is not bootstrapped");
    require(!isGameOver(), "Game is over");
    revenue += ticketSize;
    weth.safeTransferFrom(msg.sender, address(this), ticketSize);
    
    // Will revert if subscription is not set and funded.
    uint requestId = COORDINATOR.requestRandomWords(
      keyHash,
      s_subscriptionId,
      requestConfirmations,
      callbackGasLimit,
      1
    );
    rollRequests[requestId] = msg.sender;

    emit LogNewRollRequest(requestId, msg.sender);
  }

  // Approve WETH once and roll multiple times
  function rollMultipleDice(uint32 times) external {
    require(isBootstrapped, "Game is not bootstrapped");
    require(!isGameOver(), "Game is over");
    require(times > 1 && times <= 5, "Should be >=1 and <=5 rolls in 1 txn");
    uint total = ticketSize * times;
    revenue += total;
    weth.safeTransferFrom(msg.sender, address(this), total);
    
    // Will revert if subscription is not set and funded.
    uint requestId = COORDINATOR.requestRandomWords(
      keyHash,
      s_subscriptionId,
      requestConfirmations,
      callbackGasLimit,
      times
    );
    rollRequests[requestId] = msg.sender;
    emit LogNewRollRequest(requestId, msg.sender);
  }

  // Returns current available fees
  function getFees()
  public
  view
  returns (uint) {
    return ((revenue * feePercentage) / (100 * percentagePrecision)) - feesCollected;
  }

  // Returns revenue split for rollers above 600k
  function getRevenueSplit()
  public
  view
  returns (uint) {
    return ((revenue * revenueSplitPercentage) / (100 * percentagePrecision));
  }

  // Format number to 0 - 10 ** 6 range
  function getFormattedNumber(
    uint number
  )
  public
  pure
  returns (uint) {
    return number % 1000000 + 1;
  }

  // Returns whether the game is still running
  function isGameOver()
  public
  view
  returns (bool) {
    return winner.roller != address(0) || hasGameDurationElapsed();
  }

  // Returns whether the game duration has ended
  function hasGameDurationElapsed()
  public
  view
  returns (bool) {
    return block.timestamp > startTime + gameDuration;
  }

  function updateCallbackGasLimit(uint32 limit)
  public
  onlyOwner returns (bool) {
    require(limit >= 500000, "Limit must be >=500000");
    callbackGasLimit = limit;
    return true;
  }

  // Allows owner to add revenue to the pot
  function addToRevenue(uint amount)
  public
  onlyOwner returns (bool) {
    revenue += amount;
    weth.safeTransferFrom(msg.sender, address(this), amount);
    emit LogAddToRevenue(amount);
    return true;
  }

  // Toggle enable single roll
  function toggleEnableSingleRoll(bool enabled)
  public
  onlyOwner
  returns (bool) {
    isSingleRollEnabled = enabled;
    emit LogToggleEnableSingleRoll(enabled);
    return true;
  }

  modifier onlyOwner() {
    require(msg.sender == owner);
    _;
  }
}

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

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

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

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

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

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

  function increaseApproval(address spender, uint256 subtractedValue) external;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

pragma solidity ^0.8.0;

import "../IERC20.sol";
import "../../../utils/Address.sol";

/**
 * @title SafeERC20
 * @dev Wrappers around ERC20 operations that throw on failure (when the token
 * contract returns false). Tokens that return no value (and instead revert or
 * throw on failure) are also supported, non-reverting calls are assumed to be
 * successful.
 * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
 * which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
 */
library SafeERC20 {
    using Address for address;

    function safeTransfer(
        IERC20 token,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
    }

    function safeTransferFrom(
        IERC20 token,
        address from,
        address to,
        uint256 value
    ) internal {
        _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
    }

    /**
     * @dev Deprecated. This function has issues similar to the ones found in
     * {IERC20-approve}, and its usage is discouraged.
     *
     * Whenever possible, use {safeIncreaseAllowance} and
     * {safeDecreaseAllowance} instead.
     */
    function safeApprove(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        // safeApprove should only be called when setting an initial allowance,
        // or when resetting it to zero. To increase and decrease it, use
        // 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
        require(
            (value == 0) || (token.allowance(address(this), spender) == 0),
            "SafeERC20: approve from non-zero to non-zero allowance"
        );
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
    }

    function safeIncreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        uint256 newAllowance = token.allowance(address(this), spender) + value;
        _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
    }

    function safeDecreaseAllowance(
        IERC20 token,
        address spender,
        uint256 value
    ) internal {
        unchecked {
            uint256 oldAllowance = token.allowance(address(this), spender);
            require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
            uint256 newAllowance = oldAllowance - value;
            _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
        }
    }

    /**
     * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
     * on the return value: the return value is optional (but if data is returned, it must not be false).
     * @param token The token targeted by the call.
     * @param data The call data (encoded using abi.encode or one of its variants).
     */
    function _callOptionalReturn(IERC20 token, bytes memory data) private {
        // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
        // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
        // the target address contains contract code and also asserts for success in the low-level call.

        bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
        if (returndata.length > 0) {
            // Return data is optional
            require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol)

pragma solidity ^0.8.0;

import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";

/**
 * @dev Implementation of the {IERC20} interface.
 *
 * This implementation is agnostic to the way tokens are created. This means
 * that a supply mechanism has to be added in a derived contract using {_mint}.
 * For a generic mechanism see {ERC20PresetMinterPauser}.
 *
 * TIP: For a detailed writeup see our guide
 * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
 * to implement supply mechanisms].
 *
 * We have followed general OpenZeppelin Contracts guidelines: functions revert
 * instead returning `false` on failure. This behavior is nonetheless
 * conventional and does not conflict with the expectations of ERC20
 * applications.
 *
 * Additionally, an {Approval} event is emitted on calls to {transferFrom}.
 * This allows applications to reconstruct the allowance for all accounts just
 * by listening to said events. Other implementations of the EIP may not emit
 * these events, as it isn't required by the specification.
 *
 * Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
 * functions have been added to mitigate the well-known issues around setting
 * allowances. See {IERC20-approve}.
 */
contract ERC20 is Context, IERC20, IERC20Metadata {
    mapping(address => uint256) private _balances;

    mapping(address => mapping(address => uint256)) private _allowances;

    uint256 private _totalSupply;

    string private _name;
    string private _symbol;

    /**
     * @dev Sets the values for {name} and {symbol}.
     *
     * The default value of {decimals} is 18. To select a different value for
     * {decimals} you should overload it.
     *
     * All two of these values are immutable: they can only be set once during
     * construction.
     */
    constructor(string memory name_, string memory symbol_) {
        _name = name_;
        _symbol = symbol_;
    }

    /**
     * @dev Returns the name of the token.
     */
    function name() public view virtual override returns (string memory) {
        return _name;
    }

    /**
     * @dev Returns the symbol of the token, usually a shorter version of the
     * name.
     */
    function symbol() public view virtual override returns (string memory) {
        return _symbol;
    }

    /**
     * @dev Returns the number of decimals used to get its user representation.
     * For example, if `decimals` equals `2`, a balance of `505` tokens should
     * be displayed to a user as `5.05` (`505 / 10 ** 2`).
     *
     * Tokens usually opt for a value of 18, imitating the relationship between
     * Ether and Wei. This is the value {ERC20} uses, unless this function is
     * overridden;
     *
     * NOTE: This information is only used for _display_ purposes: it in
     * no way affects any of the arithmetic of the contract, including
     * {IERC20-balanceOf} and {IERC20-transfer}.
     */
    function decimals() public view virtual override returns (uint8) {
        return 18;
    }

    /**
     * @dev See {IERC20-totalSupply}.
     */
    function totalSupply() public view virtual override returns (uint256) {
        return _totalSupply;
    }

    /**
     * @dev See {IERC20-balanceOf}.
     */
    function balanceOf(address account) public view virtual override returns (uint256) {
        return _balances[account];
    }

    /**
     * @dev See {IERC20-transfer}.
     *
     * Requirements:
     *
     * - `to` cannot be the zero address.
     * - the caller must have a balance of at least `amount`.
     */
    function transfer(address to, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _transfer(owner, to, amount);
        return true;
    }

    /**
     * @dev See {IERC20-allowance}.
     */
    function allowance(address owner, address spender) public view virtual override returns (uint256) {
        return _allowances[owner][spender];
    }

    /**
     * @dev See {IERC20-approve}.
     *
     * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
     * `transferFrom`. This is semantically equivalent to an infinite approval.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function approve(address spender, uint256 amount) public virtual override returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, amount);
        return true;
    }

    /**
     * @dev See {IERC20-transferFrom}.
     *
     * Emits an {Approval} event indicating the updated allowance. This is not
     * required by the EIP. See the note at the beginning of {ERC20}.
     *
     * NOTE: Does not update the allowance if the current allowance
     * is the maximum `uint256`.
     *
     * Requirements:
     *
     * - `from` and `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     * - the caller must have allowance for ``from``'s tokens of at least
     * `amount`.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) public virtual override returns (bool) {
        address spender = _msgSender();
        _spendAllowance(from, spender, amount);
        _transfer(from, to, amount);
        return true;
    }

    /**
     * @dev Atomically increases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     */
    function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
        address owner = _msgSender();
        _approve(owner, spender, _allowances[owner][spender] + addedValue);
        return true;
    }

    /**
     * @dev Atomically decreases the allowance granted to `spender` by the caller.
     *
     * This is an alternative to {approve} that can be used as a mitigation for
     * problems described in {IERC20-approve}.
     *
     * Emits an {Approval} event indicating the updated allowance.
     *
     * Requirements:
     *
     * - `spender` cannot be the zero address.
     * - `spender` must have allowance for the caller of at least
     * `subtractedValue`.
     */
    function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
        address owner = _msgSender();
        uint256 currentAllowance = _allowances[owner][spender];
        require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
        unchecked {
            _approve(owner, spender, currentAllowance - subtractedValue);
        }

        return true;
    }

    /**
     * @dev Moves `amount` of tokens from `sender` to `recipient`.
     *
     * This internal function is equivalent to {transfer}, and can be used to
     * e.g. implement automatic token fees, slashing mechanisms, etc.
     *
     * Emits a {Transfer} event.
     *
     * Requirements:
     *
     * - `from` cannot be the zero address.
     * - `to` cannot be the zero address.
     * - `from` must have a balance of at least `amount`.
     */
    function _transfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {
        require(from != address(0), "ERC20: transfer from the zero address");
        require(to != address(0), "ERC20: transfer to the zero address");

        _beforeTokenTransfer(from, to, amount);

        uint256 fromBalance = _balances[from];
        require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
        unchecked {
            _balances[from] = fromBalance - amount;
        }
        _balances[to] += amount;

        emit Transfer(from, to, amount);

        _afterTokenTransfer(from, to, amount);
    }

    /** @dev Creates `amount` tokens and assigns them to `account`, increasing
     * the total supply.
     *
     * Emits a {Transfer} event with `from` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     */
    function _mint(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: mint to the zero address");

        _beforeTokenTransfer(address(0), account, amount);

        _totalSupply += amount;
        _balances[account] += amount;
        emit Transfer(address(0), account, amount);

        _afterTokenTransfer(address(0), account, amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
        }
        _totalSupply -= amount;

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }

    /**
     * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
     *
     * This internal function is equivalent to `approve`, and can be used to
     * e.g. set automatic allowances for certain subsystems, etc.
     *
     * Emits an {Approval} event.
     *
     * Requirements:
     *
     * - `owner` cannot be the zero address.
     * - `spender` cannot be the zero address.
     */
    function _approve(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        require(owner != address(0), "ERC20: approve from the zero address");
        require(spender != address(0), "ERC20: approve to the zero address");

        _allowances[owner][spender] = amount;
        emit Approval(owner, spender, amount);
    }

    /**
     * @dev Spend `amount` form the allowance of `owner` toward `spender`.
     *
     * Does not update the allowance amount in case of infinite allowance.
     * Revert if not enough allowance is available.
     *
     * Might emit an {Approval} event.
     */
    function _spendAllowance(
        address owner,
        address spender,
        uint256 amount
    ) internal virtual {
        uint256 currentAllowance = allowance(owner, spender);
        if (currentAllowance != type(uint256).max) {
            require(currentAllowance >= amount, "ERC20: insufficient allowance");
            unchecked {
                _approve(owner, spender, currentAllowance - amount);
            }
        }
    }

    /**
     * @dev Hook that is called before any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * will be transferred to `to`.
     * - when `from` is zero, `amount` tokens will be minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens will be burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _beforeTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}

    /**
     * @dev Hook that is called after any transfer of tokens. This includes
     * minting and burning.
     *
     * Calling conditions:
     *
     * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
     * has been transferred to `to`.
     * - when `from` is zero, `amount` tokens have been minted for `to`.
     * - when `to` is zero, `amount` of ``from``'s tokens have been burned.
     * - `from` and `to` are never both zero.
     *
     * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
     */
    function _afterTokenTransfer(
        address from,
        address to,
        uint256 amount
    ) internal virtual {}
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)

pragma solidity ^0.8.0;

/**
 * @dev Interface of the ERC20 standard as defined in the EIP.
 */
interface IERC20 {
    /**
     * @dev Returns the amount of tokens in existence.
     */
    function totalSupply() external view returns (uint256);

    /**
     * @dev Returns the amount of tokens owned by `account`.
     */
    function balanceOf(address account) external view returns (uint256);

    /**
     * @dev Moves `amount` tokens from the caller's account to `to`.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transfer(address to, uint256 amount) external returns (bool);

    /**
     * @dev Returns the remaining number of tokens that `spender` will be
     * allowed to spend on behalf of `owner` through {transferFrom}. This is
     * zero by default.
     *
     * This value changes when {approve} or {transferFrom} are called.
     */
    function allowance(address owner, address spender) external view returns (uint256);

    /**
     * @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * IMPORTANT: Beware that changing an allowance with this method brings the risk
     * that someone may use both the old and the new allowance by unfortunate
     * transaction ordering. One possible solution to mitigate this race
     * condition is to first reduce the spender's allowance to 0 and set the
     * desired value afterwards:
     * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
     *
     * Emits an {Approval} event.
     */
    function approve(address spender, uint256 amount) external returns (bool);

    /**
     * @dev Moves `amount` tokens from `from` to `to` using the
     * allowance mechanism. `amount` is then deducted from the caller's
     * allowance.
     *
     * Returns a boolean value indicating whether the operation succeeded.
     *
     * Emits a {Transfer} event.
     */
    function transferFrom(
        address from,
        address to,
        uint256 amount
    ) external returns (bool);

    /**
     * @dev Emitted when `value` tokens are moved from one account (`from`) to
     * another (`to`).
     *
     * Note that `value` may be zero.
     */
    event Transfer(address indexed from, address indexed to, uint256 value);

    /**
     * @dev Emitted when the allowance of a `spender` for an `owner` is set by
     * a call to {approve}. `value` is the new allowance.
     */
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)

pragma solidity ^0.8.1;

/**
 * @dev Collection of functions related to the address type
 */
library Address {
    /**
     * @dev Returns true if `account` is a contract.
     *
     * [IMPORTANT]
     * ====
     * It is unsafe to assume that an address for which this function returns
     * false is an externally-owned account (EOA) and not a contract.
     *
     * Among others, `isContract` will return false for the following
     * types of addresses:
     *
     *  - an externally-owned account
     *  - a contract in construction
     *  - an address where a contract will be created
     *  - an address where a contract lived, but was destroyed
     * ====
     *
     * [IMPORTANT]
     * ====
     * You shouldn't rely on `isContract` to protect against flash loan attacks!
     *
     * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
     * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
     * constructor.
     * ====
     */
    function isContract(address account) internal view returns (bool) {
        // This method relies on extcodesize/address.code.length, which returns 0
        // for contracts in construction, since the code is only stored at the end
        // of the constructor execution.

        return account.code.length > 0;
    }

    /**
     * @dev Replacement for Solidity's `transfer`: sends `amount` wei to
     * `recipient`, forwarding all available gas and reverting on errors.
     *
     * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
     * of certain opcodes, possibly making contracts go over the 2300 gas limit
     * imposed by `transfer`, making them unable to receive funds via
     * `transfer`. {sendValue} removes this limitation.
     *
     * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
     *
     * IMPORTANT: because control is transferred to `recipient`, care must be
     * taken to not create reentrancy vulnerabilities. Consider using
     * {ReentrancyGuard} or the
     * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
     */
    function sendValue(address payable recipient, uint256 amount) internal {
        require(address(this).balance >= amount, "Address: insufficient balance");

        (bool success, ) = recipient.call{value: amount}("");
        require(success, "Address: unable to send value, recipient may have reverted");
    }

    /**
     * @dev Performs a Solidity function call using a low level `call`. A
     * plain `call` is an unsafe replacement for a function call: use this
     * function instead.
     *
     * If `target` reverts with a revert reason, it is bubbled up by this
     * function (like regular Solidity function calls).
     *
     * Returns the raw returned data. To convert to the expected return value,
     * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
     *
     * Requirements:
     *
     * - `target` must be a contract.
     * - calling `target` with `data` must not revert.
     *
     * _Available since v3.1._
     */
    function functionCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionCall(target, data, "Address: low-level call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
     * `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, 0, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but also transferring `value` wei to `target`.
     *
     * Requirements:
     *
     * - the calling contract must have an ETH balance of at least `value`.
     * - the called Solidity function must be `payable`.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value
    ) internal returns (bytes memory) {
        return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
    }

    /**
     * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
     * with `errorMessage` as a fallback revert reason when `target` reverts.
     *
     * _Available since v3.1._
     */
    function functionCallWithValue(
        address target,
        bytes memory data,
        uint256 value,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(address(this).balance >= value, "Address: insufficient balance for call");
        require(isContract(target), "Address: call to non-contract");

        (bool success, bytes memory returndata) = target.call{value: value}(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
        return functionStaticCall(target, data, "Address: low-level static call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a static call.
     *
     * _Available since v3.3._
     */
    function functionStaticCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal view returns (bytes memory) {
        require(isContract(target), "Address: static call to non-contract");

        (bool success, bytes memory returndata) = target.staticcall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
        return functionDelegateCall(target, data, "Address: low-level delegate call failed");
    }

    /**
     * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
     * but performing a delegate call.
     *
     * _Available since v3.4._
     */
    function functionDelegateCall(
        address target,
        bytes memory data,
        string memory errorMessage
    ) internal returns (bytes memory) {
        require(isContract(target), "Address: delegate call to non-contract");

        (bool success, bytes memory returndata) = target.delegatecall(data);
        return verifyCallResult(success, returndata, errorMessage);
    }

    /**
     * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
     * revert reason using the provided one.
     *
     * _Available since v4.3._
     */
    function verifyCallResult(
        bool success,
        bytes memory returndata,
        string memory errorMessage
    ) internal pure returns (bytes memory) {
        if (success) {
            return returndata;
        } else {
            // Look for revert reason and bubble it up if present
            if (returndata.length > 0) {
                // The easiest way to bubble the revert reason is using memory via assembly

                assembly {
                    let returndata_size := mload(returndata)
                    revert(add(32, returndata), returndata_size)
                }
            } else {
                revert(errorMessage);
            }
        }
    }
}

// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)

pragma solidity ^0.8.0;

import "../IERC20.sol";

/**
 * @dev Interface for the optional metadata functions from the ERC20 standard.
 *
 * _Available since v4.1._
 */
interface IERC20Metadata is IERC20 {
    /**
     * @dev Returns the name of the token.
     */
    function name() external view returns (string memory);

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

    /**
     * @dev Returns the decimals places of the token.
     */
    function decimals() external view returns (uint8);
}

// 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;
    }
}

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

Contract Security Audit

Contract ABI

API
[{"inputs":[{"internalType":"uint64","name":"subscriptionId","type":"uint64"},{"internalType":"address","name":"_weth","type":"address"},{"internalType":"address","name":"_vrfCoordinator","type":"address"},{"internalType":"uint256","name":"_gameDuration","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"have","type":"address"},{"internalType":"address","name":"want","type":"address"}],"name":"OnlyCoordinatorCanFulfill","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"LogAddToRevenue","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rollId","type":"uint256"},{"indexed":true,"internalType":"address","name":"roller","type":"address"}],"name":"LogDiscardedRollResult","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"winner","type":"address"},{"indexed":false,"internalType":"uint256","name":"winnings","type":"uint256"}],"name":"LogGameOver","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rollId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"roll","type":"uint256"},{"indexed":true,"internalType":"address","name":"roller","type":"address"}],"name":"LogNewCurrentWinner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":true,"internalType":"address","name":"roller","type":"address"}],"name":"LogNewRollRequest","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"split","type":"uint256"}],"name":"LogOnCollectRevenueSplit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"requestId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"rollId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"roll","type":"uint256"},{"indexed":true,"internalType":"address","name":"roller","type":"address"}],"name":"LogOnRollResult","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"LogToggleEnableSingleRoll","type":"event"},{"inputs":[],"name":"COORDINATOR","outputs":[{"internalType":"contract VRFCoordinatorV2Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"LINKTOKEN","outputs":[{"internalType":"contract LinkTokenInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"addToRevenue","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_bootstrapWinnings","type":"uint256"}],"name":"bootstrap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"bootstrapWinnings","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"callbackGasLimit","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collectFees","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collectRevenueSplit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentWinner","outputs":[{"internalType":"uint256","name":"roll","type":"uint256"},{"internalType":"address","name":"roller","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"diceRolls","outputs":[{"internalType":"uint256","name":"roll","type":"uint256"},{"internalType":"address","name":"roller","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"endGame","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feesCollected","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"gameDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"number","type":"uint256"}],"name":"getFormattedNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"getRevenueSplit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hasGameDurationElapsed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"houseFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isBootstrapped","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isGameOver","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isSingleRollEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"keyHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"link","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"linkFeePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"percentagePrecision","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"requestId","type":"uint256"},{"internalType":"uint256[]","name":"randomWords","type":"uint256[]"}],"name":"rawFulfillRandomWords","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"requestConfirmations","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"revenue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"revenueSplitCollectedPerUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"revenueSplitPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"revenueSplitRollThreshold","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"revenueSplitSharesPerUser","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rollCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rollDice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"times","type":"uint32"}],"name":"rollMultipleDice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"rollRequests","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_coordinator","type":"address"}],"name":"setCoordinator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ticketSize","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"enabled","type":"bool"}],"name":"toggleEnableSingleRoll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"totalRevenueSplitShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint32","name":"limit","type":"uint32"}],"name":"updateCallbackGasLimit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"vrfCoordinator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"contract ERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"winner","outputs":[{"internalType":"uint256","name":"roll","type":"uint256"},{"internalType":"address","name":"roller","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"winningNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60a0604052670138a388a43c0000600555606460065560065460146200002691906200046d565b60075560065460056200003a91906200046d565b6008556008546007546200004f919062000410565b60095560065460146200006391906200046d565b600a55620927c0600b55620d903860175573514910771af9ca656af840dff83e8264ecf986ca601c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055507f8af398995b04c28e9951adb9721ef74c74f93e6a478f39e7e0777be13527e7ef60001b601d55620f4240601e60006101000a81548163ffffffff021916908363ffffffff1602179055506003601e60046101000a81548161ffff021916908361ffff1602179055506000601e60066101000a81548160ff0219169083151502179055503480156200015a57600080fd5b5060405162003faf38038062003faf83398181016040528101906200018091906200039e565b818073ffffffffffffffffffffffffffffffffffffffff1660808173ffffffffffffffffffffffffffffffffffffffff1660601b8152505050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555033601e60076101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600160146101000a81548167ffffffffffffffff021916908367ffffffffffffffff16021790555081601b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508060038190555050505050620005a2565b6000815190506200036a8162000554565b92915050565b60008151905062000381816200056e565b92915050565b600081519050620003988162000588565b92915050565b60008060008060808587031215620003bb57620003ba6200054f565b5b6000620003cb8782880162000387565b9450506020620003de8782880162000359565b9350506040620003f18782880162000359565b9250506060620004048782880162000370565b91505092959194509250565b60006200041d8262000502565b91506200042a8362000502565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0382111562000462576200046162000520565b5b828201905092915050565b60006200047a8262000502565b9150620004878362000502565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0483118215151615620004c357620004c262000520565b5b828202905092915050565b6000620004db82620004e2565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600067ffffffffffffffff82169050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600080fd5b6200055f81620004ce565b81146200056b57600080fd5b50565b620005798162000502565b81146200058557600080fd5b50565b62000593816200050c565b81146200059f57600080fd5b50565b60805160601c6139e7620005c860003960008181610946015261099a01526139e76000f3fe608060405234801561001057600080fd5b50600436106102955760003560e01c806361728f3911610167578063bc33ed94116100ce578063e1d37e6011610087578063e1d37e60146107cf578063e1f0c376146107ed578063e30a3bad1461080b578063f071db5a14610829578063f146f0cb14610847578063f343026a1461087757610295565b8063bc33ed941461071c578063c879657214610738578063d0d9256614610756578063db8d55f114610774578063ded984e914610792578063dfbf53ae146107b057610295565b80638ea98117116101205780638ea9811714610643578063a001ecdd14610673578063a3e56fa814610691578063aabe2fe3146106af578063b0e8d086146106ce578063b0fb162f146106fe57610295565b806361728f39146105905780636c61fbcd146105ae5780636cbc2ded146105cc57806378e97925146105ea578063837e7cc6146106085780638d435df21461061257610295565b80633e27fee21161020b5780634664611e116101c45780634664611e146104de57806349a5f7ac146104fc5780634a3329d31461051a57806355380dfb14610524578063564e47a314610542578063582361641461056057610295565b80633e27fee2146104065780633e9491a2146104245780633fc8cef3146104425780634268e548146104605780634308ed451461047e5780634461ea8c146104ae57610295565b806322e062881161025d57806322e062881461032e57806324f746971461034c5780632a628fbd1461036a57806330bcf9731461039a5780633686a39e146103b85780633b2bcbf1146103e857610295565b80630e04a7d81461029a5780630ff320d6146102b857806318952383146102d65780631c4695f4146102f45780631fe543e314610312575b600080fd5b6102a26108a7565b6040516102af9190612ddd565b60405180910390f35b6102c0610912565b6040516102cd9190613107565b60405180910390f35b6102de610918565b6040516102eb9190613107565b60405180910390f35b6102fc61091e565b6040516103099190612d39565b60405180910390f35b61032c600480360381019061032791906129a0565b610944565b005b610336610a04565b6040516103439190612ddd565b60405180910390f35b610354610a17565b60405161036191906131ab565b60405180910390f35b610384600480360381019061037f9190612946565b610a2d565b6040516103919190613107565b60405180910390f35b6103a2610a51565b6040516103af9190613107565b60405180910390f35b6103d260048036038101906103cd9190612946565b610a57565b6040516103df9190612ddd565b60405180910390f35b6103f0610b9d565b6040516103fd9190612eef565b60405180910390f35b61040e610bc1565b60405161041b9190613107565b60405180910390f35b61042c610bc7565b6040516104399190613107565b60405180910390f35b61044a610bcd565b6040516104579190612eb9565b60405180910390f35b610468610bf3565b6040516104759190613107565b60405180910390f35b610498600480360381019061049391906128bf565b610bf9565b6040516104a59190613107565b60405180910390f35b6104c860048036038101906104c391906128bf565b610c11565b6040516104d59190613107565b60405180910390f35b6104e6610c29565b6040516104f39190613107565b60405180910390f35b610504610c2f565b6040516105119190613107565b60405180910390f35b610522610c35565b005b61052c610ecb565b6040516105399190612ed4565b60405180910390f35b61054a610ef1565b6040516105579190613107565b60405180910390f35b61057a60048036038101906105759190612946565b610ef7565b6040516105879190612ddd565b60405180910390f35b610598610ffb565b6040516105a59190612df8565b60405180910390f35b6105b6611001565b6040516105c39190612ddd565b60405180910390f35b6105d461101a565b6040516105e19190612ddd565b60405180910390f35b6105f261125a565b6040516105ff9190613107565b60405180910390f35b610610611260565b005b61062c60048036038101906106279190612946565b611548565b60405161063a929190613122565b60405180910390f35b61065d600480360381019061065891906128bf565b61158c565b60405161066a9190612ddd565b60405180910390f35b61067b6116e4565b6040516106889190613107565b60405180910390f35b6106996116ea565b6040516106a69190612d39565b60405180910390f35b6106b7611710565b6040516106c5929190613122565b60405180910390f35b6106e860048036038101906106e391906129fc565b611742565b6040516106f59190612ddd565b60405180910390f35b610706611814565b60405161071391906130ec565b60405180910390f35b610736600480360381019061073191906129fc565b611828565b005b610740611b32565b60405161074d9190612ddd565b60405180910390f35b61075e611bcf565b60405161076b9190612ddd565b60405180910390f35b61077c611be2565b6040516107899190613107565b60405180910390f35b61079a611c1f565b6040516107a79190613107565b60405180910390f35b6107b8611c25565b6040516107c6929190613122565b60405180910390f35b6107d7611c57565b6040516107e49190613107565b60405180910390f35b6107f5611c87565b6040516108029190613107565b60405180910390f35b610813611c8d565b6040516108209190613107565b60405180910390f35b610831611c93565b60405161083e9190613107565b60405180910390f35b610861600480360381019061085c9190612946565b611c99565b60405161086e9190612d39565b60405180910390f35b610891600480360381019061088c91906128ec565b611ccc565b60405161089e9190612ddd565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff16601560010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614158061090d575061090c611001565b5b905090565b60075481565b60065481565b601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000000000000000000000000000000000000000000073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109f657337f00000000000000000000000000000000000000000000000000000000000000006040517f1cf993f40000000000000000000000000000000000000000000000000000000081526004016109ed929190612d54565b60405180910390fd5b610a008282611d82565b5050565b601260009054906101000a900460ff1681565b601e60009054906101000a900463ffffffff1681565b60006001620f424083610a4091906134fb565b610a4a9190613249565b9050919050565b600d5481565b6000601e60079054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ab357600080fd5b601260009054906101000a900460ff1615610b03576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610afa90612f4c565b60405180910390fd5b8160118190555081600c6000828254610b1c9190613249565b925050819055506001601260006101000a81548160ff02191690831515021790555042600481905550610b94333084600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166123f2909392919063ffffffff16565b60019050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b600c5481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60115481565b600e6020528060005260406000206000915090505481565b600f6020528060005260406000206000915090505481565b60175481565b600a5481565b610c3d6108a7565b610c7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c73906130cc565b60405180910390fd5b6000600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411610cfe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cf59061302c565b60405180910390fd5b6000600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414610d80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d779061306c565b60405180910390fd5b6000610d8a611c57565b90506000600d54600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483610ddc91906132d0565b610de6919061329f565b905080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e793382600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661247b9092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff887f704fcacccb912c6addca1c044f3b5a5a5d43a4caa3e412ea180cec2bac282604051610ebf9190613107565b60405180910390a25050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600b5481565b6000601e60079054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f5357600080fd5b81600c6000828254610f659190613249565b92505081905550610fbb333084600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166123f2909392919063ffffffff16565b7f45a9d545c0c0708638780bc550b5505adacb7b9ffe8f1d28f0ebb3fad582830482604051610fea9190613107565b60405180910390a160019050919050565b601d5481565b60006003546004546110139190613249565b4211905090565b6000611024611001565b80156110815750600073ffffffffffffffffffffffffffffffffffffffff16601560010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b6110c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110b79061304c565b60405180910390fd5b60136015600082015481600001556001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050611140611b32565b50600061114b611c57565b9050600081601054600c54611160919061332a565b61116a919061332a565b90506111de601560010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661247b9092919063ffffffff16565b601560010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fe9a4d659e6a8ce6849e740816611c866470197dcfd0dc85cfc87d6fc3ce00ffa826040516112499190613107565b60405180910390a260019250505090565b60045481565b601e60069054906101000a900460ff166112af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112a690612f8c565b60405180910390fd5b601260009054906101000a900460ff166112fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f590612fac565b60405180910390fd5b6113066108a7565b15611346576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133d90612fec565b60405180910390fd5b600554600c600082825461135a9190613249565b925050819055506113b23330600554600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166123f2909392919063ffffffff16565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635d3b1d30601d54600160149054906101000a900467ffffffffffffffff16601e60049054906101000a900461ffff16601e60009054906101000a900463ffffffff1660016040518663ffffffff1660e01b8152600401611451959493929190612e13565b602060405180830381600087803b15801561146b57600080fd5b505af115801561147f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a39190612973565b9050336018600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167fcbebc82cfbcf32e3ac3bfe1d5070977fdb22b43a27910f60e6446d2104eec76b8260405161153d9190613107565b60405180910390a250565b601a6020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082565b6000601e60079054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146115e857600080fd5b601260009054906101000a900460ff1615611638576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162f90612f2c565b60405180910390fd5b81601b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b60095481565b601b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60138060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082565b6000601e60079054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461179e57600080fd5b6207a1208263ffffffff1610156117ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117e19061300c565b60405180910390fd5b81601e60006101000a81548163ffffffff021916908363ffffffff16021790555060019050919050565b601e60049054906101000a900461ffff1681565b601260009054906101000a900460ff16611877576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161186e90612fac565b60405180910390fd5b61187f6108a7565b156118bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118b690612fec565b60405180910390fd5b60018163ffffffff161180156118dc575060058163ffffffff1611155b61191b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161191290612fcc565b60405180910390fd5b60008163ffffffff1660055461193191906132d0565b905080600c60008282546119459190613249565b9250508190555061199b333083600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166123f2909392919063ffffffff16565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635d3b1d30601d54600160149054906101000a900467ffffffffffffffff16601e60049054906101000a900461ffff16601e60009054906101000a900463ffffffff16886040518663ffffffff1660e01b8152600401611a39959493929190612e66565b602060405180830381600087803b158015611a5357600080fd5b505af1158015611a67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8b9190612973565b9050336018600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167fcbebc82cfbcf32e3ac3bfe1d5070977fdb22b43a27910f60e6446d2104eec76b82604051611b259190613107565b60405180910390a2505050565b600080611b3d611be2565b90508060106000828254611b519190613249565b92505081905550611bc7601e60079054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661247b9092919063ffffffff16565b600191505090565b601e60069054906101000a900460ff1681565b60006010546006546064611bf691906132d0565b600954600c54611c0691906132d0565b611c10919061329f565b611c1a919061332a565b905090565b60055481565b60158060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082565b60006006546064611c6891906132d0565b600a54600c54611c7891906132d0565b611c82919061329f565b905090565b60035481565b60195481565b60105481565b60186020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000601e60079054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611d2857600080fd5b81601e60066101000a81548160ff0219169083151502179055507f26ca518fbc9dec6337072279aaf5f72c2c8797c4d825148a1edf58e5dd332ea382604051611d719190612ddd565b60405180910390a160019050919050565b60005b81518110156123ed57611db1828281518110611da457611da361358a565b5b6020026020010151610a2d565b601a6000601960008154611dc4906134b2565b9190508190558152602001908152602001600020600001819055506018600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16601a6000601954815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611e716108a7565b6122ab57601754601a6000601954815260200190815260200160002060000154141561204257601a600060195481526020019081526020016000206015600082015481600001556001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050611f2a611b32565b506000611f35611c57565b9050600081601054600c54611f4a919061332a565b611f54919061332a565b9050611fc8601560010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661247b9092919063ffffffff16565b601560010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fe9a4d659e6a8ce6849e740816611c866470197dcfd0dc85cfc87d6fc3ce00ffa826040516120339190613107565b60405180910390a2505061210e565b600b54601a60006019548152602001908152602001600020600001541061210d576001600d60008282546120769190613249565b925050819055506001600e6000601a6000601954815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546121059190613249565b925050819055505b5b601754601a6000601954815260200190815260200160002060000154146122a6576000612155601a6000601954815260200190815260200160002060000154601754612501565b9050600061216a601360000154601754612501565b90508082136122a357601a600060195481526020019081526020016000206013600082015481600001556001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050601a6000601954815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f70f530d38bbb979cbe0444c65e6b0535c5fb314af6a84e0780174a0343cd689486601954601a600060195481526020019081526020016000206000015460405161229a93929190613174565b60405180910390a25b50505b612336565b601a6000601954815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f232dc04763cdd04ec8a9ebb622299b5cd5e5118aa5991255b80ea7bdaab5dd248460195460405161232d92919061314b565b60405180910390a25b601a6000601954815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f0fe72e7aa5069752512d05d50cab574fba2bc0d02a73ecedb38409ed159fe95184601954601a60006019548152602001908152602001600020600001546040516123d293929190613174565b60405180910390a280806123e5906134b2565b915050611d85565b505050565b612475846323b872dd60e01b85858560405160240161241393929190612d7d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612526565b50505050565b6124fc8363a9059cbb60e01b848460405160240161249a929190612db4565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612526565b505050565b6000808284039050600081121561251b578060000361251d565b805b91505092915050565b6000612588826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166125ed9092919063ffffffff16565b90506000815111156125e857808060200190518101906125a89190612919565b6125e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125de906130ac565b60405180910390fd5b5b505050565b60606125fc8484600085612605565b90509392505050565b60608247101561264a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161264190612f6c565b60405180910390fd5b61265385612719565b612692576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126899061308c565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516126bb9190612d22565b60006040518083038185875af1925050503d80600081146126f8576040519150601f19603f3d011682016040523d82523d6000602084013e6126fd565b606091505b509150915061270d82828661273c565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6060831561274c5782905061279c565b60008351111561275f5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127939190612f0a565b60405180910390fd5b9392505050565b60006127b66127b1846131eb565b6131c6565b905080838252602082019050828560208602820111156127d9576127d86135ed565b5b60005b8581101561280957816127ef8882612880565b8452602084019350602083019250506001810190506127dc565b5050509392505050565b60008135905061282281613955565b92915050565b600082601f83011261283d5761283c6135e8565b5b813561284d8482602086016127a3565b91505092915050565b6000813590506128658161396c565b92915050565b60008151905061287a8161396c565b92915050565b60008135905061288f81613983565b92915050565b6000815190506128a481613983565b92915050565b6000813590506128b98161399a565b92915050565b6000602082840312156128d5576128d46135f7565b5b60006128e384828501612813565b91505092915050565b600060208284031215612902576129016135f7565b5b600061291084828501612856565b91505092915050565b60006020828403121561292f5761292e6135f7565b5b600061293d8482850161286b565b91505092915050565b60006020828403121561295c5761295b6135f7565b5b600061296a84828501612880565b91505092915050565b600060208284031215612989576129886135f7565b5b600061299784828501612895565b91505092915050565b600080604083850312156129b7576129b66135f7565b5b60006129c585828601612880565b925050602083013567ffffffffffffffff8111156129e6576129e56135f2565b5b6129f285828601612828565b9150509250929050565b600060208284031215612a1257612a116135f7565b5b6000612a20848285016128aa565b91505092915050565b612a328161335e565b82525050565b612a4181613370565b82525050565b612a508161337c565b82525050565b6000612a6182613217565b612a6b818561322d565b9350612a7b81856020860161344e565b80840191505092915050565b612a90816133e2565b82525050565b612a9f816133f4565b82525050565b612aae81613406565b82525050565b612abd81613418565b82525050565b6000612ace82613222565b612ad88185613238565b9350612ae881856020860161344e565b612af1816135fc565b840191505092915050565b6000612b09602083613238565b9150612b148261360d565b602082019050919050565b6000612b2c601983613238565b9150612b3782613636565b602082019050919050565b6000612b4f602683613238565b9150612b5a8261365f565b604082019050919050565b6000612b72602683613238565b9150612b7d826136ae565b604082019050919050565b6000612b95601883613238565b9150612ba0826136fd565b602082019050919050565b6000612bb8602483613238565b9150612bc382613726565b604082019050919050565b6000612bdb600c83613238565b9150612be682613775565b602082019050919050565b6000612bfe601683613238565b9150612c098261379e565b602082019050919050565b6000612c21602b83613238565b9150612c2c826137c7565b604082019050919050565b6000612c44602d83613238565b9150612c4f82613816565b604082019050919050565b6000612c67602883613238565b9150612c7282613865565b604082019050919050565b6000612c8a601d83613238565b9150612c95826138b4565b602082019050919050565b6000612cad602a83613238565b9150612cb8826138dd565b604082019050919050565b6000612cd0600f83613238565b9150612cdb8261392c565b602082019050919050565b612cef81613386565b82525050565b612cfe816133b4565b82525050565b612d0d816133be565b82525050565b612d1c816133ce565b82525050565b6000612d2e8284612a56565b915081905092915050565b6000602082019050612d4e6000830184612a29565b92915050565b6000604082019050612d696000830185612a29565b612d766020830184612a29565b9392505050565b6000606082019050612d926000830186612a29565b612d9f6020830185612a29565b612dac6040830184612cf5565b949350505050565b6000604082019050612dc96000830185612a29565b612dd66020830184612cf5565b9392505050565b6000602082019050612df26000830184612a38565b92915050565b6000602082019050612e0d6000830184612a47565b92915050565b600060a082019050612e286000830188612a47565b612e356020830187612d13565b612e426040830186612ce6565b612e4f6060830185612d04565b612e5c6080830184612ab4565b9695505050505050565b600060a082019050612e7b6000830188612a47565b612e886020830187612d13565b612e956040830186612ce6565b612ea26060830185612d04565b612eaf6080830184612d04565b9695505050505050565b6000602082019050612ece6000830184612a87565b92915050565b6000602082019050612ee96000830184612a96565b92915050565b6000602082019050612f046000830184612aa5565b92915050565b60006020820190508181036000830152612f248184612ac3565b905092915050565b60006020820190508181036000830152612f4581612afc565b9050919050565b60006020820190508181036000830152612f6581612b1f565b9050919050565b60006020820190508181036000830152612f8581612b42565b9050919050565b60006020820190508181036000830152612fa581612b65565b9050919050565b60006020820190508181036000830152612fc581612b88565b9050919050565b60006020820190508181036000830152612fe581612bab565b9050919050565b6000602082019050818103600083015261300581612bce565b9050919050565b6000602082019050818103600083015261302581612bf1565b9050919050565b6000602082019050818103600083015261304581612c14565b9050919050565b6000602082019050818103600083015261306581612c37565b9050919050565b6000602082019050818103600083015261308581612c5a565b9050919050565b600060208201905081810360008301526130a581612c7d565b9050919050565b600060208201905081810360008301526130c581612ca0565b9050919050565b600060208201905081810360008301526130e581612cc3565b9050919050565b60006020820190506131016000830184612ce6565b92915050565b600060208201905061311c6000830184612cf5565b92915050565b60006040820190506131376000830185612cf5565b6131446020830184612a29565b9392505050565b60006040820190506131606000830185612cf5565b61316d6020830184612cf5565b9392505050565b60006060820190506131896000830186612cf5565b6131966020830185612cf5565b6131a36040830184612cf5565b949350505050565b60006020820190506131c06000830184612d04565b92915050565b60006131d06131e1565b90506131dc8282613481565b919050565b6000604051905090565b600067ffffffffffffffff821115613206576132056135b9565b5b602082029050602081019050919050565b600081519050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b6000613254826133b4565b915061325f836133b4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156132945761329361352c565b5b828201905092915050565b60006132aa826133b4565b91506132b5836133b4565b9250826132c5576132c461355b565b5b828204905092915050565b60006132db826133b4565b91506132e6836133b4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561331f5761331e61352c565b5b828202905092915050565b6000613335826133b4565b9150613340836133b4565b9250828210156133535761335261352c565b5b828203905092915050565b600061336982613394565b9050919050565b60008115159050919050565b6000819050919050565b600061ffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600067ffffffffffffffff82169050919050565b60006133ed8261342a565b9050919050565b60006133ff8261342a565b9050919050565b60006134118261342a565b9050919050565b6000613423826133be565b9050919050565b60006134358261343c565b9050919050565b600061344782613394565b9050919050565b60005b8381101561346c578082015181840152602081019050613451565b8381111561347b576000848401525b50505050565b61348a826135fc565b810181811067ffffffffffffffff821117156134a9576134a86135b9565b5b80604052505050565b60006134bd826133b4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156134f0576134ef61352c565b5b600182019050919050565b6000613506826133b4565b9150613511836133b4565b9250826135215761352061355b565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f436f6e747261637420697320616c726561647920626f6f747374726170706564600082015250565b7f47616d6520616c726561647920626f6f74737472617070656400000000000000600082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f53696e676c6520726f6c6c7320617265206e6f742063757272656e746c79206560008201527f6e61626c65640000000000000000000000000000000000000000000000000000602082015250565b7f47616d65206973206e6f7420626f6f7473747261707065640000000000000000600082015250565b7f53686f756c64206265203e3d3120616e64203c3d3520726f6c6c7320696e203160008201527f2074786e00000000000000000000000000000000000000000000000000000000602082015250565b7f47616d65206973206f7665720000000000000000000000000000000000000000600082015250565b7f4c696d6974206d757374206265203e3d35303030303000000000000000000000600082015250565b7f5573657220646f6573206e6f74206861766520616e7920726576656e7565207360008201527f706c697420736861726573000000000000000000000000000000000000000000602082015250565b7f47616d65206475726174696f6e206861736e277420656c61707365642077697460008201527f686f757420612077696e6e657200000000000000000000000000000000000000602082015250565b7f557365722068617320616c726561647920636f6c6c656374656420726576656e60008201527f75652073706c6974000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f47616d652069736e2774206f7665720000000000000000000000000000000000600082015250565b61395e8161335e565b811461396957600080fd5b50565b61397581613370565b811461398057600080fd5b50565b61398c816133b4565b811461399757600080fd5b50565b6139a3816133be565b81146139ae57600080fd5b5056fea2646970667358221220f9c2bcbfd869f79cf1419ff7f5edfb180d10e9a4bd215705391b90dafcbd82cc64736f6c634300080700330000000000000000000000000000000000000000000000000000000000000005000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699090000000000000000000000000000000000000000000000000000000000740400

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102955760003560e01c806361728f3911610167578063bc33ed94116100ce578063e1d37e6011610087578063e1d37e60146107cf578063e1f0c376146107ed578063e30a3bad1461080b578063f071db5a14610829578063f146f0cb14610847578063f343026a1461087757610295565b8063bc33ed941461071c578063c879657214610738578063d0d9256614610756578063db8d55f114610774578063ded984e914610792578063dfbf53ae146107b057610295565b80638ea98117116101205780638ea9811714610643578063a001ecdd14610673578063a3e56fa814610691578063aabe2fe3146106af578063b0e8d086146106ce578063b0fb162f146106fe57610295565b806361728f39146105905780636c61fbcd146105ae5780636cbc2ded146105cc57806378e97925146105ea578063837e7cc6146106085780638d435df21461061257610295565b80633e27fee21161020b5780634664611e116101c45780634664611e146104de57806349a5f7ac146104fc5780634a3329d31461051a57806355380dfb14610524578063564e47a314610542578063582361641461056057610295565b80633e27fee2146104065780633e9491a2146104245780633fc8cef3146104425780634268e548146104605780634308ed451461047e5780634461ea8c146104ae57610295565b806322e062881161025d57806322e062881461032e57806324f746971461034c5780632a628fbd1461036a57806330bcf9731461039a5780633686a39e146103b85780633b2bcbf1146103e857610295565b80630e04a7d81461029a5780630ff320d6146102b857806318952383146102d65780631c4695f4146102f45780631fe543e314610312575b600080fd5b6102a26108a7565b6040516102af9190612ddd565b60405180910390f35b6102c0610912565b6040516102cd9190613107565b60405180910390f35b6102de610918565b6040516102eb9190613107565b60405180910390f35b6102fc61091e565b6040516103099190612d39565b60405180910390f35b61032c600480360381019061032791906129a0565b610944565b005b610336610a04565b6040516103439190612ddd565b60405180910390f35b610354610a17565b60405161036191906131ab565b60405180910390f35b610384600480360381019061037f9190612946565b610a2d565b6040516103919190613107565b60405180910390f35b6103a2610a51565b6040516103af9190613107565b60405180910390f35b6103d260048036038101906103cd9190612946565b610a57565b6040516103df9190612ddd565b60405180910390f35b6103f0610b9d565b6040516103fd9190612eef565b60405180910390f35b61040e610bc1565b60405161041b9190613107565b60405180910390f35b61042c610bc7565b6040516104399190613107565b60405180910390f35b61044a610bcd565b6040516104579190612eb9565b60405180910390f35b610468610bf3565b6040516104759190613107565b60405180910390f35b610498600480360381019061049391906128bf565b610bf9565b6040516104a59190613107565b60405180910390f35b6104c860048036038101906104c391906128bf565b610c11565b6040516104d59190613107565b60405180910390f35b6104e6610c29565b6040516104f39190613107565b60405180910390f35b610504610c2f565b6040516105119190613107565b60405180910390f35b610522610c35565b005b61052c610ecb565b6040516105399190612ed4565b60405180910390f35b61054a610ef1565b6040516105579190613107565b60405180910390f35b61057a60048036038101906105759190612946565b610ef7565b6040516105879190612ddd565b60405180910390f35b610598610ffb565b6040516105a59190612df8565b60405180910390f35b6105b6611001565b6040516105c39190612ddd565b60405180910390f35b6105d461101a565b6040516105e19190612ddd565b60405180910390f35b6105f261125a565b6040516105ff9190613107565b60405180910390f35b610610611260565b005b61062c60048036038101906106279190612946565b611548565b60405161063a929190613122565b60405180910390f35b61065d600480360381019061065891906128bf565b61158c565b60405161066a9190612ddd565b60405180910390f35b61067b6116e4565b6040516106889190613107565b60405180910390f35b6106996116ea565b6040516106a69190612d39565b60405180910390f35b6106b7611710565b6040516106c5929190613122565b60405180910390f35b6106e860048036038101906106e391906129fc565b611742565b6040516106f59190612ddd565b60405180910390f35b610706611814565b60405161071391906130ec565b60405180910390f35b610736600480360381019061073191906129fc565b611828565b005b610740611b32565b60405161074d9190612ddd565b60405180910390f35b61075e611bcf565b60405161076b9190612ddd565b60405180910390f35b61077c611be2565b6040516107899190613107565b60405180910390f35b61079a611c1f565b6040516107a79190613107565b60405180910390f35b6107b8611c25565b6040516107c6929190613122565b60405180910390f35b6107d7611c57565b6040516107e49190613107565b60405180910390f35b6107f5611c87565b6040516108029190613107565b60405180910390f35b610813611c8d565b6040516108209190613107565b60405180910390f35b610831611c93565b60405161083e9190613107565b60405180910390f35b610861600480360381019061085c9190612946565b611c99565b60405161086e9190612d39565b60405180910390f35b610891600480360381019061088c91906128ec565b611ccc565b60405161089e9190612ddd565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff16601560010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614158061090d575061090c611001565b5b905090565b60075481565b60065481565b601c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b7f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e6990973ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146109f657337f000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699096040517f1cf993f40000000000000000000000000000000000000000000000000000000081526004016109ed929190612d54565b60405180910390fd5b610a008282611d82565b5050565b601260009054906101000a900460ff1681565b601e60009054906101000a900463ffffffff1681565b60006001620f424083610a4091906134fb565b610a4a9190613249565b9050919050565b600d5481565b6000601e60079054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610ab357600080fd5b601260009054906101000a900460ff1615610b03576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610afa90612f4c565b60405180910390fd5b8160118190555081600c6000828254610b1c9190613249565b925050819055506001601260006101000a81548160ff02191690831515021790555042600481905550610b94333084600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166123f2909392919063ffffffff16565b60019050919050565b60008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60085481565b600c5481565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60115481565b600e6020528060005260406000206000915090505481565b600f6020528060005260406000206000915090505481565b60175481565b600a5481565b610c3d6108a7565b610c7c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c73906130cc565b60405180910390fd5b6000600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205411610cfe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610cf59061302c565b60405180910390fd5b6000600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205414610d80576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d779061306c565b60405180910390fd5b6000610d8a611c57565b90506000600d54600e60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205483610ddc91906132d0565b610de6919061329f565b905080600f60003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550610e793382600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661247b9092919063ffffffff16565b3373ffffffffffffffffffffffffffffffffffffffff167ff887f704fcacccb912c6addca1c044f3b5a5a5d43a4caa3e412ea180cec2bac282604051610ebf9190613107565b60405180910390a25050565b600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600b5481565b6000601e60079054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610f5357600080fd5b81600c6000828254610f659190613249565b92505081905550610fbb333084600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166123f2909392919063ffffffff16565b7f45a9d545c0c0708638780bc550b5505adacb7b9ffe8f1d28f0ebb3fad582830482604051610fea9190613107565b60405180910390a160019050919050565b601d5481565b60006003546004546110139190613249565b4211905090565b6000611024611001565b80156110815750600073ffffffffffffffffffffffffffffffffffffffff16601560010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b6110c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110b79061304c565b60405180910390fd5b60136015600082015481600001556001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050611140611b32565b50600061114b611c57565b9050600081601054600c54611160919061332a565b61116a919061332a565b90506111de601560010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661247b9092919063ffffffff16565b601560010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fe9a4d659e6a8ce6849e740816611c866470197dcfd0dc85cfc87d6fc3ce00ffa826040516112499190613107565b60405180910390a260019250505090565b60045481565b601e60069054906101000a900460ff166112af576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112a690612f8c565b60405180910390fd5b601260009054906101000a900460ff166112fe576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016112f590612fac565b60405180910390fd5b6113066108a7565b15611346576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161133d90612fec565b60405180910390fd5b600554600c600082825461135a9190613249565b925050819055506113b23330600554600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166123f2909392919063ffffffff16565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635d3b1d30601d54600160149054906101000a900467ffffffffffffffff16601e60049054906101000a900461ffff16601e60009054906101000a900463ffffffff1660016040518663ffffffff1660e01b8152600401611451959493929190612e13565b602060405180830381600087803b15801561146b57600080fd5b505af115801561147f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114a39190612973565b9050336018600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167fcbebc82cfbcf32e3ac3bfe1d5070977fdb22b43a27910f60e6446d2104eec76b8260405161153d9190613107565b60405180910390a250565b601a6020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082565b6000601e60079054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146115e857600080fd5b601260009054906101000a900460ff1615611638576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161162f90612f2c565b60405180910390fd5b81601b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550601b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff166000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060019050919050565b60095481565b601b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60138060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082565b6000601e60079054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff161461179e57600080fd5b6207a1208263ffffffff1610156117ea576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117e19061300c565b60405180910390fd5b81601e60006101000a81548163ffffffff021916908363ffffffff16021790555060019050919050565b601e60049054906101000a900461ffff1681565b601260009054906101000a900460ff16611877576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161186e90612fac565b60405180910390fd5b61187f6108a7565b156118bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118b690612fec565b60405180910390fd5b60018163ffffffff161180156118dc575060058163ffffffff1611155b61191b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161191290612fcc565b60405180910390fd5b60008163ffffffff1660055461193191906132d0565b905080600c60008282546119459190613249565b9250508190555061199b333083600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166123f2909392919063ffffffff16565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635d3b1d30601d54600160149054906101000a900467ffffffffffffffff16601e60049054906101000a900461ffff16601e60009054906101000a900463ffffffff16886040518663ffffffff1660e01b8152600401611a39959493929190612e66565b602060405180830381600087803b158015611a5357600080fd5b505af1158015611a67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a8b9190612973565b9050336018600083815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055503373ffffffffffffffffffffffffffffffffffffffff167fcbebc82cfbcf32e3ac3bfe1d5070977fdb22b43a27910f60e6446d2104eec76b82604051611b259190613107565b60405180910390a2505050565b600080611b3d611be2565b90508060106000828254611b519190613249565b92505081905550611bc7601e60079054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661247b9092919063ffffffff16565b600191505090565b601e60069054906101000a900460ff1681565b60006010546006546064611bf691906132d0565b600954600c54611c0691906132d0565b611c10919061329f565b611c1a919061332a565b905090565b60055481565b60158060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905082565b60006006546064611c6891906132d0565b600a54600c54611c7891906132d0565b611c82919061329f565b905090565b60035481565b60195481565b60105481565b60186020528060005260406000206000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6000601e60079054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614611d2857600080fd5b81601e60066101000a81548160ff0219169083151502179055507f26ca518fbc9dec6337072279aaf5f72c2c8797c4d825148a1edf58e5dd332ea382604051611d719190612ddd565b60405180910390a160019050919050565b60005b81518110156123ed57611db1828281518110611da457611da361358a565b5b6020026020010151610a2d565b601a6000601960008154611dc4906134b2565b9190508190558152602001908152602001600020600001819055506018600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16601a6000601954815260200190815260200160002060010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550611e716108a7565b6122ab57601754601a6000601954815260200190815260200160002060000154141561204257601a600060195481526020019081526020016000206015600082015481600001556001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050611f2a611b32565b506000611f35611c57565b9050600081601054600c54611f4a919061332a565b611f54919061332a565b9050611fc8601560010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1682600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1661247b9092919063ffffffff16565b601560010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167fe9a4d659e6a8ce6849e740816611c866470197dcfd0dc85cfc87d6fc3ce00ffa826040516120339190613107565b60405180910390a2505061210e565b600b54601a60006019548152602001908152602001600020600001541061210d576001600d60008282546120769190613249565b925050819055506001600e6000601a6000601954815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008282546121059190613249565b925050819055505b5b601754601a6000601954815260200190815260200160002060000154146122a6576000612155601a6000601954815260200190815260200160002060000154601754612501565b9050600061216a601360000154601754612501565b90508082136122a357601a600060195481526020019081526020016000206013600082015481600001556001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff168160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550905050601a6000601954815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f70f530d38bbb979cbe0444c65e6b0535c5fb314af6a84e0780174a0343cd689486601954601a600060195481526020019081526020016000206000015460405161229a93929190613174565b60405180910390a25b50505b612336565b601a6000601954815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f232dc04763cdd04ec8a9ebb622299b5cd5e5118aa5991255b80ea7bdaab5dd248460195460405161232d92919061314b565b60405180910390a25b601a6000601954815260200190815260200160002060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f0fe72e7aa5069752512d05d50cab574fba2bc0d02a73ecedb38409ed159fe95184601954601a60006019548152602001908152602001600020600001546040516123d293929190613174565b60405180910390a280806123e5906134b2565b915050611d85565b505050565b612475846323b872dd60e01b85858560405160240161241393929190612d7d565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612526565b50505050565b6124fc8363a9059cbb60e01b848460405160240161249a929190612db4565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050612526565b505050565b6000808284039050600081121561251b578060000361251d565b805b91505092915050565b6000612588826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff166125ed9092919063ffffffff16565b90506000815111156125e857808060200190518101906125a89190612919565b6125e7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125de906130ac565b60405180910390fd5b5b505050565b60606125fc8484600085612605565b90509392505050565b60608247101561264a576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161264190612f6c565b60405180910390fd5b61265385612719565b612692576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016126899061308c565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516126bb9190612d22565b60006040518083038185875af1925050503d80600081146126f8576040519150601f19603f3d011682016040523d82523d6000602084013e6126fd565b606091505b509150915061270d82828661273c565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6060831561274c5782905061279c565b60008351111561275f5782518084602001fd5b816040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016127939190612f0a565b60405180910390fd5b9392505050565b60006127b66127b1846131eb565b6131c6565b905080838252602082019050828560208602820111156127d9576127d86135ed565b5b60005b8581101561280957816127ef8882612880565b8452602084019350602083019250506001810190506127dc565b5050509392505050565b60008135905061282281613955565b92915050565b600082601f83011261283d5761283c6135e8565b5b813561284d8482602086016127a3565b91505092915050565b6000813590506128658161396c565b92915050565b60008151905061287a8161396c565b92915050565b60008135905061288f81613983565b92915050565b6000815190506128a481613983565b92915050565b6000813590506128b98161399a565b92915050565b6000602082840312156128d5576128d46135f7565b5b60006128e384828501612813565b91505092915050565b600060208284031215612902576129016135f7565b5b600061291084828501612856565b91505092915050565b60006020828403121561292f5761292e6135f7565b5b600061293d8482850161286b565b91505092915050565b60006020828403121561295c5761295b6135f7565b5b600061296a84828501612880565b91505092915050565b600060208284031215612989576129886135f7565b5b600061299784828501612895565b91505092915050565b600080604083850312156129b7576129b66135f7565b5b60006129c585828601612880565b925050602083013567ffffffffffffffff8111156129e6576129e56135f2565b5b6129f285828601612828565b9150509250929050565b600060208284031215612a1257612a116135f7565b5b6000612a20848285016128aa565b91505092915050565b612a328161335e565b82525050565b612a4181613370565b82525050565b612a508161337c565b82525050565b6000612a6182613217565b612a6b818561322d565b9350612a7b81856020860161344e565b80840191505092915050565b612a90816133e2565b82525050565b612a9f816133f4565b82525050565b612aae81613406565b82525050565b612abd81613418565b82525050565b6000612ace82613222565b612ad88185613238565b9350612ae881856020860161344e565b612af1816135fc565b840191505092915050565b6000612b09602083613238565b9150612b148261360d565b602082019050919050565b6000612b2c601983613238565b9150612b3782613636565b602082019050919050565b6000612b4f602683613238565b9150612b5a8261365f565b604082019050919050565b6000612b72602683613238565b9150612b7d826136ae565b604082019050919050565b6000612b95601883613238565b9150612ba0826136fd565b602082019050919050565b6000612bb8602483613238565b9150612bc382613726565b604082019050919050565b6000612bdb600c83613238565b9150612be682613775565b602082019050919050565b6000612bfe601683613238565b9150612c098261379e565b602082019050919050565b6000612c21602b83613238565b9150612c2c826137c7565b604082019050919050565b6000612c44602d83613238565b9150612c4f82613816565b604082019050919050565b6000612c67602883613238565b9150612c7282613865565b604082019050919050565b6000612c8a601d83613238565b9150612c95826138b4565b602082019050919050565b6000612cad602a83613238565b9150612cb8826138dd565b604082019050919050565b6000612cd0600f83613238565b9150612cdb8261392c565b602082019050919050565b612cef81613386565b82525050565b612cfe816133b4565b82525050565b612d0d816133be565b82525050565b612d1c816133ce565b82525050565b6000612d2e8284612a56565b915081905092915050565b6000602082019050612d4e6000830184612a29565b92915050565b6000604082019050612d696000830185612a29565b612d766020830184612a29565b9392505050565b6000606082019050612d926000830186612a29565b612d9f6020830185612a29565b612dac6040830184612cf5565b949350505050565b6000604082019050612dc96000830185612a29565b612dd66020830184612cf5565b9392505050565b6000602082019050612df26000830184612a38565b92915050565b6000602082019050612e0d6000830184612a47565b92915050565b600060a082019050612e286000830188612a47565b612e356020830187612d13565b612e426040830186612ce6565b612e4f6060830185612d04565b612e5c6080830184612ab4565b9695505050505050565b600060a082019050612e7b6000830188612a47565b612e886020830187612d13565b612e956040830186612ce6565b612ea26060830185612d04565b612eaf6080830184612d04565b9695505050505050565b6000602082019050612ece6000830184612a87565b92915050565b6000602082019050612ee96000830184612a96565b92915050565b6000602082019050612f046000830184612aa5565b92915050565b60006020820190508181036000830152612f248184612ac3565b905092915050565b60006020820190508181036000830152612f4581612afc565b9050919050565b60006020820190508181036000830152612f6581612b1f565b9050919050565b60006020820190508181036000830152612f8581612b42565b9050919050565b60006020820190508181036000830152612fa581612b65565b9050919050565b60006020820190508181036000830152612fc581612b88565b9050919050565b60006020820190508181036000830152612fe581612bab565b9050919050565b6000602082019050818103600083015261300581612bce565b9050919050565b6000602082019050818103600083015261302581612bf1565b9050919050565b6000602082019050818103600083015261304581612c14565b9050919050565b6000602082019050818103600083015261306581612c37565b9050919050565b6000602082019050818103600083015261308581612c5a565b9050919050565b600060208201905081810360008301526130a581612c7d565b9050919050565b600060208201905081810360008301526130c581612ca0565b9050919050565b600060208201905081810360008301526130e581612cc3565b9050919050565b60006020820190506131016000830184612ce6565b92915050565b600060208201905061311c6000830184612cf5565b92915050565b60006040820190506131376000830185612cf5565b6131446020830184612a29565b9392505050565b60006040820190506131606000830185612cf5565b61316d6020830184612cf5565b9392505050565b60006060820190506131896000830186612cf5565b6131966020830185612cf5565b6131a36040830184612cf5565b949350505050565b60006020820190506131c06000830184612d04565b92915050565b60006131d06131e1565b90506131dc8282613481565b919050565b6000604051905090565b600067ffffffffffffffff821115613206576132056135b9565b5b602082029050602081019050919050565b600081519050919050565b600081519050919050565b600081905092915050565b600082825260208201905092915050565b6000613254826133b4565b915061325f836133b4565b9250827fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff038211156132945761329361352c565b5b828201905092915050565b60006132aa826133b4565b91506132b5836133b4565b9250826132c5576132c461355b565b5b828204905092915050565b60006132db826133b4565b91506132e6836133b4565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561331f5761331e61352c565b5b828202905092915050565b6000613335826133b4565b9150613340836133b4565b9250828210156133535761335261352c565b5b828203905092915050565b600061336982613394565b9050919050565b60008115159050919050565b6000819050919050565b600061ffff82169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600063ffffffff82169050919050565b600067ffffffffffffffff82169050919050565b60006133ed8261342a565b9050919050565b60006133ff8261342a565b9050919050565b60006134118261342a565b9050919050565b6000613423826133be565b9050919050565b60006134358261343c565b9050919050565b600061344782613394565b9050919050565b60005b8381101561346c578082015181840152602081019050613451565b8381111561347b576000848401525b50505050565b61348a826135fc565b810181811067ffffffffffffffff821117156134a9576134a86135b9565b5b80604052505050565b60006134bd826133b4565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8214156134f0576134ef61352c565b5b600182019050919050565b6000613506826133b4565b9150613511836133b4565b9250826135215761352061355b565b5b828206905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b600080fd5b600080fd5b600080fd5b600080fd5b6000601f19601f8301169050919050565b7f436f6e747261637420697320616c726561647920626f6f747374726170706564600082015250565b7f47616d6520616c726561647920626f6f74737472617070656400000000000000600082015250565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b7f53696e676c6520726f6c6c7320617265206e6f742063757272656e746c79206560008201527f6e61626c65640000000000000000000000000000000000000000000000000000602082015250565b7f47616d65206973206e6f7420626f6f7473747261707065640000000000000000600082015250565b7f53686f756c64206265203e3d3120616e64203c3d3520726f6c6c7320696e203160008201527f2074786e00000000000000000000000000000000000000000000000000000000602082015250565b7f47616d65206973206f7665720000000000000000000000000000000000000000600082015250565b7f4c696d6974206d757374206265203e3d35303030303000000000000000000000600082015250565b7f5573657220646f6573206e6f74206861766520616e7920726576656e7565207360008201527f706c697420736861726573000000000000000000000000000000000000000000602082015250565b7f47616d65206475726174696f6e206861736e277420656c61707365642077697460008201527f686f757420612077696e6e657200000000000000000000000000000000000000602082015250565b7f557365722068617320616c726561647920636f6c6c656374656420726576656e60008201527f75652073706c6974000000000000000000000000000000000000000000000000602082015250565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b7f47616d652069736e2774206f7665720000000000000000000000000000000000600082015250565b61395e8161335e565b811461396957600080fd5b50565b61397581613370565b811461398057600080fd5b50565b61398c816133b4565b811461399757600080fd5b50565b6139a3816133be565b81146139ae57600080fd5b5056fea2646970667358221220f9c2bcbfd869f79cf1419ff7f5edfb180d10e9a4bd215705391b90dafcbd82cc64736f6c63430008070033

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

0000000000000000000000000000000000000000000000000000000000000005000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e699090000000000000000000000000000000000000000000000000000000000740400

-----Decoded View---------------
Arg [0] : subscriptionId (uint64): 5
Arg [1] : _weth (address): 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2
Arg [2] : _vrfCoordinator (address): 0x271682DEB8C4E0901D1a1550aD2e64D568E69909
Arg [3] : _gameDuration (uint256): 7603200

-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [1] : 000000000000000000000000c02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
Arg [2] : 000000000000000000000000271682deb8c4e0901d1a1550ad2e64d568e69909
Arg [3] : 0000000000000000000000000000000000000000000000000000000000740400


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

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