Mumbai Testnet

Contract

0xFCbb24E49E3A7af7ae4277268D73F7351E1fCe76

Overview

MATIC Balance

Token Holdings

Multichain Info

N/A
Transaction Hash
Method
Block
From
To
Value
Submit297643692022-12-16 13:11:00547 days ago1671196260IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000278882
Submit297643672022-12-16 13:10:54547 days ago1671196254IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000278882
Submit297643652022-12-16 13:10:50547 days ago1671196250IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000278882
Submit297643632022-12-16 13:10:46547 days ago1671196246IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000278882
Submit297643612022-12-16 13:10:42547 days ago1671196242IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000278882
Submit297643592022-12-16 13:10:38547 days ago1671196238IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000283362
Submit297643572022-12-16 13:10:34547 days ago1671196234IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000278862
Submit297643552022-12-16 13:10:30547 days ago1671196230IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000278862
Submit297643532022-12-16 13:10:26547 days ago1671196226IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000278862
Submit297643512022-12-16 13:10:20547 days ago1671196220IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000348572.50000001
Submit297643492022-12-16 13:10:16547 days ago1671196216IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000278862
Submit297643472022-12-16 13:10:12547 days ago1671196212IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000278862
Submit297643452022-12-16 13:10:08547 days ago1671196208IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000278862
Submit297643432022-12-16 13:10:04547 days ago1671196204IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000283342
Submit297640872022-12-16 13:01:00547 days ago1671195660IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000250991.80000002
Submit297640852022-12-16 13:00:56547 days ago1671195656IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000250991.80000002
Submit297640832022-12-16 13:00:52547 days ago1671195652IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000250991.80000002
Submit297640812022-12-16 13:00:48547 days ago1671195648IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000250991.80000002
Submit297640792022-12-16 13:00:42547 days ago1671195642IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000250991.80000002
Submit297640772022-12-16 13:00:38547 days ago1671195638IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000250991.80000002
Submit297640752022-12-16 13:00:34547 days ago1671195634IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000250991.80000002
Submit297640732022-12-16 13:00:30547 days ago1671195630IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000250991.80000002
Submit297640712022-12-16 13:00:26547 days ago1671195626IN
0xFCbb24E4...51E1fCe76
0 MATIC0.000418323.00000001
Submit297640692022-12-16 13:00:22547 days ago1671195622IN
0xFCbb24E4...51E1fCe76
0 MATIC0.0016732812.00000001
Submit297640672022-12-16 13:00:18547 days ago1671195618IN
0xFCbb24E4...51E1fCe76
0 MATIC0.0016732812.00000001
View all transactions

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

Contract Source Code Verified (Exact Match)

Contract Name:
FluxAggregator

Compiler Version
v0.6.6+commit.6c089d02

Optimization Enabled:
Yes with 800 runs

Other Settings:
default evmVersion

Contract Source Code (Solidity Standard Json-Input format)

File 1 of 13 : FluxAggregator.sol
// SPDX-License-Identifier: MIT
pragma solidity 0.6.6;

import "./Median.sol";
import "./Owned.sol";
import "./SafeMath128.sol";
import "./SafeMath32.sol";
import "./SafeMath64.sol";
import "./interfaces/AggregatorV2V3Interface.sol";
import "./interfaces/AggregatorValidatorInterface.sol";
import "./interfaces/LinkTokenInterface.sol";
import "./vendor/SafeMathChainlink.sol";

/**
 * @title The Prepaid Aggregator contract
 * @notice Handles aggregating data pushed in from off-chain, and unlocks
 * payment for oracles as they report. Oracles' submissions are gathered in
 * rounds, with each round aggregating the submissions for each oracle into a
 * single answer. The latest aggregated answer is exposed as well as historical
 * answers and their updated at timestamp.
 */
contract FluxAggregator is AggregatorV2V3Interface, Owned {
  using SafeMathChainlink for uint256;
  using SafeMath128 for uint128;
  using SafeMath64 for uint64;
  using SafeMath32 for uint32;

  struct Round {
    int256 answer;
    uint64 startedAt;
    uint64 updatedAt;
    uint32 answeredInRound;
  }

  struct RoundDetails {
    int256[] submissions;
    uint32 maxSubmissions;
    uint32 minSubmissions;
    uint32 timeout;
    uint128 paymentAmount;
  }

  struct OracleStatus {
    uint128 withdrawable;
    uint32 startingRound;
    uint32 endingRound;
    uint32 lastReportedRound;
    uint32 lastStartedRound;
    int256 latestSubmission;
    uint16 index;
    address admin;
    address pendingAdmin;
  }

  struct Requester {
    bool authorized;
    uint32 delay;
    uint32 lastStartedRound;
  }

  struct Funds {
    uint128 available;
    uint128 allocated;
  }

  LinkTokenInterface public linkToken;
  AggregatorValidatorInterface public validator;

  // Round related params
  uint128 public paymentAmount;
  uint32 public maxSubmissionCount;
  uint32 public minSubmissionCount;
  uint32 public restartDelay;
  uint32 public timeout;
  uint8 public override decimals;
  string public override description;

  int256 immutable public minSubmissionValue;
  int256 immutable public maxSubmissionValue;

  uint256 constant public override version = 3;

  /**
   * @notice To ensure owner isn't withdrawing required funds as oracles are
   * submitting updates, we enforce that the contract maintains a minimum
   * reserve of RESERVE_ROUNDS * oracleCount() LINK earmarked for payment to
   * oracles. (Of course, this doesn't prevent the contract from running out of
   * funds without the owner's intervention.)
   */
  uint256 constant private RESERVE_ROUNDS = 2;
  uint256 constant private MAX_ORACLE_COUNT = 77;
  uint32 constant private ROUND_MAX = 2**32-1;
  uint256 private constant VALIDATOR_GAS_LIMIT = 100000;
  // An error specific to the Aggregator V3 Interface, to prevent possible
  // confusion around accidentally reading unset values as reported values.
  string constant private V3_NO_DATA_ERROR = "No data present";

  uint32 private reportingRoundId;
  uint32 internal latestRoundId;
  mapping(address => OracleStatus) private oracles;
  mapping(uint32 => Round) internal rounds;
  mapping(uint32 => RoundDetails) internal details;
  mapping(address => Requester) internal requesters;
  address[] private oracleAddresses;
  Funds private recordedFunds;

  event AvailableFundsUpdated(
    uint256 indexed amount
  );
  event RoundDetailsUpdated(
    uint128 indexed paymentAmount,
    uint32 indexed minSubmissionCount,
    uint32 indexed maxSubmissionCount,
    uint32 restartDelay,
    uint32 timeout // measured in seconds
  );
  event OraclePermissionsUpdated(
    address indexed oracle,
    bool indexed whitelisted
  );
  event OracleAdminUpdated(
    address indexed oracle,
    address indexed newAdmin
  );
  event OracleAdminUpdateRequested(
    address indexed oracle,
    address admin,
    address newAdmin
  );
  event SubmissionReceived(
    int256 indexed submission,
    uint32 indexed round,
    address indexed oracle
  );
  event RequesterPermissionsSet(
    address indexed requester,
    bool authorized,
    uint32 delay
  );
  event ValidatorUpdated(
    address indexed previous,
    address indexed current
  );

  /**
   * @notice set up the aggregator with initial configuration
   * @param _link The address of the LINK token
   * @param _paymentAmount The amount paid of LINK paid to each oracle per submission, in wei (units of 10⁻¹⁸ LINK)
   * @param _timeout is the number of seconds after the previous round that are
   * allowed to lapse before allowing an oracle to skip an unfinished round
   * @param _validator is an optional contract address for validating
   * external validation of answers
   * @param _minSubmissionValue is an immutable check for a lower bound of what
   * submission values are accepted from an oracle
   * @param _maxSubmissionValue is an immutable check for an upper bound of what
   * submission values are accepted from an oracle
   * @param _decimals represents the number of decimals to offset the answer by
   * @param _description a short description of what is being reported
   */
  constructor(
    address _link,
    uint128 _paymentAmount,
    uint32 _timeout,
    address _validator,
    int256 _minSubmissionValue,
    int256 _maxSubmissionValue,
    uint8 _decimals,
    string memory _description
  ) public {
    linkToken = LinkTokenInterface(_link);
    updateFutureRounds(_paymentAmount, 0, 0, 0, _timeout);
    setValidator(_validator);
    minSubmissionValue = _minSubmissionValue;
    maxSubmissionValue = _maxSubmissionValue;
    decimals = _decimals;
    description = _description;
    rounds[0].updatedAt = uint64(block.timestamp.sub(uint256(_timeout)));
  }

  /**
   * @notice called by oracles when they have witnessed a need to update
   * @param _roundId is the ID of the round this submission pertains to
   * @param _submission is the updated data that the oracle is submitting
   */
  function submit(uint256 _roundId, int256 _submission)
    external
  {
    bytes memory error = validateOracleRound(msg.sender, uint32(_roundId));
    require(_submission >= minSubmissionValue, "value below minSubmissionValue");
    require(_submission <= maxSubmissionValue, "value above maxSubmissionValue");
    require(error.length == 0, string(error));

    oracleInitializeNewRound(uint32(_roundId));
    recordSubmission(_submission, uint32(_roundId));
    (bool updated, int256 newAnswer) = updateRoundAnswer(uint32(_roundId));
    payOracle(uint32(_roundId));
    deleteRoundDetails(uint32(_roundId));
    if (updated) {
      validateAnswer(uint32(_roundId), newAnswer);
    }
  }

  /**
   * @notice called by the owner to remove and add new oracles as well as
   * update the round related parameters that pertain to total oracle count
   * @param _removed is the list of addresses for the new Oracles being removed
   * @param _added is the list of addresses for the new Oracles being added
   * @param _addedAdmins is the admin addresses for the new respective _added
   * list. Only this address is allowed to access the respective oracle's funds
   * @param _minSubmissions is the new minimum submission count for each round
   * @param _maxSubmissions is the new maximum submission count for each round
   * @param _restartDelay is the number of rounds an Oracle has to wait before
   * they can initiate a round
   */
  function changeOracles(
    address[] calldata _removed,
    address[] calldata _added,
    address[] calldata _addedAdmins,
    uint32 _minSubmissions,
    uint32 _maxSubmissions,
    uint32 _restartDelay
  )
    external
    onlyOwner()
  {
    for (uint256 i = 0; i < _removed.length; i++) {
      removeOracle(_removed[i]);
    }

    require(_added.length == _addedAdmins.length, "need same oracle and admin count");
    require(uint256(oracleCount()).add(_added.length) <= MAX_ORACLE_COUNT, "max oracles allowed");

    for (uint256 i = 0; i < _added.length; i++) {
      addOracle(_added[i], _addedAdmins[i]);
    }

    updateFutureRounds(paymentAmount, _minSubmissions, _maxSubmissions, _restartDelay, timeout);
  }

  /**
   * @notice update the round and payment related parameters for subsequent
   * rounds
   * @param _paymentAmount is the payment amount for subsequent rounds
   * @param _minSubmissions is the new minimum submission count for each round
   * @param _maxSubmissions is the new maximum submission count for each round
   * @param _restartDelay is the number of rounds an Oracle has to wait before
   * they can initiate a round
   */
  function updateFutureRounds(
    uint128 _paymentAmount,
    uint32 _minSubmissions,
    uint32 _maxSubmissions,
    uint32 _restartDelay,
    uint32 _timeout
  )
    public
    onlyOwner()
  {
    uint32 oracleNum = oracleCount(); // Save on storage reads
    require(_maxSubmissions >= _minSubmissions, "max must equal/exceed min");
    require(oracleNum >= _maxSubmissions, "max cannot exceed total");
    require(oracleNum == 0 || oracleNum > _restartDelay, "delay cannot exceed total");
    require(recordedFunds.available >= requiredReserve(_paymentAmount), "insufficient funds for payment");
    if (oracleCount() > 0) {
      require(_minSubmissions > 0, "min must be greater than 0");
    }

    paymentAmount = _paymentAmount;
    minSubmissionCount = _minSubmissions;
    maxSubmissionCount = _maxSubmissions;
    restartDelay = _restartDelay;
    timeout = _timeout;

    emit RoundDetailsUpdated(
      paymentAmount,
      _minSubmissions,
      _maxSubmissions,
      _restartDelay,
      _timeout
    );
  }

  /**
   * @notice the amount of payment yet to be withdrawn by oracles
   */
  function allocatedFunds()
    external
    view
    returns (uint128)
  {
    return recordedFunds.allocated;
  }

  /**
   * @notice the amount of future funding available to oracles
   */
  function availableFunds()
    external
    view
    returns (uint128)
  {
    return recordedFunds.available;
  }

  /**
   * @notice recalculate the amount of LINK available for payouts
   */
  function updateAvailableFunds()
    public
  {
    Funds memory funds = recordedFunds;

    uint256 nowAvailable = linkToken.balanceOf(address(this)).sub(funds.allocated);

    if (funds.available != nowAvailable) {
      recordedFunds.available = uint128(nowAvailable);
      emit AvailableFundsUpdated(nowAvailable);
    }
  }

  /**
   * @notice returns the number of oracles
   */
  function oracleCount() public view returns (uint8) {
    return uint8(oracleAddresses.length);
  }

  /**
   * @notice returns an array of addresses containing the oracles on contract
   */
  function getOracles() external view returns (address[] memory) {
    return oracleAddresses;
  }

  /**
   * @notice get the most recently reported answer
   *
   * @dev #[deprecated] Use latestRoundData instead. This does not error if no
   * answer has been reached, it will simply return 0. Either wait to point to
   * an already answered Aggregator or use the recommended latestRoundData
   * instead which includes better verification information.
   */
  function latestAnswer()
    public
    view
    virtual
    override
    returns (int256)
  {
    return rounds[latestRoundId].answer;
  }

  /**
   * @notice get the most recent updated at timestamp
   *
   * @dev #[deprecated] Use latestRoundData instead. This does not error if no
   * answer has been reached, it will simply return 0. Either wait to point to
   * an already answered Aggregator or use the recommended latestRoundData
   * instead which includes better verification information.
   */
  function latestTimestamp()
    public
    view
    virtual
    override
    returns (uint256)
  {
    return rounds[latestRoundId].updatedAt;
  }

  /**
   * @notice get the ID of the last updated round
   *
   * @dev #[deprecated] Use latestRoundData instead. This does not error if no
   * answer has been reached, it will simply return 0. Either wait to point to
   * an already answered Aggregator or use the recommended latestRoundData
   * instead which includes better verification information.
   */
  function latestRound()
    public
    view
    virtual
    override
    returns (uint256)
  {
    return latestRoundId;
  }

  /**
   * @notice get past rounds answers
   * @param _roundId the round number to retrieve the answer for
   *
   * @dev #[deprecated] Use getRoundData instead. This does not error if no
   * answer has been reached, it will simply return 0. Either wait to point to
   * an already answered Aggregator or use the recommended getRoundData
   * instead which includes better verification information.
   */
  function getAnswer(uint256 _roundId)
    public
    view
    virtual
    override
    returns (int256)
  {
    if (validRoundId(_roundId)) {
      return rounds[uint32(_roundId)].answer;
    }
    return 0;
  }

  /**
   * @notice get timestamp when an answer was last updated
   * @param _roundId the round number to retrieve the updated timestamp for
   *
   * @dev #[deprecated] Use getRoundData instead. This does not error if no
   * answer has been reached, it will simply return 0. Either wait to point to
   * an already answered Aggregator or use the recommended getRoundData
   * instead which includes better verification information.
   */
  function getTimestamp(uint256 _roundId)
    public
    view
    virtual
    override
    returns (uint256)
  {
    if (validRoundId(_roundId)) {
      return rounds[uint32(_roundId)].updatedAt;
    }
    return 0;
  }

  /**
   * @notice get data about a round. Consumers are encouraged to check
   * that they're receiving fresh data by inspecting the updatedAt and
   * answeredInRound return values.
   * @param _roundId the round ID to retrieve the round data for
   * @return roundId is the round ID for which data was retrieved
   * @return answer is the answer for the given round
   * @return startedAt is the timestamp when the round was started. This is 0
   * if the round hasn't been started yet.
   * @return updatedAt is the timestamp when the round last was updated (i.e.
   * answer was last computed)
   * @return answeredInRound is the round ID of the round in which the answer
   * was computed. answeredInRound may be smaller than roundId when the round
   * timed out. answeredInRound is equal to roundId when the round didn't time out
   * and was completed regularly.
   * @dev Note that for in-progress rounds (i.e. rounds that haven't yet received
   * maxSubmissions) answer and updatedAt may change between queries.
   */
  function getRoundData(uint80 _roundId)
    public
    view
    virtual
    override
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    )
  {
    Round memory r = rounds[uint32(_roundId)];

    require(r.answeredInRound > 0 && validRoundId(_roundId), V3_NO_DATA_ERROR);

    return (
      _roundId,
      r.answer,
      r.startedAt,
      r.updatedAt,
      r.answeredInRound
    );
  }

  /**
   * @notice get data about the latest round. Consumers are encouraged to check
   * that they're receiving fresh data by inspecting the updatedAt and
   * answeredInRound return values. Consumers are encouraged to
   * use this more fully featured method over the "legacy" latestRound/
   * latestAnswer/latestTimestamp functions. Consumers are encouraged to check
   * that they're receiving fresh data by inspecting the updatedAt and
   * answeredInRound return values.
   * @return roundId is the round ID for which data was retrieved
   * @return answer is the answer for the given round
   * @return startedAt is the timestamp when the round was started. This is 0
   * if the round hasn't been started yet.
   * @return updatedAt is the timestamp when the round last was updated (i.e.
   * answer was last computed)
   * @return answeredInRound is the round ID of the round in which the answer
   * was computed. answeredInRound may be smaller than roundId when the round
   * timed out. answeredInRound is equal to roundId when the round didn't time
   * out and was completed regularly.
   * @dev Note that for in-progress rounds (i.e. rounds that haven't yet
   * received maxSubmissions) answer and updatedAt may change between queries.
   */
   function latestRoundData()
    public
    view
    virtual
    override
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    )
  {
    return getRoundData(latestRoundId);
  }


  /**
   * @notice query the available amount of LINK for an oracle to withdraw
   */
  function withdrawablePayment(address _oracle)
    external
    view
    returns (uint256)
  {
    return oracles[_oracle].withdrawable;
  }

  /**
   * @notice transfers the oracle's LINK to another address. Can only be called
   * by the oracle's admin.
   * @param _oracle is the oracle whose LINK is transferred
   * @param _recipient is the address to send the LINK to
   * @param _amount is the amount of LINK to send
   */
  function withdrawPayment(address _oracle, address _recipient, uint256 _amount)
    external
  {
    require(oracles[_oracle].admin == msg.sender, "only callable by admin");

    // Safe to downcast _amount because the total amount of LINK is less than 2^128.
    uint128 amount = uint128(_amount);
    uint128 available = oracles[_oracle].withdrawable;
    require(available >= amount, "insufficient withdrawable funds");

    oracles[_oracle].withdrawable = available.sub(amount);
    recordedFunds.allocated = recordedFunds.allocated.sub(amount);

    assert(linkToken.transfer(_recipient, uint256(amount)));
  }

  /**
   * @notice transfers the owner's LINK to another address
   * @param _recipient is the address to send the LINK to
   * @param _amount is the amount of LINK to send
   */
  function withdrawFunds(address _recipient, uint256 _amount)
    external
    onlyOwner()
  {
    uint256 available = uint256(recordedFunds.available);
    require(available.sub(requiredReserve(paymentAmount)) >= _amount, "insufficient reserve funds");
    require(linkToken.transfer(_recipient, _amount), "token transfer failed");
    updateAvailableFunds();
  }

  /**
   * @notice get the admin address of an oracle
   * @param _oracle is the address of the oracle whose admin is being queried
   */
  function getAdmin(address _oracle)
    external
    view
    returns (address)
  {
    return oracles[_oracle].admin;
  }

  /**
   * @notice transfer the admin address for an oracle
   * @param _oracle is the address of the oracle whose admin is being transferred
   * @param _newAdmin is the new admin address
   */
  function transferAdmin(address _oracle, address _newAdmin)
    external
  {
    require(oracles[_oracle].admin == msg.sender, "only callable by admin");
    oracles[_oracle].pendingAdmin = _newAdmin;

    emit OracleAdminUpdateRequested(_oracle, msg.sender, _newAdmin);
  }

  /**
   * @notice accept the admin address transfer for an oracle
   * @param _oracle is the address of the oracle whose admin is being transferred
   */
  function acceptAdmin(address _oracle)
    external
  {
    require(oracles[_oracle].pendingAdmin == msg.sender, "only callable by pending admin");
    oracles[_oracle].pendingAdmin = address(0);
    oracles[_oracle].admin = msg.sender;

    emit OracleAdminUpdated(_oracle, msg.sender);
  }

  /**
   * @notice allows non-oracles to request a new round
   */
  function requestNewRound()
    external
    returns (uint80)
  {
    require(requesters[msg.sender].authorized, "not authorized requester");

    uint32 current = reportingRoundId;
    require(rounds[current].updatedAt > 0 || timedOut(current), "prev round must be supersedable");

    uint32 newRoundId = current.add(1);
    requesterInitializeNewRound(newRoundId);
    return newRoundId;
  }

  /**
   * @notice allows the owner to specify new non-oracles to start new rounds
   * @param _requester is the address to set permissions for
   * @param _authorized is a boolean specifying whether they can start new rounds or not
   * @param _delay is the number of rounds the requester must wait before starting another round
   */
  function setRequesterPermissions(address _requester, bool _authorized, uint32 _delay)
    external
    onlyOwner()
  {
    if (requesters[_requester].authorized == _authorized) return;

    if (_authorized) {
      requesters[_requester].authorized = _authorized;
      requesters[_requester].delay = _delay;
    } else {
      delete requesters[_requester];
    }

    emit RequesterPermissionsSet(_requester, _authorized, _delay);
  }

  /**
   * @notice called through LINK's transferAndCall to update available funds
   * in the same transaction as the funds were transferred to the aggregator
   * @param _data is mostly ignored. It is checked for length, to be sure
   * nothing strange is passed in.
   */
  function onTokenTransfer(address, uint256, bytes calldata _data)
    external
  {
    require(_data.length == 0, "transfer doesn't accept calldata");
    updateAvailableFunds();
  }

  /**
   * @notice a method to provide all current info oracles need. Intended only
   * only to be callable by oracles. Not for use by contracts to read state.
   * @param _oracle the address to look up information for.
   */
  function oracleRoundState(address _oracle, uint32 _queriedRoundId)
    external
    view
    returns (
      bool _eligibleToSubmit,
      uint32 _roundId,
      int256 _latestSubmission,
      uint64 _startedAt,
      uint64 _timeout,
      uint128 _availableFunds,
      uint8 _oracleCount,
      uint128 _paymentAmount
    )
  {
    require(msg.sender == tx.origin, "off-chain reading only");

    if (_queriedRoundId > 0) {
      Round storage round = rounds[_queriedRoundId];
      RoundDetails storage details = details[_queriedRoundId];
      return (
        eligibleForSpecificRound(_oracle, _queriedRoundId),
        _queriedRoundId,
        oracles[_oracle].latestSubmission,
        round.startedAt,
        details.timeout,
        recordedFunds.available,
        oracleCount(),
        (round.startedAt > 0 ? details.paymentAmount : paymentAmount)
      );
    } else {
      return oracleRoundStateSuggestRound(_oracle);
    }
  }

  /**
   * @notice method to update the address which does external data validation.
   * @param _newValidator designates the address of the new validation contract.
   */
  function setValidator(address _newValidator)
    public
    onlyOwner()
  {
    address previous = address(validator);

    if (previous != _newValidator) {
      validator = AggregatorValidatorInterface(_newValidator);

      emit ValidatorUpdated(previous, _newValidator);
    }
  }


  /**
   * Private
   */

  function initializeNewRound(uint32 _roundId)
    private
  {
    updateTimedOutRoundInfo(_roundId.sub(1));

    reportingRoundId = _roundId;
    RoundDetails memory nextDetails = RoundDetails(
      new int256[](0),
      maxSubmissionCount,
      minSubmissionCount,
      timeout,
      paymentAmount
    );
    details[_roundId] = nextDetails;
    rounds[_roundId].startedAt = uint64(block.timestamp);

    emit NewRound(_roundId, msg.sender, rounds[_roundId].startedAt);
  }

  function oracleInitializeNewRound(uint32 _roundId)
    private
  {
    if (!newRound(_roundId)) return;
    uint256 lastStarted = oracles[msg.sender].lastStartedRound; // cache storage reads
    if (_roundId <= lastStarted + restartDelay && lastStarted != 0) return;

    initializeNewRound(_roundId);

    oracles[msg.sender].lastStartedRound = _roundId;
  }

  function requesterInitializeNewRound(uint32 _roundId)
    private
  {
    if (!newRound(_roundId)) return;
    uint256 lastStarted = requesters[msg.sender].lastStartedRound; // cache storage reads
    require(_roundId > lastStarted + requesters[msg.sender].delay || lastStarted == 0, "must delay requests");

    initializeNewRound(_roundId);

    requesters[msg.sender].lastStartedRound = _roundId;
  }

  function updateTimedOutRoundInfo(uint32 _roundId)
    private
  {
    if (!timedOut(_roundId)) return;

    uint32 prevId = _roundId.sub(1);
    rounds[_roundId].answer = rounds[prevId].answer;
    rounds[_roundId].answeredInRound = rounds[prevId].answeredInRound;
    rounds[_roundId].updatedAt = uint64(block.timestamp);

    delete details[_roundId];
  }

  function eligibleForSpecificRound(address _oracle, uint32 _queriedRoundId)
    private
    view
    returns (bool _eligible)
  {
    if (rounds[_queriedRoundId].startedAt > 0) {
      return acceptingSubmissions(_queriedRoundId) && validateOracleRound(_oracle, _queriedRoundId).length == 0;
    } else {
      return delayed(_oracle, _queriedRoundId) && validateOracleRound(_oracle, _queriedRoundId).length == 0;
    }
  }

  function oracleRoundStateSuggestRound(address _oracle)
    private
    view
    returns (
      bool _eligibleToSubmit,
      uint32 _roundId,
      int256 _latestSubmission,
      uint64 _startedAt,
      uint64 _timeout,
      uint128 _availableFunds,
      uint8 _oracleCount,
      uint128 _paymentAmount
    )
  {
    Round storage round = rounds[0];
    OracleStatus storage oracle = oracles[_oracle];

    bool shouldSupersede = oracle.lastReportedRound == reportingRoundId || !acceptingSubmissions(reportingRoundId);
    // Instead of nudging oracles to submit to the next round, the inclusion of
    // the shouldSupersede bool in the if condition pushes them towards
    // submitting in a currently open round.
    if (supersedable(reportingRoundId) && shouldSupersede) {
      _roundId = reportingRoundId.add(1);
      round = rounds[_roundId];

      _paymentAmount = paymentAmount;
      _eligibleToSubmit = delayed(_oracle, _roundId);
    } else {
      _roundId = reportingRoundId;
      round = rounds[_roundId];

      _paymentAmount = details[_roundId].paymentAmount;
      _eligibleToSubmit = acceptingSubmissions(_roundId);
    }

    if (validateOracleRound(_oracle, _roundId).length != 0) {
      _eligibleToSubmit = false;
    }

    return (
      _eligibleToSubmit,
      _roundId,
      oracle.latestSubmission,
      round.startedAt,
      details[_roundId].timeout,
      recordedFunds.available,
      oracleCount(),
      _paymentAmount
    );
  }

  function updateRoundAnswer(uint32 _roundId)
    internal
    returns (bool, int256)
  {
    if (details[_roundId].submissions.length < details[_roundId].minSubmissions) {
      return (false, 0);
    }

    int256 newAnswer = Median.calculateInplace(details[_roundId].submissions);
    rounds[_roundId].answer = newAnswer;
    rounds[_roundId].updatedAt = uint64(block.timestamp);
    rounds[_roundId].answeredInRound = _roundId;
    latestRoundId = _roundId;

    emit AnswerUpdated(newAnswer, _roundId, now);

    return (true, newAnswer);
  }

  function validateAnswer(
    uint32 _roundId,
    int256 _newAnswer
  )
    private
  {
    AggregatorValidatorInterface av = validator; // cache storage reads
    if (address(av) == address(0)) return;

    uint32 prevRound = _roundId.sub(1);
    uint32 prevAnswerRoundId = rounds[prevRound].answeredInRound;
    int256 prevRoundAnswer = rounds[prevRound].answer;
    // We do not want the validator to ever prevent reporting, so we limit its
    // gas usage and catch any errors that may arise.
    try av.validate{gas: VALIDATOR_GAS_LIMIT}(
      prevAnswerRoundId,
      prevRoundAnswer,
      _roundId,
      _newAnswer
    ) {} catch {}
  }

  function payOracle(uint32 _roundId)
    private
  {
    uint128 payment = details[_roundId].paymentAmount;
    Funds memory funds = recordedFunds;
    funds.available = funds.available.sub(payment);
    funds.allocated = funds.allocated.add(payment);
    recordedFunds = funds;
    oracles[msg.sender].withdrawable = oracles[msg.sender].withdrawable.add(payment);

    emit AvailableFundsUpdated(funds.available);
  }

  function recordSubmission(int256 _submission, uint32 _roundId)
    private
  {
    require(acceptingSubmissions(_roundId), "round not accepting submissions");

    details[_roundId].submissions.push(_submission);
    oracles[msg.sender].lastReportedRound = _roundId;
    oracles[msg.sender].latestSubmission = _submission;

    emit SubmissionReceived(_submission, _roundId, msg.sender);
  }

  function deleteRoundDetails(uint32 _roundId)
    private
  {
    if (details[_roundId].submissions.length < details[_roundId].maxSubmissions) return;

    delete details[_roundId];
  }

  function timedOut(uint32 _roundId)
    private
    view
    returns (bool)
  {
    uint64 startedAt = rounds[_roundId].startedAt;
    uint32 roundTimeout = details[_roundId].timeout;
    return startedAt > 0 && roundTimeout > 0 && startedAt.add(roundTimeout) < block.timestamp;
  }

  function getStartingRound(address _oracle)
    private
    view
    returns (uint32)
  {
    uint32 currentRound = reportingRoundId;
    if (currentRound != 0 && currentRound == oracles[_oracle].endingRound) {
      return currentRound;
    }
    return currentRound.add(1);
  }

  function previousAndCurrentUnanswered(uint32 _roundId, uint32 _rrId)
    private
    view
    returns (bool)
  {
    return _roundId.add(1) == _rrId && rounds[_rrId].updatedAt == 0;
  }

  function requiredReserve(uint256 payment)
    private
    view
    returns (uint256)
  {
    return payment.mul(oracleCount()).mul(RESERVE_ROUNDS);
  }

  function addOracle(
    address _oracle,
    address _admin
  )
    private
  {
    require(!oracleEnabled(_oracle), "oracle already enabled");

    require(_admin != address(0), "cannot set admin to 0");
    require(oracles[_oracle].admin == address(0) || oracles[_oracle].admin == _admin, "owner cannot overwrite admin");

    oracles[_oracle].startingRound = getStartingRound(_oracle);
    oracles[_oracle].endingRound = ROUND_MAX;
    oracles[_oracle].index = uint16(oracleAddresses.length);
    oracleAddresses.push(_oracle);
    oracles[_oracle].admin = _admin;

    emit OraclePermissionsUpdated(_oracle, true);
    emit OracleAdminUpdated(_oracle, _admin);
  }

  function removeOracle(
    address _oracle
  )
    private
  {
    require(oracleEnabled(_oracle), "oracle not enabled");

    oracles[_oracle].endingRound = reportingRoundId.add(1);
    address tail = oracleAddresses[uint256(oracleCount()).sub(1)];
    uint16 index = oracles[_oracle].index;
    oracles[tail].index = index;
    delete oracles[_oracle].index;
    oracleAddresses[index] = tail;
    oracleAddresses.pop();

    emit OraclePermissionsUpdated(_oracle, false);
  }

  function validateOracleRound(address _oracle, uint32 _roundId)
    private
    view
    returns (bytes memory)
  {
    // cache storage reads
    uint32 startingRound = oracles[_oracle].startingRound;
    uint32 rrId = reportingRoundId;

    if (startingRound == 0) return "not enabled oracle";
    if (startingRound > _roundId) return "not yet enabled oracle";
    if (oracles[_oracle].endingRound < _roundId) return "no longer allowed oracle";
    if (oracles[_oracle].lastReportedRound >= _roundId) return "cannot report on previous rounds";
    if (_roundId != rrId && _roundId != rrId.add(1) && !previousAndCurrentUnanswered(_roundId, rrId)) return "invalid round to report";
    if (_roundId != 1 && !supersedable(_roundId.sub(1))) return "previous round not supersedable";
  }

  function supersedable(uint32 _roundId)
    private
    view
    returns (bool)
  {
    return rounds[_roundId].updatedAt > 0 || timedOut(_roundId);
  }

  function oracleEnabled(address _oracle)
    private
    view
    returns (bool)
  {
    return oracles[_oracle].endingRound == ROUND_MAX;
  }

  function acceptingSubmissions(uint32 _roundId)
    private
    view
    returns (bool)
  {
    return details[_roundId].maxSubmissions != 0;
  }

  function delayed(address _oracle, uint32 _roundId)
    private
    view
    returns (bool)
  {
    uint256 lastStarted = oracles[_oracle].lastStartedRound;
    return _roundId > lastStarted + restartDelay || lastStarted == 0;
  }

  function newRound(uint32 _roundId)
    private
    view
    returns (bool)
  {
    return _roundId == reportingRoundId.add(1);
  }

  function validRoundId(uint256 _roundId)
    private
    pure
    returns (bool)
  {
    return _roundId <= ROUND_MAX;
  }

}

File 2 of 13 : Median.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

import "./vendor/SafeMathChainlink.sol";
import "./SignedSafeMath.sol";

library Median {
  using SignedSafeMath for int256;

  int256 constant INT_MAX = 2**255-1;

  /**
   * @notice Returns the sorted middle, or the average of the two middle indexed items if the
   * array has an even number of elements.
   * @dev The list passed as an argument isn't modified.
   * @dev This algorithm has expected runtime O(n), but for adversarially chosen inputs
   * the runtime is O(n^2).
   * @param list The list of elements to compare
   */
  function calculate(int256[] memory list)
    internal
    pure
    returns (int256)
  {
    return calculateInplace(copy(list));
  }

  /**
   * @notice See documentation for function calculate.
   * @dev The list passed as an argument may be permuted.
   */
  function calculateInplace(int256[] memory list)
    internal
    pure
    returns (int256)
  {
    require(0 < list.length, "list must not be empty");
    uint256 len = list.length;
    uint256 middleIndex = len / 2;
    if (len % 2 == 0) {
      int256 median1;
      int256 median2;
      (median1, median2) = quickselectTwo(list, 0, len - 1, middleIndex - 1, middleIndex);
      return SignedSafeMath.avg(median1, median2);
    } else {
      return quickselect(list, 0, len - 1, middleIndex);
    }
  }

  /**
   * @notice Maximum length of list that shortSelectTwo can handle
   */
  uint256 constant SHORTSELECTTWO_MAX_LENGTH = 7;

  /**
   * @notice Select the k1-th and k2-th element from list of length at most 7
   * @dev Uses an optimal sorting network
   */
  function shortSelectTwo(
    int256[] memory list,
    uint256 lo,
    uint256 hi,
    uint256 k1,
    uint256 k2
  )
    private
    pure
    returns (int256 k1th, int256 k2th)
  {
    // Uses an optimal sorting network (https://en.wikipedia.org/wiki/Sorting_network)
    // for lists of length 7. Network layout is taken from
    // http://jgamble.ripco.net/cgi-bin/nw.cgi?inputs=7&algorithm=hibbard&output=svg

    uint256 len = hi + 1 - lo;
    int256 x0 = list[lo + 0];
    int256 x1 = 1 < len ? list[lo + 1] : INT_MAX;
    int256 x2 = 2 < len ? list[lo + 2] : INT_MAX;
    int256 x3 = 3 < len ? list[lo + 3] : INT_MAX;
    int256 x4 = 4 < len ? list[lo + 4] : INT_MAX;
    int256 x5 = 5 < len ? list[lo + 5] : INT_MAX;
    int256 x6 = 6 < len ? list[lo + 6] : INT_MAX;

    if (x0 > x1) {(x0, x1) = (x1, x0);}
    if (x2 > x3) {(x2, x3) = (x3, x2);}
    if (x4 > x5) {(x4, x5) = (x5, x4);}
    if (x0 > x2) {(x0, x2) = (x2, x0);}
    if (x1 > x3) {(x1, x3) = (x3, x1);}
    if (x4 > x6) {(x4, x6) = (x6, x4);}
    if (x1 > x2) {(x1, x2) = (x2, x1);}
    if (x5 > x6) {(x5, x6) = (x6, x5);}
    if (x0 > x4) {(x0, x4) = (x4, x0);}
    if (x1 > x5) {(x1, x5) = (x5, x1);}
    if (x2 > x6) {(x2, x6) = (x6, x2);}
    if (x1 > x4) {(x1, x4) = (x4, x1);}
    if (x3 > x6) {(x3, x6) = (x6, x3);}
    if (x2 > x4) {(x2, x4) = (x4, x2);}
    if (x3 > x5) {(x3, x5) = (x5, x3);}
    if (x3 > x4) {(x3, x4) = (x4, x3);}

    uint256 index1 = k1 - lo;
    if (index1 == 0) {k1th = x0;}
    else if (index1 == 1) {k1th = x1;}
    else if (index1 == 2) {k1th = x2;}
    else if (index1 == 3) {k1th = x3;}
    else if (index1 == 4) {k1th = x4;}
    else if (index1 == 5) {k1th = x5;}
    else if (index1 == 6) {k1th = x6;}
    else {revert("k1 out of bounds");}

    uint256 index2 = k2 - lo;
    if (k1 == k2) {return (k1th, k1th);}
    else if (index2 == 0) {return (k1th, x0);}
    else if (index2 == 1) {return (k1th, x1);}
    else if (index2 == 2) {return (k1th, x2);}
    else if (index2 == 3) {return (k1th, x3);}
    else if (index2 == 4) {return (k1th, x4);}
    else if (index2 == 5) {return (k1th, x5);}
    else if (index2 == 6) {return (k1th, x6);}
    else {revert("k2 out of bounds");}
  }

  /**
   * @notice Selects the k-th ranked element from list, looking only at indices between lo and hi
   * (inclusive). Modifies list in-place.
   */
  function quickselect(int256[] memory list, uint256 lo, uint256 hi, uint256 k)
    private
    pure
    returns (int256 kth)
  {
    require(lo <= k);
    require(k <= hi);
    while (lo < hi) {
      if (hi - lo < SHORTSELECTTWO_MAX_LENGTH) {
        int256 ignore;
        (kth, ignore) = shortSelectTwo(list, lo, hi, k, k);
        return kth;
      }
      uint256 pivotIndex = partition(list, lo, hi);
      if (k <= pivotIndex) {
        // since pivotIndex < (original hi passed to partition),
        // termination is guaranteed in this case
        hi = pivotIndex;
      } else {
        // since (original lo passed to partition) <= pivotIndex,
        // termination is guaranteed in this case
        lo = pivotIndex + 1;
      }
    }
    return list[lo];
  }

  /**
   * @notice Selects the k1-th and k2-th ranked elements from list, looking only at indices between
   * lo and hi (inclusive). Modifies list in-place.
   */
  function quickselectTwo(
    int256[] memory list,
    uint256 lo,
    uint256 hi,
    uint256 k1,
    uint256 k2
  )
    internal // for testing
    pure
    returns (int256 k1th, int256 k2th)
  {
    require(k1 < k2);
    require(lo <= k1 && k1 <= hi);
    require(lo <= k2 && k2 <= hi);

    while (true) {
      if (hi - lo < SHORTSELECTTWO_MAX_LENGTH) {
        return shortSelectTwo(list, lo, hi, k1, k2);
      }
      uint256 pivotIdx = partition(list, lo, hi);
      if (k2 <= pivotIdx) {
        hi = pivotIdx;
      } else if (pivotIdx < k1) {
        lo = pivotIdx + 1;
      } else {
        assert(k1 <= pivotIdx && pivotIdx < k2);
        k1th = quickselect(list, lo, pivotIdx, k1);
        k2th = quickselect(list, pivotIdx + 1, hi, k2);
        return (k1th, k2th);
      }
    }
  }

  /**
   * @notice Partitions list in-place using Hoare's partitioning scheme.
   * Only elements of list between indices lo and hi (inclusive) will be modified.
   * Returns an index i, such that:
   * - lo <= i < hi
   * - forall j in [lo, i]. list[j] <= list[i]
   * - forall j in [i, hi]. list[i] <= list[j]
   */
  function partition(int256[] memory list, uint256 lo, uint256 hi)
    private
    pure
    returns (uint256)
  {
    // We don't care about overflow of the addition, because it would require a list
    // larger than any feasible computer's memory.
    int256 pivot = list[(lo + hi) / 2];
    lo -= 1; // this can underflow. that's intentional.
    hi += 1;
    while (true) {
      do {
        lo += 1;
      } while (list[lo] < pivot);
      do {
        hi -= 1;
      } while (list[hi] > pivot);
      if (lo < hi) {
        (list[lo], list[hi]) = (list[hi], list[lo]);
      } else {
        // Let orig_lo and orig_hi be the original values of lo and hi passed to partition.
        // Then, hi < orig_hi, because hi decreases *strictly* monotonically
        // in each loop iteration and
        // - either list[orig_hi] > pivot, in which case the first loop iteration
        //   will achieve hi < orig_hi;
        // - or list[orig_hi] <= pivot, in which case at least two loop iterations are
        //   needed:
        //   - lo will have to stop at least once in the interval
        //     [orig_lo, (orig_lo + orig_hi)/2]
        //   - (orig_lo + orig_hi)/2 < orig_hi
        return hi;
      }
    }
  }

  /**
   * @notice Makes an in-memory copy of the array passed in
   * @param list Reference to the array to be copied
   */
  function copy(int256[] memory list)
    private
    pure
    returns(int256[] memory)
  {
    int256[] memory list2 = new int256[](list.length);
    for (uint256 i = 0; i < list.length; i++) {
      list2[i] = list[i];
    }
    return list2;
  }
}

File 2 of 13 : Owned.sol
// SPDX-License-Identifier: MIT
pragma solidity >0.6.0 <0.8.0;

/**
 * @title The Owned contract
 * @notice A contract with helpers for basic contract ownership.
 */
contract Owned {

  address public owner;
  address private pendingOwner;

  event OwnershipTransferRequested(
    address indexed from,
    address indexed to
  );
  event OwnershipTransferred(
    address indexed from,
    address indexed to
  );

  constructor() public {
    owner = msg.sender;
  }

  /**
   * @dev Allows an owner to begin transferring ownership to a new address,
   * pending.
   */
  function transferOwnership(address _to)
    external
    onlyOwner()
  {
    pendingOwner = _to;

    emit OwnershipTransferRequested(owner, _to);
  }

  /**
   * @dev Allows an ownership transfer to be completed by the recipient.
   */
  function acceptOwnership()
    external
  {
    require(msg.sender == pendingOwner, "Must be proposed owner");

    address oldOwner = owner;
    owner = msg.sender;
    pendingOwner = address(0);

    emit OwnershipTransferred(oldOwner, msg.sender);
  }

  /**
   * @dev Reverts if called by anyone other than the contract owner.
   */
  modifier onlyOwner() {
    require(msg.sender == owner, "Only callable by owner");
    _;
  }

}

File 2 of 13 : SafeMath128.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 *
 * This library is a version of Open Zeppelin's SafeMath, modified to support
 * unsigned 128 bit integers.
 */
library SafeMath128 {
  /**
    * @dev Returns the addition of two unsigned integers, reverting on
    * overflow.
    *
    * Counterpart to Solidity's `+` operator.
    *
    * Requirements:
    * - Addition cannot overflow.
    */
  function add(uint128 a, uint128 b) internal pure returns (uint128) {
    uint128 c = a + b;
    require(c >= a, "SafeMath: addition overflow");

    return c;
  }

  /**
    * @dev Returns the subtraction of two unsigned integers, reverting on
    * overflow (when the result is negative).
    *
    * Counterpart to Solidity's `-` operator.
    *
    * Requirements:
    * - Subtraction cannot overflow.
    */
  function sub(uint128 a, uint128 b) internal pure returns (uint128) {
    require(b <= a, "SafeMath: subtraction overflow");
    uint128 c = a - b;

    return c;
  }

  /**
    * @dev Returns the multiplication of two unsigned integers, reverting on
    * overflow.
    *
    * Counterpart to Solidity's `*` operator.
    *
    * Requirements:
    * - Multiplication cannot overflow.
    */
  function mul(uint128 a, uint128 b) internal pure returns (uint128) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
    if (a == 0) {
      return 0;
    }

    uint128 c = a * b;
    require(c / a == b, "SafeMath: multiplication overflow");

    return c;
  }

  /**
    * @dev Returns the integer division of two unsigned integers. Reverts on
    * division by zero. The result is rounded towards zero.
    *
    * Counterpart to Solidity's `/` operator. Note: this function uses a
    * `revert` opcode (which leaves remaining gas untouched) while Solidity
    * uses an invalid opcode to revert (consuming all remaining gas).
    *
    * Requirements:
    * - The divisor cannot be zero.
    */
  function div(uint128 a, uint128 b) internal pure returns (uint128) {
    // Solidity only automatically asserts when dividing by 0
    require(b > 0, "SafeMath: division by zero");
    uint128 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold

    return c;
  }

  /**
    * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
    * Reverts when dividing by zero.
    *
    * Counterpart to Solidity's `%` operator. This function uses a `revert`
    * opcode (which leaves remaining gas untouched) while Solidity uses an
    * invalid opcode to revert (consuming all remaining gas).
    *
    * Requirements:
    * - The divisor cannot be zero.
    */
  function mod(uint128 a, uint128 b) internal pure returns (uint128) {
    require(b != 0, "SafeMath: modulo by zero");
    return a % b;
  }
}

File 2 of 13 : SafeMath32.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 *
 * This library is a version of Open Zeppelin's SafeMath, modified to support
 * unsigned 32 bit integers.
 */
library SafeMath32 {
  /**
    * @dev Returns the addition of two unsigned integers, reverting on
    * overflow.
    *
    * Counterpart to Solidity's `+` operator.
    *
    * Requirements:
    * - Addition cannot overflow.
    */
  function add(uint32 a, uint32 b) internal pure returns (uint32) {
    uint32 c = a + b;
    require(c >= a, "SafeMath: addition overflow");

    return c;
  }

  /**
    * @dev Returns the subtraction of two unsigned integers, reverting on
    * overflow (when the result is negative).
    *
    * Counterpart to Solidity's `-` operator.
    *
    * Requirements:
    * - Subtraction cannot overflow.
    */
  function sub(uint32 a, uint32 b) internal pure returns (uint32) {
    require(b <= a, "SafeMath: subtraction overflow");
    uint32 c = a - b;

    return c;
  }

  /**
    * @dev Returns the multiplication of two unsigned integers, reverting on
    * overflow.
    *
    * Counterpart to Solidity's `*` operator.
    *
    * Requirements:
    * - Multiplication cannot overflow.
    */
  function mul(uint32 a, uint32 b) internal pure returns (uint32) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
    if (a == 0) {
      return 0;
    }

    uint32 c = a * b;
    require(c / a == b, "SafeMath: multiplication overflow");

    return c;
  }

  /**
    * @dev Returns the integer division of two unsigned integers. Reverts on
    * division by zero. The result is rounded towards zero.
    *
    * Counterpart to Solidity's `/` operator. Note: this function uses a
    * `revert` opcode (which leaves remaining gas untouched) while Solidity
    * uses an invalid opcode to revert (consuming all remaining gas).
    *
    * Requirements:
    * - The divisor cannot be zero.
    */
  function div(uint32 a, uint32 b) internal pure returns (uint32) {
    // Solidity only automatically asserts when dividing by 0
    require(b > 0, "SafeMath: division by zero");
    uint32 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold

    return c;
  }

  /**
    * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
    * Reverts when dividing by zero.
    *
    * Counterpart to Solidity's `%` operator. This function uses a `revert`
    * opcode (which leaves remaining gas untouched) while Solidity uses an
    * invalid opcode to revert (consuming all remaining gas).
    *
    * Requirements:
    * - The divisor cannot be zero.
    */
  function mod(uint32 a, uint32 b) internal pure returns (uint32) {
    require(b != 0, "SafeMath: modulo by zero");
    return a % b;
  }
}

File 2 of 13 : SafeMath64.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 *
 * This library is a version of Open Zeppelin's SafeMath, modified to support
 * unsigned 64 bit integers.
 */
library SafeMath64 {
  /**
    * @dev Returns the addition of two unsigned integers, reverting on
    * overflow.
    *
    * Counterpart to Solidity's `+` operator.
    *
    * Requirements:
    * - Addition cannot overflow.
    */
  function add(uint64 a, uint64 b) internal pure returns (uint64) {
    uint64 c = a + b;
    require(c >= a, "SafeMath: addition overflow");

    return c;
  }

  /**
    * @dev Returns the subtraction of two unsigned integers, reverting on
    * overflow (when the result is negative).
    *
    * Counterpart to Solidity's `-` operator.
    *
    * Requirements:
    * - Subtraction cannot overflow.
    */
  function sub(uint64 a, uint64 b) internal pure returns (uint64) {
    require(b <= a, "SafeMath: subtraction overflow");
    uint64 c = a - b;

    return c;
  }

  /**
    * @dev Returns the multiplication of two unsigned integers, reverting on
    * overflow.
    *
    * Counterpart to Solidity's `*` operator.
    *
    * Requirements:
    * - Multiplication cannot overflow.
    */
  function mul(uint64 a, uint64 b) internal pure returns (uint64) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
    if (a == 0) {
      return 0;
    }

    uint64 c = a * b;
    require(c / a == b, "SafeMath: multiplication overflow");

    return c;
  }

  /**
    * @dev Returns the integer division of two unsigned integers. Reverts on
    * division by zero. The result is rounded towards zero.
    *
    * Counterpart to Solidity's `/` operator. Note: this function uses a
    * `revert` opcode (which leaves remaining gas untouched) while Solidity
    * uses an invalid opcode to revert (consuming all remaining gas).
    *
    * Requirements:
    * - The divisor cannot be zero.
    */
  function div(uint64 a, uint64 b) internal pure returns (uint64) {
    // Solidity only automatically asserts when dividing by 0
    require(b > 0, "SafeMath: division by zero");
    uint64 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold

    return c;
  }

  /**
    * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
    * Reverts when dividing by zero.
    *
    * Counterpart to Solidity's `%` operator. This function uses a `revert`
    * opcode (which leaves remaining gas untouched) while Solidity uses an
    * invalid opcode to revert (consuming all remaining gas).
    *
    * Requirements:
    * - The divisor cannot be zero.
    */
  function mod(uint64 a, uint64 b) internal pure returns (uint64) {
    require(b != 0, "SafeMath: modulo by zero");
    return a % b;
  }
}

File 2 of 13 : AggregatorV2V3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

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

interface AggregatorV2V3Interface is AggregatorInterface, AggregatorV3Interface
{
}

File 2 of 13 : AggregatorValidatorInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

interface AggregatorValidatorInterface {
  function validate(
    uint256 previousRoundId,
    int256 previousAnswer,
    uint256 currentRoundId,
    int256 currentAnswer
  ) external returns (bool);
}

File 2 of 13 : LinkTokenInterface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

interface LinkTokenInterface {
  function allowance(address owner, address spender) external view returns (uint256 remaining);
  function approve(address spender, uint256 value) external returns (bool success);
  function balanceOf(address owner) external view returns (uint256 balance);
  function decimals() external view returns (uint8 decimalPlaces);
  function decreaseApproval(address spender, uint256 addedValue) external returns (bool success);
  function increaseApproval(address spender, uint256 subtractedValue) external;
  function name() external view returns (string memory tokenName);
  function symbol() external view returns (string memory tokenSymbol);
  function totalSupply() external view returns (uint256 totalTokensIssued);
  function transfer(address to, uint256 value) external returns (bool success);
  function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool success);
  function transferFrom(address from, address to, uint256 value) external returns (bool success);
}

File 2 of 13 : SafeMathChainlink.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMathChainlink {
  /**
    * @dev Returns the addition of two unsigned integers, reverting on
    * overflow.
    *
    * Counterpart to Solidity's `+` operator.
    *
    * Requirements:
    * - Addition cannot overflow.
    */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a, "SafeMath: addition overflow");

    return c;
  }

  /**
    * @dev Returns the subtraction of two unsigned integers, reverting on
    * overflow (when the result is negative).
    *
    * Counterpart to Solidity's `-` operator.
    *
    * Requirements:
    * - Subtraction cannot overflow.
    */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b <= a, "SafeMath: subtraction overflow");
    uint256 c = a - b;

    return c;
  }

  /**
    * @dev Returns the multiplication of two unsigned integers, reverting on
    * overflow.
    *
    * Counterpart to Solidity's `*` operator.
    *
    * Requirements:
    * - Multiplication cannot overflow.
    */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-solidity/pull/522
    if (a == 0) {
      return 0;
    }

    uint256 c = a * b;
    require(c / a == b, "SafeMath: multiplication overflow");

    return c;
  }

  /**
    * @dev Returns the integer division of two unsigned integers. Reverts on
    * division by zero. The result is rounded towards zero.
    *
    * Counterpart to Solidity's `/` operator. Note: this function uses a
    * `revert` opcode (which leaves remaining gas untouched) while Solidity
    * uses an invalid opcode to revert (consuming all remaining gas).
    *
    * Requirements:
    * - The divisor cannot be zero.
    */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    // Solidity only automatically asserts when dividing by 0
    require(b > 0, "SafeMath: division by zero");
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold

    return c;
  }

  /**
    * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
    * Reverts when dividing by zero.
    *
    * Counterpart to Solidity's `%` operator. This function uses a `revert`
    * opcode (which leaves remaining gas untouched) while Solidity uses an
    * invalid opcode to revert (consuming all remaining gas).
    *
    * Requirements:
    * - The divisor cannot be zero.
    */
  function mod(uint256 a, uint256 b) internal pure returns (uint256) {
    require(b != 0, "SafeMath: modulo by zero");
    return a % b;
  }
}

File 2 of 13 : SignedSafeMath.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

library SignedSafeMath {
  int256 constant private _INT256_MIN = -2**255;

  /**
   * @dev Multiplies two signed integers, reverts on overflow.
   */
  function mul(int256 a, int256 b) internal pure returns (int256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
    if (a == 0) {
      return 0;
    }

    require(!(a == -1 && b == _INT256_MIN), "SignedSafeMath: multiplication overflow");

    int256 c = a * b;
    require(c / a == b, "SignedSafeMath: multiplication overflow");

    return c;
  }

  /**
   * @dev Integer division of two signed integers truncating the quotient, reverts on division by zero.
   */
  function div(int256 a, int256 b) internal pure returns (int256) {
    require(b != 0, "SignedSafeMath: division by zero");
    require(!(b == -1 && a == _INT256_MIN), "SignedSafeMath: division overflow");

    int256 c = a / b;

    return c;
  }

  /**
   * @dev Subtracts two signed integers, reverts on overflow.
   */
  function sub(int256 a, int256 b) internal pure returns (int256) {
    int256 c = a - b;
    require((b >= 0 && c <= a) || (b < 0 && c > a), "SignedSafeMath: subtraction overflow");

    return c;
  }

  /**
   * @dev Adds two signed integers, reverts on overflow.
   */
  function add(int256 a, int256 b) internal pure returns (int256) {
    int256 c = a + b;
    require((b >= 0 && c >= a) || (b < 0 && c < a), "SignedSafeMath: addition overflow");

    return c;
  }

  /**
   * @notice Computes average of two signed integers, ensuring that the computation
   * doesn't overflow.
   * @dev If the result is not an integer, it is rounded towards zero. For example,
   * avg(-3, -4) = -3
   */
  function avg(int256 _a, int256 _b)
    internal
    pure
    returns (int256)
  {
    if ((_a < 0 && _b > 0) || (_a > 0 && _b < 0)) {
      return add(_a, _b) / 2;
    }
    int256 remainder = (_a % 2 + _b % 2) / 2;
    return add(add(_a / 2, _b / 2), remainder);
  }
}

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

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

  function latestRound()
    external
    view
    returns (
      uint256
    );

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

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

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

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

File 2 of 13 : AggregatorV3Interface.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;

interface AggregatorV3Interface {

  function decimals()
    external
    view
    returns (
      uint8
    );

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

  function version()
    external
    view
    returns (
      uint256
    );

  // getRoundData and latestRoundData should both raise "No data present"
  // if they do not have data to report, instead of returning unset values
  // which could be misinterpreted as actual reported values.
  function getRoundData(
    uint80 _roundId
  )
    external
    view
    returns (
      uint80 roundId,
      int256 answer,
      uint256 startedAt,
      uint256 updatedAt,
      uint80 answeredInRound
    );

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

}

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

Contract ABI

[{"inputs":[{"internalType":"address","name":"_link","type":"address"},{"internalType":"uint128","name":"_paymentAmount","type":"uint128"},{"internalType":"uint32","name":"_timeout","type":"uint32"},{"internalType":"address","name":"_validator","type":"address"},{"internalType":"int256","name":"_minSubmissionValue","type":"int256"},{"internalType":"int256","name":"_maxSubmissionValue","type":"int256"},{"internalType":"uint8","name":"_decimals","type":"uint8"},{"internalType":"string","name":"_description","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"int256","name":"current","type":"int256"},{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"updatedAt","type":"uint256"}],"name":"AnswerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"AvailableFundsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"roundId","type":"uint256"},{"indexed":true,"internalType":"address","name":"startedBy","type":"address"},{"indexed":false,"internalType":"uint256","name":"startedAt","type":"uint256"}],"name":"NewRound","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oracle","type":"address"},{"indexed":false,"internalType":"address","name":"admin","type":"address"},{"indexed":false,"internalType":"address","name":"newAdmin","type":"address"}],"name":"OracleAdminUpdateRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oracle","type":"address"},{"indexed":true,"internalType":"address","name":"newAdmin","type":"address"}],"name":"OracleAdminUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oracle","type":"address"},{"indexed":true,"internalType":"bool","name":"whitelisted","type":"bool"}],"name":"OraclePermissionsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"requester","type":"address"},{"indexed":false,"internalType":"bool","name":"authorized","type":"bool"},{"indexed":false,"internalType":"uint32","name":"delay","type":"uint32"}],"name":"RequesterPermissionsSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint128","name":"paymentAmount","type":"uint128"},{"indexed":true,"internalType":"uint32","name":"minSubmissionCount","type":"uint32"},{"indexed":true,"internalType":"uint32","name":"maxSubmissionCount","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"restartDelay","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"timeout","type":"uint32"}],"name":"RoundDetailsUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"int256","name":"submission","type":"int256"},{"indexed":true,"internalType":"uint32","name":"round","type":"uint32"},{"indexed":true,"internalType":"address","name":"oracle","type":"address"}],"name":"SubmissionReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previous","type":"address"},{"indexed":true,"internalType":"address","name":"current","type":"address"}],"name":"ValidatorUpdated","type":"event"},{"inputs":[{"internalType":"address","name":"_oracle","type":"address"}],"name":"acceptAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"allocatedFunds","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"availableFunds","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_removed","type":"address[]"},{"internalType":"address[]","name":"_added","type":"address[]"},{"internalType":"address[]","name":"_addedAdmins","type":"address[]"},{"internalType":"uint32","name":"_minSubmissions","type":"uint32"},{"internalType":"uint32","name":"_maxSubmissions","type":"uint32"},{"internalType":"uint32","name":"_restartDelay","type":"uint32"}],"name":"changeOracles","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"description","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oracle","type":"address"}],"name":"getAdmin","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"}],"name":"getAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getOracles","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint80","name":"_roundId","type":"uint80"}],"name":"getRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"}],"name":"getTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestAnswer","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRound","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestRoundData","outputs":[{"internalType":"uint80","name":"roundId","type":"uint80"},{"internalType":"int256","name":"answer","type":"int256"},{"internalType":"uint256","name":"startedAt","type":"uint256"},{"internalType":"uint256","name":"updatedAt","type":"uint256"},{"internalType":"uint80","name":"answeredInRound","type":"uint80"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"latestTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"linkToken","outputs":[{"internalType":"contract LinkTokenInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSubmissionCount","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSubmissionValue","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minSubmissionCount","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minSubmissionValue","outputs":[{"internalType":"int256","name":"","type":"int256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"onTokenTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"oracleCount","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oracle","type":"address"},{"internalType":"uint32","name":"_queriedRoundId","type":"uint32"}],"name":"oracleRoundState","outputs":[{"internalType":"bool","name":"_eligibleToSubmit","type":"bool"},{"internalType":"uint32","name":"_roundId","type":"uint32"},{"internalType":"int256","name":"_latestSubmission","type":"int256"},{"internalType":"uint64","name":"_startedAt","type":"uint64"},{"internalType":"uint64","name":"_timeout","type":"uint64"},{"internalType":"uint128","name":"_availableFunds","type":"uint128"},{"internalType":"uint8","name":"_oracleCount","type":"uint8"},{"internalType":"uint128","name":"_paymentAmount","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paymentAmount","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"requestNewRound","outputs":[{"internalType":"uint80","name":"","type":"uint80"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"restartDelay","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_requester","type":"address"},{"internalType":"bool","name":"_authorized","type":"bool"},{"internalType":"uint32","name":"_delay","type":"uint32"}],"name":"setRequesterPermissions","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_newValidator","type":"address"}],"name":"setValidator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"},{"internalType":"int256","name":"_submission","type":"int256"}],"name":"submit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"timeout","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_oracle","type":"address"},{"internalType":"address","name":"_newAdmin","type":"address"}],"name":"transferAdmin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateAvailableFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"_paymentAmount","type":"uint128"},{"internalType":"uint32","name":"_minSubmissions","type":"uint32"},{"internalType":"uint32","name":"_maxSubmissions","type":"uint32"},{"internalType":"uint32","name":"_restartDelay","type":"uint32"},{"internalType":"uint32","name":"_timeout","type":"uint32"}],"name":"updateFutureRounds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"validator","outputs":[{"internalType":"contract AggregatorValidatorInterface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"version","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawFunds","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oracle","type":"address"},{"internalType":"address","name":"_recipient","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawPayment","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oracle","type":"address"}],"name":"withdrawablePayment","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"}]

60c06040523480156200001157600080fd5b5060405162004ceb38038062004ceb83398181016040526101008110156200003857600080fd5b815160208301516040808501516060860151608087015160a088015160c089015160e08a0180519651989a9799959894979396929591949391820192846401000000008211156200008857600080fd5b9083019060208201858111156200009e57600080fd5b8251640100000000811182820188101715620000b957600080fd5b82525081516020918201929091019080838360005b83811015620000e8578181015183820152602001620000ce565b50505050905090810190601f168015620001165780820380516001836020036101000a031916815260200191505b50604052505060008054336001600160a01b0319918216178255600280549091166001600160a01b038c16179055620001559150889080808a6200021f565b62000169856001600160e01b03620005fd16565b608084905260a08390526005805460ff191660ff8416179055805162000197906006906020840190620007e1565b50620001b88663ffffffff1642620006c760201b620030e41790919060201c565b6000805260096020527fec8156718a8372b1db44bb411437d0870f3e3790d4a08526d024ce1b0b668f6c80546001600160401b03929092166801000000000000000002600160401b600160801b031990921691909117905550620008839650505050505050565b6000546001600160a01b031633146200027f576040805162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015290519081900360640190fd5b6000620002946001600160e01b036200072a16565b60ff1690508463ffffffff168463ffffffff161015620002fb576040805162461bcd60e51b815260206004820152601960248201527f6d6178206d75737420657175616c2f657863656564206d696e00000000000000604482015290519081900360640190fd5b8363ffffffff168163ffffffff1610156200035d576040805162461bcd60e51b815260206004820152601760248201527f6d61782063616e6e6f742065786365656420746f74616c000000000000000000604482015290519081900360640190fd5b63ffffffff811615806200037c57508263ffffffff168163ffffffff16115b620003ce576040805162461bcd60e51b815260206004820152601960248201527f64656c61792063616e6e6f742065786365656420746f74616c00000000000000604482015290519081900360640190fd5b620003eb6001600160801b0387166001600160e01b036200073116565b600d546001600160801b031610156200044b576040805162461bcd60e51b815260206004820152601e60248201527f696e73756666696369656e742066756e647320666f72207061796d656e740000604482015290519081900360640190fd5b6000620004606001600160e01b036200072a16565b60ff161115620004c65760008563ffffffff1611620004c6576040805162461bcd60e51b815260206004820152601a60248201527f6d696e206d7573742062652067726561746572207468616e2030000000000000604482015290519081900360640190fd5b85600460006101000a8154816001600160801b0302191690836001600160801b0316021790555084600460146101000a81548163ffffffff021916908363ffffffff16021790555083600460106101000a81548163ffffffff021916908363ffffffff16021790555082600460186101000a81548163ffffffff021916908363ffffffff160217905550816004601c6101000a81548163ffffffff021916908363ffffffff1602179055508363ffffffff168563ffffffff16600460009054906101000a90046001600160801b03166001600160801b03167f56800c9d1ed723511246614d15e58cfcde15b6a33c245b5c961b689c1890fd8f8686604051808363ffffffff1663ffffffff1681526020018263ffffffff1663ffffffff1681526020019250505060405180910390a4505050505050565b6000546001600160a01b031633146200065d576040805162461bcd60e51b815260206004820152601660248201527f4f6e6c792063616c6c61626c65206279206f776e657200000000000000000000604482015290519081900360640190fd5b6003546001600160a01b039081169082168114620006c357600380546001600160a01b0319166001600160a01b0384811691821790925560405190918316907fcfac5dc75b8d9a7e074162f59d9adcd33da59f0fe8dfb21580db298fc0fdad0d90600090a35b5050565b6000828211156200071f576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b508082035b92915050565b600c545b90565b600062000724600262000768620007506001600160e01b036200072a16565b60ff16856200077c60201b620039571790919060201c565b6200077c60201b620039571790919060201c565b6000826200078d5750600062000724565b828202828482816200079b57fe5b0414620007da5760405162461bcd60e51b815260040180806020018281038252602181526020018062004cca6021913960400191505060405180910390fd5b9392505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200082457805160ff191683800117855562000854565b8280016001018555821562000854579182015b828111156200085457825182559160200191906001019062000837565b506200086292915062000866565b5090565b6200072e91905b808211156200086257600081556001016200086d565b60805160a051614419620008b160003980610b185280610da7525080610aa352806119ee52506144196000f3fe608060405234801561001057600080fd5b50600436106102d35760003560e01c8063668a0f0211610186578063a4c0ed36116100e3578063c937450011610097578063e9ee6eeb11610071578063e9ee6eeb14610976578063f2fde38b146109a4578063feaf968c146109ca576102d3565b8063c937450014610940578063d4cc54e414610948578063e2e4031714610950576102d3565b8063b633620c116100c8578063b633620c146108ef578063c10753291461090c578063c35905c614610938576102d3565b8063a4c0ed361461084d578063b5ab58dc146108d2576102d3565b80638205bf6a1161013a5780638da5cb5b1161011f5780638da5cb5b146107b657806398e5b12a146107be5780639a6fc8f5146107e5576102d3565b80638205bf6a1461071b57806388aa80e714610723576102d3565b80637284e4161161016b5780637284e4161461068e57806379ba50971461070b5780637c2b0b2114610713576102d3565b8063668a0f021461067e57806370dea79a14610686576102d3565b806340884c521161023457806357970e93116101e8578063613d8fcc116101cd578063613d8fcc1461062a578063628806ef1461063257806364efb22b14610658576102d3565b806357970e931461061a57806358609e4414610622576102d3565b80634f8fc3b5116102195780634f8fc3b51461060257806350d25bcd1461060a57806354fd4d5014610612576102d3565b806340884c521461058657806346fcff4c146105de576102d3565b8063357ebb021161028b5780633969c20f116102705780633969c20f146104005780633a5381b51461052c5780633d3d771414610550576102d3565b8063357ebb021461039557806338aa4c72146103b6576102d3565b806320ed0275116102bc57806320ed02751461032357806323ca29031461035d578063313ce56714610377576102d3565b80631327d3d8146102d8578063202ee0ed14610300575b600080fd5b6102fe600480360360208110156102ee57600080fd5b50356001600160a01b03166109d2565b005b6102fe6004803603604081101561031657600080fd5b5080359060200135610a93565b6102fe6004803603606081101561033957600080fd5b5080356001600160a01b03169060208101351515906040013563ffffffff16610c65565b610365610da5565b60408051918252519081900360200190f35b61037f610dc9565b6040805160ff9092168252519081900360200190f35b61039d610dd2565b6040805163ffffffff9092168252519081900360200190f35b6102fe600480360360a08110156103cc57600080fd5b506001600160801b038135169063ffffffff6020820135811691604081013582169160608201358116916080013516610de5565b6102fe600480360360c081101561041657600080fd5b81019060208101813564010000000081111561043157600080fd5b82018360208201111561044357600080fd5b8035906020019184602083028401116401000000008311171561046557600080fd5b91939092909160208101903564010000000081111561048357600080fd5b82018360208201111561049557600080fd5b803590602001918460208302840111640100000000831117156104b757600080fd5b9193909290916020810190356401000000008111156104d557600080fd5b8201836020820111156104e757600080fd5b8035906020019184602083028401116401000000008311171561050957600080fd5b919350915063ffffffff8135811691602081013582169160409091013516611193565b610534611370565b604080516001600160a01b039092168252519081900360200190f35b6102fe6004803603606081101561056657600080fd5b506001600160a01b0381358116916020810135909116906040013561137f565b61058e611582565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156105ca5781810151838201526020016105b2565b505050509050019250505060405180910390f35b6105e66115e5565b604080516001600160801b039092168252519081900360200190f35b6102fe6115f4565b610365611714565b610365611737565b61053461173c565b61039d61174b565b61037f61175e565b6102fe6004803603602081101561064857600080fd5b50356001600160a01b0316611764565b6105346004803603602081101561066e57600080fd5b50356001600160a01b0316611857565b610365611881565b61039d611895565b6106966118a8565b6040805160208082528351818301528351919283929083019185019080838360005b838110156106d05781810151838201526020016106b8565b50505050905090810190601f1680156106fd5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102fe611936565b6103656119ec565b610365611a10565b6107556004803603604081101561073957600080fd5b5080356001600160a01b0316906020013563ffffffff16611a47565b60408051981515895263ffffffff90971660208901528787019590955267ffffffffffffffff93841660608801529190921660808601526001600160801b0391821660a086015260ff1660c08501521660e083015251908190036101000190f35b610534611bb0565b6107c6611bbf565b6040805169ffffffffffffffffffff9092168252519081900360200190f35b61080e600480360360208110156107fb57600080fd5b503569ffffffffffffffffffff16611cdf565b6040805169ffffffffffffffffffff96871681526020810195909552848101939093526060840191909152909216608082015290519081900360a00190f35b6102fe6004803603606081101561086357600080fd5b6001600160a01b038235169160208101359181019060608101604082013564010000000081111561089357600080fd5b8201836020820111156108a557600080fd5b803590602001918460018302840111640100000000831117156108c757600080fd5b509092509050611e29565b610365600480360360208110156108e857600080fd5b5035611e8a565b6103656004803603602081101561090557600080fd5b5035611ebe565b6102fe6004803603604081101561092257600080fd5b506001600160a01b038135169060200135611efe565b6105e66120b3565b61039d6120c2565b6105e66120d5565b6103656004803603602081101561096657600080fd5b50356001600160a01b03166120eb565b6102fe6004803603604081101561098c57600080fd5b506001600160a01b038135811691602001351661210f565b6102fe600480360360208110156109ba57600080fd5b50356001600160a01b03166121f9565b61080e6122a2565b6000546001600160a01b03163314610a2a576040805162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b604482015290519081900360640190fd5b6003546001600160a01b039081169082168114610a8f57600380546001600160a01b0319166001600160a01b0384811691821790925560405190918316907fcfac5dc75b8d9a7e074162f59d9adcd33da59f0fe8dfb21580db298fc0fdad0d90600090a35b5050565b6060610a9f33846122dc565b90507f0000000000000000000000000000000000000000000000000000000000000000821215610b16576040805162461bcd60e51b815260206004820152601e60248201527f76616c75652062656c6f77206d696e5375626d697373696f6e56616c75650000604482015290519081900360640190fd5b7f0000000000000000000000000000000000000000000000000000000000000000821315610b8b576040805162461bcd60e51b815260206004820152601e60248201527f76616c75652061626f7665206d61785375626d697373696f6e56616c75650000604482015290519081900360640190fd5b8051819015610c185760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610bdd578181015183820152602001610bc5565b50505050905090810190601f168015610c0a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50610c2283612591565b610c2c828461263a565b600080610c388561272b565b91509150610c458561288b565b610c4e856129e0565b8115610c5e57610c5e8582612a57565b5050505050565b6000546001600160a01b03163314610cbd576040805162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b604482015290519081900360640190fd5b6001600160a01b0383166000908152600b602052604090205460ff1615158215151415610ce957610da0565b8115610d2c576001600160a01b0383166000908152600b60205260409020805460ff19168315151764ffffffff00191661010063ffffffff841602179055610d55565b6001600160a01b0383166000908152600b60205260409020805468ffffffffffffffffff191690555b60408051831515815263ffffffff8316602082015281516001600160a01b038616927fc3df5a754e002718f2e10804b99e6605e7c701d95cec9552c7680ca2b6f2820a928290030190a25b505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b60055460ff1681565b600454600160c01b900463ffffffff1681565b6000546001600160a01b03163314610e3d576040805162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b604482015290519081900360640190fd5b6000610e4761175e565b60ff1690508463ffffffff168463ffffffff161015610ead576040805162461bcd60e51b815260206004820152601960248201527f6d6178206d75737420657175616c2f657863656564206d696e00000000000000604482015290519081900360640190fd5b8363ffffffff168163ffffffff161015610f0e576040805162461bcd60e51b815260206004820152601760248201527f6d61782063616e6e6f742065786365656420746f74616c000000000000000000604482015290519081900360640190fd5b63ffffffff81161580610f2c57508263ffffffff168163ffffffff16115b610f7d576040805162461bcd60e51b815260206004820152601960248201527f64656c61792063616e6e6f742065786365656420746f74616c00000000000000604482015290519081900360640190fd5b610f8f866001600160801b0316612b50565b600d546001600160801b03161015610fee576040805162461bcd60e51b815260206004820152601e60248201527f696e73756666696369656e742066756e647320666f72207061796d656e740000604482015290519081900360640190fd5b6000610ff861175e565b60ff16111561105c5760008563ffffffff161161105c576040805162461bcd60e51b815260206004820152601a60248201527f6d696e206d7573742062652067726561746572207468616e2030000000000000604482015290519081900360640190fd5b85600460006101000a8154816001600160801b0302191690836001600160801b0316021790555084600460146101000a81548163ffffffff021916908363ffffffff16021790555083600460106101000a81548163ffffffff021916908363ffffffff16021790555082600460186101000a81548163ffffffff021916908363ffffffff160217905550816004601c6101000a81548163ffffffff021916908363ffffffff1602179055508363ffffffff168563ffffffff16600460009054906101000a90046001600160801b03166001600160801b03167f56800c9d1ed723511246614d15e58cfcde15b6a33c245b5c961b689c1890fd8f8686604051808363ffffffff1663ffffffff1681526020018263ffffffff1663ffffffff1681526020019250505060405180910390a4505050505050565b6000546001600160a01b031633146111eb576040805162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b604482015290519081900360640190fd5b60005b888110156112225761121a8a8a8381811061120557fe5b905060200201356001600160a01b0316612b7e565b6001016111ee565b50858414611277576040805162461bcd60e51b815260206004820181905260248201527f6e6565642073616d65206f7261636c6520616e642061646d696e20636f756e74604482015290519081900360640190fd5b604d6112948761128561175e565b60ff169063ffffffff612d5716565b11156112e7576040805162461bcd60e51b815260206004820152601360248201527f6d6178206f7261636c657320616c6c6f77656400000000000000000000000000604482015290519081900360640190fd5b60005b8681101561133a5761133288888381811061130157fe5b905060200201356001600160a01b031687878481811061131d57fe5b905060200201356001600160a01b0316612db8565b6001016112ea565b50600454611365906001600160801b03811690859085908590600160e01b900463ffffffff16610de5565b505050505050505050565b6003546001600160a01b031681565b6001600160a01b038381166000908152600860205260409020600201546201000090041633146113f6576040805162461bcd60e51b815260206004820152601660248201527f6f6e6c792063616c6c61626c652062792061646d696e00000000000000000000604482015290519081900360640190fd5b6001600160a01b03831660009081526008602052604090205481906001600160801b03908116908216811015611473576040805162461bcd60e51b815260206004820152601f60248201527f696e73756666696369656e7420776974686472617761626c652066756e647300604482015290519081900360640190fd5b61148c6001600160801b0382168363ffffffff61307516565b6001600160a01b038616600090815260086020526040902080546fffffffffffffffffffffffffffffffff19166001600160801b03928316179055600d546114dd91600160801b9091041683613075565b600d80546001600160801b03928316600160801b029083161790556002546040805163a9059cbb60e01b81526001600160a01b03888116600483015293861660248201529051929091169163a9059cbb916044808201926020929091908290030181600087803b15801561155057600080fd5b505af1158015611564573d6000803e3d6000fd5b505050506040513d602081101561157a57600080fd5b5051610c5e57fe5b6060600c8054806020026020016040519081016040528092919081815260200182805480156115da57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116115bc575b505050505090505b90565b600d546001600160801b031690565b6115fc6142db565b50604080518082018252600d546001600160801b038082168352600160801b90910416602080830182905260025484516370a0823160e01b8152306004820152945193946000946116ad94936001600160a01b03909316926370a082319260248082019391829003018186803b15801561167557600080fd5b505afa158015611689573d6000803e3d6000fd5b505050506040513d602081101561169f57600080fd5b50519063ffffffff6130e416565b82519091506001600160801b03168114610a8f57600d80546fffffffffffffffffffffffffffffffff19166001600160801b03831617905560405181907ffe25c73e3b9089fac37d55c4c7efcba6f04af04cebd2fc4d6d7dbb07e1e5234f90600090a25050565b600754640100000000900463ffffffff1660009081526009602052604090205490565b600381565b6002546001600160a01b031681565b600454600160801b900463ffffffff1681565b600c5490565b6001600160a01b038181166000908152600860205260409020600301541633146117d5576040805162461bcd60e51b815260206004820152601e60248201527f6f6e6c792063616c6c61626c652062792070656e64696e672061646d696e0000604482015290519081900360640190fd5b6001600160a01b0381166000818152600860205260408082206003810180546001600160a01b0319169055600201805475ffffffffffffffffffffffffffffffffffffffff00001916336201000081029190911790915590519092917f0c5055390645c15a4be9a21b3f8d019153dcb4a0c125685da6eb84048e2fe90491a350565b6001600160a01b03808216600090815260086020526040902060020154620100009004165b919050565b600754640100000000900463ffffffff1690565b600454600160e01b900463ffffffff1681565b6006805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561192e5780601f106119035761010080835404028352916020019161192e565b820191906000526020600020905b81548152906001019060200180831161191157829003601f168201915b505050505081565b6001546001600160a01b03163314611995576040805162461bcd60e51b815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015290519081900360640190fd5b60008054336001600160a01b0319808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b7f000000000000000000000000000000000000000000000000000000000000000081565b600754640100000000900463ffffffff16600090815260096020526040902060010154600160401b900467ffffffffffffffff1690565b600080808080808080333214611aa4576040805162461bcd60e51b815260206004820152601660248201527f6f66662d636861696e2072656164696e67206f6e6c7900000000000000000000604482015290519081900360640190fd5b63ffffffff891615611b895763ffffffff89166000908152600960209081526040808320600a909252909120611ada8c8c61313b565b6001600160a01b038d1660009081526008602052604090206001908101548482015491840154600d548f9367ffffffffffffffff1691600160401b900463ffffffff16906001600160801b0316611b2f61175e565b600189015467ffffffffffffffff16611b53576004546001600160801b0316611b69565b6001880154600160601b90046001600160801b03165b8363ffffffff169350995099509950995099509950995099505050611ba3565b611b928a613191565b975097509750975097509750975097505b9295985092959890939650565b6000546001600160a01b031681565b336000908152600b602052604081205460ff16611c23576040805162461bcd60e51b815260206004820152601860248201527f6e6f7420617574686f72697a6564207265717565737465720000000000000000604482015290519081900360640190fd5b60075463ffffffff16600081815260096020526040902060010154600160401b900467ffffffffffffffff16151580611c605750611c608161335d565b611cb1576040805162461bcd60e51b815260206004820152601f60248201527f7072657620726f756e64206d75737420626520737570657273656461626c6500604482015290519081900360640190fd5b6000611cc863ffffffff808416906001906133eb16565b9050611cd38161344e565b63ffffffff1691505090565b6000806000806000611cef6142f2565b5063ffffffff80871660009081526009602090815260409182902082516080810184528154815260019091015467ffffffffffffffff80821693830193909352600160401b810490921692810192909252600160801b90049091166060820181905215801590611d6f5750611d6f8769ffffffffffffffffffff16613526565b6040518060400160405280600f81526020017f4e6f20646174612070726573656e74000000000000000000000000000000000081525090611df15760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610bdd578181015183820152602001610bc5565b508051602082015160408301516060909301519899919867ffffffffffffffff91821698509216955063ffffffff9091169350915050565b8015611e7c576040805162461bcd60e51b815260206004820181905260248201527f7472616e7366657220646f65736e2774206163636570742063616c6c64617461604482015290519081900360640190fd5b611e846115f4565b50505050565b6000611e9582613526565b15611eb6575063ffffffff811660009081526009602052604090205461187c565b506000919050565b6000611ec982613526565b15611eb6575063ffffffff8116600090815260096020526040902060010154600160401b900467ffffffffffffffff1661187c565b6000546001600160a01b03163314611f56576040805162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b604482015290519081900360640190fd5b600d546004546001600160801b03918216918391611f8591611f789116612b50565b839063ffffffff6130e416565b1015611fd8576040805162461bcd60e51b815260206004820152601a60248201527f696e73756666696369656e7420726573657276652066756e6473000000000000604482015290519081900360640190fd5b6002546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561202e57600080fd5b505af1158015612042573d6000803e3d6000fd5b505050506040513d602081101561205857600080fd5b50516120ab576040805162461bcd60e51b815260206004820152601560248201527f746f6b656e207472616e73666572206661696c65640000000000000000000000604482015290519081900360640190fd5b610da06115f4565b6004546001600160801b031681565b600454600160a01b900463ffffffff1681565b600d54600160801b90046001600160801b031690565b6001600160a01b03166000908152600860205260409020546001600160801b031690565b6001600160a01b03828116600090815260086020526040902060020154620100009004163314612186576040805162461bcd60e51b815260206004820152601660248201527f6f6e6c792063616c6c61626c652062792061646d696e00000000000000000000604482015290519081900360640190fd5b6001600160a01b0382811660008181526008602090815260409182902060030180546001600160a01b0319169486169485179055815133815290810193909352805191927fb79bf2e89c2d70dde91d2991fb1ea69b7e478061ad7c04ed5b02b96bc52b8104929081900390910190a25050565b6000546001600160a01b03163314612251576040805162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60008060008060006122cb600760049054906101000a900463ffffffff1663ffffffff16611cdf565b945094509450945094509091929394565b6001600160a01b03821660009081526008602052604090205460075460609163ffffffff600160801b9091048116911681612350576040518060400160405280601281526020017f6e6f7420656e61626c6564206f7261636c6500000000000000000000000000008152509250505061258b565b8363ffffffff168263ffffffff1611156123a3576040518060400160405280601681526020017f6e6f742079657420656e61626c6564206f7261636c65000000000000000000008152509250505061258b565b6001600160a01b03851660009081526008602052604090205463ffffffff808616600160a01b909204161015612412576040518060400160405280601881526020017f6e6f206c6f6e67657220616c6c6f776564206f7261636c6500000000000000008152509250505061258b565b6001600160a01b03851660009081526008602052604090205463ffffffff808616600160c01b9092041610612480576040518060400160405280602081526020017f63616e6e6f74207265706f7274206f6e2070726576696f757320726f756e64738152509250505061258b565b8063ffffffff168463ffffffff16141580156124bc57506124ac63ffffffff808316906001906133eb16565b63ffffffff168463ffffffff1614155b80156124cf57506124cd8482613530565b155b15612513576040518060400160405280601781526020017f696e76616c696420726f756e6420746f207265706f72740000000000000000008152509250505061258b565b8363ffffffff16600114158015612544575061254261253d63ffffffff8087169060019061359116565b6135f4565b155b15612588576040518060400160405280601f81526020017f70726576696f757320726f756e64206e6f7420737570657273656461626c65008152509250505061258b565b50505b92915050565b61259a8161362f565b6125a357612637565b3360009081526008602052604090205460045463ffffffff600160e01b909204821691600160c01b90910481168201908316118015906125e257508015155b156125ed5750612637565b6125f682613660565b5033600090815260086020526040902080547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600160e01b63ffffffff8416021790555b50565b61264381613821565b612694576040805162461bcd60e51b815260206004820152601f60248201527f726f756e64206e6f7420616363657074696e67207375626d697373696f6e7300604482015290519081900360640190fd5b63ffffffff81166000818152600a602090815260408083208054600180820183559185528385200187905533808552600890935281842080547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b8702178155018690555190929185917f92e98423f8adac6e64d0608e519fd1cefb861498385c6dee70d58fc926ddc68c9190a45050565b63ffffffff8082166000908152600a60205260408120600181015490549192839264010000000090920416111561276757506000905080612886565b63ffffffff83166000908152600a6020908152604080832080548251818502810185019093528083526127cd938301828280156127c357602002820191906000526020600020905b8154815260200190600101908083116127af575b5050505050613841565b63ffffffff851660008181526009602090815260409182902084815560010180546fffffffffffffffff00000000000000001916600160401b4267ffffffffffffffff8116919091029190911763ffffffff60801b1916600160801b8602179091556007805467ffffffff000000001916640100000000860217905582519081529151939450919284927f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f928290030190a36001925090505b915091565b63ffffffff81166000908152600a6020526040902060010154600160601b90046001600160801b03166128bc6142db565b5060408051808201909152600d546001600160801b03808216808452600160801b9092041660208301526128f6908363ffffffff61307516565b6001600160801b039081168252602082015161291991168363ffffffff6138f116565b6001600160801b0390811660208084018290528351600d8054600160801b9094029185166fffffffffffffffffffffffffffffffff19909416939093178416179091553360009081526008909152604090205461297d91168363ffffffff6138f116565b3360009081526008602052604080822080546fffffffffffffffffffffffffffffffff19166001600160801b03948516179055835190519216917ffe25c73e3b9089fac37d55c4c7efcba6f04af04cebd2fc4d6d7dbb07e1e5234f9190a2505050565b63ffffffff8082166000908152600a602052604090206001810154905491161115612a0a57612637565b63ffffffff81166000908152600a6020526040812090612a2a8282614319565b5060010180547fffffffff0000000000000000000000000000000000000000000000000000000016905550565b6003546001600160a01b031680612a6e5750610a8f565b6000612a8563ffffffff8086169060019061359116565b63ffffffff808216600090815260096020908152604080832060018101549054825163beed9b5160e01b8152600160801b90920486166004830181905260248301829052958b166044830152606482018a90529151959650939490936001600160a01b0388169363beed9b5193620186a093608480850194929391928390030190829088803b158015612b1757600080fd5b5087f193505050508015612b3d57506040513d6020811015612b3857600080fd5b505160015b612b4657612b48565b505b505050505050565b600061258b6002612b72612b6261175e565b859060ff1663ffffffff61395716565b9063ffffffff61395716565b612b87816139b0565b612bd8576040805162461bcd60e51b815260206004820152601260248201527f6f7261636c65206e6f7420656e61626c65640000000000000000000000000000604482015290519081900360640190fd5b600754612bf19063ffffffff908116906001906133eb16565b6001600160a01b0382166000908152600860205260408120805463ffffffff93909316600160a01b0263ffffffff60a01b1990931692909217909155600c612c4b6001612c3c61175e565b60ff169063ffffffff6130e416565b81548110612c5557fe5b6000918252602080832091909101546001600160a01b0385811680855260089093526040808520600290810180549390941680875291862001805461ffff90931661ffff199384168117909155939094528154169055600c8054929350909183919083908110612cc157fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600c805480612cfa57fe5b600082815260208120820160001990810180546001600160a01b03191690559091019091556040516001600160a01b038516907f18dd09695e4fbdae8d1a5edb11221eb04564269c29a089b9753a6535c54ba92e908390a3505050565b600082820183811015612db1576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b612dc1826139b0565b15612e13576040805162461bcd60e51b815260206004820152601660248201527f6f7261636c6520616c726561647920656e61626c656400000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612e6e576040805162461bcd60e51b815260206004820152601560248201527f63616e6e6f74207365742061646d696e20746f20300000000000000000000000604482015290519081900360640190fd5b6001600160a01b03828116600090815260086020526040902060020154620100009004161580612ec357506001600160a01b038281166000908152600860205260409020600201546201000090048116908216145b612f14576040805162461bcd60e51b815260206004820152601c60248201527f6f776e65722063616e6e6f74206f76657277726974652061646d696e00000000604482015290519081900360640190fd5b612f1d826139db565b6001600160a01b03808416600081815260086020526040808220805463ffffffff60a01b1963ffffffff97909716600160801b0263ffffffff60801b19909116179590951677ffffffff0000000000000000000000000000000000000000178555600c80546002909601805461ffff90971661ffff19909716969096178655805460018181019092557fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c70180546001600160a01b031916851790558383528554948716620100000275ffffffffffffffffffffffffffffffffffffffff000019909516949094179094559251919290917f18dd09695e4fbdae8d1a5edb11221eb04564269c29a089b9753a6535c54ba92e9190a3806001600160a01b0316826001600160a01b03167f0c5055390645c15a4be9a21b3f8d019153dcb4a0c125685da6eb84048e2fe90460405160405180910390a35050565b6000826001600160801b0316826001600160801b031611156130de576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000828211156130de576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b63ffffffff811660009081526009602052604081206001015467ffffffffffffffff16156131875761316c82613821565b8015613180575061317d83836122dc565b51155b905061258b565b61316c8383613a3e565b6001600160a01b0381166000908152600860205260408120600754815483928392839283928392839283927fec8156718a8372b1db44bb411437d0870f3e3790d4a08526d024ce1b0b668f6b929091849163ffffffff908116600160c01b90920416148061320e575060075461320c9063ffffffff16613821565b155b6007549091506132239063ffffffff166135f4565b801561322c5750805b156132855760075461324a9063ffffffff908116906001906133eb16565b63ffffffff81166000908152600960205260409020600454919b506001600160801b039091169450925061327e8c8b613a3e565b9a506132cf565b60075463ffffffff166000818152600960209081526040808320600a90925290912060010154919b50600160601b9091046001600160801b0316945092506132cc8a613821565b9a505b6132d98c8b6122dc565b51156132e45760009a505b6001808301548482015463ffffffff808e166000908152600a6020526040902090930154600d548f948f949367ffffffffffffffff1692600160401b900416906001600160801b031661333561175e565b8a8363ffffffff1693509a509a509a509a509a509a509a509a50505050919395975091939597565b63ffffffff8082166000908152600960209081526040808320600190810154600a9093529083200154919267ffffffffffffffff90911691600160401b90041681158015906133b2575060008163ffffffff16115b80156133e35750426133d767ffffffffffffffff841663ffffffff80851690613a8816565b67ffffffffffffffff16105b949350505050565b600082820163ffffffff8085169082161015612db1576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6134578161362f565b61346057612637565b336000908152600b602052604090205463ffffffff6501000000000082048116916101009004811682019083161180613497575080155b6134e8576040805162461bcd60e51b815260206004820152601360248201527f6d7573742064656c617920726571756573747300000000000000000000000000604482015290519081900360640190fd5b6134f182613660565b50336000908152600b60205260409020805463ffffffff8316650100000000000268ffffffff00000000001990911617905550565b63ffffffff101590565b60008163ffffffff1661355360018563ffffffff166133eb90919063ffffffff16565b63ffffffff16148015612db157505063ffffffff16600090815260096020526040902060010154600160401b900467ffffffffffffffff1615919050565b60008263ffffffff168263ffffffff1611156130de576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b63ffffffff8116600090815260096020526040812060010154600160401b900467ffffffffffffffff1615158061258b575061258b8261335d565b60075460009061364b9063ffffffff908116906001906133eb16565b63ffffffff168263ffffffff16149050919050565b61367d61367863ffffffff8084169060019061359116565b613aef565b6007805463ffffffff191663ffffffff831617905561369a614337565b5060408051600060a0820181815260c083018452825260045463ffffffff600160801b82048116602080860191909152600160a01b8304821685870152600160e01b8304821660608601526001600160801b03909216608085015285168252600a815292902081518051929384936137159284920190614365565b5060208281015160019283018054604080870151606088015160809098015163ffffffff1990931663ffffffff9586161767ffffffff00000000191664010000000091861691909102176bffffffff00000000000000001916600160401b97851697909702969096177fffffffff00000000000000000000000000000000ffffffffffffffffffffffff16600160601b6001600160801b03909216919091021790558516600081815260098352849020909201805467ffffffffffffffff19164267ffffffffffffffff9081169190911791829055845191168152925133937f0109fc6f55cf40689f02fbaad7af7fe7bbac8a3d2186600afc7d3e10cac6027192908290030190a35050565b63ffffffff9081166000908152600a602052604090206001015416151590565b60008151600010613899576040805162461bcd60e51b815260206004820152601660248201527f6c697374206d757374206e6f7420626520656d70747900000000000000000000604482015290519081900360640190fd5b815160028104600182166138d8576000806138be866000600187036001870387613bcf565b90925090506138cd8282613cad565b94505050505061187c565b6138e88460006001850384613d1b565b9250505061187c565b60008282016001600160801b038085169082161015612db1576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000826139665750600061258b565b8282028284828161397357fe5b0414612db15760405162461bcd60e51b81526004018080602001828103825260218152602001806143ec6021913960400191505060405180910390fd5b6001600160a01b031660009081526008602052604090205463ffffffff600160a01b90910481161490565b60075460009063ffffffff168015801590613a1d57506001600160a01b03831660009081526008602052604090205463ffffffff828116600160a01b90920416145b15613a2957905061187c565b612db163ffffffff808316906001906133eb16565b6001600160a01b03821660009081526008602052604081205460045463ffffffff600160e01b909204821691600160c01b9091048116820190841611806133e35750159392505050565b600082820167ffffffffffffffff8085169082161015612db1576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b613af88161335d565b613b0157612637565b6000613b1863ffffffff8084169060019061359116565b63ffffffff8181166000908152600960209081526040808320805488861685528285209081556001918201549101805463ffffffff60801b1916600160801b92839004909616909102949094176fffffffffffffffff00000000000000001916600160401b4267ffffffffffffffff160217909355600a9052908120919250613ba18282614319565b5060010180547fffffffff000000000000000000000000000000000000000000000000000000001690555050565b600080828410613bde57600080fd5b838611158015613bee5750848411155b613bf757600080fd5b828611158015613c075750848311155b613c1057600080fd5b60078686031015613c3157613c288787878787613dac565b91509150613ca3565b6000613c3e888888614199565b9050808411613c4f57809550613c9d565b84811015613c6257806001019650613c9d565b808511158015613c7157508381105b613c7757fe5b613c8388888388613d1b565b9250613c9488826001018887613d1b565b9150613ca39050565b50613c10565b9550959350505050565b60008083128015613cbe5750600082135b80613cd45750600083138015613cd45750600082125b15613cf4576002613ce58484614276565b81613cec57fe5b05905061258b565b60006002808507818507010590506133e3613d156002860560028605614276565b82614276565b600081841115613d2a57600080fd5b82821115613d3757600080fd5b82841015613d8e5760078484031015613d63576000613d598686868687613dac565b5091506133e39050565b6000613d70868686614199565b9050808311613d8157809350613d88565b8060010194505b50613d37565b848481518110613d9a57fe5b60200260200101519050949350505050565b600080600086866001010390506000888860000181518110613dca57fe5b60200260200101519050600082600110613deb576001600160ff1b03613e03565b898960010181518110613dfa57fe5b60200260200101515b9050600083600210613e1c576001600160ff1b03613e34565b8a8a60020181518110613e2b57fe5b60200260200101515b9050600084600310613e4d576001600160ff1b03613e65565b8b8b60030181518110613e5c57fe5b60200260200101515b9050600085600410613e7e576001600160ff1b03613e96565b8c8c60040181518110613e8d57fe5b60200260200101515b9050600086600510613eaf576001600160ff1b03613ec7565b8d8d60050181518110613ebe57fe5b60200260200101515b9050600087600610613ee0576001600160ff1b03613ef8565b8e8e60060181518110613eef57fe5b60200260200101515b905085871315613f06579495945b83851315613f12579293925b81831315613f1e579091905b84871315613f2a579395935b83861315613f36579294925b80831315613f4057915b84861315613f4c579394935b80821315613f5657905b82871315613f62579195915b81861315613f6e579094905b80851315613f7857935b82861315613f84579194915b80841315613f8e57925b82851315613f9a579193915b81841315613fa6579092905b82841315613fb2579192915b8d8c0380613fc257879a50614075565b8060011415613fd357869a50614075565b8060021415613fe457859a50614075565b8060031415613ff557849a50614075565b806004141561400657839a50614075565b806005141561401757829a50614075565b806006141561402857819a50614075565b6040805162461bcd60e51b815260206004820152601060248201527f6b31206f7574206f6620626f756e647300000000000000000000000000000000604482015290519081900360640190fd5b8e8c038d8d141561409357508a9950613ca398505050505050505050565b806140aa5750969850613ca3975050505050505050565b80600114156140c55750959850613ca3975050505050505050565b80600214156140e05750949850613ca3975050505050505050565b80600314156140fb5750939850613ca3975050505050505050565b80600414156141165750929850613ca3975050505050505050565b80600514156141315750919850613ca3975050505050505050565b806006141561414c5750909850613ca3975050505050505050565b6040805162461bcd60e51b815260206004820152601060248201527f6b32206f7574206f6620626f756e647300000000000000000000000000000000604482015290519081900360640190fd5b60008084600285850104815181106141ad57fe5b602002602001015190506001840393506001830192505b600184019350808585815181106141d757fe5b6020026020010151126141c4575b600183039250808584815181106141f857fe5b6020026020010151136141e557828410156142685784838151811061421957fe5b602002602001015185858151811061422d57fe5b602002602001015186868151811061424157fe5b6020026020010187868151811061425457fe5b602090810291909101019190915252614271565b82915050612db1565b6141c4565b600082820181831280159061428b5750838112155b806142a057506000831280156142a057508381125b612db15760405162461bcd60e51b81526004018080602001828103825260218152602001806143cb6021913960400191505060405180910390fd5b604080518082019091526000808252602082015290565b60408051608081018252600080825260208201819052918101829052606081019190915290565b508054600082559060005260206000209081019061263791906143b0565b6040805160a08101825260608082526000602083018190529282018390528101829052608081019190915290565b8280548282559060005260206000209081019282156143a0579160200282015b828111156143a0578251825591602001919060010190614385565b506143ac9291506143b0565b5090565b6115e291905b808211156143ac57600081556001016143b656fe5369676e6564536166654d6174683a206164646974696f6e206f766572666c6f77536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a164736f6c6343000606000a536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77000000000000000000000000326c977e6efc84e512bb9c30f76e30c160ed06fb000000000000000000000000000000000000000000000000000000174876e800000000000000000000000000000000000000000000000000000000000002a300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003635c9adc5dea000000000000000000000000000000000000000000001431e0fae6d7217caa00000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000114c494e4b504f4f4c20424159432f455448000000000000000000000000000000

Deployed Bytecode

0x608060405234801561001057600080fd5b50600436106102d35760003560e01c8063668a0f0211610186578063a4c0ed36116100e3578063c937450011610097578063e9ee6eeb11610071578063e9ee6eeb14610976578063f2fde38b146109a4578063feaf968c146109ca576102d3565b8063c937450014610940578063d4cc54e414610948578063e2e4031714610950576102d3565b8063b633620c116100c8578063b633620c146108ef578063c10753291461090c578063c35905c614610938576102d3565b8063a4c0ed361461084d578063b5ab58dc146108d2576102d3565b80638205bf6a1161013a5780638da5cb5b1161011f5780638da5cb5b146107b657806398e5b12a146107be5780639a6fc8f5146107e5576102d3565b80638205bf6a1461071b57806388aa80e714610723576102d3565b80637284e4161161016b5780637284e4161461068e57806379ba50971461070b5780637c2b0b2114610713576102d3565b8063668a0f021461067e57806370dea79a14610686576102d3565b806340884c521161023457806357970e93116101e8578063613d8fcc116101cd578063613d8fcc1461062a578063628806ef1461063257806364efb22b14610658576102d3565b806357970e931461061a57806358609e4414610622576102d3565b80634f8fc3b5116102195780634f8fc3b51461060257806350d25bcd1461060a57806354fd4d5014610612576102d3565b806340884c521461058657806346fcff4c146105de576102d3565b8063357ebb021161028b5780633969c20f116102705780633969c20f146104005780633a5381b51461052c5780633d3d771414610550576102d3565b8063357ebb021461039557806338aa4c72146103b6576102d3565b806320ed0275116102bc57806320ed02751461032357806323ca29031461035d578063313ce56714610377576102d3565b80631327d3d8146102d8578063202ee0ed14610300575b600080fd5b6102fe600480360360208110156102ee57600080fd5b50356001600160a01b03166109d2565b005b6102fe6004803603604081101561031657600080fd5b5080359060200135610a93565b6102fe6004803603606081101561033957600080fd5b5080356001600160a01b03169060208101351515906040013563ffffffff16610c65565b610365610da5565b60408051918252519081900360200190f35b61037f610dc9565b6040805160ff9092168252519081900360200190f35b61039d610dd2565b6040805163ffffffff9092168252519081900360200190f35b6102fe600480360360a08110156103cc57600080fd5b506001600160801b038135169063ffffffff6020820135811691604081013582169160608201358116916080013516610de5565b6102fe600480360360c081101561041657600080fd5b81019060208101813564010000000081111561043157600080fd5b82018360208201111561044357600080fd5b8035906020019184602083028401116401000000008311171561046557600080fd5b91939092909160208101903564010000000081111561048357600080fd5b82018360208201111561049557600080fd5b803590602001918460208302840111640100000000831117156104b757600080fd5b9193909290916020810190356401000000008111156104d557600080fd5b8201836020820111156104e757600080fd5b8035906020019184602083028401116401000000008311171561050957600080fd5b919350915063ffffffff8135811691602081013582169160409091013516611193565b610534611370565b604080516001600160a01b039092168252519081900360200190f35b6102fe6004803603606081101561056657600080fd5b506001600160a01b0381358116916020810135909116906040013561137f565b61058e611582565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156105ca5781810151838201526020016105b2565b505050509050019250505060405180910390f35b6105e66115e5565b604080516001600160801b039092168252519081900360200190f35b6102fe6115f4565b610365611714565b610365611737565b61053461173c565b61039d61174b565b61037f61175e565b6102fe6004803603602081101561064857600080fd5b50356001600160a01b0316611764565b6105346004803603602081101561066e57600080fd5b50356001600160a01b0316611857565b610365611881565b61039d611895565b6106966118a8565b6040805160208082528351818301528351919283929083019185019080838360005b838110156106d05781810151838201526020016106b8565b50505050905090810190601f1680156106fd5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102fe611936565b6103656119ec565b610365611a10565b6107556004803603604081101561073957600080fd5b5080356001600160a01b0316906020013563ffffffff16611a47565b60408051981515895263ffffffff90971660208901528787019590955267ffffffffffffffff93841660608801529190921660808601526001600160801b0391821660a086015260ff1660c08501521660e083015251908190036101000190f35b610534611bb0565b6107c6611bbf565b6040805169ffffffffffffffffffff9092168252519081900360200190f35b61080e600480360360208110156107fb57600080fd5b503569ffffffffffffffffffff16611cdf565b6040805169ffffffffffffffffffff96871681526020810195909552848101939093526060840191909152909216608082015290519081900360a00190f35b6102fe6004803603606081101561086357600080fd5b6001600160a01b038235169160208101359181019060608101604082013564010000000081111561089357600080fd5b8201836020820111156108a557600080fd5b803590602001918460018302840111640100000000831117156108c757600080fd5b509092509050611e29565b610365600480360360208110156108e857600080fd5b5035611e8a565b6103656004803603602081101561090557600080fd5b5035611ebe565b6102fe6004803603604081101561092257600080fd5b506001600160a01b038135169060200135611efe565b6105e66120b3565b61039d6120c2565b6105e66120d5565b6103656004803603602081101561096657600080fd5b50356001600160a01b03166120eb565b6102fe6004803603604081101561098c57600080fd5b506001600160a01b038135811691602001351661210f565b6102fe600480360360208110156109ba57600080fd5b50356001600160a01b03166121f9565b61080e6122a2565b6000546001600160a01b03163314610a2a576040805162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b604482015290519081900360640190fd5b6003546001600160a01b039081169082168114610a8f57600380546001600160a01b0319166001600160a01b0384811691821790925560405190918316907fcfac5dc75b8d9a7e074162f59d9adcd33da59f0fe8dfb21580db298fc0fdad0d90600090a35b5050565b6060610a9f33846122dc565b90507f00000000000000000000000000000000000000000000003635c9adc5dea00000821215610b16576040805162461bcd60e51b815260206004820152601e60248201527f76616c75652062656c6f77206d696e5375626d697373696f6e56616c75650000604482015290519081900360640190fd5b7f0000000000000000000000000000000000000001431e0fae6d7217caa0000000821315610b8b576040805162461bcd60e51b815260206004820152601e60248201527f76616c75652061626f7665206d61785375626d697373696f6e56616c75650000604482015290519081900360640190fd5b8051819015610c185760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610bdd578181015183820152602001610bc5565b50505050905090810190601f168015610c0a5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50610c2283612591565b610c2c828461263a565b600080610c388561272b565b91509150610c458561288b565b610c4e856129e0565b8115610c5e57610c5e8582612a57565b5050505050565b6000546001600160a01b03163314610cbd576040805162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b604482015290519081900360640190fd5b6001600160a01b0383166000908152600b602052604090205460ff1615158215151415610ce957610da0565b8115610d2c576001600160a01b0383166000908152600b60205260409020805460ff19168315151764ffffffff00191661010063ffffffff841602179055610d55565b6001600160a01b0383166000908152600b60205260409020805468ffffffffffffffffff191690555b60408051831515815263ffffffff8316602082015281516001600160a01b038616927fc3df5a754e002718f2e10804b99e6605e7c701d95cec9552c7680ca2b6f2820a928290030190a25b505050565b7f0000000000000000000000000000000000000001431e0fae6d7217caa000000081565b60055460ff1681565b600454600160c01b900463ffffffff1681565b6000546001600160a01b03163314610e3d576040805162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b604482015290519081900360640190fd5b6000610e4761175e565b60ff1690508463ffffffff168463ffffffff161015610ead576040805162461bcd60e51b815260206004820152601960248201527f6d6178206d75737420657175616c2f657863656564206d696e00000000000000604482015290519081900360640190fd5b8363ffffffff168163ffffffff161015610f0e576040805162461bcd60e51b815260206004820152601760248201527f6d61782063616e6e6f742065786365656420746f74616c000000000000000000604482015290519081900360640190fd5b63ffffffff81161580610f2c57508263ffffffff168163ffffffff16115b610f7d576040805162461bcd60e51b815260206004820152601960248201527f64656c61792063616e6e6f742065786365656420746f74616c00000000000000604482015290519081900360640190fd5b610f8f866001600160801b0316612b50565b600d546001600160801b03161015610fee576040805162461bcd60e51b815260206004820152601e60248201527f696e73756666696369656e742066756e647320666f72207061796d656e740000604482015290519081900360640190fd5b6000610ff861175e565b60ff16111561105c5760008563ffffffff161161105c576040805162461bcd60e51b815260206004820152601a60248201527f6d696e206d7573742062652067726561746572207468616e2030000000000000604482015290519081900360640190fd5b85600460006101000a8154816001600160801b0302191690836001600160801b0316021790555084600460146101000a81548163ffffffff021916908363ffffffff16021790555083600460106101000a81548163ffffffff021916908363ffffffff16021790555082600460186101000a81548163ffffffff021916908363ffffffff160217905550816004601c6101000a81548163ffffffff021916908363ffffffff1602179055508363ffffffff168563ffffffff16600460009054906101000a90046001600160801b03166001600160801b03167f56800c9d1ed723511246614d15e58cfcde15b6a33c245b5c961b689c1890fd8f8686604051808363ffffffff1663ffffffff1681526020018263ffffffff1663ffffffff1681526020019250505060405180910390a4505050505050565b6000546001600160a01b031633146111eb576040805162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b604482015290519081900360640190fd5b60005b888110156112225761121a8a8a8381811061120557fe5b905060200201356001600160a01b0316612b7e565b6001016111ee565b50858414611277576040805162461bcd60e51b815260206004820181905260248201527f6e6565642073616d65206f7261636c6520616e642061646d696e20636f756e74604482015290519081900360640190fd5b604d6112948761128561175e565b60ff169063ffffffff612d5716565b11156112e7576040805162461bcd60e51b815260206004820152601360248201527f6d6178206f7261636c657320616c6c6f77656400000000000000000000000000604482015290519081900360640190fd5b60005b8681101561133a5761133288888381811061130157fe5b905060200201356001600160a01b031687878481811061131d57fe5b905060200201356001600160a01b0316612db8565b6001016112ea565b50600454611365906001600160801b03811690859085908590600160e01b900463ffffffff16610de5565b505050505050505050565b6003546001600160a01b031681565b6001600160a01b038381166000908152600860205260409020600201546201000090041633146113f6576040805162461bcd60e51b815260206004820152601660248201527f6f6e6c792063616c6c61626c652062792061646d696e00000000000000000000604482015290519081900360640190fd5b6001600160a01b03831660009081526008602052604090205481906001600160801b03908116908216811015611473576040805162461bcd60e51b815260206004820152601f60248201527f696e73756666696369656e7420776974686472617761626c652066756e647300604482015290519081900360640190fd5b61148c6001600160801b0382168363ffffffff61307516565b6001600160a01b038616600090815260086020526040902080546fffffffffffffffffffffffffffffffff19166001600160801b03928316179055600d546114dd91600160801b9091041683613075565b600d80546001600160801b03928316600160801b029083161790556002546040805163a9059cbb60e01b81526001600160a01b03888116600483015293861660248201529051929091169163a9059cbb916044808201926020929091908290030181600087803b15801561155057600080fd5b505af1158015611564573d6000803e3d6000fd5b505050506040513d602081101561157a57600080fd5b5051610c5e57fe5b6060600c8054806020026020016040519081016040528092919081815260200182805480156115da57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116115bc575b505050505090505b90565b600d546001600160801b031690565b6115fc6142db565b50604080518082018252600d546001600160801b038082168352600160801b90910416602080830182905260025484516370a0823160e01b8152306004820152945193946000946116ad94936001600160a01b03909316926370a082319260248082019391829003018186803b15801561167557600080fd5b505afa158015611689573d6000803e3d6000fd5b505050506040513d602081101561169f57600080fd5b50519063ffffffff6130e416565b82519091506001600160801b03168114610a8f57600d80546fffffffffffffffffffffffffffffffff19166001600160801b03831617905560405181907ffe25c73e3b9089fac37d55c4c7efcba6f04af04cebd2fc4d6d7dbb07e1e5234f90600090a25050565b600754640100000000900463ffffffff1660009081526009602052604090205490565b600381565b6002546001600160a01b031681565b600454600160801b900463ffffffff1681565b600c5490565b6001600160a01b038181166000908152600860205260409020600301541633146117d5576040805162461bcd60e51b815260206004820152601e60248201527f6f6e6c792063616c6c61626c652062792070656e64696e672061646d696e0000604482015290519081900360640190fd5b6001600160a01b0381166000818152600860205260408082206003810180546001600160a01b0319169055600201805475ffffffffffffffffffffffffffffffffffffffff00001916336201000081029190911790915590519092917f0c5055390645c15a4be9a21b3f8d019153dcb4a0c125685da6eb84048e2fe90491a350565b6001600160a01b03808216600090815260086020526040902060020154620100009004165b919050565b600754640100000000900463ffffffff1690565b600454600160e01b900463ffffffff1681565b6006805460408051602060026001851615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561192e5780601f106119035761010080835404028352916020019161192e565b820191906000526020600020905b81548152906001019060200180831161191157829003601f168201915b505050505081565b6001546001600160a01b03163314611995576040805162461bcd60e51b815260206004820152601660248201527f4d7573742062652070726f706f736564206f776e657200000000000000000000604482015290519081900360640190fd5b60008054336001600160a01b0319808316821784556001805490911690556040516001600160a01b0390921692909183917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a350565b7f00000000000000000000000000000000000000000000003635c9adc5dea0000081565b600754640100000000900463ffffffff16600090815260096020526040902060010154600160401b900467ffffffffffffffff1690565b600080808080808080333214611aa4576040805162461bcd60e51b815260206004820152601660248201527f6f66662d636861696e2072656164696e67206f6e6c7900000000000000000000604482015290519081900360640190fd5b63ffffffff891615611b895763ffffffff89166000908152600960209081526040808320600a909252909120611ada8c8c61313b565b6001600160a01b038d1660009081526008602052604090206001908101548482015491840154600d548f9367ffffffffffffffff1691600160401b900463ffffffff16906001600160801b0316611b2f61175e565b600189015467ffffffffffffffff16611b53576004546001600160801b0316611b69565b6001880154600160601b90046001600160801b03165b8363ffffffff169350995099509950995099509950995099505050611ba3565b611b928a613191565b975097509750975097509750975097505b9295985092959890939650565b6000546001600160a01b031681565b336000908152600b602052604081205460ff16611c23576040805162461bcd60e51b815260206004820152601860248201527f6e6f7420617574686f72697a6564207265717565737465720000000000000000604482015290519081900360640190fd5b60075463ffffffff16600081815260096020526040902060010154600160401b900467ffffffffffffffff16151580611c605750611c608161335d565b611cb1576040805162461bcd60e51b815260206004820152601f60248201527f7072657620726f756e64206d75737420626520737570657273656461626c6500604482015290519081900360640190fd5b6000611cc863ffffffff808416906001906133eb16565b9050611cd38161344e565b63ffffffff1691505090565b6000806000806000611cef6142f2565b5063ffffffff80871660009081526009602090815260409182902082516080810184528154815260019091015467ffffffffffffffff80821693830193909352600160401b810490921692810192909252600160801b90049091166060820181905215801590611d6f5750611d6f8769ffffffffffffffffffff16613526565b6040518060400160405280600f81526020017f4e6f20646174612070726573656e74000000000000000000000000000000000081525090611df15760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610bdd578181015183820152602001610bc5565b508051602082015160408301516060909301519899919867ffffffffffffffff91821698509216955063ffffffff9091169350915050565b8015611e7c576040805162461bcd60e51b815260206004820181905260248201527f7472616e7366657220646f65736e2774206163636570742063616c6c64617461604482015290519081900360640190fd5b611e846115f4565b50505050565b6000611e9582613526565b15611eb6575063ffffffff811660009081526009602052604090205461187c565b506000919050565b6000611ec982613526565b15611eb6575063ffffffff8116600090815260096020526040902060010154600160401b900467ffffffffffffffff1661187c565b6000546001600160a01b03163314611f56576040805162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b604482015290519081900360640190fd5b600d546004546001600160801b03918216918391611f8591611f789116612b50565b839063ffffffff6130e416565b1015611fd8576040805162461bcd60e51b815260206004820152601a60248201527f696e73756666696369656e7420726573657276652066756e6473000000000000604482015290519081900360640190fd5b6002546040805163a9059cbb60e01b81526001600160a01b038681166004830152602482018690529151919092169163a9059cbb9160448083019260209291908290030181600087803b15801561202e57600080fd5b505af1158015612042573d6000803e3d6000fd5b505050506040513d602081101561205857600080fd5b50516120ab576040805162461bcd60e51b815260206004820152601560248201527f746f6b656e207472616e73666572206661696c65640000000000000000000000604482015290519081900360640190fd5b610da06115f4565b6004546001600160801b031681565b600454600160a01b900463ffffffff1681565b600d54600160801b90046001600160801b031690565b6001600160a01b03166000908152600860205260409020546001600160801b031690565b6001600160a01b03828116600090815260086020526040902060020154620100009004163314612186576040805162461bcd60e51b815260206004820152601660248201527f6f6e6c792063616c6c61626c652062792061646d696e00000000000000000000604482015290519081900360640190fd5b6001600160a01b0382811660008181526008602090815260409182902060030180546001600160a01b0319169486169485179055815133815290810193909352805191927fb79bf2e89c2d70dde91d2991fb1ea69b7e478061ad7c04ed5b02b96bc52b8104929081900390910190a25050565b6000546001600160a01b03163314612251576040805162461bcd60e51b815260206004820152601660248201527527b7363c9031b0b63630b1363290313c9037bbb732b960511b604482015290519081900360640190fd5b600180546001600160a01b0319166001600160a01b0383811691821790925560008054604051929316917fed8889f560326eb138920d842192f0eb3dd22b4f139c87a2c57538e05bae12789190a350565b60008060008060006122cb600760049054906101000a900463ffffffff1663ffffffff16611cdf565b945094509450945094509091929394565b6001600160a01b03821660009081526008602052604090205460075460609163ffffffff600160801b9091048116911681612350576040518060400160405280601281526020017f6e6f7420656e61626c6564206f7261636c6500000000000000000000000000008152509250505061258b565b8363ffffffff168263ffffffff1611156123a3576040518060400160405280601681526020017f6e6f742079657420656e61626c6564206f7261636c65000000000000000000008152509250505061258b565b6001600160a01b03851660009081526008602052604090205463ffffffff808616600160a01b909204161015612412576040518060400160405280601881526020017f6e6f206c6f6e67657220616c6c6f776564206f7261636c6500000000000000008152509250505061258b565b6001600160a01b03851660009081526008602052604090205463ffffffff808616600160c01b9092041610612480576040518060400160405280602081526020017f63616e6e6f74207265706f7274206f6e2070726576696f757320726f756e64738152509250505061258b565b8063ffffffff168463ffffffff16141580156124bc57506124ac63ffffffff808316906001906133eb16565b63ffffffff168463ffffffff1614155b80156124cf57506124cd8482613530565b155b15612513576040518060400160405280601781526020017f696e76616c696420726f756e6420746f207265706f72740000000000000000008152509250505061258b565b8363ffffffff16600114158015612544575061254261253d63ffffffff8087169060019061359116565b6135f4565b155b15612588576040518060400160405280601f81526020017f70726576696f757320726f756e64206e6f7420737570657273656461626c65008152509250505061258b565b50505b92915050565b61259a8161362f565b6125a357612637565b3360009081526008602052604090205460045463ffffffff600160e01b909204821691600160c01b90910481168201908316118015906125e257508015155b156125ed5750612637565b6125f682613660565b5033600090815260086020526040902080547bffffffffffffffffffffffffffffffffffffffffffffffffffffffff16600160e01b63ffffffff8416021790555b50565b61264381613821565b612694576040805162461bcd60e51b815260206004820152601f60248201527f726f756e64206e6f7420616363657074696e67207375626d697373696f6e7300604482015290519081900360640190fd5b63ffffffff81166000818152600a602090815260408083208054600180820183559185528385200187905533808552600890935281842080547fffffffff00000000ffffffffffffffffffffffffffffffffffffffffffffffff16600160c01b8702178155018690555190929185917f92e98423f8adac6e64d0608e519fd1cefb861498385c6dee70d58fc926ddc68c9190a45050565b63ffffffff8082166000908152600a60205260408120600181015490549192839264010000000090920416111561276757506000905080612886565b63ffffffff83166000908152600a6020908152604080832080548251818502810185019093528083526127cd938301828280156127c357602002820191906000526020600020905b8154815260200190600101908083116127af575b5050505050613841565b63ffffffff851660008181526009602090815260409182902084815560010180546fffffffffffffffff00000000000000001916600160401b4267ffffffffffffffff8116919091029190911763ffffffff60801b1916600160801b8602179091556007805467ffffffff000000001916640100000000860217905582519081529151939450919284927f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f928290030190a36001925090505b915091565b63ffffffff81166000908152600a6020526040902060010154600160601b90046001600160801b03166128bc6142db565b5060408051808201909152600d546001600160801b03808216808452600160801b9092041660208301526128f6908363ffffffff61307516565b6001600160801b039081168252602082015161291991168363ffffffff6138f116565b6001600160801b0390811660208084018290528351600d8054600160801b9094029185166fffffffffffffffffffffffffffffffff19909416939093178416179091553360009081526008909152604090205461297d91168363ffffffff6138f116565b3360009081526008602052604080822080546fffffffffffffffffffffffffffffffff19166001600160801b03948516179055835190519216917ffe25c73e3b9089fac37d55c4c7efcba6f04af04cebd2fc4d6d7dbb07e1e5234f9190a2505050565b63ffffffff8082166000908152600a602052604090206001810154905491161115612a0a57612637565b63ffffffff81166000908152600a6020526040812090612a2a8282614319565b5060010180547fffffffff0000000000000000000000000000000000000000000000000000000016905550565b6003546001600160a01b031680612a6e5750610a8f565b6000612a8563ffffffff8086169060019061359116565b63ffffffff808216600090815260096020908152604080832060018101549054825163beed9b5160e01b8152600160801b90920486166004830181905260248301829052958b166044830152606482018a90529151959650939490936001600160a01b0388169363beed9b5193620186a093608480850194929391928390030190829088803b158015612b1757600080fd5b5087f193505050508015612b3d57506040513d6020811015612b3857600080fd5b505160015b612b4657612b48565b505b505050505050565b600061258b6002612b72612b6261175e565b859060ff1663ffffffff61395716565b9063ffffffff61395716565b612b87816139b0565b612bd8576040805162461bcd60e51b815260206004820152601260248201527f6f7261636c65206e6f7420656e61626c65640000000000000000000000000000604482015290519081900360640190fd5b600754612bf19063ffffffff908116906001906133eb16565b6001600160a01b0382166000908152600860205260408120805463ffffffff93909316600160a01b0263ffffffff60a01b1990931692909217909155600c612c4b6001612c3c61175e565b60ff169063ffffffff6130e416565b81548110612c5557fe5b6000918252602080832091909101546001600160a01b0385811680855260089093526040808520600290810180549390941680875291862001805461ffff90931661ffff199384168117909155939094528154169055600c8054929350909183919083908110612cc157fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550600c805480612cfa57fe5b600082815260208120820160001990810180546001600160a01b03191690559091019091556040516001600160a01b038516907f18dd09695e4fbdae8d1a5edb11221eb04564269c29a089b9753a6535c54ba92e908390a3505050565b600082820183811015612db1576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b612dc1826139b0565b15612e13576040805162461bcd60e51b815260206004820152601660248201527f6f7261636c6520616c726561647920656e61626c656400000000000000000000604482015290519081900360640190fd5b6001600160a01b038116612e6e576040805162461bcd60e51b815260206004820152601560248201527f63616e6e6f74207365742061646d696e20746f20300000000000000000000000604482015290519081900360640190fd5b6001600160a01b03828116600090815260086020526040902060020154620100009004161580612ec357506001600160a01b038281166000908152600860205260409020600201546201000090048116908216145b612f14576040805162461bcd60e51b815260206004820152601c60248201527f6f776e65722063616e6e6f74206f76657277726974652061646d696e00000000604482015290519081900360640190fd5b612f1d826139db565b6001600160a01b03808416600081815260086020526040808220805463ffffffff60a01b1963ffffffff97909716600160801b0263ffffffff60801b19909116179590951677ffffffff0000000000000000000000000000000000000000178555600c80546002909601805461ffff90971661ffff19909716969096178655805460018181019092557fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c70180546001600160a01b031916851790558383528554948716620100000275ffffffffffffffffffffffffffffffffffffffff000019909516949094179094559251919290917f18dd09695e4fbdae8d1a5edb11221eb04564269c29a089b9753a6535c54ba92e9190a3806001600160a01b0316826001600160a01b03167f0c5055390645c15a4be9a21b3f8d019153dcb4a0c125685da6eb84048e2fe90460405160405180910390a35050565b6000826001600160801b0316826001600160801b031611156130de576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6000828211156130de576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b63ffffffff811660009081526009602052604081206001015467ffffffffffffffff16156131875761316c82613821565b8015613180575061317d83836122dc565b51155b905061258b565b61316c8383613a3e565b6001600160a01b0381166000908152600860205260408120600754815483928392839283928392839283927fec8156718a8372b1db44bb411437d0870f3e3790d4a08526d024ce1b0b668f6b929091849163ffffffff908116600160c01b90920416148061320e575060075461320c9063ffffffff16613821565b155b6007549091506132239063ffffffff166135f4565b801561322c5750805b156132855760075461324a9063ffffffff908116906001906133eb16565b63ffffffff81166000908152600960205260409020600454919b506001600160801b039091169450925061327e8c8b613a3e565b9a506132cf565b60075463ffffffff166000818152600960209081526040808320600a90925290912060010154919b50600160601b9091046001600160801b0316945092506132cc8a613821565b9a505b6132d98c8b6122dc565b51156132e45760009a505b6001808301548482015463ffffffff808e166000908152600a6020526040902090930154600d548f948f949367ffffffffffffffff1692600160401b900416906001600160801b031661333561175e565b8a8363ffffffff1693509a509a509a509a509a509a509a509a50505050919395975091939597565b63ffffffff8082166000908152600960209081526040808320600190810154600a9093529083200154919267ffffffffffffffff90911691600160401b90041681158015906133b2575060008163ffffffff16115b80156133e35750426133d767ffffffffffffffff841663ffffffff80851690613a8816565b67ffffffffffffffff16105b949350505050565b600082820163ffffffff8085169082161015612db1576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6134578161362f565b61346057612637565b336000908152600b602052604090205463ffffffff6501000000000082048116916101009004811682019083161180613497575080155b6134e8576040805162461bcd60e51b815260206004820152601360248201527f6d7573742064656c617920726571756573747300000000000000000000000000604482015290519081900360640190fd5b6134f182613660565b50336000908152600b60205260409020805463ffffffff8316650100000000000268ffffffff00000000001990911617905550565b63ffffffff101590565b60008163ffffffff1661355360018563ffffffff166133eb90919063ffffffff16565b63ffffffff16148015612db157505063ffffffff16600090815260096020526040902060010154600160401b900467ffffffffffffffff1615919050565b60008263ffffffff168263ffffffff1611156130de576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b63ffffffff8116600090815260096020526040812060010154600160401b900467ffffffffffffffff1615158061258b575061258b8261335d565b60075460009061364b9063ffffffff908116906001906133eb16565b63ffffffff168263ffffffff16149050919050565b61367d61367863ffffffff8084169060019061359116565b613aef565b6007805463ffffffff191663ffffffff831617905561369a614337565b5060408051600060a0820181815260c083018452825260045463ffffffff600160801b82048116602080860191909152600160a01b8304821685870152600160e01b8304821660608601526001600160801b03909216608085015285168252600a815292902081518051929384936137159284920190614365565b5060208281015160019283018054604080870151606088015160809098015163ffffffff1990931663ffffffff9586161767ffffffff00000000191664010000000091861691909102176bffffffff00000000000000001916600160401b97851697909702969096177fffffffff00000000000000000000000000000000ffffffffffffffffffffffff16600160601b6001600160801b03909216919091021790558516600081815260098352849020909201805467ffffffffffffffff19164267ffffffffffffffff9081169190911791829055845191168152925133937f0109fc6f55cf40689f02fbaad7af7fe7bbac8a3d2186600afc7d3e10cac6027192908290030190a35050565b63ffffffff9081166000908152600a602052604090206001015416151590565b60008151600010613899576040805162461bcd60e51b815260206004820152601660248201527f6c697374206d757374206e6f7420626520656d70747900000000000000000000604482015290519081900360640190fd5b815160028104600182166138d8576000806138be866000600187036001870387613bcf565b90925090506138cd8282613cad565b94505050505061187c565b6138e88460006001850384613d1b565b9250505061187c565b60008282016001600160801b038085169082161015612db1576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000826139665750600061258b565b8282028284828161397357fe5b0414612db15760405162461bcd60e51b81526004018080602001828103825260218152602001806143ec6021913960400191505060405180910390fd5b6001600160a01b031660009081526008602052604090205463ffffffff600160a01b90910481161490565b60075460009063ffffffff168015801590613a1d57506001600160a01b03831660009081526008602052604090205463ffffffff828116600160a01b90920416145b15613a2957905061187c565b612db163ffffffff808316906001906133eb16565b6001600160a01b03821660009081526008602052604081205460045463ffffffff600160e01b909204821691600160c01b9091048116820190841611806133e35750159392505050565b600082820167ffffffffffffffff8085169082161015612db1576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b613af88161335d565b613b0157612637565b6000613b1863ffffffff8084169060019061359116565b63ffffffff8181166000908152600960209081526040808320805488861685528285209081556001918201549101805463ffffffff60801b1916600160801b92839004909616909102949094176fffffffffffffffff00000000000000001916600160401b4267ffffffffffffffff160217909355600a9052908120919250613ba18282614319565b5060010180547fffffffff000000000000000000000000000000000000000000000000000000001690555050565b600080828410613bde57600080fd5b838611158015613bee5750848411155b613bf757600080fd5b828611158015613c075750848311155b613c1057600080fd5b60078686031015613c3157613c288787878787613dac565b91509150613ca3565b6000613c3e888888614199565b9050808411613c4f57809550613c9d565b84811015613c6257806001019650613c9d565b808511158015613c7157508381105b613c7757fe5b613c8388888388613d1b565b9250613c9488826001018887613d1b565b9150613ca39050565b50613c10565b9550959350505050565b60008083128015613cbe5750600082135b80613cd45750600083138015613cd45750600082125b15613cf4576002613ce58484614276565b81613cec57fe5b05905061258b565b60006002808507818507010590506133e3613d156002860560028605614276565b82614276565b600081841115613d2a57600080fd5b82821115613d3757600080fd5b82841015613d8e5760078484031015613d63576000613d598686868687613dac565b5091506133e39050565b6000613d70868686614199565b9050808311613d8157809350613d88565b8060010194505b50613d37565b848481518110613d9a57fe5b60200260200101519050949350505050565b600080600086866001010390506000888860000181518110613dca57fe5b60200260200101519050600082600110613deb576001600160ff1b03613e03565b898960010181518110613dfa57fe5b60200260200101515b9050600083600210613e1c576001600160ff1b03613e34565b8a8a60020181518110613e2b57fe5b60200260200101515b9050600084600310613e4d576001600160ff1b03613e65565b8b8b60030181518110613e5c57fe5b60200260200101515b9050600085600410613e7e576001600160ff1b03613e96565b8c8c60040181518110613e8d57fe5b60200260200101515b9050600086600510613eaf576001600160ff1b03613ec7565b8d8d60050181518110613ebe57fe5b60200260200101515b9050600087600610613ee0576001600160ff1b03613ef8565b8e8e60060181518110613eef57fe5b60200260200101515b905085871315613f06579495945b83851315613f12579293925b81831315613f1e579091905b84871315613f2a579395935b83861315613f36579294925b80831315613f4057915b84861315613f4c579394935b80821315613f5657905b82871315613f62579195915b81861315613f6e579094905b80851315613f7857935b82861315613f84579194915b80841315613f8e57925b82851315613f9a579193915b81841315613fa6579092905b82841315613fb2579192915b8d8c0380613fc257879a50614075565b8060011415613fd357869a50614075565b8060021415613fe457859a50614075565b8060031415613ff557849a50614075565b806004141561400657839a50614075565b806005141561401757829a50614075565b806006141561402857819a50614075565b6040805162461bcd60e51b815260206004820152601060248201527f6b31206f7574206f6620626f756e647300000000000000000000000000000000604482015290519081900360640190fd5b8e8c038d8d141561409357508a9950613ca398505050505050505050565b806140aa5750969850613ca3975050505050505050565b80600114156140c55750959850613ca3975050505050505050565b80600214156140e05750949850613ca3975050505050505050565b80600314156140fb5750939850613ca3975050505050505050565b80600414156141165750929850613ca3975050505050505050565b80600514156141315750919850613ca3975050505050505050565b806006141561414c5750909850613ca3975050505050505050565b6040805162461bcd60e51b815260206004820152601060248201527f6b32206f7574206f6620626f756e647300000000000000000000000000000000604482015290519081900360640190fd5b60008084600285850104815181106141ad57fe5b602002602001015190506001840393506001830192505b600184019350808585815181106141d757fe5b6020026020010151126141c4575b600183039250808584815181106141f857fe5b6020026020010151136141e557828410156142685784838151811061421957fe5b602002602001015185858151811061422d57fe5b602002602001015186868151811061424157fe5b6020026020010187868151811061425457fe5b602090810291909101019190915252614271565b82915050612db1565b6141c4565b600082820181831280159061428b5750838112155b806142a057506000831280156142a057508381125b612db15760405162461bcd60e51b81526004018080602001828103825260218152602001806143cb6021913960400191505060405180910390fd5b604080518082019091526000808252602082015290565b60408051608081018252600080825260208201819052918101829052606081019190915290565b508054600082559060005260206000209081019061263791906143b0565b6040805160a08101825260608082526000602083018190529282018390528101829052608081019190915290565b8280548282559060005260206000209081019282156143a0579160200282015b828111156143a0578251825591602001919060010190614385565b506143ac9291506143b0565b5090565b6115e291905b808211156143ac57600081556001016143b656fe5369676e6564536166654d6174683a206164646974696f6e206f766572666c6f77536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a164736f6c6343000606000a

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

000000000000000000000000326c977e6efc84e512bb9c30f76e30c160ed06fb000000000000000000000000000000000000000000000000000000174876e800000000000000000000000000000000000000000000000000000000000002a300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003635c9adc5dea000000000000000000000000000000000000000000001431e0fae6d7217caa00000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000000114c494e4b504f4f4c20424159432f455448000000000000000000000000000000

-----Decoded View---------------
Arg [0] : _link (address): 0x326C977E6efc84E512bB9C30f76E30c160eD06FB
Arg [1] : _paymentAmount (uint128): 100000000000
Arg [2] : _timeout (uint32): 172800
Arg [3] : _validator (address): 0x0000000000000000000000000000000000000000
Arg [4] : _minSubmissionValue (int256): 1000000000000000000000
Arg [5] : _maxSubmissionValue (int256): 100000000000000000000000000000
Arg [6] : _decimals (uint8): 18
Arg [7] : _description (string): LINKPOOL BAYC/ETH

-----Encoded View---------------
10 Constructor Arguments found :
Arg [0] : 000000000000000000000000326c977e6efc84e512bb9c30f76e30c160ed06fb
Arg [1] : 000000000000000000000000000000000000000000000000000000174876e800
Arg [2] : 000000000000000000000000000000000000000000000000000000000002a300
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [4] : 00000000000000000000000000000000000000000000003635c9adc5dea00000
Arg [5] : 0000000000000000000000000000000000000001431e0fae6d7217caa0000000
Arg [6] : 0000000000000000000000000000000000000000000000000000000000000012
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000100
Arg [8] : 0000000000000000000000000000000000000000000000000000000000000011
Arg [9] : 4c494e4b504f4f4c20424159432f455448000000000000000000000000000000


Block Transaction Difficulty Gas Used Reward
View All Blocks Produced

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

Validator Index Block Amount
View All Withdrawals

Txn Hash Block Value Eth2 PubKey Valid
View All Deposits
[ Download: CSV Export  ]

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