false
false
0

Contract Address Details

0x564115c47d47fF4628155b9D9F9C3b61cf1f89f2

Contract Name
ErinaceusVRF
Creator
0xbb78ef–16399b at 0x3c0654–155d5e
Balance
0 FTN ( )
Tokens
Fetching tokens...
Transactions
85 Transactions
Transfers
65 Transfers
Gas Used
20,334,907
Last Balance Update
4346574
Warning! Contract bytecode has been changed and doesn't match the verified one. Therefore, interaction with this smart contract may be risky.
Contract name:
ErinaceusVRF




Optimization enabled
true
Compiler version
v0.8.6+commit.11564f7e




Optimization runs
200
EVM Version
default




Verified at
2024-05-20T14:52:35.984297Z

Constructor Arguments

0000000000000000000000004084ab20f8ffca76c19aaf854fb5fe9de6217fbb0000000000000000000000000a0ddd7c62bd7fcdb6308d655fbc82a042463ac2000000000000000000000000bb78efaaaf9223b4840ea7defdc379a13b16399b

Arg [0] (address) : 0x4084ab20f8ffca76c19aaf854fb5fe9de6217fbb
Arg [1] (address) : 0x0a0ddd7c62bd7fcdb6308d655fbc82a042463ac2
Arg [2] (address) : 0xbb78efaaaf9223b4840ea7defdc379a13b16399b

              

contracts/vrf/ErinaceusVRF.sol

// SPDX-License-Identifier: MIT
pragma solidity 0.8.6;

import {VRF} from "./VRF.sol";
import {IWFTN} from "../interfaces/IWFTN.sol";
import {VRFConsumerBaseV2} from "./VRFConsumerBaseV2.sol";
import {IHashHub} from "../interfaces/IHashHub.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {ErinaceusVRFInterface} from "./interfaces/ErinaceusVRFInterface.sol";
import "hardhat/console.sol";

contract ErinaceusVRF is VRF, Ownable, ErinaceusVRFInterface {
  // solhint-disable-next-line chainlink-solidity/prefix-immutable-variables-with-i
  IWFTN public wFTN;
  IHashHub public HashHub;
  address public team;
  uint256 public withdrawableForTeam;
  uint256 public feePercentage;
  // solhint-disable-next-line chainlink-solidity/prefix-immutable-variables-with-i

  // We need to maintain a list of consuming addresses.
  // This bound ensures we are able to loop over them as needed.
  // Should a user require more consumers, they can use multiple subscriptions.
  uint16 public constant MAX_CONSUMERS = 100;
  error InvalidCalldata();
  error CantBeAddressZero();
  error TooManyConsumers();
  error InsufficientBalance();
  error InvalidSubscription();
  error OnlyCallableFromLink();
  error PendingRequestExists();
  error PercentageIsNotInRange();
  error MustBeSubOwner(address owner);
  error BlockhashNotInStore(uint256 blocNumber);
  event FundsRecovered(address to, uint256 amount);
  error MustBeRequestedOwner(address proposedOwner);
  error InvalidConsumer(uint64 subId, address consumer);
  error BalanceInvariantViolated(uint256 internalBalance, uint256 externalBalance); // Should never happen
  // We use the subscription struct (1 word)
  // at fulfillment time.
  struct Subscription {
    uint256 balance; // Common wFTN balance used for all consumer requests.
    uint256 reqCount; // For fee tiers
  }
  // We use the config for the mgmt APIs
  struct SubscriptionConfig {
    address owner; // Owner can fund/withdraw/cancel the sub.
    address requestedOwner; // For safely transferring sub ownership.
    // Maintains the list of keys in s_consumers.
    // We do this for 2 reasons:
    // 1. To be able to clean up all keys from s_consumers when canceling a subscription.
    // 2. To be able to return the list of all consumers in getSubscription.
    // Note that we need the s_consumers map to be able to directly check if a
    // consumer is valid without reading all the consumers from storage.
    address[] consumers;
  }
  // Note a nonce of 0 indicates an the consumer is not assigned to that subscription.
  mapping(address => mapping(uint64 => uint64)) /* consumer */ /* subId */ /* nonce */ private s_consumers;
  mapping(uint64 => SubscriptionConfig) /* subId */ /* subscriptionConfig */ public s_subscriptionConfigs;
  mapping(uint64 => Subscription) /* subId */ /* subscription */ public s_subscriptions;
  mapping(uint256 => bool) private isRequested;
  // We make the sub count public so that its possible to
  // get all the current subscriptions via getSubscription.
  uint64 private s_currentSubId;
  // s_totalBalance tracks the total wFTN sent to/from
  // this contract through onTokenTransfer, cancelSubscription and oracleWithdraw.
  // A discrepancy with this contract's wFTN balance indicates someone
  // sent tokens using transfer and so we may need to use recoverFunds.
  uint256 private s_totalBalance;
  uint256 public HashHubBalance;
  uint256 public HashHubReward;
  event RewardSet(uint256 reward);
  event HashHubFunded(uint256 oldBalance, uint256 newBalance);
  event HashHubChanged(address oldHashHub, address newHashHub);
  event SubscriptionCreated(uint64 indexed subId, address owner);
  event SubscriptionConsumerAdded(uint64 indexed subId, address consumer);
  event SubscriptionConsumerRemoved(uint64 indexed subId, address consumer);
  event SubscriptionCanceled(uint64 indexed subId, address to, uint256 amount);
  event SubscriptionOwnerTransferred(uint64 indexed subId, address from, address to);
  event SubscriptionFunded(uint64 indexed subId, uint256 oldBalance, uint256 newBalance);
  event SubscriptionOwnerTransferRequested(uint64 indexed subId, address from, address to);

  // Set this maximum to 200 to give us a 56 block window to fulfill
  // the request before requiring the block hash feeder.
  uint16 public constant MAX_REQUEST_CONFIRMATIONS = 200;
  uint32 public constant MAX_NUM_WORDS = 500;
  // 5k is plenty for an EXTCODESIZE call (2600) + warm CALL (100)
  // and some arithmetic operations.
  uint256 private constant GAS_FOR_CALL_EXACT_CHECK = 5_000;
  error InvalidRequestConfirmations(uint16 have, uint16 min, uint16 max);
  error GasLimitTooBig(uint32 have, uint32 want);
  error NumWordsTooBig(uint32 have, uint32 want);
  error ProvingKeyAlreadyRegistered(bytes32 keyHash);
  error NoSuchProvingKey(bytes32 keyHash);
  error InsufficientGasForConsumer(uint256 have, uint256 want);
  error NoCorrespondingRequest();
  error IncorrectCommitment();
  error InvalidBlockhash(uint256 blockNum);
  error PaymentTooLarge();
  error Reentrant();
  struct RequestCommitment {
    uint64 blockNum;
    uint64 subId;
    uint32 callbackGasLimit;
    uint32 numWords;
    address sender;
  }
  mapping(bytes32 => address) /* keyHash */ /* oracle */ private s_provingKeys;
  bytes32[] private s_provingKeyHashes;
  mapping(address => uint256) /* oracle */ /* wFTN balance */ private s_withdrawableTokens;
  mapping(uint256 => bytes32) /* requestID */ /* commitment */ private s_requestCommitments;
  event ProvingKeyRegistered(bytes32 keyHash, address indexed oracle);
  event ProvingKeyDeregistered(bytes32 keyHash, address indexed oracle);
  event RandomWordsRequested(
    bytes32 indexed keyHash,
    uint256 requestId,
    uint256 preSeed,
    uint64 indexed subId,
    uint16 minimumRequestConfirmations,
    uint32 callbackGasLimit,
    uint32 numWords,
    address indexed sender
  );
  event RandomWordsFulfilled(uint256 indexed requestId, uint256 outputSeed, uint256 payment, bool success);

  struct Config {
    uint16 minimumRequestConfirmations;
    uint32 maxGasLimit;
    // Reentrancy protection.
    bool reentrancyLock;
    // Gas to cover oracle payment after we calculate the payment.
    // We make it configurable in case those operations are repriced.
    uint32 gasAfterPaymentCalculation;
  }
  Config private s_config;
  FeeConfig private s_feeConfig;
  struct FeeConfig {
    // Flat fee charged per fulfillment in millionths of wFTN
    // So fee range is [0, 2^32/10^6].
    uint32 fulfillmentFlatFeeWFTNPPMTier1;
    uint32 fulfillmentFlatFeeWFTNPPMTier2;
    uint32 fulfillmentFlatFeeWFTNPPMTier3;
    uint32 fulfillmentFlatFeeWFTNPPMTier4;
    uint32 fulfillmentFlatFeeWFTNPPMTier5;
    uint24 reqsForTier2;
    uint24 reqsForTier3;
    uint24 reqsForTier4;
    uint24 reqsForTier5;
  }
  event ConfigSet(
    uint16 minimumRequestConfirmations,
    uint32 maxGasLimit,
    uint32 gasAfterPaymentCalculation,
    FeeConfig feeConfig
  );

  constructor(
    address payable _wFTN,
    address _hashHub,
    address _owner
    ){
    wFTN = IWFTN(_wFTN);
    HashHub = IHashHub(_hashHub);
    _transferOwnership(_owner);
  }

  /**
   * @notice Registers a proving key to an oracle.
   * @param oracle address of the oracle
   * @param publicProvingKey key that oracle can use to submit vrf fulfillments
   */
  function registerProvingKey(address oracle, uint256[2] calldata publicProvingKey) external onlyOwner {
    bytes32 kh = hashOfKey(publicProvingKey);
    if (s_provingKeys[kh] != address(0)) {
      revert ProvingKeyAlreadyRegistered(kh);
    }
    s_provingKeys[kh] = oracle;
    s_provingKeyHashes.push(kh);
    emit ProvingKeyRegistered(kh, oracle);
  }

  /**
   * @notice Deregisters a proving key to an oracle.
   * @param publicProvingKey key that oracle can use to submit vrf fulfillments
   */
  function deregisterProvingKey(uint256[2] calldata publicProvingKey) external onlyOwner {
    bytes32 kh = hashOfKey(publicProvingKey);
    address oracle = s_provingKeys[kh];
    if (oracle == address(0)) {
      revert NoSuchProvingKey(kh);
    }
    delete s_provingKeys[kh];
    for (uint256 i = 0; i < s_provingKeyHashes.length; i++) {
      if (s_provingKeyHashes[i] == kh) {
        bytes32 last = s_provingKeyHashes[s_provingKeyHashes.length - 1];
        // Copy last element and overwrite kh to be deleted with it
        s_provingKeyHashes[i] = last;
        s_provingKeyHashes.pop();
      }
    }
    emit ProvingKeyDeregistered(kh, oracle);
  }

  /**
   * @notice Returns the proving key hash key associated with this public key
   * @param publicKey the key to return the hash of
   */
  function hashOfKey(uint256[2] memory publicKey) public pure returns (bytes32) {
    return keccak256(abi.encode(publicKey));
  }

  /**
   * @notice Sets the configuration of the vrfv2 erinaceus
   * @param minimumRequestConfirmations global min for request confirmations
   * @param maxGasLimit global max for request gas limit
   * @param gasAfterPaymentCalculation gas used in doing accounting after completing the gas measurement
   * @param feeConfig fee tier configuration
   */
  function setConfig(
    uint16 minimumRequestConfirmations,
    uint32 maxGasLimit,
    uint32 gasAfterPaymentCalculation,
    FeeConfig memory feeConfig
  ) external onlyOwner {
    if (minimumRequestConfirmations > MAX_REQUEST_CONFIRMATIONS) {
      revert InvalidRequestConfirmations(
        minimumRequestConfirmations,
        minimumRequestConfirmations,
        MAX_REQUEST_CONFIRMATIONS
      );
    }
    s_config = Config({
      minimumRequestConfirmations: minimumRequestConfirmations,
      maxGasLimit: maxGasLimit,
      gasAfterPaymentCalculation: gasAfterPaymentCalculation,
      reentrancyLock: false
    });
    s_feeConfig = feeConfig;
    emit ConfigSet(
      minimumRequestConfirmations,
      maxGasLimit,
      gasAfterPaymentCalculation,
      s_feeConfig
    );
  }

  function setRewardForHashHub(
    uint256 _amount
  ) external onlyOwner {
    HashHubReward = _amount;
    emit RewardSet(_amount);
  }

  function setHushHub(
    address _hashHub
  ) external onlyOwner {
    address oldHashHub = address(HashHub);
    HashHub = IHashHub(_hashHub);
    emit HashHubChanged(oldHashHub, address(HashHub));
  }

  function setTeam(address _teamAddress, uint256 _feePercentage) external onlyOwner {
    if(_teamAddress == address(0)){
      revert CantBeAddressZero();
    }
    if(_feePercentage > 100){
      revert PercentageIsNotInRange();
    }
    team = _teamAddress;
    feePercentage = _feePercentage;
  }

  function getConfig()
    external
    view
    returns (
      uint16 minimumRequestConfirmations,
      uint32 maxGasLimit,
      uint32 gasAfterPaymentCalculation
    )
  {
    return (
      s_config.minimumRequestConfirmations,
      s_config.maxGasLimit,
      s_config.gasAfterPaymentCalculation
    );
  }

  function getFeeConfig()
    external
    view
    returns (
      uint32 fulfillmentFlatFeeWFTNPPMTier1,
      uint32 fulfillmentFlatFeeWFTNPPMTier2,
      uint32 fulfillmentFlatFeeWFTNPPMTier3,
      uint32 fulfillmentFlatFeeWFTNPPMTier4,
      uint32 fulfillmentFlatFeeWFTNPPMTier5,
      uint24 reqsForTier2,
      uint24 reqsForTier3,
      uint24 reqsForTier4,
      uint24 reqsForTier5
    )
  {
    return (
      s_feeConfig.fulfillmentFlatFeeWFTNPPMTier1,
      s_feeConfig.fulfillmentFlatFeeWFTNPPMTier2,
      s_feeConfig.fulfillmentFlatFeeWFTNPPMTier3,
      s_feeConfig.fulfillmentFlatFeeWFTNPPMTier4,
      s_feeConfig.fulfillmentFlatFeeWFTNPPMTier5,
      s_feeConfig.reqsForTier2,
      s_feeConfig.reqsForTier3,
      s_feeConfig.reqsForTier4,
      s_feeConfig.reqsForTier5
    );
  }

  function getTotalBalance() external view returns (uint256) {
    return s_totalBalance;
  }

  function getWithdrawableAmount() external view returns(uint256) {
    return s_withdrawableTokens[msg.sender];
  }

  /**
   * @notice Owner cancel subscription, sends remaining link directly to the subscription owner.
   * @param subId subscription id
   * @dev notably can be called even if there are pending requests, outstanding ones may fail onchain
   */
  function ownerCancelSubscription(uint64 subId) external onlyOwner {
    if (s_subscriptionConfigs[subId].owner == address(0)) {
      revert InvalidSubscription();
    }
    _cancelSubscriptionHelper(subId, s_subscriptionConfigs[subId].owner);
  }

  /**
   * @notice Recover link sent with transfer instead of transferAndCall.
   * @param to address to send link to
   */
  function recoverFunds(address to) external onlyOwner {
    uint256 externalBalance = wFTN.balanceOf(address(this)) - HashHubBalance;
    uint256 internalBalance = uint256(s_totalBalance);
    if (internalBalance > externalBalance) {
      revert BalanceInvariantViolated(internalBalance, externalBalance);
    }
    if (internalBalance < externalBalance) {
      uint256 amount = externalBalance - internalBalance;
      wFTN.transfer(to, amount);
      emit FundsRecovered(to, amount);
    }
    // If the balances are equal, nothing to be done.
  }

  /**
   * @inheritdoc ErinaceusVRFInterface
   */
  function getRequestConfig() external view override returns (uint16, uint32, bytes32[] memory) {
    return (s_config.minimumRequestConfirmations, s_config.maxGasLimit, s_provingKeyHashes);
  }

  /**
   * @inheritdoc ErinaceusVRFInterface
   */
  function requestRandomWords(
    bytes32 keyHash,
    uint64 subId,
    uint16 requestConfirmations,
    uint32 callbackGasLimit,
    uint32 numWords
  ) external override nonReentrant returns (uint256) {
    // Input validation using the subscription storage.
    if (s_subscriptionConfigs[subId].owner == address(0)) {
      revert InvalidSubscription();
    }
    // Its important to ensure that the consumer is in fact who they say they
    // are, otherwise they could use someone else's subscription balance.
    // A nonce of 0 indicates consumer is not allocated to the sub.
    uint64 currentNonce = s_consumers[msg.sender][subId];
    if (currentNonce == 0) {
      revert InvalidConsumer(subId, msg.sender);
    }
    // Input validation using the config storage word.
    if (
      requestConfirmations < s_config.minimumRequestConfirmations || requestConfirmations > MAX_REQUEST_CONFIRMATIONS
    ) {
      revert InvalidRequestConfirmations(
        requestConfirmations,
        s_config.minimumRequestConfirmations,
        MAX_REQUEST_CONFIRMATIONS
      );
    }
    // No lower bound on the requested gas limit. A user could request 0
    // and they would simply be billed for the proof verification and wouldn't be
    // able to do anything with the random value.
    if (callbackGasLimit > s_config.maxGasLimit) {
      revert GasLimitTooBig(callbackGasLimit, s_config.maxGasLimit);
    }
    if (numWords > MAX_NUM_WORDS) {
      revert NumWordsTooBig(numWords, MAX_NUM_WORDS);
    }
    // Note we do not check whether the keyHash is valid to save gas.
    // The consequence for users is that they can send requests
    // for invalid keyHashes which will simply not be fulfilled.
    uint64 nonce = currentNonce + 1;
    (uint256 requestId, uint256 preSeed) = _computeRequestId(keyHash, msg.sender, subId, nonce);

    s_requestCommitments[requestId] = keccak256(
      abi.encode(requestId, block.number, subId, callbackGasLimit, numWords, msg.sender)
    );
    if(!isRequested[block.number]){
      if(HashHubBalance >= HashHubReward && HashHubBalance > 0){
        wFTN.approve(address(HashHub), HashHubReward);
        HashHub.requestBlockhash(block.number, HashHubReward);
        HashHubBalance -= HashHubReward;
        isRequested[block.number] = true;
      }
    }
    emit RandomWordsRequested(
      keyHash,
      requestId,
      preSeed,
      subId,
      requestConfirmations,
      callbackGasLimit,
      numWords,
      msg.sender
    );
    s_consumers[msg.sender][subId] = nonce;

    return requestId;
  }

  /**
   * @notice Get request commitment
   * @param requestId id of request
   * @dev used to determine if a request is fulfilled or not
   */
  function getCommitment(uint256 requestId) external view returns (bytes32) {
    return s_requestCommitments[requestId];
  }

  function _computeRequestId(
    bytes32 keyHash,
    address sender,
    uint64 subId,
    uint64 nonce
  ) private pure returns (uint256, uint256) {
    uint256 preSeed = uint256(keccak256(abi.encode(keyHash, sender, subId, nonce)));
    return (uint256(keccak256(abi.encode(keyHash, preSeed))), preSeed);
  }

  /**
   * @dev calls target address with exactly gasAmount gas and data as calldata
   * or reverts if at least gasAmount gas is not available.
   */
  function _callWithExactGas(uint256 gasAmount, address target, bytes memory data) private returns (bool success) {
    assembly {
      let g := gas()
      // Compute g -= GAS_FOR_CALL_EXACT_CHECK and check for underflow
      // The gas actually passed to the callee is min(gasAmount, 63//64*gas available).
      // We want to ensure that we revert if gasAmount >  63//64*gas available
      // as we do not want to provide them with less, however that check itself costs
      // gas.  GAS_FOR_CALL_EXACT_CHECK ensures we have at least enough gas to be able
      // to revert if gasAmount >  63//64*gas available.
      if lt(g, GAS_FOR_CALL_EXACT_CHECK) {
        revert(0, 0)
      }
      g := sub(g, GAS_FOR_CALL_EXACT_CHECK)
      // if g - g//64 <= gasAmount, revert
      // (we subtract g//64 because of EIP-150)
      if iszero(gt(sub(g, div(g, 64)), gasAmount)) {
        revert(0, 0)
      }
      // solidity calls check that a contract actually exists at the destination, so we do the same
      if iszero(extcodesize(target)) {
        revert(0, 0)
      }
      // call and return whether we succeeded. ignore return data
      // call(gas,addr,value,argsOffset,argsLength,retOffset,retLength)
      success := call(gasAmount, target, 0, add(data, 0x20), mload(data), 0, 0)
    }
    return success;
  }

  function _getRandomnessFromProof(
    Proof memory proof,
    RequestCommitment memory rc
  ) private view returns (bytes32 keyHash, uint256 requestId, uint256 randomness) {
    keyHash = hashOfKey(proof.pk);
    // Only registered proving keys are permitted.
    address oracle = s_provingKeys[keyHash];
    if (oracle == address(0)) {
      revert NoSuchProvingKey(keyHash);
    }
    requestId = uint256(keccak256(abi.encode(keyHash, proof.seed)));
    bytes32 commitment = s_requestCommitments[requestId];
    if (commitment == 0) {
      revert NoCorrespondingRequest();
    }
    if (
      commitment != keccak256(abi.encode(requestId, rc.blockNum, rc.subId, rc.callbackGasLimit, rc.numWords, rc.sender))
    ) {
      revert IncorrectCommitment();
    }

    bytes32 blockHash = blockhash(rc.blockNum);
    if (blockHash == bytes32(0)) {
      blockHash = HashHub.getBlockhash(rc.blockNum);
      if (blockHash == bytes32(0)) {
        revert BlockhashNotInStore(rc.blockNum);
      }
    }

    // The seed actually used by the VRF machinery, mixing in the blockhash
    uint256 actualSeed = uint256(keccak256(abi.encodePacked(proof.seed, blockHash)));
    randomness = VRF._randomValueFromVRFProof(proof, actualSeed); // Reverts on failure
    return (keyHash, requestId, randomness);
  }

  /*
   * @notice Compute fee based on the request count
   * @param reqCount number of requests
   * @return feePPM fee in wFTN PPM
   */
  function getFeeTier(uint256 reqCount) public view returns (uint32) {
    FeeConfig memory fc = s_feeConfig;
    if (0 <= reqCount && reqCount <= fc.reqsForTier2) {
      return fc.fulfillmentFlatFeeWFTNPPMTier1;
    }
    if (fc.reqsForTier2 < reqCount && reqCount <= fc.reqsForTier3) {
      return fc.fulfillmentFlatFeeWFTNPPMTier2;
    }
    if (fc.reqsForTier3 < reqCount && reqCount <= fc.reqsForTier4) {
      return fc.fulfillmentFlatFeeWFTNPPMTier3;
    }
    if (fc.reqsForTier4 < reqCount && reqCount <= fc.reqsForTier5) {
      return fc.fulfillmentFlatFeeWFTNPPMTier4;
    }
    return fc.fulfillmentFlatFeeWFTNPPMTier5;
  }

  /*
   * @notice Fulfill a randomness request
   * @param proof contains the proof and randomness
   * @param rc request commitment pre-image, committed to at request time
   * @return payment amount billed to the subscription
   * @dev simulated offchain to determine if sufficient balance is present to fulfill the request
   */
  function fulfillRandomWords(Proof memory proof, RequestCommitment memory rc) external nonReentrant returns (uint256) {
    uint256 startGas = gasleft();
    (bytes32 keyHash, uint256 requestId, uint256 randomness) = _getRandomnessFromProof(proof, rc); // TEST

    uint256[] memory randomWords = new uint256[](rc.numWords);
    for (uint256 i = 0; i < rc.numWords; i++) {
      randomWords[i] = uint256(keccak256(abi.encode(randomness, i)));
    }

    delete s_requestCommitments[requestId];
    VRFConsumerBaseV2 v;
    bytes memory resp = abi.encodeWithSelector(v.rawFulfillRandomWords.selector, requestId, randomWords);
    // Call with explicitly the amount of callback gas requested
    // Important to not let them exhaust the gas budget and avoid oracle payment.
    // Do not allow any non-view/non-pure erinaceus functions to be called
    // during the consumers callback code via reentrancyLock.
    // Note that _callWithExactGas will revert if we do not have sufficient gas
    // to give the callee their requested amount.
    s_config.reentrancyLock = true;
    bool success = _callWithExactGas(rc.callbackGasLimit, rc.sender, resp);
    s_config.reentrancyLock = false;

    // Increment the req count for fee tier selection.
    uint256 reqCount = s_subscriptions[rc.subId].reqCount;
    s_subscriptions[rc.subId].reqCount += 1;

    // We want to charge users exactly for how much gas they use in their callback.
    // The gasAfterPaymentCalculation is meant to cover these additional operations where we
    // decrement the subscription balance and increment the oracles withdrawable balance.
    // We also add the flat wFTN fee to the payment amount.
    // Its specified in millionths of wFTN, if s_config.fulfillmentFlatFeeWFTNPPM = 1
    // 1 wFTN / 1e6 = 1e18 juels / 1e6 = 1e12 juels.
    uint256 payment = _calculatePaymentAmount(
      startGas,
      s_config.gasAfterPaymentCalculation,
      getFeeTier(reqCount),
      tx.gasprice
    );
    if (s_subscriptions[rc.subId].balance < payment) {
      revert InsufficientBalance();
    }
    s_subscriptions[rc.subId].balance -= payment;
    s_withdrawableTokens[s_provingKeys[keyHash]] += payment * (100 - feePercentage) / 100;
    withdrawableForTeam += payment * feePercentage / 100;
    // Include payment in the event for tracking costs.
    emit RandomWordsFulfilled(requestId, randomness, payment, success);
    return payment;
  }
  // Get the amount of gas used for fulfillment
  function _calculatePaymentAmount(
    uint256 startGas,
    uint256 gasAfterPaymentCalculation,
    uint32 fulfillmentFlatFeeWFTNPPM,
    uint256 weiPerUnitGas
  ) internal view returns (uint256) {
        //(juels/link) (wei/gas * gas) = juels
    uint256 paymentNoFee = weiPerUnitGas * (gasAfterPaymentCalculation + startGas - gasleft());
    uint256 fee = 1e12 * uint256(fulfillmentFlatFeeWFTNPPM);
    return uint96(paymentNoFee + fee);
  }

  /*
   * @notice Oracle withdraw wFTN earned through fulfilling requests
   * @param recipient where to send the funds
   * @param amount amount to withdraw
   */
  function oracleWithdraw(address recipient, uint96 amount) external nonReentrant {
    if (s_withdrawableTokens[msg.sender] < amount) {
      revert InsufficientBalance();
    }
    s_withdrawableTokens[msg.sender] -= amount;
    s_totalBalance -= amount;
    if (!wFTN.transfer(recipient, amount)) {
      revert InsufficientBalance();
    }
  }

  function withdrawForTeam(uint256 amount) external nonReentrant{
    if (withdrawableForTeam < amount) {
      revert InsufficientBalance();
    }
    withdrawableForTeam -= amount;
    s_totalBalance -= amount;

    if (!wFTN.transfer(team, amount)) {
      revert InsufficientBalance();
    }
  }

  function fundSubscribtion(uint256 amount, uint64 subId) external nonReentrant {
    if (s_subscriptionConfigs[subId].owner == address(0)) {
      revert InvalidSubscription();
    }
    // We do not check that the msg.sender is the subscription owner,
    // anyone can fund a subscription.
    uint256 oldBalance = s_subscriptions[subId].balance;
    s_subscriptions[subId].balance += uint96(amount);
    s_totalBalance += uint96(amount);
    wFTN.transferFrom(msg.sender, address(this), amount);
    emit SubscriptionFunded(subId, oldBalance, oldBalance + amount);
  }

  function fundHashHub(uint256 amount) external nonReentrant{
    wFTN.transferFrom(msg.sender, address(this), amount);
    uint256 oldBalance = HashHubBalance;
    HashHubBalance += amount;
    emit HashHubFunded(oldBalance, HashHubBalance);
  }

  function getCurrentSubId() external view returns (uint64) {
    return s_currentSubId;
  }

  /**
   * @inheritdoc ErinaceusVRFInterface
   */
  function getSubscription(
    uint64 subId
  ) external view override returns (uint256 balance, uint256 reqCount, address owner, address[] memory consumers) {
    if (s_subscriptionConfigs[subId].owner == address(0)) {
      revert InvalidSubscription();
    }
    return (
      s_subscriptions[subId].balance,
      s_subscriptions[subId].reqCount,
      s_subscriptionConfigs[subId].owner,
      s_subscriptionConfigs[subId].consumers
    );
  }

  /**
   * @inheritdoc ErinaceusVRFInterface
   */
  function createSubscription() external override nonReentrant returns (uint64) {
    s_currentSubId++;
    uint64 currentSubId = s_currentSubId;
    address[] memory consumers = new address[](0);
    s_subscriptions[currentSubId] = Subscription({balance: 0, reqCount: 0});
    s_subscriptionConfigs[currentSubId] = SubscriptionConfig({
      owner: msg.sender,
      requestedOwner: address(0),
      consumers: consumers
    });

    emit SubscriptionCreated(currentSubId, msg.sender);
    return currentSubId;
  }

  /**
   * @inheritdoc ErinaceusVRFInterface
   */
  function requestSubscriptionOwnerTransfer(
    uint64 subId,
    address newOwner
  ) external override onlySubOwner(subId) nonReentrant {
    // Proposing to address(0) would never be claimable so don't need to check.
    if (s_subscriptionConfigs[subId].requestedOwner != newOwner) {
      s_subscriptionConfigs[subId].requestedOwner = newOwner;
      emit SubscriptionOwnerTransferRequested(subId, msg.sender, newOwner);
    }
  }

  /**
   * @inheritdoc ErinaceusVRFInterface
   */
  function acceptSubscriptionOwnerTransfer(uint64 subId) external override nonReentrant {
    if (s_subscriptionConfigs[subId].owner == address(0)) {
      revert InvalidSubscription();
    }
    if (s_subscriptionConfigs[subId].requestedOwner != msg.sender) {
      revert MustBeRequestedOwner(s_subscriptionConfigs[subId].requestedOwner);
    }
    address oldOwner = s_subscriptionConfigs[subId].owner;
    s_subscriptionConfigs[subId].owner = msg.sender;
    s_subscriptionConfigs[subId].requestedOwner = address(0);
    emit SubscriptionOwnerTransferred(subId, oldOwner, msg.sender);
  }

  /**
   * @inheritdoc ErinaceusVRFInterface
   */
  function removeConsumer(uint64 subId, address consumer) external override onlySubOwner(subId) nonReentrant {
    if (pendingRequestExists(subId)) {
      revert PendingRequestExists();
    }
    if (s_consumers[consumer][subId] == 0) {
      revert InvalidConsumer(subId, consumer);
    }
    // Note bounded by MAX_CONSUMERS
    address[] memory consumers = s_subscriptionConfigs[subId].consumers;
    uint256 lastConsumerIndex = consumers.length - 1;
    for (uint256 i = 0; i < consumers.length; i++) {
      if (consumers[i] == consumer) {
        address last = consumers[lastConsumerIndex];
        // Storage write to preserve last element
        s_subscriptionConfigs[subId].consumers[i] = last;
        // Storage remove last element
        s_subscriptionConfigs[subId].consumers.pop();
        break;
      }
    }
    delete s_consumers[consumer][subId];
    emit SubscriptionConsumerRemoved(subId, consumer);
  }

  /**
   * @inheritdoc ErinaceusVRFInterface
   */
  function addConsumer(uint64 subId, address consumer) external override onlySubOwner(subId) nonReentrant {
    // Already maxed, cannot add any more consumers.
    if (s_subscriptionConfigs[subId].consumers.length == MAX_CONSUMERS) {
      revert TooManyConsumers();
    }
    if (s_consumers[consumer][subId] != 0) {
      // Idempotence - do nothing if already added.
      // Ensures uniqueness in s_subscriptions[subId].consumers.
      return;
    }
    // Initialize the nonce to 1, indicating the consumer is allocated.
    s_consumers[consumer][subId] = 1;
    s_subscriptionConfigs[subId].consumers.push(consumer);

    emit SubscriptionConsumerAdded(subId, consumer);
  }

  /**
   * @inheritdoc ErinaceusVRFInterface
   */
  function cancelSubscription(uint64 subId, address to) external override onlySubOwner(subId) nonReentrant {
    if (pendingRequestExists(subId)) {
      revert PendingRequestExists();
    }
    _cancelSubscriptionHelper(subId, to);
  }

  function _cancelSubscriptionHelper(uint64 subId, address to) private nonReentrant {
    SubscriptionConfig memory subConfig = s_subscriptionConfigs[subId];
    Subscription memory sub = s_subscriptions[subId];
    uint256 balance = sub.balance;
    // Note bounded by MAX_CONSUMERS;
    // If no consumers, does nothing.
    for (uint256 i = 0; i < subConfig.consumers.length; i++) {
      delete s_consumers[subConfig.consumers[i]][subId];
    }
    delete s_subscriptionConfigs[subId];
    delete s_subscriptions[subId];
    s_totalBalance -= balance;
    if (!wFTN.transfer(to, uint256(balance))) {
      revert InsufficientBalance();
    }
    emit SubscriptionCanceled(subId, to, balance);
  }

  /**
   * @inheritdoc ErinaceusVRFInterface
   * @dev Looping is bounded to MAX_CONSUMERS*(number of keyhashes).
   * @dev Used to disable subscription canceling while outstanding request are present.
   */
  function pendingRequestExists(uint64 subId) public view override returns (bool) {
    SubscriptionConfig memory subConfig = s_subscriptionConfigs[subId];
    for (uint256 i = 0; i < subConfig.consumers.length; i++) {
      for (uint256 j = 0; j < s_provingKeyHashes.length; j++) {
        (uint256 reqId, ) = _computeRequestId(
          s_provingKeyHashes[j],
          subConfig.consumers[i],
          subId,
          s_consumers[subConfig.consumers[i]][subId]
        );
        if (s_requestCommitments[reqId] != 0) {
          return true;
        }
      }
    }
    return false;
  }

  modifier onlySubOwner(uint64 subId) {
    address owner = s_subscriptionConfigs[subId].owner;
    if (owner == address(0)) {
      revert InvalidSubscription();
    }
    if (msg.sender != owner) {
      revert MustBeSubOwner(owner);
    }
    _;
  }

  modifier nonReentrant() {
    if (s_config.reentrancyLock) {
      revert Reentrant();
    }
    _;
  }
}
        

@openzeppelin/contracts/access/Ownable.sol

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

pragma solidity ^0.8.0;

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

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

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

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

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        _checkOwner();
        _;
    }

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

    /**
     * @dev Throws if the sender is not the owner.
     */
    function _checkOwner() internal view virtual {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
    }

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

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

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

@openzeppelin/contracts/utils/Context.sol

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

    function _contextSuffixLength() internal view virtual returns (uint256) {
        return 0;
    }
}
          

contracts/Mocks/ConsumerMock.sol

pragma solidity ^0.8.6;


import "../vrf/VRFConsumerBaseV2.sol";
import "../vrf/ErinaceusVRF.sol";
import "hardhat/console.sol";


contract ConsumerMock is VRFConsumerBaseV2 {
    ErinaceusVRF public erinaceus;
    uint256[] public random;
    // uint public constant totalSupply = 10**27;
    // string public constant name = "ChainLink Token";
    // uint8 public constant decimals = 18;
    // string public constant symbol = "LINK";

    //   function LinkToken()
    //     public
    //   {
    //     balances[msg.sender] = totalSupply;
    //   }
    mapping(uint256 => uint256[]) public randomWord;
    uint256 public currentId;
    constructor(address erinaceusVRF)VRFConsumerBaseV2(erinaceusVRF){
        erinaceus = ErinaceusVRF(erinaceusVRF);
    }
    function getRandom(uint256 id) public view returns (uint256[] memory){
        return randomWord[id];
    }

    function getRandom1() public view returns (uint256[] memory){
        return random;
    }
    function generateRandomWords(
        bytes32 keyHash,
        uint64 subId,
        uint16 requestConfirmations,
        uint32 callbackGasLimit,
        uint32 numWords
    ) external {
            erinaceus.requestRandomWords(
            keyHash,
            subId,
            requestConfirmations,
            callbackGasLimit,
            numWords
            );
    }
    function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual override {
        // random = randomWords;
        randomWord[currentId] = randomWords;
        currentId++;
    }

    function test(uint256[] memory randomWords) external {
        random = randomWords;
        randomWord[currentId] = randomWords;
    }
}
          

contracts/interfaces/IHashHub.sol

// SPDX-License-Identifier: MIT
pragma solidity 0.8.6;
/**
 * @title HashHub
 * @notice This contract provides a way to access blockhashes older than
 *   the 256 block limit imposed by the BLOCKHASH opcode.
 *   You may assume that any blockhash stored by the contract is correct.
 *   Note that the contract depends on the format of serialized Ethereum
 *   blocks. If a future hardfork of Ethereum changes that format, the
 *   logic in this contract may become incorrect and an updated version
 *   would have to be deployed.
 */
interface IHashHub {  
  function store(uint256 n) external;

  function requestBlockhash(uint256 _blockNumber, uint256 _reward) external;
  
  function claimRewardsForUnregisteredBlocks(uint256[] memory _blocks) external;
  
  function getBlockhash(uint256 n) external view returns (bytes32);
  
  function rewardForStoring(uint256) external view returns(uint256);

  function usersRequestedBlocks(address) external view returns(uint256[] memory);

  function providedRewards(address, uint256) external view returns(uint256);
}
          

contracts/interfaces/IWFTN.sol

// SPDX-License-Identifier: MIT

// Copyright (C) 2024 Fasttoken

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

pragma solidity ^0.8.6;

interface IWFTN {

    receive() external payable;
    function deposit() external payable;

    function withdraw(uint256 amount_) external;
    
    function balanceOf(address account) external view returns (uint256);

    function totalSupply() external view returns (uint256);

    function approve(address to_, uint256 amount_) external returns (bool);

    function transfer(address to_, uint256 amount_) external returns (bool);

    function transferFrom(address src_, address to_, uint256 amount_)
        external
        returns (bool);
}
        
          

contracts/vrf/VRF.sol

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

/** ****************************************************************************
  * @notice Verification of verifiable-random-function (VRF) proofs, following
  * @notice https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-vrf-05#section-5.3
  * @notice See https://eprint.iacr.org/2017/099.pdf for security proofs.

  * @dev Bibliographic references:

  * @dev Goldberg, et al., "Verifiable Random Functions (VRFs)", Internet Draft
  * @dev draft-irtf-cfrg-vrf-05, IETF, Aug 11 2019,
  * @dev https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-vrf-05

  * @dev Papadopoulos, et al., "Making NSEC5 Practical for DNSSEC", Cryptology
  * @dev ePrint Archive, Report 2017/099, https://eprint.iacr.org/2017/099.pdf
  * ****************************************************************************
  * @dev USAGE

  * @dev The main entry point is _randomValueFromVRFProof. See its docstring.
  * ****************************************************************************
  * @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 computationally indistinguishable to her from a uniform
  * @dev random sample from the output space.

  * @dev The purpose of this contract is to perform that verification.
  * ****************************************************************************
  * @dev DESIGN NOTES

  * @dev The VRF algorithm verified here satisfies the full uniqueness, full
  * @dev collision resistance, and full pseudo-randomness security properties.
  * @dev See "SECURITY PROPERTIES" below, and
  * @dev https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-vrf-05#section-3

  * @dev An elliptic curve point is generally represented in the solidity code
  * @dev as a uint256[2], corresponding to its affine coordinates in
  * @dev GF(FIELD_SIZE).

  * @dev For the sake of efficiency, this implementation deviates from the spec
  * @dev in some minor ways:

  * @dev - Keccak hash rather than the SHA256 hash recommended in
  * @dev   https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-vrf-05#section-5.5
  * @dev   Keccak costs much less gas on the EVM, and provides similar security.

  * @dev - Secp256k1 curve instead of the P-256 or ED25519 curves recommended in
  * @dev   https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-vrf-05#section-5.5
  * @dev   For curve-point multiplication, it's much cheaper to abuse ECRECOVER

  * @dev - _hashToCurve recursively hashes until it finds a curve x-ordinate. On
  * @dev   the EVM, this is slightly more efficient than the recommendation in
  * @dev   https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-vrf-05#section-5.4.1.1
  * @dev   step 5, to concatenate with a nonce then hash, and rehash with the
  * @dev   nonce updated until a valid x-ordinate is found.

  * @dev - _hashToCurve does not include a cipher version string or the byte 0x1
  * @dev   in the hash message, as recommended in step 5.B of the draft
  * @dev   standard. They are unnecessary here because no variation in the
  * @dev   cipher suite is allowed.

  * @dev - Similarly, the hash input in _scalarFromCurvePoints does not include a
  * @dev   commitment to the cipher suite, either, which differs from step 2 of
  * @dev   https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-vrf-05#section-5.4.3
  * @dev   . Also, the hash input is the concatenation of the uncompressed
  * @dev   points, not the compressed points as recommended in step 3.

  * @dev - In the calculation of the challenge value "c", the "u" value (i.e.
  * @dev   the value computed by Reggie as the nonce times the secp256k1
  * @dev   generator point, see steps 5 and 7 of
  * @dev   https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-vrf-05#section-5.3
  * @dev   ) is replaced by its ethereum address, i.e. the lower 160 bits of the
  * @dev   keccak hash of the original u. This is because we only verify the
  * @dev   calculation of u up to its address, by abusing ECRECOVER.
  * ****************************************************************************
  * @dev   SECURITY PROPERTIES

  * @dev Here are the security properties for this VRF:

  * @dev Full uniqueness: For any seed and valid VRF public key, there is
  * @dev   exactly one VRF output which can be proved to come from that seed, in
  * @dev   the sense that the proof will pass _verifyVRFProof.

  * @dev Full collision resistance: It's cryptographically infeasible to find
  * @dev   two seeds with same VRF output from a fixed, valid VRF key

  * @dev Full pseudorandomness: Absent the proofs that the VRF outputs are
  * @dev   derived from a given seed, the outputs are computationally
  * @dev   indistinguishable from randomness.

  * @dev https://eprint.iacr.org/2017/099.pdf, Appendix B contains the proofs
  * @dev for these properties.

  * @dev For secp256k1, the key validation described in section
  * @dev https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-vrf-05#section-5.6
  * @dev is unnecessary, because secp256k1 has cofactor 1, and the
  * @dev representation of the public key used here (affine x- and y-ordinates
  * @dev of the secp256k1 point on the standard y^2=x^3+7 curve) cannot refer to
  * @dev the point at infinity.
  * ****************************************************************************
  * @dev OTHER SECURITY CONSIDERATIONS
  *
  * @dev The seed input to the VRF could in principle force an arbitrary amount
  * @dev of work in _hashToCurve, by requiring extra rounds of hashing and
  * @dev checking whether that's yielded the x ordinate of a secp256k1 point.
  * @dev However, under the Random Oracle Model the probability of choosing a
  * @dev point which forces n extra rounds in _hashToCurve is 2⁻ⁿ. The base cost
  * @dev for calling _hashToCurve is about 25,000 gas, and each round of checking
  * @dev for a valid x ordinate costs about 15,555 gas, so to find a seed for
  * @dev which _hashToCurve would cost more than 2,017,000 gas, one would have to
  * @dev try, in expectation, about 2¹²⁸ seeds, which is infeasible for any
  * @dev foreseeable computational resources. (25,000 + 128 * 15,555 < 2,017,000.)

  * @dev Since the gas block limit for the Ethereum main net is 10,000,000 gas,
  * @dev this means it is infeasible for an adversary to prevent correct
  * @dev operation of this contract by choosing an adverse seed.

  * @dev (See TestMeasureHashToCurveGasCost for verification of the gas cost for
  * @dev _hashToCurve.)

  * @dev It may be possible to make a secure constant-time _hashToCurve function.
  * @dev See notes in _hashToCurve docstring.
*/
contract VRF {
  // See https://www.secg.org/sec2-v2.pdf, section 2.4.1, for these constants.
  // Number of points in Secp256k1
  uint256 private constant GROUP_ORDER = 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141;
  // Prime characteristic of the galois field over which Secp256k1 is defined
  uint256 private constant FIELD_SIZE =
    // solium-disable-next-line indentation
    0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F;
  uint256 private constant WORD_LENGTH_BYTES = 0x20;

  // (base^exponent) % FIELD_SIZE
  // Cribbed from https://medium.com/@rbkhmrcr/precompiles-solidity-e5d29bd428c4
  function _bigModExp(uint256 base, uint256 exponent) internal view returns (uint256 exponentiation) {
    uint256 callResult;
    uint256[6] memory bigModExpContractInputs;
    bigModExpContractInputs[0] = WORD_LENGTH_BYTES; // Length of base
    bigModExpContractInputs[1] = WORD_LENGTH_BYTES; // Length of exponent
    bigModExpContractInputs[2] = WORD_LENGTH_BYTES; // Length of modulus
    bigModExpContractInputs[3] = base;
    bigModExpContractInputs[4] = exponent;
    bigModExpContractInputs[5] = FIELD_SIZE;
    uint256[1] memory output;
    assembly {
      callResult := staticcall(
        not(0), // Gas cost: no limit
        0x05, // Bigmodexp contract address
        bigModExpContractInputs,
        0xc0, // Length of input segment: 6*0x20-bytes
        output,
        0x20 // Length of output segment
      )
    }
    if (callResult == 0) {
      // solhint-disable-next-line custom-errors
      revert("bigModExp failure!");
    }
    return output[0];
  }

  // Let q=FIELD_SIZE. q % 4 = 3, ∴ x≡r^2 mod q ⇒ x^SQRT_POWER≡±r mod q.  See
  // https://en.wikipedia.org/wiki/Modular_square_root#Prime_or_prime_power_modulus
  uint256 private constant SQRT_POWER = (FIELD_SIZE + 1) >> 2;

  // Computes a s.t. a^2 = x in the field. Assumes a exists
  function _squareRoot(uint256 x) internal view returns (uint256) {
    return _bigModExp(x, SQRT_POWER);
  }

  // The value of y^2 given that (x,y) is on secp256k1.
  function _ySquared(uint256 x) internal pure returns (uint256) {
    // Curve is y^2=x^3+7. See section 2.4.1 of https://www.secg.org/sec2-v2.pdf
    uint256 xCubed = mulmod(x, mulmod(x, x, FIELD_SIZE), FIELD_SIZE);
    return addmod(xCubed, 7, FIELD_SIZE);
  }

  // True iff p is on secp256k1
  function _isOnCurve(uint256[2] memory p) internal pure returns (bool) {
    // Section 2.3.6. in https://www.secg.org/sec1-v2.pdf
    // requires each ordinate to be in [0, ..., FIELD_SIZE-1]
    // solhint-disable-next-line custom-errors
    require(p[0] < FIELD_SIZE, "invalid x-ordinate");
    // solhint-disable-next-line custom-errors
    require(p[1] < FIELD_SIZE, "invalid y-ordinate");
    return _ySquared(p[0]) == mulmod(p[1], p[1], FIELD_SIZE);
  }

  // Hash x uniformly into {0, ..., FIELD_SIZE-1}.
  function _fieldHash(bytes memory b) internal pure returns (uint256 x_) {
    x_ = uint256(keccak256(b));
    // Rejecting if x >= FIELD_SIZE corresponds to step 2.1 in section 2.3.4 of
    // http://www.secg.org/sec1-v2.pdf , which is part of the definition of
    // string_to_point in the IETF draft
    while (x_ >= FIELD_SIZE) {
      x_ = uint256(keccak256(abi.encodePacked(x_)));
    }
    return x_;
  }

  // Hash b to a random point which hopefully lies on secp256k1. The y ordinate
  // is always even, due to
  // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-vrf-05#section-5.4.1.1
  // step 5.C, which references arbitrary_string_to_point, defined in
  // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-vrf-05#section-5.5 as
  // returning the point with given x ordinate, and even y ordinate.
  function _newCandidateSecp256k1Point(bytes memory b) internal view returns (uint256[2] memory p) {
    unchecked {
      p[0] = _fieldHash(b);
      p[1] = _squareRoot(_ySquared(p[0]));
      if (p[1] % 2 == 1) {
        // Note that 0 <= p[1] < FIELD_SIZE
        // so this cannot wrap, we use unchecked to save gas.
        p[1] = FIELD_SIZE - p[1];
      }
    }
    return p;
  }

  // Domain-separation tag for initial hash in _hashToCurve. Corresponds to
  // vrf.go/hashToCurveHashPrefix
  uint256 internal constant HASH_TO_CURVE_HASH_PREFIX = 1;

  // Cryptographic hash function onto the curve.
  //
  // Corresponds to algorithm in section 5.4.1.1 of the draft standard. (But see
  // DESIGN NOTES above for slight differences.)
  //
  // TODO(alx): Implement a bounded-computation hash-to-curve, as described in
  // "Construction of Rational Points on Elliptic Curves over Finite Fields"
  // http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.831.5299&rep=rep1&type=pdf
  // and suggested by
  // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-hash-to-curve-01#section-5.2.2
  // (Though we can't used exactly that because secp256k1's j-invariant is 0.)
  //
  // This would greatly simplify the analysis in "OTHER SECURITY CONSIDERATIONS"
  // https://www.pivotaltracker.com/story/show/171120900
  function _hashToCurve(uint256[2] memory pk, uint256 input) internal view returns (uint256[2] memory rv) {
    rv = _newCandidateSecp256k1Point(abi.encodePacked(HASH_TO_CURVE_HASH_PREFIX, pk, input));
    while (!_isOnCurve(rv)) {
      rv = _newCandidateSecp256k1Point(abi.encodePacked(rv[0]));
    }
    return rv;
  }

  /** *********************************************************************
   * @notice Check that product==scalar*multiplicand
   *
   * @dev Based on Vitalik Buterin's idea in ethresear.ch post cited below.
   *
   * @param multiplicand: secp256k1 point
   * @param scalar: non-zero GF(GROUP_ORDER) scalar
   * @param product: secp256k1 expected to be multiplier * multiplicand
   * @return verifies true iff product==scalar*multiplicand, with cryptographically high probability
   */
  function _ecmulVerify(
    uint256[2] memory multiplicand,
    uint256 scalar,
    uint256[2] memory product
  ) internal pure returns (bool verifies) {
    // solhint-disable-next-line custom-errors
    require(scalar != 0, "zero scalar"); // Rules out an ecrecover failure case
    uint256 x = multiplicand[0]; // x ordinate of multiplicand
    uint8 v = multiplicand[1] % 2 == 0 ? 27 : 28; // parity of y ordinate
    // https://ethresear.ch/t/you-can-kinda-abuse-ecrecover-to-do-ecmul-in-secp256k1-today/2384/9
    // Point corresponding to address ecrecover(0, v, x, s=scalar*x) is
    // (x⁻¹ mod GROUP_ORDER) * (scalar * x * multiplicand - 0 * g), i.e.
    // scalar*multiplicand. See https://crypto.stackexchange.com/a/18106
    bytes32 scalarTimesX = bytes32(mulmod(scalar, x, GROUP_ORDER));
    address actual = ecrecover(bytes32(0), v, bytes32(x), scalarTimesX);
    // Explicit conversion to address takes bottom 160 bits
    address expected = address(uint160(uint256(keccak256(abi.encodePacked(product)))));
    return (actual == expected);
  }

  // Returns x1/z1-x2/z2=(x1z2-x2z1)/(z1z2) in projective coordinates on P¹(𝔽ₙ)
  function _projectiveSub(
    uint256 x1,
    uint256 z1,
    uint256 x2,
    uint256 z2
  ) internal pure returns (uint256 x3, uint256 z3) {
    unchecked {
      uint256 num1 = mulmod(z2, x1, FIELD_SIZE);
      // Note this cannot wrap since x2 is a point in [0, FIELD_SIZE-1]
      // we use unchecked to save gas.
      uint256 num2 = mulmod(FIELD_SIZE - x2, z1, FIELD_SIZE);
      (x3, z3) = (addmod(num1, num2, FIELD_SIZE), mulmod(z1, z2, FIELD_SIZE));
    }
    return (x3, z3);
  }

  // Returns x1/z1*x2/z2=(x1x2)/(z1z2), in projective coordinates on P¹(𝔽ₙ)
  function _projectiveMul(
    uint256 x1,
    uint256 z1,
    uint256 x2,
    uint256 z2
  ) internal pure returns (uint256 x3, uint256 z3) {
    (x3, z3) = (mulmod(x1, x2, FIELD_SIZE), mulmod(z1, z2, FIELD_SIZE));
    return (x3, z3);
  }

  /** **************************************************************************
        @notice Computes elliptic-curve sum, in projective co-ordinates

        @dev Using projective coordinates avoids costly divisions

        @dev To use this with p and q in affine coordinates, call
        @dev _projectiveECAdd(px, py, qx, qy). This will return
        @dev the addition of (px, py, 1) and (qx, qy, 1), in the
        @dev secp256k1 group.

        @dev This can be used to calculate the z which is the inverse to zInv
        @dev in isValidVRFOutput. But consider using a faster
        @dev re-implementation such as ProjectiveECAdd in the golang vrf package.

        @dev This function assumes [px,py,1],[qx,qy,1] are valid projective
             coordinates of secp256k1 points. That is safe in this contract,
             because this method is only used by _linearCombination, which checks
             points are on the curve via ecrecover.
        **************************************************************************
        @param px The first affine coordinate of the first summand
        @param py The second affine coordinate of the first summand
        @param qx The first affine coordinate of the second summand
        @param qy The second affine coordinate of the second summand

        (px,py) and (qx,qy) must be distinct, valid secp256k1 points.
        **************************************************************************
        Return values are projective coordinates of [px,py,1]+[qx,qy,1] as points
        on secp256k1, in P²(𝔽ₙ)
        @return sx
        @return sy
        @return sz
    */
  function _projectiveECAdd(
    uint256 px,
    uint256 py,
    uint256 qx,
    uint256 qy
  ) internal pure returns (uint256 sx, uint256 sy, uint256 sz) {
    unchecked {
      // See "Group law for E/K : y^2 = x^3 + ax + b", in section 3.1.2, p. 80,
      // "Guide to Elliptic Curve Cryptography" by Hankerson, Menezes and Vanstone
      // We take the equations there for (sx,sy), and homogenize them to
      // projective coordinates. That way, no inverses are required, here, and we
      // only need the one inverse in _affineECAdd.

      // We only need the "point addition" equations from Hankerson et al. Can
      // skip the "point doubling" equations because p1 == p2 is cryptographically
      // impossible, and required not to be the case in _linearCombination.

      // Add extra "projective coordinate" to the two points
      (uint256 z1, uint256 z2) = (1, 1);

      // (lx, lz) = (qy-py)/(qx-px), i.e., gradient of secant line.
      // Cannot wrap since px and py are in [0, FIELD_SIZE-1]
      uint256 lx = addmod(qy, FIELD_SIZE - py, FIELD_SIZE);
      uint256 lz = addmod(qx, FIELD_SIZE - px, FIELD_SIZE);

      uint256 dx; // Accumulates denominator from sx calculation
      // sx=((qy-py)/(qx-px))^2-px-qx
      (sx, dx) = _projectiveMul(lx, lz, lx, lz); // ((qy-py)/(qx-px))^2
      (sx, dx) = _projectiveSub(sx, dx, px, z1); // ((qy-py)/(qx-px))^2-px
      (sx, dx) = _projectiveSub(sx, dx, qx, z2); // ((qy-py)/(qx-px))^2-px-qx

      uint256 dy; // Accumulates denominator from sy calculation
      // sy=((qy-py)/(qx-px))(px-sx)-py
      (sy, dy) = _projectiveSub(px, z1, sx, dx); // px-sx
      (sy, dy) = _projectiveMul(sy, dy, lx, lz); // ((qy-py)/(qx-px))(px-sx)
      (sy, dy) = _projectiveSub(sy, dy, py, z1); // ((qy-py)/(qx-px))(px-sx)-py

      if (dx != dy) {
        // Cross-multiply to put everything over a common denominator
        sx = mulmod(sx, dy, FIELD_SIZE);
        sy = mulmod(sy, dx, FIELD_SIZE);
        sz = mulmod(dx, dy, FIELD_SIZE);
      } else {
        // Already over a common denominator, use that for z ordinate
        sz = dx;
      }
    }
    return (sx, sy, sz);
  }

  // p1+p2, as affine points on secp256k1.
  //
  // invZ must be the inverse of the z returned by _projectiveECAdd(p1, p2).
  // It is computed off-chain to save gas.
  //
  // p1 and p2 must be distinct, because _projectiveECAdd doesn't handle
  // point doubling.
  function _affineECAdd(
    uint256[2] memory p1,
    uint256[2] memory p2,
    uint256 invZ
  ) internal pure returns (uint256[2] memory) {
    uint256 x;
    uint256 y;
    uint256 z;
    (x, y, z) = _projectiveECAdd(p1[0], p1[1], p2[0], p2[1]);
    // solhint-disable-next-line custom-errors
    require(mulmod(z, invZ, FIELD_SIZE) == 1, "invZ must be inverse of z");
    // Clear the z ordinate of the projective representation by dividing through
    // by it, to obtain the affine representation
    return [mulmod(x, invZ, FIELD_SIZE), mulmod(y, invZ, FIELD_SIZE)];
  }

  // True iff address(c*p+s*g) == lcWitness, where g is generator. (With
  // cryptographically high probability.)
  function _verifyLinearCombinationWithGenerator(
    uint256 c,
    uint256[2] memory p,
    uint256 s,
    address lcWitness
  ) internal pure returns (bool) {
    // Rule out ecrecover failure modes which return address 0.
    unchecked {
      // solhint-disable-next-line custom-errors
      require(lcWitness != address(0), "bad witness");
      uint8 v = (p[1] % 2 == 0) ? 27 : 28; // parity of y-ordinate of p
      // Note this cannot wrap (X - Y % X), but we use unchecked to save
      // gas.
      bytes32 pseudoHash = bytes32(GROUP_ORDER - mulmod(p[0], s, GROUP_ORDER)); // -s*p[0]
      bytes32 pseudoSignature = bytes32(mulmod(c, p[0], GROUP_ORDER)); // c*p[0]
      // https://ethresear.ch/t/you-can-kinda-abuse-ecrecover-to-do-ecmul-in-secp256k1-today/2384/9
      // The point corresponding to the address returned by
      // ecrecover(-s*p[0],v,p[0],c*p[0]) is
      // (p[0]⁻¹ mod GROUP_ORDER)*(c*p[0]-(-s)*p[0]*g)=c*p+s*g.
      // See https://crypto.stackexchange.com/a/18106
      // https://bitcoin.stackexchange.com/questions/38351/ecdsa-v-r-s-what-is-v
      address computed = ecrecover(pseudoHash, v, bytes32(p[0]), pseudoSignature);
      return computed == lcWitness;
    }
  }

  // c*p1 + s*p2. Requires cp1Witness=c*p1 and sp2Witness=s*p2. Also
  // requires cp1Witness != sp2Witness (which is fine for this application,
  // since it is cryptographically impossible for them to be equal. In the
  // (cryptographically impossible) case that a prover accidentally derives
  // a proof with equal c*p1 and s*p2, they should retry with a different
  // proof nonce.) Assumes that all points are on secp256k1
  // (which is checked in _verifyVRFProof below.)
  function _linearCombination(
    uint256 c,
    uint256[2] memory p1,
    uint256[2] memory cp1Witness,
    uint256 s,
    uint256[2] memory p2,
    uint256[2] memory sp2Witness,
    uint256 zInv
  ) internal pure returns (uint256[2] memory) {
    unchecked {
      // Note we are relying on the wrap around here
      // solhint-disable-next-line custom-errors
      require((cp1Witness[0] % FIELD_SIZE) != (sp2Witness[0] % FIELD_SIZE), "points in sum must be distinct");
      // solhint-disable-next-line custom-errors
      require(_ecmulVerify(p1, c, cp1Witness), "First mul check failed");
      // solhint-disable-next-line custom-errors
      require(_ecmulVerify(p2, s, sp2Witness), "Second mul check failed");
      return _affineECAdd(cp1Witness, sp2Witness, zInv);
    }
  }

  // Domain-separation tag for the hash taken in _scalarFromCurvePoints.
  // Corresponds to scalarFromCurveHashPrefix in vrf.go
  uint256 internal constant SCALAR_FROM_CURVE_POINTS_HASH_PREFIX = 2;

  // Pseudo-random number from inputs. Matches vrf.go/_scalarFromCurvePoints, and
  // https://datatracker.ietf.org/doc/html/draft-irtf-cfrg-vrf-05#section-5.4.3
  // The draft calls (in step 7, via the definition of string_to_int, in
  // https://datatracker.ietf.org/doc/html/rfc8017#section-4.2 ) for taking the
  // first hash without checking that it corresponds to a number less than the
  // group order, which will lead to a slight bias in the sample.
  //
  // TODO(alx): We could save a bit of gas by following the standard here and
  // using the compressed representation of the points, if we collated the y
  // parities into a single bytes32.
  // https://www.pivotaltracker.com/story/show/171120588
  function _scalarFromCurvePoints(
    uint256[2] memory hash,
    uint256[2] memory pk,
    uint256[2] memory gamma,
    address uWitness,
    uint256[2] memory v
  ) internal pure returns (uint256 s) {
    return uint256(keccak256(abi.encodePacked(SCALAR_FROM_CURVE_POINTS_HASH_PREFIX, hash, pk, gamma, v, uWitness)));
  }

  // True if (gamma, c, s) is a correctly constructed randomness proof from pk
  // and seed. zInv must be the inverse of the third ordinate from
  // _projectiveECAdd applied to cGammaWitness and sHashWitness. Corresponds to
  // section 5.3 of the IETF draft.
  //
  // TODO(alx): Since I'm only using pk in the ecrecover call, I could only pass
  // the x ordinate, and the parity of the y ordinate in the top bit of uWitness
  // (which I could make a uint256 without using any extra space.) Would save
  // about 2000 gas. https://www.pivotaltracker.com/story/show/170828567
  function _verifyVRFProof(
    uint256[2] memory pk,
    uint256[2] memory gamma,
    uint256 c,
    uint256 s,
    uint256 seed,
    address uWitness,
    uint256[2] memory cGammaWitness,
    uint256[2] memory sHashWitness,
    uint256 zInv
  ) internal view {
    unchecked {
      // solhint-disable-next-line custom-errors
      require(_isOnCurve(pk), "public key is not on curve");
      // solhint-disable-next-line custom-errors
      require(_isOnCurve(gamma), "gamma is not on curve");
      // solhint-disable-next-line custom-errors
      require(_isOnCurve(cGammaWitness), "cGammaWitness is not on curve");
      // solhint-disable-next-line custom-errors
      require(_isOnCurve(sHashWitness), "sHashWitness is not on curve");
      // Step 5. of IETF draft section 5.3 (pk corresponds to 5.3's Y, and here
      // we use the address of u instead of u itself. Also, here we add the
      // terms instead of taking the difference, and in the proof construction in
      // vrf.GenerateProof, we correspondingly take the difference instead of
      // taking the sum as they do in step 7 of section 5.1.)
      // solhint-disable-next-line custom-errors
      require(_verifyLinearCombinationWithGenerator(c, pk, s, uWitness), "addr(c*pk+s*g)!=_uWitness");
      // Step 4. of IETF draft section 5.3 (pk corresponds to Y, seed to alpha_string)
      uint256[2] memory hash = _hashToCurve(pk, seed);
      // Step 6. of IETF draft section 5.3, but see note for step 5 about +/- terms
      uint256[2] memory v = _linearCombination(c, gamma, cGammaWitness, s, hash, sHashWitness, zInv);
      // Steps 7. and 8. of IETF draft section 5.3
      uint256 derivedC = _scalarFromCurvePoints(hash, pk, gamma, uWitness, v);
      // solhint-disable-next-line custom-errors
      require(c == derivedC, "invalid proof");
    }
  }

  // Domain-separation tag for the hash used as the final VRF output.
  // Corresponds to vrfRandomOutputHashPrefix in vrf.go
  uint256 internal constant VRF_RANDOM_OUTPUT_HASH_PREFIX = 3;

  struct Proof {
    uint256[2] pk;
    uint256[2] gamma;
    uint256 c;
    uint256 s;
    uint256 seed;
    address uWitness;
    uint256[2] cGammaWitness;
    uint256[2] sHashWitness;
    uint256 zInv;
  }

  /* ***************************************************************************
     * @notice Returns proof's output, if proof is valid. Otherwise reverts

     * @param proof vrf proof components
     * @param seed  seed used to generate the vrf output
     *
     * Throws if proof is invalid, otherwise:
     * @return output i.e., the random output implied by the proof
     * ***************************************************************************
     */
  function _randomValueFromVRFProof(Proof memory proof, uint256 seed) internal view returns (uint256 output) {
    _verifyVRFProof(
      proof.pk,
      proof.gamma,
      proof.c,
      proof.s,
      seed,
      proof.uWitness,
      proof.cGammaWitness,
      proof.sHashWitness,
      proof.zInv
    );
    output = uint256(keccak256(abi.encode(VRF_RANDOM_OUTPUT_HASH_PREFIX, proof.gamma)));
    return output;
  }
}
          

contracts/vrf/VRFConsumerBaseV2.sol

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

/** ****************************************************************************
 * @notice Interface for contracts using VRF randomness
 * *****************************************************************************
 * @dev PURPOSE
 *
 * @dev Reggie the Random Oracle (not his real job) wants to provide randomness
 * @dev to Vera the verifier in such a way that Vera can be sure he's not
 * @dev making his output up to suit himself. Reggie provides Vera a public key
 * @dev to which he knows the secret key. Each time Vera provides a seed to
 * @dev Reggie, he gives back a value which is computed completely
 * @dev deterministically from the seed and the secret key.
 *
 * @dev Reggie provides a proof by which Vera can verify that the output was
 * @dev correctly computed once Reggie tells it to her, but without that proof,
 * @dev the output is indistinguishable to her from a uniform random sample
 * @dev from the output space.
 *
 * @dev The purpose of this contract is to make it easy for unrelated contracts
 * @dev to talk to Vera the verifier about the work Reggie is doing, to provide
 * @dev simple access to a verifiable source of randomness. It ensures 2 things:
 * @dev 1. The fulfillment came from the ErinaceusVRF
 * @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 _erinaceusVRF, address _link)
 * @dev       VRFConsumerBase(_erinaceusVRF) 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 ErinaceusVRFInterface
 * @dev subscription management functions).
 * @dev Call requestRandomWords(keyHash, subId, minimumRequestConfirmations,
 * @dev callbackGasLimit, numWords),
 * @dev see (ErinaceusVRFInterface for a description of the arguments).
 *
 * @dev Once the ErinaceusVRF 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 OnlyErinaceusCanFulfill(address have, address want);
  // solhint-disable-next-line chainlink-solidity/prefix-immutable-variables-with-i
  address private immutable erinaceusVRF;

  /**
   * @param _erinaceusVRF address of ErinaceusVRF contract
   */
  constructor(address _erinaceusVRF) {
    erinaceusVRF = _erinaceusVRF;
  }

  /**
   * @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
   */
  // solhint-disable-next-line chainlink-solidity/prefix-internal-functions-with-underscore
  function fulfillRandomWords(uint256 requestId, uint256[] memory randomWords) internal virtual;

  // rawFulfillRandomness is called by ErinaceusVRF 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 != erinaceusVRF) {
      revert OnlyErinaceusCanFulfill(msg.sender, erinaceusVRF);
    }
    fulfillRandomWords(requestId, randomWords);
  }
}
          

contracts/vrf/interfaces/ErinaceusVRFInterface.sol

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

interface ErinaceusVRFInterface {
  /**
   * @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 ErinaceusVRF 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(ERINACEUS),
   * @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 (uint256 balance, uint256 reqCount, address owner, address[] memory consumers);

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

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

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

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

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

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

hardhat/console.sol

// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.9.0;

library console {
    address constant CONSOLE_ADDRESS =
        0x000000000000000000636F6e736F6c652e6c6f67;

    function _sendLogPayloadImplementation(bytes memory payload) internal view {
        address consoleAddress = CONSOLE_ADDRESS;
        /// @solidity memory-safe-assembly
        assembly {
            pop(
                staticcall(
                    gas(),
                    consoleAddress,
                    add(payload, 32),
                    mload(payload),
                    0,
                    0
                )
            )
        }
    }

    function _castToPure(
      function(bytes memory) internal view fnIn
    ) internal pure returns (function(bytes memory) pure fnOut) {
        assembly {
            fnOut := fnIn
        }
    }

    function _sendLogPayload(bytes memory payload) internal pure {
        _castToPure(_sendLogPayloadImplementation)(payload);
    }

    function log() internal pure {
        _sendLogPayload(abi.encodeWithSignature("log()"));
    }
    function logInt(int256 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(int256)", p0));
    }

    function logUint(uint256 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0));
    }

    function logString(string memory p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string)", p0));
    }

    function logBool(bool p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
    }

    function logAddress(address p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address)", p0));
    }

    function logBytes(bytes memory p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes)", p0));
    }

    function logBytes1(bytes1 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes1)", p0));
    }

    function logBytes2(bytes2 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes2)", p0));
    }

    function logBytes3(bytes3 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes3)", p0));
    }

    function logBytes4(bytes4 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes4)", p0));
    }

    function logBytes5(bytes5 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes5)", p0));
    }

    function logBytes6(bytes6 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes6)", p0));
    }

    function logBytes7(bytes7 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes7)", p0));
    }

    function logBytes8(bytes8 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes8)", p0));
    }

    function logBytes9(bytes9 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes9)", p0));
    }

    function logBytes10(bytes10 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes10)", p0));
    }

    function logBytes11(bytes11 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes11)", p0));
    }

    function logBytes12(bytes12 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes12)", p0));
    }

    function logBytes13(bytes13 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes13)", p0));
    }

    function logBytes14(bytes14 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes14)", p0));
    }

    function logBytes15(bytes15 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes15)", p0));
    }

    function logBytes16(bytes16 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes16)", p0));
    }

    function logBytes17(bytes17 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes17)", p0));
    }

    function logBytes18(bytes18 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes18)", p0));
    }

    function logBytes19(bytes19 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes19)", p0));
    }

    function logBytes20(bytes20 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes20)", p0));
    }

    function logBytes21(bytes21 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes21)", p0));
    }

    function logBytes22(bytes22 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes22)", p0));
    }

    function logBytes23(bytes23 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes23)", p0));
    }

    function logBytes24(bytes24 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes24)", p0));
    }

    function logBytes25(bytes25 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes25)", p0));
    }

    function logBytes26(bytes26 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes26)", p0));
    }

    function logBytes27(bytes27 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes27)", p0));
    }

    function logBytes28(bytes28 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes28)", p0));
    }

    function logBytes29(bytes29 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes29)", p0));
    }

    function logBytes30(bytes30 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes30)", p0));
    }

    function logBytes31(bytes31 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes31)", p0));
    }

    function logBytes32(bytes32 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bytes32)", p0));
    }

    function log(uint256 p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256)", p0));
    }

    function log(string memory p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string)", p0));
    }

    function log(bool p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool)", p0));
    }

    function log(address p0) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address)", p0));
    }

    function log(uint256 p0, uint256 p1) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256)", p0, p1));
    }

    function log(uint256 p0, string memory p1) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,string)", p0, p1));
    }

    function log(uint256 p0, bool p1) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,bool)", p0, p1));
    }

    function log(uint256 p0, address p1) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,address)", p0, p1));
    }

    function log(string memory p0, uint256 p1) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint256)", p0, p1));
    }

    function log(string memory p0, string memory p1) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,string)", p0, p1));
    }

    function log(string memory p0, bool p1) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool)", p0, p1));
    }

    function log(string memory p0, address p1) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,address)", p0, p1));
    }

    function log(bool p0, uint256 p1) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint256)", p0, p1));
    }

    function log(bool p0, string memory p1) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string)", p0, p1));
    }

    function log(bool p0, bool p1) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool)", p0, p1));
    }

    function log(bool p0, address p1) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address)", p0, p1));
    }

    function log(address p0, uint256 p1) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint256)", p0, p1));
    }

    function log(address p0, string memory p1) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,string)", p0, p1));
    }

    function log(address p0, bool p1) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool)", p0, p1));
    }

    function log(address p0, address p1) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,address)", p0, p1));
    }

    function log(uint256 p0, uint256 p1, uint256 p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256)", p0, p1, p2));
    }

    function log(uint256 p0, uint256 p1, string memory p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string)", p0, p1, p2));
    }

    function log(uint256 p0, uint256 p1, bool p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool)", p0, p1, p2));
    }

    function log(uint256 p0, uint256 p1, address p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address)", p0, p1, p2));
    }

    function log(uint256 p0, string memory p1, uint256 p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256)", p0, p1, p2));
    }

    function log(uint256 p0, string memory p1, string memory p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string)", p0, p1, p2));
    }

    function log(uint256 p0, string memory p1, bool p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool)", p0, p1, p2));
    }

    function log(uint256 p0, string memory p1, address p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address)", p0, p1, p2));
    }

    function log(uint256 p0, bool p1, uint256 p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256)", p0, p1, p2));
    }

    function log(uint256 p0, bool p1, string memory p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string)", p0, p1, p2));
    }

    function log(uint256 p0, bool p1, bool p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool)", p0, p1, p2));
    }

    function log(uint256 p0, bool p1, address p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address)", p0, p1, p2));
    }

    function log(uint256 p0, address p1, uint256 p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256)", p0, p1, p2));
    }

    function log(uint256 p0, address p1, string memory p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string)", p0, p1, p2));
    }

    function log(uint256 p0, address p1, bool p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool)", p0, p1, p2));
    }

    function log(uint256 p0, address p1, address p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address)", p0, p1, p2));
    }

    function log(string memory p0, uint256 p1, uint256 p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256)", p0, p1, p2));
    }

    function log(string memory p0, uint256 p1, string memory p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string)", p0, p1, p2));
    }

    function log(string memory p0, uint256 p1, bool p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool)", p0, p1, p2));
    }

    function log(string memory p0, uint256 p1, address p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address)", p0, p1, p2));
    }

    function log(string memory p0, string memory p1, uint256 p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256)", p0, p1, p2));
    }

    function log(string memory p0, string memory p1, string memory p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,string)", p0, p1, p2));
    }

    function log(string memory p0, string memory p1, bool p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,bool)", p0, p1, p2));
    }

    function log(string memory p0, string memory p1, address p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,address)", p0, p1, p2));
    }

    function log(string memory p0, bool p1, uint256 p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256)", p0, p1, p2));
    }

    function log(string memory p0, bool p1, string memory p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,string)", p0, p1, p2));
    }

    function log(string memory p0, bool p1, bool p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool)", p0, p1, p2));
    }

    function log(string memory p0, bool p1, address p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,address)", p0, p1, p2));
    }

    function log(string memory p0, address p1, uint256 p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256)", p0, p1, p2));
    }

    function log(string memory p0, address p1, string memory p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,string)", p0, p1, p2));
    }

    function log(string memory p0, address p1, bool p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,bool)", p0, p1, p2));
    }

    function log(string memory p0, address p1, address p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,address)", p0, p1, p2));
    }

    function log(bool p0, uint256 p1, uint256 p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256)", p0, p1, p2));
    }

    function log(bool p0, uint256 p1, string memory p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string)", p0, p1, p2));
    }

    function log(bool p0, uint256 p1, bool p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool)", p0, p1, p2));
    }

    function log(bool p0, uint256 p1, address p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address)", p0, p1, p2));
    }

    function log(bool p0, string memory p1, uint256 p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256)", p0, p1, p2));
    }

    function log(bool p0, string memory p1, string memory p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,string)", p0, p1, p2));
    }

    function log(bool p0, string memory p1, bool p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool)", p0, p1, p2));
    }

    function log(bool p0, string memory p1, address p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,address)", p0, p1, p2));
    }

    function log(bool p0, bool p1, uint256 p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256)", p0, p1, p2));
    }

    function log(bool p0, bool p1, string memory p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string)", p0, p1, p2));
    }

    function log(bool p0, bool p1, bool p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool)", p0, p1, p2));
    }

    function log(bool p0, bool p1, address p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address)", p0, p1, p2));
    }

    function log(bool p0, address p1, uint256 p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256)", p0, p1, p2));
    }

    function log(bool p0, address p1, string memory p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,string)", p0, p1, p2));
    }

    function log(bool p0, address p1, bool p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool)", p0, p1, p2));
    }

    function log(bool p0, address p1, address p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,address)", p0, p1, p2));
    }

    function log(address p0, uint256 p1, uint256 p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256)", p0, p1, p2));
    }

    function log(address p0, uint256 p1, string memory p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string)", p0, p1, p2));
    }

    function log(address p0, uint256 p1, bool p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool)", p0, p1, p2));
    }

    function log(address p0, uint256 p1, address p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address)", p0, p1, p2));
    }

    function log(address p0, string memory p1, uint256 p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256)", p0, p1, p2));
    }

    function log(address p0, string memory p1, string memory p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,string)", p0, p1, p2));
    }

    function log(address p0, string memory p1, bool p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,bool)", p0, p1, p2));
    }

    function log(address p0, string memory p1, address p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,address)", p0, p1, p2));
    }

    function log(address p0, bool p1, uint256 p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256)", p0, p1, p2));
    }

    function log(address p0, bool p1, string memory p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,string)", p0, p1, p2));
    }

    function log(address p0, bool p1, bool p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool)", p0, p1, p2));
    }

    function log(address p0, bool p1, address p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,address)", p0, p1, p2));
    }

    function log(address p0, address p1, uint256 p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256)", p0, p1, p2));
    }

    function log(address p0, address p1, string memory p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,string)", p0, p1, p2));
    }

    function log(address p0, address p1, bool p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,bool)", p0, p1, p2));
    }

    function log(address p0, address p1, address p2) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,address)", p0, p1, p2));
    }

    function log(uint256 p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,uint256)", p0, p1, p2, p3));
    }

    function log(uint256 p0, uint256 p1, uint256 p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,string)", p0, p1, p2, p3));
    }

    function log(uint256 p0, uint256 p1, uint256 p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,bool)", p0, p1, p2, p3));
    }

    function log(uint256 p0, uint256 p1, uint256 p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,uint256,address)", p0, p1, p2, p3));
    }

    function log(uint256 p0, uint256 p1, string memory p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,uint256)", p0, p1, p2, p3));
    }

    function log(uint256 p0, uint256 p1, string memory p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,string)", p0, p1, p2, p3));
    }

    function log(uint256 p0, uint256 p1, string memory p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,bool)", p0, p1, p2, p3));
    }

    function log(uint256 p0, uint256 p1, string memory p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,string,address)", p0, p1, p2, p3));
    }

    function log(uint256 p0, uint256 p1, bool p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,uint256)", p0, p1, p2, p3));
    }

    function log(uint256 p0, uint256 p1, bool p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,string)", p0, p1, p2, p3));
    }

    function log(uint256 p0, uint256 p1, bool p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,bool)", p0, p1, p2, p3));
    }

    function log(uint256 p0, uint256 p1, bool p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,bool,address)", p0, p1, p2, p3));
    }

    function log(uint256 p0, uint256 p1, address p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,uint256)", p0, p1, p2, p3));
    }

    function log(uint256 p0, uint256 p1, address p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,string)", p0, p1, p2, p3));
    }

    function log(uint256 p0, uint256 p1, address p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,bool)", p0, p1, p2, p3));
    }

    function log(uint256 p0, uint256 p1, address p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,uint256,address,address)", p0, p1, p2, p3));
    }

    function log(uint256 p0, string memory p1, uint256 p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,uint256)", p0, p1, p2, p3));
    }

    function log(uint256 p0, string memory p1, uint256 p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,string)", p0, p1, p2, p3));
    }

    function log(uint256 p0, string memory p1, uint256 p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,bool)", p0, p1, p2, p3));
    }

    function log(uint256 p0, string memory p1, uint256 p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,string,uint256,address)", p0, p1, p2, p3));
    }

    function log(uint256 p0, string memory p1, string memory p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,uint256)", p0, p1, p2, p3));
    }

    function log(uint256 p0, string memory p1, string memory p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,string)", p0, p1, p2, p3));
    }

    function log(uint256 p0, string memory p1, string memory p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,bool)", p0, p1, p2, p3));
    }

    function log(uint256 p0, string memory p1, string memory p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,string,string,address)", p0, p1, p2, p3));
    }

    function log(uint256 p0, string memory p1, bool p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,uint256)", p0, p1, p2, p3));
    }

    function log(uint256 p0, string memory p1, bool p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,string)", p0, p1, p2, p3));
    }

    function log(uint256 p0, string memory p1, bool p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,bool)", p0, p1, p2, p3));
    }

    function log(uint256 p0, string memory p1, bool p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,string,bool,address)", p0, p1, p2, p3));
    }

    function log(uint256 p0, string memory p1, address p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,uint256)", p0, p1, p2, p3));
    }

    function log(uint256 p0, string memory p1, address p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,string)", p0, p1, p2, p3));
    }

    function log(uint256 p0, string memory p1, address p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,bool)", p0, p1, p2, p3));
    }

    function log(uint256 p0, string memory p1, address p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,string,address,address)", p0, p1, p2, p3));
    }

    function log(uint256 p0, bool p1, uint256 p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,uint256)", p0, p1, p2, p3));
    }

    function log(uint256 p0, bool p1, uint256 p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,string)", p0, p1, p2, p3));
    }

    function log(uint256 p0, bool p1, uint256 p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,bool)", p0, p1, p2, p3));
    }

    function log(uint256 p0, bool p1, uint256 p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,uint256,address)", p0, p1, p2, p3));
    }

    function log(uint256 p0, bool p1, string memory p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,uint256)", p0, p1, p2, p3));
    }

    function log(uint256 p0, bool p1, string memory p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,string)", p0, p1, p2, p3));
    }

    function log(uint256 p0, bool p1, string memory p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,bool)", p0, p1, p2, p3));
    }

    function log(uint256 p0, bool p1, string memory p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,string,address)", p0, p1, p2, p3));
    }

    function log(uint256 p0, bool p1, bool p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,uint256)", p0, p1, p2, p3));
    }

    function log(uint256 p0, bool p1, bool p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,string)", p0, p1, p2, p3));
    }

    function log(uint256 p0, bool p1, bool p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,bool)", p0, p1, p2, p3));
    }

    function log(uint256 p0, bool p1, bool p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,bool,address)", p0, p1, p2, p3));
    }

    function log(uint256 p0, bool p1, address p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,uint256)", p0, p1, p2, p3));
    }

    function log(uint256 p0, bool p1, address p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,string)", p0, p1, p2, p3));
    }

    function log(uint256 p0, bool p1, address p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,bool)", p0, p1, p2, p3));
    }

    function log(uint256 p0, bool p1, address p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,bool,address,address)", p0, p1, p2, p3));
    }

    function log(uint256 p0, address p1, uint256 p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,uint256)", p0, p1, p2, p3));
    }

    function log(uint256 p0, address p1, uint256 p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,string)", p0, p1, p2, p3));
    }

    function log(uint256 p0, address p1, uint256 p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,bool)", p0, p1, p2, p3));
    }

    function log(uint256 p0, address p1, uint256 p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,address,uint256,address)", p0, p1, p2, p3));
    }

    function log(uint256 p0, address p1, string memory p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,uint256)", p0, p1, p2, p3));
    }

    function log(uint256 p0, address p1, string memory p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,string)", p0, p1, p2, p3));
    }

    function log(uint256 p0, address p1, string memory p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,bool)", p0, p1, p2, p3));
    }

    function log(uint256 p0, address p1, string memory p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,address,string,address)", p0, p1, p2, p3));
    }

    function log(uint256 p0, address p1, bool p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,uint256)", p0, p1, p2, p3));
    }

    function log(uint256 p0, address p1, bool p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,string)", p0, p1, p2, p3));
    }

    function log(uint256 p0, address p1, bool p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,bool)", p0, p1, p2, p3));
    }

    function log(uint256 p0, address p1, bool p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,address,bool,address)", p0, p1, p2, p3));
    }

    function log(uint256 p0, address p1, address p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,uint256)", p0, p1, p2, p3));
    }

    function log(uint256 p0, address p1, address p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,string)", p0, p1, p2, p3));
    }

    function log(uint256 p0, address p1, address p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,bool)", p0, p1, p2, p3));
    }

    function log(uint256 p0, address p1, address p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(uint256,address,address,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,uint256)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint256 p1, uint256 p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint256 p1, uint256 p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint256 p1, uint256 p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint256,uint256,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint256 p1, string memory p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,uint256)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint256 p1, string memory p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint256 p1, string memory p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint256 p1, string memory p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint256,string,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint256 p1, bool p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,uint256)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint256 p1, bool p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint256 p1, bool p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint256 p1, bool p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint256,bool,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint256 p1, address p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,uint256)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint256 p1, address p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint256 p1, address p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, uint256 p1, address p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,uint256,address,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, uint256 p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,uint256)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, uint256 p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, uint256 p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, uint256 p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,uint256,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, string memory p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,string,uint256)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, string memory p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,string,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, string memory p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,string,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, string memory p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,string,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, bool p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,uint256)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, bool p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, bool p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, bool p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,bool,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, address p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,address,uint256)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, address p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,address,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, address p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,address,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, string memory p1, address p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,string,address,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, uint256 p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,uint256)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, uint256 p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, uint256 p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, uint256 p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,uint256,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, string memory p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,uint256)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, string memory p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, string memory p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, string memory p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,string,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, bool p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,uint256)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, bool p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, bool p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, bool p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,bool,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, address p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,uint256)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, address p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, address p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, bool p1, address p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,bool,address,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, uint256 p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,uint256)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, uint256 p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, uint256 p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, uint256 p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,uint256,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, string memory p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,string,uint256)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, string memory p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,string,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, string memory p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,string,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, string memory p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,string,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, bool p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,uint256)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, bool p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, bool p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, bool p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,bool,address)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, address p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,address,uint256)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, address p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,address,string)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, address p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,address,bool)", p0, p1, p2, p3));
    }

    function log(string memory p0, address p1, address p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(string,address,address,address)", p0, p1, p2, p3));
    }

    function log(bool p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,uint256)", p0, p1, p2, p3));
    }

    function log(bool p0, uint256 p1, uint256 p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,string)", p0, p1, p2, p3));
    }

    function log(bool p0, uint256 p1, uint256 p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, uint256 p1, uint256 p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,uint256,address)", p0, p1, p2, p3));
    }

    function log(bool p0, uint256 p1, string memory p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,uint256)", p0, p1, p2, p3));
    }

    function log(bool p0, uint256 p1, string memory p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,string)", p0, p1, p2, p3));
    }

    function log(bool p0, uint256 p1, string memory p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, uint256 p1, string memory p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,string,address)", p0, p1, p2, p3));
    }

    function log(bool p0, uint256 p1, bool p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,uint256)", p0, p1, p2, p3));
    }

    function log(bool p0, uint256 p1, bool p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,string)", p0, p1, p2, p3));
    }

    function log(bool p0, uint256 p1, bool p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, uint256 p1, bool p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,bool,address)", p0, p1, p2, p3));
    }

    function log(bool p0, uint256 p1, address p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,uint256)", p0, p1, p2, p3));
    }

    function log(bool p0, uint256 p1, address p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,string)", p0, p1, p2, p3));
    }

    function log(bool p0, uint256 p1, address p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, uint256 p1, address p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,uint256,address,address)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, uint256 p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,uint256)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, uint256 p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,string)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, uint256 p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, uint256 p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,uint256,address)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, string memory p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,uint256)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, string memory p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,string)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, string memory p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, string memory p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,string,address)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, bool p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,uint256)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, bool p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,string)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, bool p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, bool p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,bool,address)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, address p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,uint256)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, address p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,string)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, address p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, string memory p1, address p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,string,address,address)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, uint256 p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,uint256)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, uint256 p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,string)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, uint256 p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, uint256 p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,uint256,address)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, string memory p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,uint256)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, string memory p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,string)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, string memory p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, string memory p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,string,address)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, bool p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,uint256)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, bool p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,string)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, bool p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, bool p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,bool,address)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, address p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,uint256)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, address p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,string)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, address p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, bool p1, address p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,bool,address,address)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, uint256 p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,uint256)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, uint256 p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,string)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, uint256 p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, uint256 p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,uint256,address)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, string memory p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,uint256)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, string memory p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,string)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, string memory p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, string memory p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,string,address)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, bool p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,uint256)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, bool p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,string)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, bool p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, bool p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,bool,address)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, address p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,uint256)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, address p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,string)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, address p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,bool)", p0, p1, p2, p3));
    }

    function log(bool p0, address p1, address p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(bool,address,address,address)", p0, p1, p2, p3));
    }

    function log(address p0, uint256 p1, uint256 p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,uint256)", p0, p1, p2, p3));
    }

    function log(address p0, uint256 p1, uint256 p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,string)", p0, p1, p2, p3));
    }

    function log(address p0, uint256 p1, uint256 p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,bool)", p0, p1, p2, p3));
    }

    function log(address p0, uint256 p1, uint256 p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint256,uint256,address)", p0, p1, p2, p3));
    }

    function log(address p0, uint256 p1, string memory p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,uint256)", p0, p1, p2, p3));
    }

    function log(address p0, uint256 p1, string memory p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,string)", p0, p1, p2, p3));
    }

    function log(address p0, uint256 p1, string memory p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,bool)", p0, p1, p2, p3));
    }

    function log(address p0, uint256 p1, string memory p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint256,string,address)", p0, p1, p2, p3));
    }

    function log(address p0, uint256 p1, bool p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,uint256)", p0, p1, p2, p3));
    }

    function log(address p0, uint256 p1, bool p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,string)", p0, p1, p2, p3));
    }

    function log(address p0, uint256 p1, bool p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,bool)", p0, p1, p2, p3));
    }

    function log(address p0, uint256 p1, bool p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint256,bool,address)", p0, p1, p2, p3));
    }

    function log(address p0, uint256 p1, address p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,uint256)", p0, p1, p2, p3));
    }

    function log(address p0, uint256 p1, address p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,string)", p0, p1, p2, p3));
    }

    function log(address p0, uint256 p1, address p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,bool)", p0, p1, p2, p3));
    }

    function log(address p0, uint256 p1, address p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,uint256,address,address)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, uint256 p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,uint256)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, uint256 p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,string)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, uint256 p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,bool)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, uint256 p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,uint256,address)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, string memory p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,string,uint256)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, string memory p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,string,string)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, string memory p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,string,bool)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, string memory p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,string,address)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, bool p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,uint256)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, bool p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,string)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, bool p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,bool)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, bool p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,bool,address)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, address p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,address,uint256)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, address p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,address,string)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, address p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,address,bool)", p0, p1, p2, p3));
    }

    function log(address p0, string memory p1, address p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,string,address,address)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, uint256 p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,uint256)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, uint256 p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,string)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, uint256 p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,bool)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, uint256 p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,uint256,address)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, string memory p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,uint256)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, string memory p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,string)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, string memory p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,bool)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, string memory p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,string,address)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, bool p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,uint256)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, bool p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,string)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, bool p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,bool)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, bool p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,bool,address)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, address p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,uint256)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, address p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,string)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, address p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,bool)", p0, p1, p2, p3));
    }

    function log(address p0, bool p1, address p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,bool,address,address)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, uint256 p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,uint256)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, uint256 p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,string)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, uint256 p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,bool)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, uint256 p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,uint256,address)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, string memory p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,string,uint256)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, string memory p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,string,string)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, string memory p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,string,bool)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, string memory p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,string,address)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, bool p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,uint256)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, bool p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,string)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, bool p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,bool)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, bool p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,bool,address)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, address p2, uint256 p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,address,uint256)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, address p2, string memory p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,address,string)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, address p2, bool p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,address,bool)", p0, p1, p2, p3));
    }

    function log(address p0, address p1, address p2, address p3) internal pure {
        _sendLogPayload(abi.encodeWithSignature("log(address,address,address,address)", p0, p1, p2, p3));
    }

}
          

Compiler Settings

{"outputSelection":{"*":{"*":["*"],"":["*"]}},"optimizer":{"runs":200,"enabled":true},"metadata":{"useLiteralContent":true},"libraries":{}}
              

Contract ABI

[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"_wFTN","internalType":"address payable"},{"type":"address","name":"_hashHub","internalType":"address"},{"type":"address","name":"_owner","internalType":"address"}]},{"type":"error","name":"BalanceInvariantViolated","inputs":[{"type":"uint256","name":"internalBalance","internalType":"uint256"},{"type":"uint256","name":"externalBalance","internalType":"uint256"}]},{"type":"error","name":"BlockhashNotInStore","inputs":[{"type":"uint256","name":"blocNumber","internalType":"uint256"}]},{"type":"error","name":"CantBeAddressZero","inputs":[]},{"type":"error","name":"GasLimitTooBig","inputs":[{"type":"uint32","name":"have","internalType":"uint32"},{"type":"uint32","name":"want","internalType":"uint32"}]},{"type":"error","name":"IncorrectCommitment","inputs":[]},{"type":"error","name":"InsufficientBalance","inputs":[]},{"type":"error","name":"InsufficientGasForConsumer","inputs":[{"type":"uint256","name":"have","internalType":"uint256"},{"type":"uint256","name":"want","internalType":"uint256"}]},{"type":"error","name":"InvalidBlockhash","inputs":[{"type":"uint256","name":"blockNum","internalType":"uint256"}]},{"type":"error","name":"InvalidCalldata","inputs":[]},{"type":"error","name":"InvalidConsumer","inputs":[{"type":"uint64","name":"subId","internalType":"uint64"},{"type":"address","name":"consumer","internalType":"address"}]},{"type":"error","name":"InvalidRequestConfirmations","inputs":[{"type":"uint16","name":"have","internalType":"uint16"},{"type":"uint16","name":"min","internalType":"uint16"},{"type":"uint16","name":"max","internalType":"uint16"}]},{"type":"error","name":"InvalidSubscription","inputs":[]},{"type":"error","name":"MustBeRequestedOwner","inputs":[{"type":"address","name":"proposedOwner","internalType":"address"}]},{"type":"error","name":"MustBeSubOwner","inputs":[{"type":"address","name":"owner","internalType":"address"}]},{"type":"error","name":"NoCorrespondingRequest","inputs":[]},{"type":"error","name":"NoSuchProvingKey","inputs":[{"type":"bytes32","name":"keyHash","internalType":"bytes32"}]},{"type":"error","name":"NumWordsTooBig","inputs":[{"type":"uint32","name":"have","internalType":"uint32"},{"type":"uint32","name":"want","internalType":"uint32"}]},{"type":"error","name":"OnlyCallableFromLink","inputs":[]},{"type":"error","name":"PaymentTooLarge","inputs":[]},{"type":"error","name":"PendingRequestExists","inputs":[]},{"type":"error","name":"PercentageIsNotInRange","inputs":[]},{"type":"error","name":"ProvingKeyAlreadyRegistered","inputs":[{"type":"bytes32","name":"keyHash","internalType":"bytes32"}]},{"type":"error","name":"Reentrant","inputs":[]},{"type":"error","name":"TooManyConsumers","inputs":[]},{"type":"event","name":"ConfigSet","inputs":[{"type":"uint16","name":"minimumRequestConfirmations","internalType":"uint16","indexed":false},{"type":"uint32","name":"maxGasLimit","internalType":"uint32","indexed":false},{"type":"uint32","name":"gasAfterPaymentCalculation","internalType":"uint32","indexed":false},{"type":"tuple","name":"feeConfig","internalType":"struct ErinaceusVRF.FeeConfig","indexed":false,"components":[{"type":"uint32","name":"fulfillmentFlatFeeWFTNPPMTier1","internalType":"uint32"},{"type":"uint32","name":"fulfillmentFlatFeeWFTNPPMTier2","internalType":"uint32"},{"type":"uint32","name":"fulfillmentFlatFeeWFTNPPMTier3","internalType":"uint32"},{"type":"uint32","name":"fulfillmentFlatFeeWFTNPPMTier4","internalType":"uint32"},{"type":"uint32","name":"fulfillmentFlatFeeWFTNPPMTier5","internalType":"uint32"},{"type":"uint24","name":"reqsForTier2","internalType":"uint24"},{"type":"uint24","name":"reqsForTier3","internalType":"uint24"},{"type":"uint24","name":"reqsForTier4","internalType":"uint24"},{"type":"uint24","name":"reqsForTier5","internalType":"uint24"}]}],"anonymous":false},{"type":"event","name":"FundsRecovered","inputs":[{"type":"address","name":"to","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"HashHubChanged","inputs":[{"type":"address","name":"oldHashHub","internalType":"address","indexed":false},{"type":"address","name":"newHashHub","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"HashHubFunded","inputs":[{"type":"uint256","name":"oldBalance","internalType":"uint256","indexed":false},{"type":"uint256","name":"newBalance","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"ProvingKeyDeregistered","inputs":[{"type":"bytes32","name":"keyHash","internalType":"bytes32","indexed":false},{"type":"address","name":"oracle","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"ProvingKeyRegistered","inputs":[{"type":"bytes32","name":"keyHash","internalType":"bytes32","indexed":false},{"type":"address","name":"oracle","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RandomWordsFulfilled","inputs":[{"type":"uint256","name":"requestId","internalType":"uint256","indexed":true},{"type":"uint256","name":"outputSeed","internalType":"uint256","indexed":false},{"type":"uint256","name":"payment","internalType":"uint256","indexed":false},{"type":"bool","name":"success","internalType":"bool","indexed":false}],"anonymous":false},{"type":"event","name":"RandomWordsRequested","inputs":[{"type":"bytes32","name":"keyHash","internalType":"bytes32","indexed":true},{"type":"uint256","name":"requestId","internalType":"uint256","indexed":false},{"type":"uint256","name":"preSeed","internalType":"uint256","indexed":false},{"type":"uint64","name":"subId","internalType":"uint64","indexed":true},{"type":"uint16","name":"minimumRequestConfirmations","internalType":"uint16","indexed":false},{"type":"uint32","name":"callbackGasLimit","internalType":"uint32","indexed":false},{"type":"uint32","name":"numWords","internalType":"uint32","indexed":false},{"type":"address","name":"sender","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"RewardSet","inputs":[{"type":"uint256","name":"reward","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"SubscriptionCanceled","inputs":[{"type":"uint64","name":"subId","internalType":"uint64","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":false},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"SubscriptionConsumerAdded","inputs":[{"type":"uint64","name":"subId","internalType":"uint64","indexed":true},{"type":"address","name":"consumer","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"SubscriptionConsumerRemoved","inputs":[{"type":"uint64","name":"subId","internalType":"uint64","indexed":true},{"type":"address","name":"consumer","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"SubscriptionCreated","inputs":[{"type":"uint64","name":"subId","internalType":"uint64","indexed":true},{"type":"address","name":"owner","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"SubscriptionFunded","inputs":[{"type":"uint64","name":"subId","internalType":"uint64","indexed":true},{"type":"uint256","name":"oldBalance","internalType":"uint256","indexed":false},{"type":"uint256","name":"newBalance","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"SubscriptionOwnerTransferRequested","inputs":[{"type":"uint64","name":"subId","internalType":"uint64","indexed":true},{"type":"address","name":"from","internalType":"address","indexed":false},{"type":"address","name":"to","internalType":"address","indexed":false}],"anonymous":false},{"type":"event","name":"SubscriptionOwnerTransferred","inputs":[{"type":"uint64","name":"subId","internalType":"uint64","indexed":true},{"type":"address","name":"from","internalType":"address","indexed":false},{"type":"address","name":"to","internalType":"address","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IHashHub"}],"name":"HashHub","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"HashHubBalance","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"HashHubReward","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint16","name":"","internalType":"uint16"}],"name":"MAX_CONSUMERS","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint32","name":"","internalType":"uint32"}],"name":"MAX_NUM_WORDS","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint16","name":"","internalType":"uint16"}],"name":"MAX_REQUEST_CONFIRMATIONS","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"acceptSubscriptionOwnerTransfer","inputs":[{"type":"uint64","name":"subId","internalType":"uint64"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"addConsumer","inputs":[{"type":"uint64","name":"subId","internalType":"uint64"},{"type":"address","name":"consumer","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"cancelSubscription","inputs":[{"type":"uint64","name":"subId","internalType":"uint64"},{"type":"address","name":"to","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint64","name":"","internalType":"uint64"}],"name":"createSubscription","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"deregisterProvingKey","inputs":[{"type":"uint256[2]","name":"publicProvingKey","internalType":"uint256[2]"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"feePercentage","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"fulfillRandomWords","inputs":[{"type":"tuple","name":"proof","internalType":"struct VRF.Proof","components":[{"type":"uint256[2]","name":"pk","internalType":"uint256[2]"},{"type":"uint256[2]","name":"gamma","internalType":"uint256[2]"},{"type":"uint256","name":"c","internalType":"uint256"},{"type":"uint256","name":"s","internalType":"uint256"},{"type":"uint256","name":"seed","internalType":"uint256"},{"type":"address","name":"uWitness","internalType":"address"},{"type":"uint256[2]","name":"cGammaWitness","internalType":"uint256[2]"},{"type":"uint256[2]","name":"sHashWitness","internalType":"uint256[2]"},{"type":"uint256","name":"zInv","internalType":"uint256"}]},{"type":"tuple","name":"rc","internalType":"struct ErinaceusVRF.RequestCommitment","components":[{"type":"uint64","name":"blockNum","internalType":"uint64"},{"type":"uint64","name":"subId","internalType":"uint64"},{"type":"uint32","name":"callbackGasLimit","internalType":"uint32"},{"type":"uint32","name":"numWords","internalType":"uint32"},{"type":"address","name":"sender","internalType":"address"}]}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"fundHashHub","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"fundSubscribtion","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint64","name":"subId","internalType":"uint64"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"getCommitment","inputs":[{"type":"uint256","name":"requestId","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint16","name":"minimumRequestConfirmations","internalType":"uint16"},{"type":"uint32","name":"maxGasLimit","internalType":"uint32"},{"type":"uint32","name":"gasAfterPaymentCalculation","internalType":"uint32"}],"name":"getConfig","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint64","name":"","internalType":"uint64"}],"name":"getCurrentSubId","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint32","name":"fulfillmentFlatFeeWFTNPPMTier1","internalType":"uint32"},{"type":"uint32","name":"fulfillmentFlatFeeWFTNPPMTier2","internalType":"uint32"},{"type":"uint32","name":"fulfillmentFlatFeeWFTNPPMTier3","internalType":"uint32"},{"type":"uint32","name":"fulfillmentFlatFeeWFTNPPMTier4","internalType":"uint32"},{"type":"uint32","name":"fulfillmentFlatFeeWFTNPPMTier5","internalType":"uint32"},{"type":"uint24","name":"reqsForTier2","internalType":"uint24"},{"type":"uint24","name":"reqsForTier3","internalType":"uint24"},{"type":"uint24","name":"reqsForTier4","internalType":"uint24"},{"type":"uint24","name":"reqsForTier5","internalType":"uint24"}],"name":"getFeeConfig","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint32","name":"","internalType":"uint32"}],"name":"getFeeTier","inputs":[{"type":"uint256","name":"reqCount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint16","name":"","internalType":"uint16"},{"type":"uint32","name":"","internalType":"uint32"},{"type":"bytes32[]","name":"","internalType":"bytes32[]"}],"name":"getRequestConfig","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"balance","internalType":"uint256"},{"type":"uint256","name":"reqCount","internalType":"uint256"},{"type":"address","name":"owner","internalType":"address"},{"type":"address[]","name":"consumers","internalType":"address[]"}],"name":"getSubscription","inputs":[{"type":"uint64","name":"subId","internalType":"uint64"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getTotalBalance","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"getWithdrawableAmount","inputs":[]},{"type":"function","stateMutability":"pure","outputs":[{"type":"bytes32","name":"","internalType":"bytes32"}],"name":"hashOfKey","inputs":[{"type":"uint256[2]","name":"publicKey","internalType":"uint256[2]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"oracleWithdraw","inputs":[{"type":"address","name":"recipient","internalType":"address"},{"type":"uint96","name":"amount","internalType":"uint96"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"ownerCancelSubscription","inputs":[{"type":"uint64","name":"subId","internalType":"uint64"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"pendingRequestExists","inputs":[{"type":"uint64","name":"subId","internalType":"uint64"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"recoverFunds","inputs":[{"type":"address","name":"to","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"registerProvingKey","inputs":[{"type":"address","name":"oracle","internalType":"address"},{"type":"uint256[2]","name":"publicProvingKey","internalType":"uint256[2]"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"removeConsumer","inputs":[{"type":"uint64","name":"subId","internalType":"uint64"},{"type":"address","name":"consumer","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"requestRandomWords","inputs":[{"type":"bytes32","name":"keyHash","internalType":"bytes32"},{"type":"uint64","name":"subId","internalType":"uint64"},{"type":"uint16","name":"requestConfirmations","internalType":"uint16"},{"type":"uint32","name":"callbackGasLimit","internalType":"uint32"},{"type":"uint32","name":"numWords","internalType":"uint32"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"requestSubscriptionOwnerTransfer","inputs":[{"type":"uint64","name":"subId","internalType":"uint64"},{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"requestedOwner","internalType":"address"}],"name":"s_subscriptionConfigs","inputs":[{"type":"uint64","name":"","internalType":"uint64"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"balance","internalType":"uint256"},{"type":"uint256","name":"reqCount","internalType":"uint256"}],"name":"s_subscriptions","inputs":[{"type":"uint64","name":"","internalType":"uint64"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setConfig","inputs":[{"type":"uint16","name":"minimumRequestConfirmations","internalType":"uint16"},{"type":"uint32","name":"maxGasLimit","internalType":"uint32"},{"type":"uint32","name":"gasAfterPaymentCalculation","internalType":"uint32"},{"type":"tuple","name":"feeConfig","internalType":"struct ErinaceusVRF.FeeConfig","components":[{"type":"uint32","name":"fulfillmentFlatFeeWFTNPPMTier1","internalType":"uint32"},{"type":"uint32","name":"fulfillmentFlatFeeWFTNPPMTier2","internalType":"uint32"},{"type":"uint32","name":"fulfillmentFlatFeeWFTNPPMTier3","internalType":"uint32"},{"type":"uint32","name":"fulfillmentFlatFeeWFTNPPMTier4","internalType":"uint32"},{"type":"uint32","name":"fulfillmentFlatFeeWFTNPPMTier5","internalType":"uint32"},{"type":"uint24","name":"reqsForTier2","internalType":"uint24"},{"type":"uint24","name":"reqsForTier3","internalType":"uint24"},{"type":"uint24","name":"reqsForTier4","internalType":"uint24"},{"type":"uint24","name":"reqsForTier5","internalType":"uint24"}]}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setHushHub","inputs":[{"type":"address","name":"_hashHub","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setRewardForHashHub","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setTeam","inputs":[{"type":"address","name":"_teamAddress","internalType":"address"},{"type":"uint256","name":"_feePercentage","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"team","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract IWFTN"}],"name":"wFTN","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"withdrawForTeam","inputs":[{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"withdrawableForTeam","inputs":[]}]
              

Contract Creation Code

0x60806040523480156200001157600080fd5b5060405162004904380380620049048339810160408190526200003491620000d3565b6200003f3362000083565b600180546001600160a01b038086166001600160a01b03199283161790925560028054928516929091169190911790556200007a8162000083565b50505062000140565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080600060608486031215620000e957600080fd5b8351620000f68162000127565b6020850151909350620001098162000127565b60408501519092506200011c8162000127565b809150509250925092565b6001600160a01b03811681146200013d57600080fd5b50565b6147b480620001506000396000f3fe608060405234801561001057600080fd5b50600436106102895760003560e01c8063823597401161015c578063b7e2a68a116100ce578063d7ca6f9b11610087578063d7ca6f9b14610689578063e4e1b45d146106dd578063e72f6e30146106f0578063e82ad7d414610703578063eccea3e214610726578063f2fde38b1461073957600080fd5b8063b7e2a68a146105de578063bc14edcf146105f1578063c3f909d414610604578063c8f7facc14610650578063caf70c4a14610663578063d7ae1d301461067657600080fd5b8063a001ecdd11610120578063a001ecdd1461057b578063a0a19abd14610584578063a21a23e414610597578063a47c76961461059f578063af198b97146105c2578063aff4fb23146105d557600080fd5b8063823597401461050457806385f2aef2146105175780638da5cb5b1461054257806390be10cc146105535780639f87fad71461056857600080fd5b806340d6bb821161020057806366316d8d116101b957806366316d8d146104675780636840c05e1461047a57806369bcdb7d146104b65780636f64f03f146104d6578063715018a6146104e95780637341c10c146104f157600080fd5b806340d6bb821461037d5780634c6ad91c1461039b578063572727b0146103a45780635d3b1d30146103b75780635fbbc0d2146103ca57806364d51a2a1461045f57600080fd5b80630f06cbe0116102525780630f06cbe01461030e57806312b583491461032157806315c48b8414610333578063167957bd1461034e5780631a26c051146103575780631d16919b1461036a57600080fd5b80620122911461028e57806302bcc5b6146102ae57806304c357cb146102c357806306bfa637146102d657806308821d58146102fb575b600080fd5b61029661074c565b6040516102a59392919061440e565b60405180910390f35b6102c16102bc366004614306565b6107c8565b005b6102c16102d1366004614321565b61083f565b600a546001600160401b03165b6040516001600160401b0390911681526020016102a5565b6102c1610309366004614030565b61098a565b6102c161031c3660046142e3565b610b1e565b600b545b6040519081526020016102a5565b61033b60c881565b60405161ffff90911681526020016102a5565b61032560045481565b6102c16103653660046142ca565b610cb6565b6102c16103783660046141c9565b610dc6565b6103866101f481565b60405163ffffffff90911681526020016102a5565b610325600c5481565b6102c16103b23660046142ca565b610fc6565b6103256103c53660046140a3565b6110e9565b6013546040805163ffffffff8084168252640100000000840481166020830152600160401b8404811692820192909252600160601b830482166060820152600160801b8304909116608082015262ffffff600160a01b8304811660a0830152600160b81b8304811660c0830152600160d01b8304811660e0830152600160e81b909204909116610100820152610120016102a5565b61033b606481565b6102c1610475366004613fed565b611514565b6104a1610488366004614306565b6008602052600090815260409020805460019091015482565b604080519283526020830191909152016102a5565b6103256104c43660046142ca565b60009081526011602052604090205490565b6102c16104e4366004613f8f565b611676565b6102c1611775565b6102c16104ff366004614321565b611789565b6102c1610512366004614306565b61193b565b60035461052a906001600160a01b031681565b6040516001600160a01b0390911681526020016102a5565b6000546001600160a01b031661052a565b33600090815260106020526040902054610325565b6102c1610576366004614321565b611a97565b61032560055481565b60025461052a906001600160a01b031681565b6102e3611de8565b6105b26105ad366004614306565b611f6f565b6040516102a5949392919061459a565b6103256105d0366004614101565b61205d565b610325600d5481565b60015461052a906001600160a01b031681565b6102c16105ff366004613fc3565b6123d7565b61062960125461ffff81169163ffffffff620100008304811692600160381b90041690565b6040805161ffff909416845263ffffffff92831660208501529116908201526060016102a5565b6102c161065e3660046142ca565b61244e565b61032561067136600461404c565b612491565b6102c1610684366004614321565b6124c1565b6106bd610697366004614306565b600760205260009081526040902080546001909101546001600160a01b03918216911682565b604080516001600160a01b039384168152929091166020830152016102a5565b6102c16106eb366004613f74565b612593565b6102c16106fe366004613f74565b6125f5565b610716610711366004614306565b612799565b60405190151581526020016102a5565b6103866107343660046142ca565b612944565b6102c1610747366004613f74565b612a82565b601254600f805460408051602080840282018101909252828152600094859460609461ffff8316946201000090930463ffffffff169391928391908301828280156107b657602002820191906000526020600020905b8154815260200190600101908083116107a2575b50505050509050925092509250909192565b6107d0612af8565b6001600160401b0381166000908152600760205260409020546001600160a01b031661080f57604051630fb532db60e11b815260040160405180910390fd5b6001600160401b03811660009081526007602052604090205461083c9082906001600160a01b0316612b52565b50565b6001600160401b03821660009081526007602052604090205482906001600160a01b03168061088157604051630fb532db60e11b815260040160405180910390fd5b336001600160a01b038216146108ba57604051636c51fda960e11b81526001600160a01b03821660048201526024015b60405180910390fd5b601254600160301b900460ff16156108e55760405163769dd35360e11b815260040160405180910390fd5b6001600160401b0384166000908152600760205260409020600101546001600160a01b03848116911614610984576001600160401b03841660008181526007602090815260409182902060010180546001600160a01b0319166001600160a01b0388169081179091558251338152918201527f69436ea6df009049404f564eff6622cd00522b0bd6a89efd9e52a355c4a879be91015b60405180910390a25b50505050565b610992612af8565b6040805180820182526000916109c1919084906002908390839080828437600092019190915250612491915050565b6000818152600e60205260409020549091506001600160a01b0316806109fd57604051631dfd6e1360e21b8152600481018390526024016108b1565b6000828152600e6020526040812080546001600160a01b03191690555b600f54811015610ad55782600f8281548110610a3857610a38614752565b90600052602060002001541415610ac357600f805460009190610a5d906001906146a3565b81548110610a6d57610a6d614752565b9060005260206000200154905080600f8381548110610a8e57610a8e614752565b600091825260209091200155600f805480610aab57610aab61473c565b60019003818190600052602060002001600090559055505b80610acd816146ba565b915050610a1a565b50806001600160a01b03167f72be339577868f868798bac2c93e52d6f034fef4689a9848996c14ebb7416c0d83604051610b1191815260200190565b60405180910390a2505050565b601254600160301b900460ff1615610b495760405163769dd35360e11b815260040160405180910390fd5b6001600160401b0381166000908152600760205260409020546001600160a01b0316610b8857604051630fb532db60e11b815260040160405180910390fd5b6001600160401b03811660009081526008602052604081208054916001600160601b0385169190610bb9838561462d565b92505081905550826001600160601b0316600b6000828254610bdb919061462d565b90915550506001546040516323b872dd60e01b8152336004820152306024820152604481018590526001600160a01b03909116906323b872dd90606401602060405180830381600087803b158015610c3257600080fd5b505af1158015610c46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6a9190614068565b506001600160401b0382167fd39ec07f4e209f627a4c427971473820dc129761ba28de8906bd56f57101d4f882610ca1868261462d565b60408051928352602083019190915201610b11565b601254600160301b900460ff1615610ce15760405163769dd35360e11b815260040160405180910390fd5b6001546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401602060405180830381600087803b158015610d3357600080fd5b505af1158015610d47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6b9190614068565b50600c80549082906000610d7f838561462d565b9091555050600c546040805183815260208101929092527ff09ca6cef38280114ac05d60379acf68fa7f85ea69ec4a8ed2a28626acafc06391015b60405180910390a15050565b610dce612af8565b60c861ffff85161115610e085760405163539c34bb60e11b815261ffff851660048201819052602482015260c860448201526064016108b1565b604080516080808201835261ffff871680835263ffffffff878116602080860182905260008688015288831660609687018190526012805465ffffffffffff191690951762010000909302929092176affffffffff0000000000001916600160381b909202919091179092558551601380549388015188880151968901519589015160a08a015160c08b015160e08c01516101008d015196881667ffffffffffffffff199099169890981764010000000094881694909402939093176fffffffffffffffff00000000000000001916600160401b9987169990990263ffffffff60601b191698909817600160601b978616979097029690961766ffffffffffffff60801b1916600160801b969094169590950262ffffff60a01b191692909217600160a01b62ffffff968716021765ffffffffffff60b81b1916600160b81b9486169490940262ffffff60d01b191693909317600160d01b92851692909202919091176001600160e81b0316600160e81b939092169290920217815590517f3248fab4375f32e0d851d39a71c0750d4652d98bcc7d32cec9d178c9824d796b91610fb8918791879187919061446d565b60405180910390a150505050565b601254600160301b900460ff1615610ff15760405163769dd35360e11b815260040160405180910390fd5b80600454101561101457604051631e9acf1760e31b815260040160405180910390fd5b806004600082825461102691906146a3565b9250508190555080600b600082825461103f91906146a3565b909155505060015460035460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810184905291169063a9059cbb90604401602060405180830381600087803b15801561109457600080fd5b505af11580156110a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cc9190614068565b61083c57604051631e9acf1760e31b815260040160405180910390fd5b601254600090600160301b900460ff16156111175760405163769dd35360e11b815260040160405180910390fd5b6001600160401b0385166000908152600760205260409020546001600160a01b031661115657604051630fb532db60e11b815260040160405180910390fd5b3360009081526006602090815260408083206001600160401b03808a16855292529091205416806111ab57604051637800cff360e11b81526001600160401b03871660048201523360248201526044016108b1565b60125461ffff90811690861610806111c7575060c861ffff8616115b156111fe5760125460405163539c34bb60e11b815261ffff8088166004830152909116602482015260c860448201526064016108b1565b60125463ffffffff620100009091048116908516111561124c57601254604051637aebf00f60e11b815263ffffffff80871660048301526201000090920490911660248201526044016108b1565b6101f463ffffffff84161115611285576040516311ce1afb60e21b815263ffffffff841660048201526101f460248201526044016108b1565b6000611292826001614645565b90506000806112a38a338b86612e45565b604080516020810184905243918101919091526001600160401b038c16606082015263ffffffff808b166080830152891660a08201523360c0820152919350915060e00160408051601f19818403018152918152815160209283012060008581526011845282812091909155438152600990925290205460ff1661146557600d54600c541015801561133757506000600c54115b1561146557600154600254600d5460405163095ea7b360e01b81526001600160a01b039283166004820152602481019190915291169063095ea7b390604401602060405180830381600087803b15801561139057600080fd5b505af11580156113a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c89190614068565b50600254600d546040516379ddd6cf60e01b815243600482015260248101919091526001600160a01b03909116906379ddd6cf90604401600060405180830381600087803b15801561141957600080fd5b505af115801561142d573d6000803e3d6000fd5b50505050600d54600c600082825461144591906146a3565b9091555050436000908152600960205260409020805460ff191660011790555b604080518381526020810183905261ffff8a168183015263ffffffff898116606083015288166080820152905133916001600160401b038c16918d917f63373d1c4696214b898952999c9aaec57dac1ee2723cec59bea6888f489a9772919081900360a00190a4503360009081526006602090815260408083206001600160401b03808d168552925290912080549190931667ffffffffffffffff199091161790915591505095945050505050565b601254600160301b900460ff161561153f5760405163769dd35360e11b815260040160405180910390fd5b336000908152601060205260409020546001600160601b038216111561157857604051631e9acf1760e31b815260040160405180910390fd5b33600090815260106020526040812080546001600160601b03841692906115a09084906146a3565b92505081905550806001600160601b0316600b60008282546115c291906146a3565b909155505060015460405163a9059cbb60e01b81526001600160a01b0384811660048301526001600160601b03841660248301529091169063a9059cbb90604401602060405180830381600087803b15801561161d57600080fd5b505af1158015611631573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116559190614068565b61167257604051631e9acf1760e31b815260040160405180910390fd5b5050565b61167e612af8565b6040805180820182526000916116ad919084906002908390839080828437600092019190915250612491915050565b6000818152600e60205260409020549091506001600160a01b0316156116e957604051634a0b8fa760e01b8152600481018290526024016108b1565b6000818152600e6020908152604080832080546001600160a01b0319166001600160a01b038816908117909155600f805460018101825594527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802909301849055518381527fe729ae16526293f74ade739043022254f1489f616295a25bf72dfb4511ed73b89101610b11565b61177d612af8565b6117876000612ebf565b565b6001600160401b03821660009081526007602052604090205482906001600160a01b0316806117cb57604051630fb532db60e11b815260040160405180910390fd5b336001600160a01b038216146117ff57604051636c51fda960e11b81526001600160a01b03821660048201526024016108b1565b601254600160301b900460ff161561182a5760405163769dd35360e11b815260040160405180910390fd5b6001600160401b03841660009081526007602052604090206002015460641415611867576040516305a48e0f60e01b815260040160405180910390fd5b6001600160a01b03831660009081526006602090815260408083206001600160401b03808916855292529091205416156118a057610984565b6001600160a01b03831660008181526006602090815260408083206001600160401b038916808552908352818420805467ffffffffffffffff19166001908117909155600784528285206002018054918201815585529383902090930180546001600160a01b031916851790555192835290917f43dc749a04ac8fb825cbd514f7c0e13f13bc6f2ee66043b76629d51776cff8e0910161097b565b601254600160301b900460ff16156119665760405163769dd35360e11b815260040160405180910390fd5b6001600160401b0381166000908152600760205260409020546001600160a01b03166119a557604051630fb532db60e11b815260040160405180910390fd5b6001600160401b0381166000908152600760205260409020600101546001600160a01b03163314611a12576001600160401b0381166000908152600760205260409081902060010154905163d084e97560e01b81526001600160a01b0390911660048201526024016108b1565b6001600160401b0381166000818152600760209081526040918290208054336001600160a01b0319808316821784556001909301805490931690925583516001600160a01b03909116808252928101919091529092917f6f1dc65165ffffedfd8e507b4a0f1fcfdada045ed11f6c26ba27cedfe87802f0910160405180910390a25050565b6001600160401b03821660009081526007602052604090205482906001600160a01b031680611ad957604051630fb532db60e11b815260040160405180910390fd5b336001600160a01b03821614611b0d57604051636c51fda960e11b81526001600160a01b03821660048201526024016108b1565b601254600160301b900460ff1615611b385760405163769dd35360e11b815260040160405180910390fd5b611b4184612799565b15611b5f57604051631685ecdd60e31b815260040160405180910390fd5b6001600160a01b03831660009081526006602090815260408083206001600160401b03808916855292529091205416611bc557604051637800cff360e11b81526001600160401b03851660048201526001600160a01b03841660248201526044016108b1565b6001600160401b038416600090815260076020908152604080832060020180548251818502810185019093528083529192909190830182828015611c3257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611c14575b50505050509050600060018251611c4991906146a3565b905060005b8251811015611d7057856001600160a01b0316838281518110611c7357611c73614752565b60200260200101516001600160a01b03161415611d5e576000838381518110611c9e57611c9e614752565b6020026020010151905080600760008a6001600160401b03166001600160401b031681526020019081526020016000206002018381548110611ce257611ce2614752565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394909416939093179092556001600160401b038a168152600790915260409020600201805480611d3657611d3661473c565b600082815260209020810160001990810180546001600160a01b031916905501905550611d70565b80611d68816146ba565b915050611c4e565b506001600160a01b03851660008181526006602090815260408083206001600160401b038b1680855290835292819020805467ffffffffffffffff191690555192835290917f182bff9831466789164ca77075fffd84916d35a8180ba73c27e45634549b445b910160405180910390a2505050505050565b601254600090600160301b900460ff1615611e165760405163769dd35360e11b815260040160405180910390fd5b600a80546001600160401b0316906000611e2f836146d5565b82546101009290920a6001600160401b03818102199093169183160217909155600a54169050600080604051908082528060200260200182016040528015611e81578160200160208202803683370190505b50604080518082018252600080825260208083018281526001600160401b0388168084526008835285842094518555905160019485015584516060810186523381528083018481528187018881529285526007845295909320835181546001600160a01b03199081166001600160a01b03928316178355965195820180549097169516949094179094559251805194955090939192611f2892600285019290910190613d03565b50506040513381526001600160401b03841691507f464722b4166576d3dcbba877b999bc35cf911f4eaf434b7eba68fa113951d0bf9060200160405180910390a250905090565b6001600160401b038116600090815260076020526040812054819081906060906001600160a01b0316611fb557604051630fb532db60e11b815260040160405180910390fd5b6001600160401b0385166000908152600860209081526040808320805460019091015460078452938290208054600290910180548451818702810187019095528085529295946001600160a01b03909216939092909183919083018282801561204757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612029575b5050505050905093509350935093509193509193565b601254600090600160301b900460ff161561208b5760405163769dd35360e11b815260040160405180910390fd5b60005a9050600080600061209f8787612f0f565b9250925092506000866060015163ffffffff166001600160401b038111156120c9576120c9614768565b6040519080825280602002602001820160405280156120f2578160200160208202803683370190505b50905060005b876060015163ffffffff168110156121665760408051602081018590529081018290526060016040516020818303038152906040528051906020012060001c82828151811061214957612149614752565b60209081029190910101528061215e816146ba565b9150506120f8565b50600083815260116020526040808220829055518190631fe543e360e01b90612195908790869060240161454c565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092526012805466ff0000000000001916600160301b179055908a015160808b01519192506000916121fd9163ffffffff16908461317c565b6012805466ff000000000000191690556020808c0180516001600160401b0390811660009081526008909352604080842060019081015493519092168452832081018054949550919390929061225490849061462d565b9091555050601254600090612281908b90600160381b900463ffffffff1661227b85612944565b3a6131ca565b6020808e01516001600160401b03166000908152600890915260409020549091508111156122c257604051631e9acf1760e31b815260040160405180910390fd5b6020808d01516001600160401b0316600090815260089091526040812080548392906122ef9084906146a3565b909155505060055460649061230490826146a3565b61230e9083614684565b6123189190614670565b60008a8152600e60209081526040808320546001600160a01b0316835260109091528120805490919061234c90849061462d565b90915550506005546064906123619083614684565b61236b9190614670565b6004600082825461237c919061462d565b9091555050604080518881526020810183905284151581830152905189917f221ad2e5b871cead1dd7f75c2fb223c0cfa34bdc049a15f3f82a1f0e943e605a919081900360600190a299505050505050505050505b92915050565b6123df612af8565b6001600160a01b0382166124065760405163f0a7640b60e01b815260040160405180910390fd5b60648111156124285760405163197fcbd760e11b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b039390931692909217909155600555565b612456612af8565b600d8190556040518181527f4c42db8a799110fdd6a26148a21a5fbe4e581c926bccfd3b2d8a7f3aed4a87c89060200160405180910390a150565b6000816040516020016124a49190614400565b604051602081830303815290604052805190602001209050919050565b6001600160401b03821660009081526007602052604090205482906001600160a01b03168061250357604051630fb532db60e11b815260040160405180910390fd5b336001600160a01b0382161461253757604051636c51fda960e11b81526001600160a01b03821660048201526024016108b1565b601254600160301b900460ff16156125625760405163769dd35360e11b815260040160405180910390fd5b61256b84612799565b1561258957604051631685ecdd60e31b815260040160405180910390fd5b6109848484612b52565b61259b612af8565b600280546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527fa5a618fb1d2db8fcece4bcc171d33525bb774a19485486ba6f8ee0c50d59442a9101610dba565b6125fd612af8565b600c546001546040516370a0823160e01b8152306004820152600092916001600160a01b0316906370a082319060240160206040518083038186803b15801561264557600080fd5b505afa158015612659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061267d919061408a565b61268791906146a3565b600b54909150818111156126b8576040516354ced18160e11b815260048101829052602481018390526044016108b1565b818110156127945760006126cc82846146a3565b60015460405163a9059cbb60e01b81526001600160a01b0387811660048301526024820184905292935091169063a9059cbb90604401602060405180830381600087803b15801561271c57600080fd5b505af1158015612730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127549190614068565b50604080516001600160a01b0386168152602081018390527f59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b4366009101610fb8565b505050565b6001600160401b0381166000908152600760209081526040808320815160608101835281546001600160a01b039081168252600183015416818501526002820180548451818702810187018652818152879693958601939092919083018282801561282d57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161280f575b505050505081525050905060005b81604001515181101561293a5760005b600f548110156129275760006128f0600f838154811061286d5761286d614752565b90600052602060002001548560400151858151811061288e5761288e614752565b60200260200101518860066000896040015189815181106128b1576128b1614752565b6020908102919091018101516001600160a01b0316825281810192909252604090810160009081206001600160401b03808f1683529352205416612e45565b50600081815260116020526040902054909150156129145750600195945050505050565b508061291f816146ba565b91505061284b565b5080612932816146ba565b91505061283b565b5060009392505050565b604080516101208101825260135463ffffffff8082168352640100000000820481166020840152600160401b8204811693830193909352600160601b810483166060830152600160801b8104909216608082015262ffffff600160a01b8304811660a08301819052600160b81b8404821660c0840152600160d01b8404821660e0840152600160e81b9093041661010082015260009183116129e7575192915050565b828160a0015162ffffff16108015612a0857508060c0015162ffffff168311155b15612a17576020015192915050565b828160c0015162ffffff16108015612a3857508060e0015162ffffff168311155b15612a47576040015192915050565b828160e0015162ffffff16108015612a69575080610100015162ffffff168311155b15612a78576060015192915050565b6080015192915050565b612a8a612af8565b6001600160a01b038116612aef5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108b1565b61083c81612ebf565b6000546001600160a01b031633146117875760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108b1565b601254600160301b900460ff1615612b7d5760405163769dd35360e11b815260040160405180910390fd5b6001600160401b0382166000908152600760209081526040808320815160608101835281546001600160a01b03908116825260018301541681850152600282018054845181870281018701865281815292959394860193830182828015612c0d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612bef575b505050919092525050506001600160401b03841660009081526008602090815260408083208151808301909252805480835260019091015492820192909252929350905b836040015151811015612cd2576006600085604001518381518110612c7857612c78614752565b6020908102919091018101516001600160a01b0316825281810192909252604090810160009081206001600160401b038a1682529092529020805467ffffffffffffffff1916905580612cca816146ba565b915050612c51565b506001600160401b038516600090815260076020526040812080546001600160a01b03199081168255600182018054909116905590612d146002830182613d68565b50506001600160401b0385166000908152600860205260408120818155600101819055600b8054839290612d499084906146a3565b909155505060015460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b158015612d9c57600080fd5b505af1158015612db0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dd49190614068565b612df157604051631e9acf1760e31b815260040160405180910390fd5b604080516001600160a01b0386168152602081018390526001600160401b038716917fe8ed5b475a5b5987aa9165e8731bb78043f39eee32ec5a1169a89e27fcd49815910160405180910390a25050505050565b6040805160208082018790526001600160a01b0395909516818301526001600160401b039384166060820152919092166080808301919091528251808303909101815260a08201835280519084012060c082019490945260e080820185905282518083039091018152610100909101909152805191012091565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806000612f218560000151612491565b6000818152600e60205260409020549093506001600160a01b031680612f5d57604051631dfd6e1360e21b8152600481018590526024016108b1565b6080860151604051612f7c918691602001918252602082015260400190565b60408051601f1981840301815291815281516020928301206000818152601190935291205490935080612fc257604051631b44092560e11b815260040160405180910390fd5b85516020808801516040808a015160608b015160808c0151925161302d968b9690959491019586526001600160401b03948516602087015292909316604085015263ffffffff90811660608501529190911660808301526001600160a01b031660a082015260c00190565b6040516020818303038152906040528051906020012081146130625760405163354a450b60e21b815260040160405180910390fd5b85516001600160401b03164080613128576002548751604051631d2827a760e31b81526001600160401b0390911660048201526001600160a01b039091169063e9413d389060240160206040518083038186803b1580156130c257600080fd5b505afa1580156130d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130fa919061408a565b90508061312857865160405163175dadad60e01b81526001600160401b0390911660048201526024016108b1565b600088608001518260405160200161314a929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c905061316f8982613225565b9450505050509250925092565b60005a61138881101561318e57600080fd5b6113888103905084604082048203116131a657600080fd5b50823b6131b257600080fd5b60008083516020850160008789f190505b9392505050565b6000805a6131d8878761462d565b6131e291906146a3565b6131ec9084614684565b9050600061320563ffffffff861664e8d4a51000614684565b9050613211818361462d565b6001600160601b0316979650505050505050565b60006132598360000151846020015185604001518660600151868860a001518960c001518a60e001518b6101000151613290565b60038360200151604051602001613271929190614538565b60408051601f1981840301815291905280516020909101209392505050565b613299896134b3565b6132e55760405162461bcd60e51b815260206004820152601a60248201527f7075626c6963206b6579206973206e6f74206f6e20637572766500000000000060448201526064016108b1565b6132ee886134b3565b6133325760405162461bcd60e51b815260206004820152601560248201527467616d6d61206973206e6f74206f6e20637572766560581b60448201526064016108b1565b61333b836134b3565b6133875760405162461bcd60e51b815260206004820152601d60248201527f6347616d6d615769746e657373206973206e6f74206f6e20637572766500000060448201526064016108b1565b613390826134b3565b6133dc5760405162461bcd60e51b815260206004820152601c60248201527f73486173685769746e657373206973206e6f74206f6e2063757276650000000060448201526064016108b1565b6133e8878a8887613576565b6134345760405162461bcd60e51b815260206004820152601960248201527f6164647228632a706b2b732a6729213d5f755769746e6573730000000000000060448201526064016108b1565b60006134408a87613699565b90506000613453898b878b8689896136fd565b90506000613464838d8d8a86613822565b9050808a146134a55760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b60448201526064016108b1565b505050505050505050505050565b80516000906401000003d019116135015760405162461bcd60e51b8152602060048201526012602482015271696e76616c696420782d6f7264696e61746560701b60448201526064016108b1565b60208201516401000003d0191161354f5760405162461bcd60e51b8152602060048201526012602482015271696e76616c696420792d6f7264696e61746560701b60448201526064016108b1565b60208201516401000003d01990800961356f8360005b6020020151613862565b1492915050565b60006001600160a01b0382166135bc5760405162461bcd60e51b815260206004820152600b60248201526a626164207769746e65737360a81b60448201526064016108b1565b6020840151600090600116156135d357601c6135d6565b601b5b9050600070014551231950b75fc4402da1732fc9bebe1985876000602002015109865170014551231950b75fc4402da1732fc9bebe19918203925060009190890987516040805160008082526020820180845287905260ff88169282019290925260608101929092526080820183905291925060019060a0016020604051602081039080840390855afa158015613671573d6000803e3d6000fd5b5050604051601f1901516001600160a01b039081169088161495505050505050949350505050565b6136a1613d86565b6136ce600184846040516020016136ba939291906143df565b604051602081830303815290604052613886565b90505b6136da816134b3565b6123d15780516040805160208101929092526136f691016136ba565b90506136d1565b613705613d86565b825186516401000003d01990819006910614156137645760405162461bcd60e51b815260206004820152601e60248201527f706f696e747320696e2073756d206d7573742062652064697374696e6374000060448201526064016108b1565b61376f8789886138d5565b6137b45760405162461bcd60e51b8152602060048201526016602482015275119a5c9cdd081b5d5b0818da1958dac819985a5b195960521b60448201526064016108b1565b6137bf8486856138d5565b61380b5760405162461bcd60e51b815260206004820152601760248201527f5365636f6e64206d756c20636865636b206661696c656400000000000000000060448201526064016108b1565b6138168684846139fd565b98975050505050505050565b60006002868686858760405160200161384096959493929190614380565b60408051601f1981840301815291905280516020909101209695505050505050565b6000806401000003d01980848509840990506401000003d019600782089392505050565b61388e613d86565b61389782613ac4565b81526138ac6138a7826000613565565b613aff565b6020820181905260029006600114156138d0576020810180516401000003d0190390525b919050565b6000826139125760405162461bcd60e51b815260206004820152600b60248201526a3d32b9379039b1b0b630b960a91b60448201526064016108b1565b83516020850151600090613928906002906146fc565b1561393457601c613937565b601b5b9050600070014551231950b75fc4402da1732fc9bebe198387096040805160008082526020820180845281905260ff86169282019290925260608101869052608081018390529192509060019060a0016020604051602081039080840390855afa1580156139a9573d6000803e3d6000fd5b5050506020604051035190506000866040516020016139c8919061436e565b60408051601f1981840301815291905280516020909101206001600160a01b0392831692169190911498975050505050505050565b613a05613d86565b835160208086015185519186015160009384938493613a2693909190613b1f565b919450925090506401000003d019858209600114613a865760405162461bcd60e51b815260206004820152601960248201527f696e765a206d75737420626520696e7665727365206f66207a0000000000000060448201526064016108b1565b60405180604001604052806401000003d01980613aa557613aa5614726565b87860981526020016401000003d0198785099052979650505050505050565b805160208201205b6401000003d01981106138d057604080516020808201939093528151808203840181529082019091528051910120613acc565b60006123d1826002613b186401000003d019600161462d565b901c613bff565b60008080600180826401000003d019896401000003d019038808905060006401000003d0198b6401000003d019038a0890506000613b5f83838585613c96565b9098509050613b7088828e88613cba565b9098509050613b8188828c87613cba565b90985090506000613b948d878b85613cba565b9098509050613ba588828686613c96565b9098509050613bb688828e89613cba565b9098509050818114613beb576401000003d019818a0998506401000003d01982890997506401000003d0198183099650613bef565b8196505b5050505050509450945094915050565b600080613c0a613da4565b6020808252818101819052604082015260608101859052608081018490526401000003d01960a0820152613c3c613dc2565b60208160c0846005600019fa925082613c8c5760405162461bcd60e51b81526020600482015260126024820152716269674d6f64457870206661696c7572652160701b60448201526064016108b1565b5195945050505050565b6000806401000003d0198487096401000003d0198487099097909650945050505050565b600080806401000003d019878509905060006401000003d01987876401000003d019030990506401000003d0198183086401000003d01986890990999098509650505050505050565b828054828255906000526020600020908101928215613d58579160200282015b82811115613d5857825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613d23565b50613d64929150613de0565b5090565b508054600082559060005260206000209081019061083c9190613de0565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b5b80821115613d645760008155600101613de1565b80356001600160a01b03811681146138d057600080fd5b80604081018310156123d157600080fd5b600082601f830112613e2e57600080fd5b604051604081018181106001600160401b0382111715613e5057613e50614768565b8060405250808385604086011115613e6757600080fd5b60005b6002811015613e89578135835260209283019290910190600101613e6a565b509195945050505050565b600060a08284031215613ea657600080fd5b60405160a081018181106001600160401b0382111715613ec857613ec8614768565b604052905080613ed783613f5d565b8152613ee560208401613f5d565b6020820152613ef660408401613f49565b6040820152613f0760608401613f49565b6060820152613f1860808401613df5565b60808201525092915050565b803561ffff811681146138d057600080fd5b803562ffffff811681146138d057600080fd5b803563ffffffff811681146138d057600080fd5b80356001600160401b03811681146138d057600080fd5b600060208284031215613f8657600080fd5b6131c382613df5565b60008060608385031215613fa257600080fd5b613fab83613df5565b9150613fba8460208501613e0c565b90509250929050565b60008060408385031215613fd657600080fd5b613fdf83613df5565b946020939093013593505050565b6000806040838503121561400057600080fd5b61400983613df5565b915060208301356001600160601b038116811461402557600080fd5b809150509250929050565b60006040828403121561404257600080fd5b6131c38383613e0c565b60006040828403121561405e57600080fd5b6131c38383613e1d565b60006020828403121561407a57600080fd5b815180151581146131c357600080fd5b60006020828403121561409c57600080fd5b5051919050565b600080600080600060a086880312156140bb57600080fd5b853594506140cb60208701613f5d565b93506140d960408701613f24565b92506140e760608701613f49565b91506140f560808701613f49565b90509295509295909350565b60008082840361024081121561411657600080fd5b6101a08082121561412657600080fd5b61412e614604565b915061413a8686613e1d565b82526141498660408701613e1d565b60208301526080850135604083015260a0850135606083015260c0850135608083015261417860e08601613df5565b60a083015261010061418c87828801613e1d565b60c084015261419f876101408801613e1d565b60e084015261018086013581840152508193506141be86828701613e94565b925050509250929050565b6000806000808486036101808112156141e157600080fd5b6141ea86613f24565b94506141f860208701613f49565b935061420660408701613f49565b925061012080605f198301121561421c57600080fd5b614224614604565b915061423260608801613f49565b825261424060808801613f49565b602083015261425160a08801613f49565b604083015261426260c08801613f49565b606083015261427360e08801613f49565b6080830152610100614286818901613f36565b60a0840152614296828901613f36565b60c08401526142a86101408901613f36565b60e08401526142ba6101608901613f36565b9083015250939692955090935050565b6000602082840312156142dc57600080fd5b5035919050565b600080604083850312156142f657600080fd5b82359150613fba60208401613f5d565b60006020828403121561431857600080fd5b6131c382613f5d565b6000806040838503121561433457600080fd5b61433d83613f5d565b9150613fba60208401613df5565b8060005b600281101561098457815184526020938401939091019060010161434f565b614378818361434b565b604001919050565b868152614390602082018761434b565b61439d606082018661434b565b6143aa60a082018561434b565b6143b760e082018461434b565b60609190911b6bffffffffffffffffffffffff19166101208201526101340195945050505050565b8381526143ef602082018461434b565b606081019190915260800192915050565b604081016123d1828461434b565b60006060820161ffff86168352602063ffffffff86168185015260606040850152818551808452608086019150828701935060005b8181101561445f57845183529383019391830191600101614443565b509098975050505050505050565b60006101808201905061ffff8616825263ffffffff80861660208401528085166040840152835481811660608501526144b360808501838360201c1663ffffffff169052565b6144ca60a08501838360401c1663ffffffff169052565b6144e160c08501838360601c1663ffffffff169052565b6144f860e08501838360801c1663ffffffff169052565b62ffffff60a082901c811661010086015260b882901c811661012086015260d082901c1661014085015260e81c6101609093019290925295945050505050565b828152606081016131c3602083018461434b565b6000604082018483526020604081850152818551808452606086019150828701935060005b8181101561458d57845183529383019391830191600101614571565b5090979650505050505050565b84815260208082018590526001600160a01b038481166040840152608060608401819052845190840181905260009285810192909160a0860190855b818110156145f45785518416835294840194918401916001016145d6565b50909a9950505050505050505050565b60405161012081016001600160401b038111828210171561462757614627614768565b60405290565b6000821982111561464057614640614710565b500190565b60006001600160401b0380831681851680830382111561466757614667614710565b01949350505050565b60008261467f5761467f614726565b500490565b600081600019048311821515161561469e5761469e614710565b500290565b6000828210156146b5576146b5614710565b500390565b60006000198214156146ce576146ce614710565b5060010190565b60006001600160401b03808316818114156146f2576146f2614710565b6001019392505050565b60008261470b5761470b614726565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea26469706673582212209e8e4464589bd97ef9592899849a3716c5890059bc6ee6669411de23cdc93c6064736f6c634300080600330000000000000000000000004084ab20f8ffca76c19aaf854fb5fe9de6217fbb0000000000000000000000000a0ddd7c62bd7fcdb6308d655fbc82a042463ac2000000000000000000000000bb78efaaaf9223b4840ea7defdc379a13b16399b

Deployed ByteCode

0x608060405234801561001057600080fd5b50600436106102895760003560e01c8063823597401161015c578063b7e2a68a116100ce578063d7ca6f9b11610087578063d7ca6f9b14610689578063e4e1b45d146106dd578063e72f6e30146106f0578063e82ad7d414610703578063eccea3e214610726578063f2fde38b1461073957600080fd5b8063b7e2a68a146105de578063bc14edcf146105f1578063c3f909d414610604578063c8f7facc14610650578063caf70c4a14610663578063d7ae1d301461067657600080fd5b8063a001ecdd11610120578063a001ecdd1461057b578063a0a19abd14610584578063a21a23e414610597578063a47c76961461059f578063af198b97146105c2578063aff4fb23146105d557600080fd5b8063823597401461050457806385f2aef2146105175780638da5cb5b1461054257806390be10cc146105535780639f87fad71461056857600080fd5b806340d6bb821161020057806366316d8d116101b957806366316d8d146104675780636840c05e1461047a57806369bcdb7d146104b65780636f64f03f146104d6578063715018a6146104e95780637341c10c146104f157600080fd5b806340d6bb821461037d5780634c6ad91c1461039b578063572727b0146103a45780635d3b1d30146103b75780635fbbc0d2146103ca57806364d51a2a1461045f57600080fd5b80630f06cbe0116102525780630f06cbe01461030e57806312b583491461032157806315c48b8414610333578063167957bd1461034e5780631a26c051146103575780631d16919b1461036a57600080fd5b80620122911461028e57806302bcc5b6146102ae57806304c357cb146102c357806306bfa637146102d657806308821d58146102fb575b600080fd5b61029661074c565b6040516102a59392919061440e565b60405180910390f35b6102c16102bc366004614306565b6107c8565b005b6102c16102d1366004614321565b61083f565b600a546001600160401b03165b6040516001600160401b0390911681526020016102a5565b6102c1610309366004614030565b61098a565b6102c161031c3660046142e3565b610b1e565b600b545b6040519081526020016102a5565b61033b60c881565b60405161ffff90911681526020016102a5565b61032560045481565b6102c16103653660046142ca565b610cb6565b6102c16103783660046141c9565b610dc6565b6103866101f481565b60405163ffffffff90911681526020016102a5565b610325600c5481565b6102c16103b23660046142ca565b610fc6565b6103256103c53660046140a3565b6110e9565b6013546040805163ffffffff8084168252640100000000840481166020830152600160401b8404811692820192909252600160601b830482166060820152600160801b8304909116608082015262ffffff600160a01b8304811660a0830152600160b81b8304811660c0830152600160d01b8304811660e0830152600160e81b909204909116610100820152610120016102a5565b61033b606481565b6102c1610475366004613fed565b611514565b6104a1610488366004614306565b6008602052600090815260409020805460019091015482565b604080519283526020830191909152016102a5565b6103256104c43660046142ca565b60009081526011602052604090205490565b6102c16104e4366004613f8f565b611676565b6102c1611775565b6102c16104ff366004614321565b611789565b6102c1610512366004614306565b61193b565b60035461052a906001600160a01b031681565b6040516001600160a01b0390911681526020016102a5565b6000546001600160a01b031661052a565b33600090815260106020526040902054610325565b6102c1610576366004614321565b611a97565b61032560055481565b60025461052a906001600160a01b031681565b6102e3611de8565b6105b26105ad366004614306565b611f6f565b6040516102a5949392919061459a565b6103256105d0366004614101565b61205d565b610325600d5481565b60015461052a906001600160a01b031681565b6102c16105ff366004613fc3565b6123d7565b61062960125461ffff81169163ffffffff620100008304811692600160381b90041690565b6040805161ffff909416845263ffffffff92831660208501529116908201526060016102a5565b6102c161065e3660046142ca565b61244e565b61032561067136600461404c565b612491565b6102c1610684366004614321565b6124c1565b6106bd610697366004614306565b600760205260009081526040902080546001909101546001600160a01b03918216911682565b604080516001600160a01b039384168152929091166020830152016102a5565b6102c16106eb366004613f74565b612593565b6102c16106fe366004613f74565b6125f5565b610716610711366004614306565b612799565b60405190151581526020016102a5565b6103866107343660046142ca565b612944565b6102c1610747366004613f74565b612a82565b601254600f805460408051602080840282018101909252828152600094859460609461ffff8316946201000090930463ffffffff169391928391908301828280156107b657602002820191906000526020600020905b8154815260200190600101908083116107a2575b50505050509050925092509250909192565b6107d0612af8565b6001600160401b0381166000908152600760205260409020546001600160a01b031661080f57604051630fb532db60e11b815260040160405180910390fd5b6001600160401b03811660009081526007602052604090205461083c9082906001600160a01b0316612b52565b50565b6001600160401b03821660009081526007602052604090205482906001600160a01b03168061088157604051630fb532db60e11b815260040160405180910390fd5b336001600160a01b038216146108ba57604051636c51fda960e11b81526001600160a01b03821660048201526024015b60405180910390fd5b601254600160301b900460ff16156108e55760405163769dd35360e11b815260040160405180910390fd5b6001600160401b0384166000908152600760205260409020600101546001600160a01b03848116911614610984576001600160401b03841660008181526007602090815260409182902060010180546001600160a01b0319166001600160a01b0388169081179091558251338152918201527f69436ea6df009049404f564eff6622cd00522b0bd6a89efd9e52a355c4a879be91015b60405180910390a25b50505050565b610992612af8565b6040805180820182526000916109c1919084906002908390839080828437600092019190915250612491915050565b6000818152600e60205260409020549091506001600160a01b0316806109fd57604051631dfd6e1360e21b8152600481018390526024016108b1565b6000828152600e6020526040812080546001600160a01b03191690555b600f54811015610ad55782600f8281548110610a3857610a38614752565b90600052602060002001541415610ac357600f805460009190610a5d906001906146a3565b81548110610a6d57610a6d614752565b9060005260206000200154905080600f8381548110610a8e57610a8e614752565b600091825260209091200155600f805480610aab57610aab61473c565b60019003818190600052602060002001600090559055505b80610acd816146ba565b915050610a1a565b50806001600160a01b03167f72be339577868f868798bac2c93e52d6f034fef4689a9848996c14ebb7416c0d83604051610b1191815260200190565b60405180910390a2505050565b601254600160301b900460ff1615610b495760405163769dd35360e11b815260040160405180910390fd5b6001600160401b0381166000908152600760205260409020546001600160a01b0316610b8857604051630fb532db60e11b815260040160405180910390fd5b6001600160401b03811660009081526008602052604081208054916001600160601b0385169190610bb9838561462d565b92505081905550826001600160601b0316600b6000828254610bdb919061462d565b90915550506001546040516323b872dd60e01b8152336004820152306024820152604481018590526001600160a01b03909116906323b872dd90606401602060405180830381600087803b158015610c3257600080fd5b505af1158015610c46573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c6a9190614068565b506001600160401b0382167fd39ec07f4e209f627a4c427971473820dc129761ba28de8906bd56f57101d4f882610ca1868261462d565b60408051928352602083019190915201610b11565b601254600160301b900460ff1615610ce15760405163769dd35360e11b815260040160405180910390fd5b6001546040516323b872dd60e01b8152336004820152306024820152604481018390526001600160a01b03909116906323b872dd90606401602060405180830381600087803b158015610d3357600080fd5b505af1158015610d47573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d6b9190614068565b50600c80549082906000610d7f838561462d565b9091555050600c546040805183815260208101929092527ff09ca6cef38280114ac05d60379acf68fa7f85ea69ec4a8ed2a28626acafc06391015b60405180910390a15050565b610dce612af8565b60c861ffff85161115610e085760405163539c34bb60e11b815261ffff851660048201819052602482015260c860448201526064016108b1565b604080516080808201835261ffff871680835263ffffffff878116602080860182905260008688015288831660609687018190526012805465ffffffffffff191690951762010000909302929092176affffffffff0000000000001916600160381b909202919091179092558551601380549388015188880151968901519589015160a08a015160c08b015160e08c01516101008d015196881667ffffffffffffffff199099169890981764010000000094881694909402939093176fffffffffffffffff00000000000000001916600160401b9987169990990263ffffffff60601b191698909817600160601b978616979097029690961766ffffffffffffff60801b1916600160801b969094169590950262ffffff60a01b191692909217600160a01b62ffffff968716021765ffffffffffff60b81b1916600160b81b9486169490940262ffffff60d01b191693909317600160d01b92851692909202919091176001600160e81b0316600160e81b939092169290920217815590517f3248fab4375f32e0d851d39a71c0750d4652d98bcc7d32cec9d178c9824d796b91610fb8918791879187919061446d565b60405180910390a150505050565b601254600160301b900460ff1615610ff15760405163769dd35360e11b815260040160405180910390fd5b80600454101561101457604051631e9acf1760e31b815260040160405180910390fd5b806004600082825461102691906146a3565b9250508190555080600b600082825461103f91906146a3565b909155505060015460035460405163a9059cbb60e01b81526001600160a01b0391821660048201526024810184905291169063a9059cbb90604401602060405180830381600087803b15801561109457600080fd5b505af11580156110a8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906110cc9190614068565b61083c57604051631e9acf1760e31b815260040160405180910390fd5b601254600090600160301b900460ff16156111175760405163769dd35360e11b815260040160405180910390fd5b6001600160401b0385166000908152600760205260409020546001600160a01b031661115657604051630fb532db60e11b815260040160405180910390fd5b3360009081526006602090815260408083206001600160401b03808a16855292529091205416806111ab57604051637800cff360e11b81526001600160401b03871660048201523360248201526044016108b1565b60125461ffff90811690861610806111c7575060c861ffff8616115b156111fe5760125460405163539c34bb60e11b815261ffff8088166004830152909116602482015260c860448201526064016108b1565b60125463ffffffff620100009091048116908516111561124c57601254604051637aebf00f60e11b815263ffffffff80871660048301526201000090920490911660248201526044016108b1565b6101f463ffffffff84161115611285576040516311ce1afb60e21b815263ffffffff841660048201526101f460248201526044016108b1565b6000611292826001614645565b90506000806112a38a338b86612e45565b604080516020810184905243918101919091526001600160401b038c16606082015263ffffffff808b166080830152891660a08201523360c0820152919350915060e00160408051601f19818403018152918152815160209283012060008581526011845282812091909155438152600990925290205460ff1661146557600d54600c541015801561133757506000600c54115b1561146557600154600254600d5460405163095ea7b360e01b81526001600160a01b039283166004820152602481019190915291169063095ea7b390604401602060405180830381600087803b15801561139057600080fd5b505af11580156113a4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113c89190614068565b50600254600d546040516379ddd6cf60e01b815243600482015260248101919091526001600160a01b03909116906379ddd6cf90604401600060405180830381600087803b15801561141957600080fd5b505af115801561142d573d6000803e3d6000fd5b50505050600d54600c600082825461144591906146a3565b9091555050436000908152600960205260409020805460ff191660011790555b604080518381526020810183905261ffff8a168183015263ffffffff898116606083015288166080820152905133916001600160401b038c16918d917f63373d1c4696214b898952999c9aaec57dac1ee2723cec59bea6888f489a9772919081900360a00190a4503360009081526006602090815260408083206001600160401b03808d168552925290912080549190931667ffffffffffffffff199091161790915591505095945050505050565b601254600160301b900460ff161561153f5760405163769dd35360e11b815260040160405180910390fd5b336000908152601060205260409020546001600160601b038216111561157857604051631e9acf1760e31b815260040160405180910390fd5b33600090815260106020526040812080546001600160601b03841692906115a09084906146a3565b92505081905550806001600160601b0316600b60008282546115c291906146a3565b909155505060015460405163a9059cbb60e01b81526001600160a01b0384811660048301526001600160601b03841660248301529091169063a9059cbb90604401602060405180830381600087803b15801561161d57600080fd5b505af1158015611631573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906116559190614068565b61167257604051631e9acf1760e31b815260040160405180910390fd5b5050565b61167e612af8565b6040805180820182526000916116ad919084906002908390839080828437600092019190915250612491915050565b6000818152600e60205260409020549091506001600160a01b0316156116e957604051634a0b8fa760e01b8152600481018290526024016108b1565b6000818152600e6020908152604080832080546001600160a01b0319166001600160a01b038816908117909155600f805460018101825594527f8d1108e10bcb7c27dddfc02ed9d693a074039d026cf4ea4240b40f7d581ac802909301849055518381527fe729ae16526293f74ade739043022254f1489f616295a25bf72dfb4511ed73b89101610b11565b61177d612af8565b6117876000612ebf565b565b6001600160401b03821660009081526007602052604090205482906001600160a01b0316806117cb57604051630fb532db60e11b815260040160405180910390fd5b336001600160a01b038216146117ff57604051636c51fda960e11b81526001600160a01b03821660048201526024016108b1565b601254600160301b900460ff161561182a5760405163769dd35360e11b815260040160405180910390fd5b6001600160401b03841660009081526007602052604090206002015460641415611867576040516305a48e0f60e01b815260040160405180910390fd5b6001600160a01b03831660009081526006602090815260408083206001600160401b03808916855292529091205416156118a057610984565b6001600160a01b03831660008181526006602090815260408083206001600160401b038916808552908352818420805467ffffffffffffffff19166001908117909155600784528285206002018054918201815585529383902090930180546001600160a01b031916851790555192835290917f43dc749a04ac8fb825cbd514f7c0e13f13bc6f2ee66043b76629d51776cff8e0910161097b565b601254600160301b900460ff16156119665760405163769dd35360e11b815260040160405180910390fd5b6001600160401b0381166000908152600760205260409020546001600160a01b03166119a557604051630fb532db60e11b815260040160405180910390fd5b6001600160401b0381166000908152600760205260409020600101546001600160a01b03163314611a12576001600160401b0381166000908152600760205260409081902060010154905163d084e97560e01b81526001600160a01b0390911660048201526024016108b1565b6001600160401b0381166000818152600760209081526040918290208054336001600160a01b0319808316821784556001909301805490931690925583516001600160a01b03909116808252928101919091529092917f6f1dc65165ffffedfd8e507b4a0f1fcfdada045ed11f6c26ba27cedfe87802f0910160405180910390a25050565b6001600160401b03821660009081526007602052604090205482906001600160a01b031680611ad957604051630fb532db60e11b815260040160405180910390fd5b336001600160a01b03821614611b0d57604051636c51fda960e11b81526001600160a01b03821660048201526024016108b1565b601254600160301b900460ff1615611b385760405163769dd35360e11b815260040160405180910390fd5b611b4184612799565b15611b5f57604051631685ecdd60e31b815260040160405180910390fd5b6001600160a01b03831660009081526006602090815260408083206001600160401b03808916855292529091205416611bc557604051637800cff360e11b81526001600160401b03851660048201526001600160a01b03841660248201526044016108b1565b6001600160401b038416600090815260076020908152604080832060020180548251818502810185019093528083529192909190830182828015611c3257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611c14575b50505050509050600060018251611c4991906146a3565b905060005b8251811015611d7057856001600160a01b0316838281518110611c7357611c73614752565b60200260200101516001600160a01b03161415611d5e576000838381518110611c9e57611c9e614752565b6020026020010151905080600760008a6001600160401b03166001600160401b031681526020019081526020016000206002018381548110611ce257611ce2614752565b600091825260208083209190910180546001600160a01b0319166001600160a01b0394909416939093179092556001600160401b038a168152600790915260409020600201805480611d3657611d3661473c565b600082815260209020810160001990810180546001600160a01b031916905501905550611d70565b80611d68816146ba565b915050611c4e565b506001600160a01b03851660008181526006602090815260408083206001600160401b038b1680855290835292819020805467ffffffffffffffff191690555192835290917f182bff9831466789164ca77075fffd84916d35a8180ba73c27e45634549b445b910160405180910390a2505050505050565b601254600090600160301b900460ff1615611e165760405163769dd35360e11b815260040160405180910390fd5b600a80546001600160401b0316906000611e2f836146d5565b82546101009290920a6001600160401b03818102199093169183160217909155600a54169050600080604051908082528060200260200182016040528015611e81578160200160208202803683370190505b50604080518082018252600080825260208083018281526001600160401b0388168084526008835285842094518555905160019485015584516060810186523381528083018481528187018881529285526007845295909320835181546001600160a01b03199081166001600160a01b03928316178355965195820180549097169516949094179094559251805194955090939192611f2892600285019290910190613d03565b50506040513381526001600160401b03841691507f464722b4166576d3dcbba877b999bc35cf911f4eaf434b7eba68fa113951d0bf9060200160405180910390a250905090565b6001600160401b038116600090815260076020526040812054819081906060906001600160a01b0316611fb557604051630fb532db60e11b815260040160405180910390fd5b6001600160401b0385166000908152600860209081526040808320805460019091015460078452938290208054600290910180548451818702810187019095528085529295946001600160a01b03909216939092909183919083018282801561204757602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612029575b5050505050905093509350935093509193509193565b601254600090600160301b900460ff161561208b5760405163769dd35360e11b815260040160405180910390fd5b60005a9050600080600061209f8787612f0f565b9250925092506000866060015163ffffffff166001600160401b038111156120c9576120c9614768565b6040519080825280602002602001820160405280156120f2578160200160208202803683370190505b50905060005b876060015163ffffffff168110156121665760408051602081018590529081018290526060016040516020818303038152906040528051906020012060001c82828151811061214957612149614752565b60209081029190910101528061215e816146ba565b9150506120f8565b50600083815260116020526040808220829055518190631fe543e360e01b90612195908790869060240161454c565b60408051601f198184030181529181526020820180516001600160e01b03166001600160e01b0319909416939093179092526012805466ff0000000000001916600160301b179055908a015160808b01519192506000916121fd9163ffffffff16908461317c565b6012805466ff000000000000191690556020808c0180516001600160401b0390811660009081526008909352604080842060019081015493519092168452832081018054949550919390929061225490849061462d565b9091555050601254600090612281908b90600160381b900463ffffffff1661227b85612944565b3a6131ca565b6020808e01516001600160401b03166000908152600890915260409020549091508111156122c257604051631e9acf1760e31b815260040160405180910390fd5b6020808d01516001600160401b0316600090815260089091526040812080548392906122ef9084906146a3565b909155505060055460649061230490826146a3565b61230e9083614684565b6123189190614670565b60008a8152600e60209081526040808320546001600160a01b0316835260109091528120805490919061234c90849061462d565b90915550506005546064906123619083614684565b61236b9190614670565b6004600082825461237c919061462d565b9091555050604080518881526020810183905284151581830152905189917f221ad2e5b871cead1dd7f75c2fb223c0cfa34bdc049a15f3f82a1f0e943e605a919081900360600190a299505050505050505050505b92915050565b6123df612af8565b6001600160a01b0382166124065760405163f0a7640b60e01b815260040160405180910390fd5b60648111156124285760405163197fcbd760e11b815260040160405180910390fd5b600380546001600160a01b0319166001600160a01b039390931692909217909155600555565b612456612af8565b600d8190556040518181527f4c42db8a799110fdd6a26148a21a5fbe4e581c926bccfd3b2d8a7f3aed4a87c89060200160405180910390a150565b6000816040516020016124a49190614400565b604051602081830303815290604052805190602001209050919050565b6001600160401b03821660009081526007602052604090205482906001600160a01b03168061250357604051630fb532db60e11b815260040160405180910390fd5b336001600160a01b0382161461253757604051636c51fda960e11b81526001600160a01b03821660048201526024016108b1565b601254600160301b900460ff16156125625760405163769dd35360e11b815260040160405180910390fd5b61256b84612799565b1561258957604051631685ecdd60e31b815260040160405180910390fd5b6109848484612b52565b61259b612af8565b600280546001600160a01b038381166001600160a01b031983168117909355604080519190921680825260208201939093527fa5a618fb1d2db8fcece4bcc171d33525bb774a19485486ba6f8ee0c50d59442a9101610dba565b6125fd612af8565b600c546001546040516370a0823160e01b8152306004820152600092916001600160a01b0316906370a082319060240160206040518083038186803b15801561264557600080fd5b505afa158015612659573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061267d919061408a565b61268791906146a3565b600b54909150818111156126b8576040516354ced18160e11b815260048101829052602481018390526044016108b1565b818110156127945760006126cc82846146a3565b60015460405163a9059cbb60e01b81526001600160a01b0387811660048301526024820184905292935091169063a9059cbb90604401602060405180830381600087803b15801561271c57600080fd5b505af1158015612730573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906127549190614068565b50604080516001600160a01b0386168152602081018390527f59bfc682b673f8cbf945f1e454df9334834abf7dfe7f92237ca29ecb9b4366009101610fb8565b505050565b6001600160401b0381166000908152600760209081526040808320815160608101835281546001600160a01b039081168252600183015416818501526002820180548451818702810187018652818152879693958601939092919083018282801561282d57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161280f575b505050505081525050905060005b81604001515181101561293a5760005b600f548110156129275760006128f0600f838154811061286d5761286d614752565b90600052602060002001548560400151858151811061288e5761288e614752565b60200260200101518860066000896040015189815181106128b1576128b1614752565b6020908102919091018101516001600160a01b0316825281810192909252604090810160009081206001600160401b03808f1683529352205416612e45565b50600081815260116020526040902054909150156129145750600195945050505050565b508061291f816146ba565b91505061284b565b5080612932816146ba565b91505061283b565b5060009392505050565b604080516101208101825260135463ffffffff8082168352640100000000820481166020840152600160401b8204811693830193909352600160601b810483166060830152600160801b8104909216608082015262ffffff600160a01b8304811660a08301819052600160b81b8404821660c0840152600160d01b8404821660e0840152600160e81b9093041661010082015260009183116129e7575192915050565b828160a0015162ffffff16108015612a0857508060c0015162ffffff168311155b15612a17576020015192915050565b828160c0015162ffffff16108015612a3857508060e0015162ffffff168311155b15612a47576040015192915050565b828160e0015162ffffff16108015612a69575080610100015162ffffff168311155b15612a78576060015192915050565b6080015192915050565b612a8a612af8565b6001600160a01b038116612aef5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016108b1565b61083c81612ebf565b6000546001600160a01b031633146117875760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016108b1565b601254600160301b900460ff1615612b7d5760405163769dd35360e11b815260040160405180910390fd5b6001600160401b0382166000908152600760209081526040808320815160608101835281546001600160a01b03908116825260018301541681850152600282018054845181870281018701865281815292959394860193830182828015612c0d57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612bef575b505050919092525050506001600160401b03841660009081526008602090815260408083208151808301909252805480835260019091015492820192909252929350905b836040015151811015612cd2576006600085604001518381518110612c7857612c78614752565b6020908102919091018101516001600160a01b0316825281810192909252604090810160009081206001600160401b038a1682529092529020805467ffffffffffffffff1916905580612cca816146ba565b915050612c51565b506001600160401b038516600090815260076020526040812080546001600160a01b03199081168255600182018054909116905590612d146002830182613d68565b50506001600160401b0385166000908152600860205260408120818155600101819055600b8054839290612d499084906146a3565b909155505060015460405163a9059cbb60e01b81526001600160a01b038681166004830152602482018490529091169063a9059cbb90604401602060405180830381600087803b158015612d9c57600080fd5b505af1158015612db0573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612dd49190614068565b612df157604051631e9acf1760e31b815260040160405180910390fd5b604080516001600160a01b0386168152602081018390526001600160401b038716917fe8ed5b475a5b5987aa9165e8731bb78043f39eee32ec5a1169a89e27fcd49815910160405180910390a25050505050565b6040805160208082018790526001600160a01b0395909516818301526001600160401b039384166060820152919092166080808301919091528251808303909101815260a08201835280519084012060c082019490945260e080820185905282518083039091018152610100909101909152805191012091565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6000806000612f218560000151612491565b6000818152600e60205260409020549093506001600160a01b031680612f5d57604051631dfd6e1360e21b8152600481018590526024016108b1565b6080860151604051612f7c918691602001918252602082015260400190565b60408051601f1981840301815291815281516020928301206000818152601190935291205490935080612fc257604051631b44092560e11b815260040160405180910390fd5b85516020808801516040808a015160608b015160808c0151925161302d968b9690959491019586526001600160401b03948516602087015292909316604085015263ffffffff90811660608501529190911660808301526001600160a01b031660a082015260c00190565b6040516020818303038152906040528051906020012081146130625760405163354a450b60e21b815260040160405180910390fd5b85516001600160401b03164080613128576002548751604051631d2827a760e31b81526001600160401b0390911660048201526001600160a01b039091169063e9413d389060240160206040518083038186803b1580156130c257600080fd5b505afa1580156130d6573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906130fa919061408a565b90508061312857865160405163175dadad60e01b81526001600160401b0390911660048201526024016108b1565b600088608001518260405160200161314a929190918252602082015260400190565b6040516020818303038152906040528051906020012060001c905061316f8982613225565b9450505050509250925092565b60005a61138881101561318e57600080fd5b6113888103905084604082048203116131a657600080fd5b50823b6131b257600080fd5b60008083516020850160008789f190505b9392505050565b6000805a6131d8878761462d565b6131e291906146a3565b6131ec9084614684565b9050600061320563ffffffff861664e8d4a51000614684565b9050613211818361462d565b6001600160601b0316979650505050505050565b60006132598360000151846020015185604001518660600151868860a001518960c001518a60e001518b6101000151613290565b60038360200151604051602001613271929190614538565b60408051601f1981840301815291905280516020909101209392505050565b613299896134b3565b6132e55760405162461bcd60e51b815260206004820152601a60248201527f7075626c6963206b6579206973206e6f74206f6e20637572766500000000000060448201526064016108b1565b6132ee886134b3565b6133325760405162461bcd60e51b815260206004820152601560248201527467616d6d61206973206e6f74206f6e20637572766560581b60448201526064016108b1565b61333b836134b3565b6133875760405162461bcd60e51b815260206004820152601d60248201527f6347616d6d615769746e657373206973206e6f74206f6e20637572766500000060448201526064016108b1565b613390826134b3565b6133dc5760405162461bcd60e51b815260206004820152601c60248201527f73486173685769746e657373206973206e6f74206f6e2063757276650000000060448201526064016108b1565b6133e8878a8887613576565b6134345760405162461bcd60e51b815260206004820152601960248201527f6164647228632a706b2b732a6729213d5f755769746e6573730000000000000060448201526064016108b1565b60006134408a87613699565b90506000613453898b878b8689896136fd565b90506000613464838d8d8a86613822565b9050808a146134a55760405162461bcd60e51b815260206004820152600d60248201526c34b73b30b634b210383937b7b360991b60448201526064016108b1565b505050505050505050505050565b80516000906401000003d019116135015760405162461bcd60e51b8152602060048201526012602482015271696e76616c696420782d6f7264696e61746560701b60448201526064016108b1565b60208201516401000003d0191161354f5760405162461bcd60e51b8152602060048201526012602482015271696e76616c696420792d6f7264696e61746560701b60448201526064016108b1565b60208201516401000003d01990800961356f8360005b6020020151613862565b1492915050565b60006001600160a01b0382166135bc5760405162461bcd60e51b815260206004820152600b60248201526a626164207769746e65737360a81b60448201526064016108b1565b6020840151600090600116156135d357601c6135d6565b601b5b9050600070014551231950b75fc4402da1732fc9bebe1985876000602002015109865170014551231950b75fc4402da1732fc9bebe19918203925060009190890987516040805160008082526020820180845287905260ff88169282019290925260608101929092526080820183905291925060019060a0016020604051602081039080840390855afa158015613671573d6000803e3d6000fd5b5050604051601f1901516001600160a01b039081169088161495505050505050949350505050565b6136a1613d86565b6136ce600184846040516020016136ba939291906143df565b604051602081830303815290604052613886565b90505b6136da816134b3565b6123d15780516040805160208101929092526136f691016136ba565b90506136d1565b613705613d86565b825186516401000003d01990819006910614156137645760405162461bcd60e51b815260206004820152601e60248201527f706f696e747320696e2073756d206d7573742062652064697374696e6374000060448201526064016108b1565b61376f8789886138d5565b6137b45760405162461bcd60e51b8152602060048201526016602482015275119a5c9cdd081b5d5b0818da1958dac819985a5b195960521b60448201526064016108b1565b6137bf8486856138d5565b61380b5760405162461bcd60e51b815260206004820152601760248201527f5365636f6e64206d756c20636865636b206661696c656400000000000000000060448201526064016108b1565b6138168684846139fd565b98975050505050505050565b60006002868686858760405160200161384096959493929190614380565b60408051601f1981840301815291905280516020909101209695505050505050565b6000806401000003d01980848509840990506401000003d019600782089392505050565b61388e613d86565b61389782613ac4565b81526138ac6138a7826000613565565b613aff565b6020820181905260029006600114156138d0576020810180516401000003d0190390525b919050565b6000826139125760405162461bcd60e51b815260206004820152600b60248201526a3d32b9379039b1b0b630b960a91b60448201526064016108b1565b83516020850151600090613928906002906146fc565b1561393457601c613937565b601b5b9050600070014551231950b75fc4402da1732fc9bebe198387096040805160008082526020820180845281905260ff86169282019290925260608101869052608081018390529192509060019060a0016020604051602081039080840390855afa1580156139a9573d6000803e3d6000fd5b5050506020604051035190506000866040516020016139c8919061436e565b60408051601f1981840301815291905280516020909101206001600160a01b0392831692169190911498975050505050505050565b613a05613d86565b835160208086015185519186015160009384938493613a2693909190613b1f565b919450925090506401000003d019858209600114613a865760405162461bcd60e51b815260206004820152601960248201527f696e765a206d75737420626520696e7665727365206f66207a0000000000000060448201526064016108b1565b60405180604001604052806401000003d01980613aa557613aa5614726565b87860981526020016401000003d0198785099052979650505050505050565b805160208201205b6401000003d01981106138d057604080516020808201939093528151808203840181529082019091528051910120613acc565b60006123d1826002613b186401000003d019600161462d565b901c613bff565b60008080600180826401000003d019896401000003d019038808905060006401000003d0198b6401000003d019038a0890506000613b5f83838585613c96565b9098509050613b7088828e88613cba565b9098509050613b8188828c87613cba565b90985090506000613b948d878b85613cba565b9098509050613ba588828686613c96565b9098509050613bb688828e89613cba565b9098509050818114613beb576401000003d019818a0998506401000003d01982890997506401000003d0198183099650613bef565b8196505b5050505050509450945094915050565b600080613c0a613da4565b6020808252818101819052604082015260608101859052608081018490526401000003d01960a0820152613c3c613dc2565b60208160c0846005600019fa925082613c8c5760405162461bcd60e51b81526020600482015260126024820152716269674d6f64457870206661696c7572652160701b60448201526064016108b1565b5195945050505050565b6000806401000003d0198487096401000003d0198487099097909650945050505050565b600080806401000003d019878509905060006401000003d01987876401000003d019030990506401000003d0198183086401000003d01986890990999098509650505050505050565b828054828255906000526020600020908101928215613d58579160200282015b82811115613d5857825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190613d23565b50613d64929150613de0565b5090565b508054600082559060005260206000209081019061083c9190613de0565b60405180604001604052806002906020820280368337509192915050565b6040518060c001604052806006906020820280368337509192915050565b60405180602001604052806001906020820280368337509192915050565b5b80821115613d645760008155600101613de1565b80356001600160a01b03811681146138d057600080fd5b80604081018310156123d157600080fd5b600082601f830112613e2e57600080fd5b604051604081018181106001600160401b0382111715613e5057613e50614768565b8060405250808385604086011115613e6757600080fd5b60005b6002811015613e89578135835260209283019290910190600101613e6a565b509195945050505050565b600060a08284031215613ea657600080fd5b60405160a081018181106001600160401b0382111715613ec857613ec8614768565b604052905080613ed783613f5d565b8152613ee560208401613f5d565b6020820152613ef660408401613f49565b6040820152613f0760608401613f49565b6060820152613f1860808401613df5565b60808201525092915050565b803561ffff811681146138d057600080fd5b803562ffffff811681146138d057600080fd5b803563ffffffff811681146138d057600080fd5b80356001600160401b03811681146138d057600080fd5b600060208284031215613f8657600080fd5b6131c382613df5565b60008060608385031215613fa257600080fd5b613fab83613df5565b9150613fba8460208501613e0c565b90509250929050565b60008060408385031215613fd657600080fd5b613fdf83613df5565b946020939093013593505050565b6000806040838503121561400057600080fd5b61400983613df5565b915060208301356001600160601b038116811461402557600080fd5b809150509250929050565b60006040828403121561404257600080fd5b6131c38383613e0c565b60006040828403121561405e57600080fd5b6131c38383613e1d565b60006020828403121561407a57600080fd5b815180151581146131c357600080fd5b60006020828403121561409c57600080fd5b5051919050565b600080600080600060a086880312156140bb57600080fd5b853594506140cb60208701613f5d565b93506140d960408701613f24565b92506140e760608701613f49565b91506140f560808701613f49565b90509295509295909350565b60008082840361024081121561411657600080fd5b6101a08082121561412657600080fd5b61412e614604565b915061413a8686613e1d565b82526141498660408701613e1d565b60208301526080850135604083015260a0850135606083015260c0850135608083015261417860e08601613df5565b60a083015261010061418c87828801613e1d565b60c084015261419f876101408801613e1d565b60e084015261018086013581840152508193506141be86828701613e94565b925050509250929050565b6000806000808486036101808112156141e157600080fd5b6141ea86613f24565b94506141f860208701613f49565b935061420660408701613f49565b925061012080605f198301121561421c57600080fd5b614224614604565b915061423260608801613f49565b825261424060808801613f49565b602083015261425160a08801613f49565b604083015261426260c08801613f49565b606083015261427360e08801613f49565b6080830152610100614286818901613f36565b60a0840152614296828901613f36565b60c08401526142a86101408901613f36565b60e08401526142ba6101608901613f36565b9083015250939692955090935050565b6000602082840312156142dc57600080fd5b5035919050565b600080604083850312156142f657600080fd5b82359150613fba60208401613f5d565b60006020828403121561431857600080fd5b6131c382613f5d565b6000806040838503121561433457600080fd5b61433d83613f5d565b9150613fba60208401613df5565b8060005b600281101561098457815184526020938401939091019060010161434f565b614378818361434b565b604001919050565b868152614390602082018761434b565b61439d606082018661434b565b6143aa60a082018561434b565b6143b760e082018461434b565b60609190911b6bffffffffffffffffffffffff19166101208201526101340195945050505050565b8381526143ef602082018461434b565b606081019190915260800192915050565b604081016123d1828461434b565b60006060820161ffff86168352602063ffffffff86168185015260606040850152818551808452608086019150828701935060005b8181101561445f57845183529383019391830191600101614443565b509098975050505050505050565b60006101808201905061ffff8616825263ffffffff80861660208401528085166040840152835481811660608501526144b360808501838360201c1663ffffffff169052565b6144ca60a08501838360401c1663ffffffff169052565b6144e160c08501838360601c1663ffffffff169052565b6144f860e08501838360801c1663ffffffff169052565b62ffffff60a082901c811661010086015260b882901c811661012086015260d082901c1661014085015260e81c6101609093019290925295945050505050565b828152606081016131c3602083018461434b565b6000604082018483526020604081850152818551808452606086019150828701935060005b8181101561458d57845183529383019391830191600101614571565b5090979650505050505050565b84815260208082018590526001600160a01b038481166040840152608060608401819052845190840181905260009285810192909160a0860190855b818110156145f45785518416835294840194918401916001016145d6565b50909a9950505050505050505050565b60405161012081016001600160401b038111828210171561462757614627614768565b60405290565b6000821982111561464057614640614710565b500190565b60006001600160401b0380831681851680830382111561466757614667614710565b01949350505050565b60008261467f5761467f614726565b500490565b600081600019048311821515161561469e5761469e614710565b500290565b6000828210156146b5576146b5614710565b500390565b60006000198214156146ce576146ce614710565b5060010190565b60006001600160401b03808316818114156146f2576146f2614710565b6001019392505050565b60008261470b5761470b614726565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fdfea26469706673582212209e8e4464589bd97ef9592899849a3716c5890059bc6ee6669411de23cdc93c6064736f6c63430008060033