{"file_path":"project:/contracts/stability/SortedOracles.sol","creation_status":"success","source_code":"// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.5.13;\n\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"openzeppelin-solidity/contracts/ownership/Ownable.sol\";\n\nimport \"./interfaces/ISortedOracles.sol\";\nimport \"./interfaces/ISortedOraclesInitializer.sol\";\nimport \"../common/interfaces/ICeloVersionedContract.sol\";\nimport \"./interfaces/IBreakerBox.sol\";\n\nimport \"../common/FixidityLib.sol\";\nimport \"../common/Initializable.sol\";\nimport \"../common/linkedlists/AddressSortedLinkedListWithMedian.sol\";\nimport \"../common/linkedlists/SortedLinkedListWithMedian.sol\";\nimport \"../../contracts-0.8/common/interfaces/IOracle.sol\";\n\n/**\n * @title   SortedOracles\n *\n * @notice  This contract stores a collection of exchange rates with CELO\n *          expressed in units of other assets. The most recent exchange rates\n *          are gathered off-chain by oracles, who then use the `report` function to\n *          submit the rates to this contract. Before submitting a rate report, an\n *          oracle's address must be added to the `isOracle` mapping for a specific\n *          rateFeedId, with the flag set to true. While submitting a report requires\n *          an address to be added to the mapping, no additional permissions are needed\n *          to read the reports, the calculated median rate, or the list of oracles.\n *\n * @dev     A unique rateFeedId identifies each exchange rate. In the initial implementation\n *          of this contract, the rateFeedId was set as the address of the stable\n *          asset contract that used the rate. However, this implementation has since\n *          been updated, and the rateFeedId now also refers to an address derived from the\n *          concatenation other asset symbols. This change enables the contract to store multiple exchange rates for a\n *          single token. As a result of this change, there may be instances\n *          where the term \"token\" is used in the contract code. These useages of the term\n *          \"token\" are actually referring to the rateFeedId.\n *\n */\ncontract SortedOracles is\n  ISortedOracles,\n  ISortedOraclesInitializer,\n  IOracle,\n  ICeloVersionedContract,\n  Ownable,\n  Initializable\n{\n  using SafeMath for uint256;\n  using AddressSortedLinkedListWithMedian for SortedLinkedListWithMedian.List;\n  using FixidityLib for FixidityLib.Fraction;\n\n  struct EquivalentToken {\n    address token;\n  }\n\n  uint256 private constant FIXED1_UINT = 1e24;\n\n  // Maps a rateFeedID to a sorted list of report values.\n  mapping(address => SortedLinkedListWithMedian.List) private rates;\n  // Maps a rateFeedID to a sorted list of report timestamps.\n  mapping(address => SortedLinkedListWithMedian.List) private timestamps;\n  mapping(address => mapping(address => bool)) public isOracle;\n  mapping(address => address[]) public oracles;\n\n  // `reportExpirySeconds` is the fallback value used to determine reporting\n  // frequency. Initially it was the _only_ value but we later introduced\n  // the per token mapping in `tokenReportExpirySeconds`. If a token\n  // doesn't have a value in the mapping (i.e. it's 0), the fallback is used.\n  // See: #getTokenReportExpirySeconds\n  uint256 public reportExpirySeconds;\n  // Maps a rateFeedId to its report expiry time in seconds.\n  mapping(address => uint256) public tokenReportExpirySeconds;\n\n  IBreakerBox public breakerBox;\n  // Maps a token address to its equivalent token address.\n  // Original token will return the median value same as the value of equivalent token.\n  mapping(address => EquivalentToken) public equivalentTokens;\n\n  event OracleAdded(address indexed token, address indexed oracleAddress);\n  event OracleRemoved(address indexed token, address indexed oracleAddress);\n  event OracleReported(\n    address indexed token,\n    address indexed oracle,\n    uint256 timestamp,\n    uint256 value\n  );\n  event OracleReportRemoved(address indexed token, address indexed oracle);\n  event MedianUpdated(address indexed token, uint256 value);\n  event ReportExpirySet(uint256 reportExpiry);\n  event TokenReportExpirySet(address token, uint256 reportExpiry);\n  event BreakerBoxUpdated(address indexed newBreakerBox);\n  event EquivalentTokenSet(address indexed token, address indexed equivalentToken);\n\n  modifier onlyOracle(address token) {\n    require(isOracle[token][msg.sender], \"sender was not an oracle for token addr\");\n    _;\n  }\n\n  /**\n   * @notice Sets initialized == true on implementation contracts\n   * @param test Set to true to skip implementation initialization\n   */\n  constructor(bool test) public Initializable(test) {}\n\n  /**\n   * @notice Used in place of the constructor to allow the contract to be upgradable via proxy.\n   * @param _reportExpirySeconds The number of seconds before a report is considered expired.\n   */\n  function initialize(uint256 _reportExpirySeconds) external initializer {\n    _transferOwnership(msg.sender);\n    setReportExpiry(_reportExpirySeconds);\n  }\n\n  /**\n   * @notice Sets the report expiry parameter for a rateFeedId.\n   * @param _token The token for which the report expiry is being set.\n   * @param _reportExpirySeconds The number of seconds before a report is considered expired.\n   */\n  function setTokenReportExpiry(address _token, uint256 _reportExpirySeconds) external onlyOwner {\n    require(_reportExpirySeconds > 0, \"report expiry seconds must be > 0\");\n    require(\n      _reportExpirySeconds != tokenReportExpirySeconds[_token],\n      \"token reportExpirySeconds hasn't changed\"\n    );\n    tokenReportExpirySeconds[_token] = _reportExpirySeconds;\n    emit TokenReportExpirySet(_token, _reportExpirySeconds);\n  }\n\n  /**\n   * @notice Adds a new Oracle for a specified rate feed.\n   * @param token The token for which the specified oracle is to be added.\n   * @param oracleAddress The address of the oracle.\n   */\n  function addOracle(address token, address oracleAddress) external onlyOwner {\n    // solhint-disable-next-line reason-string\n    require(\n      token != address(0) && oracleAddress != address(0) && !isOracle[token][oracleAddress],\n      \"token addr was null or oracle addr was null or oracle addr is already an oracle for token addr\"\n    );\n    isOracle[token][oracleAddress] = true;\n    oracles[token].push(oracleAddress);\n    emit OracleAdded(token, oracleAddress);\n  }\n\n  /**\n   * @notice Removes an Oracle from a specified rate feed.\n   * @param token The token from which the specified oracle is to be removed.\n   * @param oracleAddress The address of the oracle.\n   * @param index The index of `oracleAddress` in the list of oracles.\n   */\n  function removeOracle(address token, address oracleAddress, uint256 index) external onlyOwner {\n    // solhint-disable-next-line reason-string\n    require(\n      token != address(0) &&\n        oracleAddress != address(0) &&\n        oracles[token].length > index &&\n        oracles[token][index] == oracleAddress,\n      \"token addr null or oracle addr null or index of token oracle not mapped to oracle addr\"\n    );\n    isOracle[token][oracleAddress] = false;\n    oracles[token][index] = oracles[token][oracles[token].length.sub(1)];\n    oracles[token].pop();\n    if (reportExists(token, oracleAddress)) {\n      removeReport(token, oracleAddress);\n    }\n    emit OracleRemoved(token, oracleAddress);\n  }\n\n  /**\n   * @notice Removes a report that is expired.\n   * @param token The token for which the expired report is to be removed.\n   * @param n The number of expired reports to remove, at most (deterministic upper gas bound).\n   */\n  function removeExpiredReports(address token, uint256 n) external {\n    require(\n      token != address(0) && n < timestamps[token].getNumElements(),\n      \"token addr null or trying to remove too many reports\"\n    );\n    for (uint256 i = 0; i < n; i = i.add(1)) {\n      (bool isExpired, address oldestAddress) = isOldestReportExpired(token);\n      if (isExpired) {\n        removeReport(token, oldestAddress);\n      } else {\n        break;\n      }\n    }\n  }\n\n  /**\n   * @notice Sets the equivalent token for a token.\n   * @param token The address of the token.\n   * @param equivalentToken The address of the equivalent token.\n   */\n  function setEquivalentToken(address token, address equivalentToken) external onlyOwner {\n    require(token != address(0), \"token address cannot be 0\");\n    require(equivalentToken != address(0), \"equivalentToken address cannot be 0\");\n    equivalentTokens[token] = EquivalentToken(equivalentToken);\n    emit EquivalentTokenSet(token, equivalentToken);\n  }\n\n  /**\n   * @notice Sets the equivalent token for a token.\n   * @param token The address of the token.\n   */\n  function deleteEquivalentToken(address token) external onlyOwner {\n    require(token != address(0), \"token address cannot be 0\");\n    delete equivalentTokens[token];\n    emit EquivalentTokenSet(token, address(0));\n  }\n\n  /**\n   * @notice Updates an oracle value and the median.\n   * @param token The token for which the rate is being reported.\n   * @param value The number of stable asset that equate to one unit of collateral asset, for the\n   *              specified rateFeedId, expressed as a fixidity value.\n   * @param lesserKey The element which should be just left of the new oracle value.\n   * @param greaterKey The element which should be just right of the new oracle value.\n   * @dev Note that only one of `lesserKey` or `greaterKey` needs to be correct to reduce friction.\n   */\n  function report(\n    address token,\n    uint256 value,\n    address lesserKey,\n    address greaterKey\n  ) external onlyOracle(token) {\n    uint256 originalMedian = rates[token].getMedianValue();\n    if (rates[token].contains(msg.sender)) {\n      rates[token].update(msg.sender, value, lesserKey, greaterKey);\n\n      // Rather than update the timestamp, we remove it and re-add it at the\n      // head of the list later. The reason for this is that we need to handle\n      // a few different cases:\n      //   1. This oracle is the only one to report so far. lesserKey = address(0)\n      //   2. Other oracles have reported since this one's last report. lesserKey = getHead()\n      //   3. Other oracles have reported, but the most recent is this one.\n      //      lesserKey = key immediately after getHead()\n      //\n      // However, if we just remove this timestamp, timestamps[token].getHead()\n      // does the right thing in all cases.\n      timestamps[token].remove(msg.sender);\n    } else {\n      rates[token].insert(msg.sender, value, lesserKey, greaterKey);\n    }\n    timestamps[token].insert(\n      msg.sender,\n      // solhint-disable-next-line not-rely-on-time\n      now,\n      timestamps[token].getHead(),\n      address(0)\n    );\n    emit OracleReported(token, msg.sender, now, value);\n    uint256 newMedian = rates[token].getMedianValue();\n    if (newMedian != originalMedian) {\n      emit MedianUpdated(token, newMedian);\n    }\n\n    if (address(breakerBox) != address(0)) {\n      breakerBox.checkAndSetBreakers(token);\n    }\n  }\n\n  /**\n   * @notice Gets the equivalent token for a token.\n   * @param token The address of the token.\n   * @return The address of the equivalent token.\n   */\n  function getEquivalentToken(address token) external view returns (address) {\n    return (equivalentTokens[token].token);\n  }\n\n  /**\n   * @notice Returns the median timestamp.\n   * @dev Does not take the equivalentTokens mapping into account.\n   * For that, the underlying token should be queried.\n   * @param token The token for which the median timestamp is being retrieved.\n   * @return uint256 The median report timestamp for the specified rateFeedId.\n   */\n  function medianTimestamp(address token) external view returns (uint256) {\n    return timestamps[token].getMedianValue();\n  }\n\n  /**\n   * @notice Gets all elements from the doubly linked list.\n   * @dev Does not take the equivalentTokens mapping into account.\n   * For that, the underlying token should be queried.\n   * @param token The token for which the timestamps are being retrieved.\n   * @return keys Keys of nn unpacked list of elements from largest to smallest.\n   * @return values Values of an unpacked list of elements from largest to smallest.\n   * @return relations Relations of an unpacked list of elements from largest to smallest.\n   */\n  function getTimestamps(\n    address token\n  )\n    external\n    view\n    returns (address[] memory, uint256[] memory, SortedLinkedListWithMedian.MedianRelation[] memory)\n  {\n    return timestamps[token].getElements();\n  }\n\n  /**\n   * @notice Returns the list of oracles for a speficied rateFeedId.\n   * @dev Does not take the equivalentTokens mapping into account.\n   * For that, the underlying token should be queried.\n   * @param token The token for which the oracles are being retrieved.\n   * @return address[] A list of oracles for the given rateFeedId.\n   */\n  function getOracles(address token) external view returns (address[] memory) {\n    return oracles[token];\n  }\n\n  /**\n   * @notice Gets all elements from the doubly linked list.\n   * @dev Does not take the equivalentTokens mapping into account.\n   * For that, the underlying token should be queried.\n   * @param token The token for which the rates are being retrieved.\n   * @return keys Keys of an unpacked list of elements from largest to smallest.\n   * @return values Values of an unpacked list of elements from largest to smallest.\n   * @return relations Relations of an unpacked list of elements from largest to smallest.\n   */\n  function getRates(\n    address token\n  )\n    external\n    view\n    returns (address[] memory, uint256[] memory, SortedLinkedListWithMedian.MedianRelation[] memory)\n  {\n    return rates[token].getElements();\n  }\n\n  /**\n   * @notice Returns the exchange rate for a specified token.\n   * @param token The token for which the exchange rate is being retrieved.\n   * @return uint256 The exchange rate for the specified token.\n   * @return uint256 The denominator for the exchange rate.\n   */\n  function getExchangeRate(\n    address token\n  ) external view returns (uint256 numerator, uint256 denominator) {\n    (numerator, denominator) = medianRate(token);\n  }\n\n  /**\n   * @notice Returns the storage, major, minor, and patch version of the contract.\n   * @return Storage version of the contract.\n   * @return Major version of the contract.\n   * @return Minor version of the contract.\n   * @return Patch version of the contract.\n   */\n  function getVersionNumber() external pure returns (uint256, uint256, uint256, uint256) {\n    return (1, 1, 4, 0);\n  }\n\n  /**\n   * @notice Sets the report expiry parameter.\n   * @param _reportExpirySeconds The number of seconds before a report is considered expired.\n   */\n  function setReportExpiry(uint256 _reportExpirySeconds) public onlyOwner {\n    require(_reportExpirySeconds > 0, \"report expiry seconds must be > 0\");\n    require(_reportExpirySeconds != reportExpirySeconds, \"reportExpirySeconds hasn't changed\");\n    reportExpirySeconds = _reportExpirySeconds;\n    emit ReportExpirySet(_reportExpirySeconds);\n  }\n\n  /**\n   * @notice Sets the address of the BreakerBox.\n   * @param newBreakerBox The new BreakerBox address.\n   */\n  function setBreakerBox(IBreakerBox newBreakerBox) public onlyOwner {\n    require(address(newBreakerBox) != address(0), \"BreakerBox address must be set\");\n    breakerBox = newBreakerBox;\n    emit BreakerBoxUpdated(address(newBreakerBox));\n  }\n\n  /**\n   * @notice Returns the median of the currently stored rates for a specified rateFeedId.\n   * @dev Please note that this function respects the equivalentToken mapping, and so may\n   * return the median identified as an equivalent to the supplied rateFeedId.\n   * @param token The token for which the median value is being retrieved.\n   * @return uint256 The median exchange rate for rateFeedId (fixidity).\n   * @return uint256 denominator\n   */\n  function medianRate(address token) public view returns (uint256, uint256) {\n    EquivalentToken storage equivalentToken = equivalentTokens[token];\n    if (equivalentToken.token != address(0)) {\n      (uint256 equivalentMedianRate, uint256 denominator) = medianRateWithoutEquivalentMapping(\n        equivalentToken.token\n      );\n      return (equivalentMedianRate, denominator);\n    }\n\n    return medianRateWithoutEquivalentMapping(token);\n  }\n\n  /**\n   * @notice Returns the number of rates that are currently stored for a specifed rateFeedId.\n   * @dev Does not take the equivalentTokens mapping into account.\n   * For that, the underlying token should be queried.\n   * @param token The token for which the number of rates is being retrieved.\n   * @return uint256 The number of reported oracle rates stored for the given rateFeedId.\n   */\n  function numRates(address token) public view returns (uint256) {\n    return rates[token].getNumElements();\n  }\n\n  /**\n   * @notice Check if last report is expired.\n   * @param token The token for which the expired report is to be checked.\n   * @return bool A bool indicating if the last report is expired.\n   * @return address Oracle address of the last report.\n   */\n  function isOldestReportExpired(address token) public view returns (bool, address) {\n    // solhint-disable-next-line reason-string\n    require(token != address(0));\n    address oldest = timestamps[token].getTail();\n    uint256 timestamp = timestamps[token].getValue(oldest);\n    // solhint-disable-next-line not-rely-on-time\n    if (now.sub(timestamp) >= getTokenReportExpirySeconds(token)) {\n      return (true, oldest);\n    }\n    return (false, oldest);\n  }\n\n  /**\n   * @notice Returns the median of the currently stored rates for a specified rateFeedId.\n   * @dev Does not take the equivalentTokens mapping into account.\n   * @param token The token for which the median value is being retrieved.\n   * @return uint256 The median exchange rate for rateFeedId (fixidity).\n   * @return uint256 denominator\n   */\n  function medianRateWithoutEquivalentMapping(\n    address token\n  ) public view returns (uint256, uint256) {\n    return (rates[token].getMedianValue(), numRates(token) == 0 ? 0 : FIXED1_UINT);\n  }\n\n  /**\n   * @notice Returns the number of timestamps.\n   * @dev Does not take the equivalentTokens mapping into account.\n   * For that, the underlying token should be queried.\n   * @param token The token for which the number of timestamps is being retrieved.\n   * @return uint256 The number of oracle report timestamps for the specified rateFeedId.\n   */\n  function numTimestamps(address token) public view returns (uint256) {\n    return timestamps[token].getNumElements();\n  }\n\n  /**\n   * @notice Returns the expiry for specified rateFeedId if it exists, if not the default is returned.\n   * @dev Does not take the equivalentTokens mapping into account.\n   * For that, the underlying token should be queried.\n   * @param token The token for which the report expiry is being retrieved.\n   * @return The report expiry in seconds.\n   */\n  function getTokenReportExpirySeconds(address token) public view returns (uint256) {\n    if (tokenReportExpirySeconds[token] == 0) {\n      return reportExpirySeconds;\n    }\n\n    return tokenReportExpirySeconds[token];\n  }\n\n  /**\n   * @notice Checks if a report exists for a specified rateFeedId from a given oracle.\n   * @dev Does not take the equivalentTokens mapping into account.\n   * For that, the underlying token should be queried.\n   * @param token The token for which the report should be checked.\n   * @param oracle The oracle whose report should be checked.\n   * @return bool True if a report exists, false otherwise.\n   */\n  function reportExists(address token, address oracle) internal view returns (bool) {\n    return rates[token].contains(oracle) && timestamps[token].contains(oracle);\n  }\n\n  /**\n   * @notice Removes an oracle value and updates the median.\n   * @dev Does not take the equivalentTokens mapping into account.\n   * For that, the underlying token should be queried.\n   * @param token The token for which the oracle report should be removed.\n   * @param oracle The oracle whose value should be removed.\n   * @dev This can be used to delete elements for oracles that have been removed.\n   * However, a > 1 elements reports list should always be maintained\n   */\n  function removeReport(address token, address oracle) private {\n    if (numTimestamps(token) == 1 && reportExists(token, oracle)) return;\n    uint256 originalMedian = rates[token].getMedianValue();\n    rates[token].remove(oracle);\n    timestamps[token].remove(oracle);\n    emit OracleReportRemoved(token, oracle);\n    uint256 newMedian = rates[token].getMedianValue();\n    if (newMedian != originalMedian) {\n      emit MedianUpdated(token, newMedian);\n      if (address(breakerBox) != address(0)) {\n        breakerBox.checkAndSetBreakers(token);\n      }\n    }\n  }\n}\n","deployed_bytecode":"0x608060405234801561001057600080fd5b50600436106102065760003560e01c8063858975121161011a578063ebc1d6bb116100ad578063f2fde38b1161007c578063f2fde38b14610d8e578063f414c5e414610dd2578063fc20935d14610e1c578063fe4b84df14610e6a578063ffe736bf14610e9857610206565b8063ebc1d6bb14610c3e578063ef90e1b014610c6c578063efb7601d14610ccb578063f0ca4adb14610d2a57610206565b8063a00a8b2c116100e9578063a00a8b2c146109e1578063b929215814610a6f578063bbc66a9414610b98578063dd34ca3b14610bf057610206565b806385897512146108585780638da5cb5b146108dc5780638e749281146109265780638f32d59b146109bf57610206565b8063493a353c1161019d5780636dd6ef0c1161016c5780636dd6ef0c1461068c5780636deb6799146106e4578063715018a61461073c578063749aa17e1461074657806380e50744146107ca57610206565b8063493a353c1461056e57806353a572971461058c57806354255be0146105fa57806363d9a6561461062d57610206565b8063158ef93e116101d9578063158ef93e146104345780631cbe9970146104565780632e86bc011461049a578063370c998e146104f257610206565b806302f55b611461020b578063040bbd3514610334578063071b48fc14610378578063145d8d18146103d0575b600080fd5b61024d6004803603602081101561022157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f27565b60405180806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b8381101561029857808201518184015260208101905061027d565b50505050905001848103835286818151815260200191508051906020019060200280838360005b838110156102da5780820151818401526020810190506102bf565b50505050905001848103825285818151815260200191508051906020019060200280838360005b8381101561031c578082015181840152602081019050610301565b50505050905001965050505050505060405180910390f35b6103766004803603602081101561034a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111c3565b005b6103ba6004803603602081101561038e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611367565b6040518082815260200191505060405180910390f35b610432600480360360408110156103e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061143a565b005b61043c6116e9565b604051808215151515815260200191505060405180910390f35b6104986004803603602081101561046c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116fc565b005b6104dc600480360360208110156104b057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118e0565b6040518082815260200191505060405180910390f35b6105546004803603604081101561050857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118f8565b604051808215151515815260200191505060405180910390f35b610576611927565b6040518082815260200191505060405180910390f35b6105f8600480360360608110156105a257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061192d565b005b610602611e45565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b61066f6004803603602081101561064357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611e6c565b604051808381526020018281526020019250505060405180910390f35b6106ce600480360360208110156106a257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f65565b6040518082815260200191505060405180910390f35b610726600480360360208110156106fa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612038565b6040518082815260200191505060405180910390f35b6107446120d3565b005b6107886004803603602081101561075c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061220c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610856600480360360808110156107e057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061224a565b005b61089a6004803603602081101561086e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612d31565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6108e4612d9d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6109686004803603602081101561093c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612dc6565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156109ab578082015181840152602081019050610990565b505050509050019250505060405180910390f35b6109c7612e93565b604051808215151515815260200191505060405180910390f35b610a2d600480360360408110156109f757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612ef1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ab160048036036020811015610a8557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612f3c565b60405180806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b83811015610afc578082015181840152602081019050610ae1565b50505050905001848103835286818151815260200191508051906020019060200280838360005b83811015610b3e578082015181840152602081019050610b23565b50505050905001848103825285818151815260200191508051906020019060200280838360005b83811015610b80578082015181840152602081019050610b65565b50505050905001965050505050505060405180910390f35b610bda60048036036020811015610bae57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506131d8565b6040518082815260200191505060405180910390f35b610c3c60048036036040811015610c0657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506132ab565b005b610c6a60048036036020811015610c5457600080fd5b8101908080359060200190929190505050613461565b005b610cae60048036036020811015610c8257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506135d0565b604051808381526020018281526020019250505060405180910390f35b610d0d60048036036020811015610ce157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506136c4565b604051808381526020018281526020019250505060405180910390f35b610d8c60048036036040811015610d4057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506136dd565b005b610dd060048036036020811015610da457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613a3f565b005b610dda613ac5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610e6860048036036040811015610e3257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613aeb565b005b610e9660048036036020811015610e8057600080fd5b8101908080359060200190929190505050613d09565b005b610eda60048036036020811015610eae57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613dbc565b60405180831515151581526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390f35b6060806060600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd79636cfa387390916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fbb57600080fd5b505af4158015610fcf573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506060811015610ff957600080fd5b810190808051604051939291908464010000000082111561101957600080fd5b8382019150602082018581111561102f57600080fd5b825186602082028301116401000000008211171561104c57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015611083578082015181840152602081019050611068565b50505050905001604052602001805160405193929190846401000000008211156110ac57600080fd5b838201915060208201858111156110c257600080fd5b82518660208202830111640100000000821117156110df57600080fd5b8083526020830192505050908051906020019060200280838360005b838110156111165780820151818401526020810190506110fb565b505050509050016040526020018051604051939291908464010000000082111561113f57600080fd5b8382019150602082018581111561115557600080fd5b825186602082028301116401000000008211171561117257600080fd5b8083526020830192505050908051906020019060200280838360005b838110156111a957808201518184015260208101905061118e565b505050509050016040525050509250925092509193909250565b6111cb612e93565b61123d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156112e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f427265616b6572426f782061646472657373206d75737420626520736574000081525060200191505060405180910390fd5b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f21921b3b46ef2c939e85d6a14410c6e3b9ce132b66e944357ff4f789f68e00e260405160405180910390a250565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd796359d556a890916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156113f857600080fd5b505af415801561140c573d6000803e3d6000fd5b505050506040513d602081101561142257600080fd5b81019080805190602001909291905050509050919050565b611442612e93565b6114b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611557576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f746f6b656e20616464726573732063616e6e6f7420626520300000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156115dd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180614a356023913960400191505060405180910390fd5b60405180602001604052808273ffffffffffffffffffffffffffffffffffffffff16815250600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509050508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f50029dfdec1fc4684fff6b60e99fd3972a724662f5b4235e5082c447344ea01f60405160405180910390a35050565b600060149054906101000a900460ff1681565b611704612e93565b611776576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611819576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f746f6b656e20616464726573732063616e6e6f7420626520300000000000000081525060200191505060405180910390fd5b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f50029dfdec1fc4684fff6b60e99fd3972a724662f5b4235e5082c447344ea01f60405160405180910390a350565b60066020528060005260406000206000915090505481565b60036020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b60055481565b611935612e93565b6119a7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611a115750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611a5e575080600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050115b8015611b0957508173ffffffffffffffffffffffffffffffffffffffff16600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110611ac657fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b611b5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526056815260200180614ab26056913960600191505060405180910390fd5b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611c886001600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905061400790919063ffffffff16565b81548110611c9257fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110611d0757fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480611d9757fe5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690559055611dd68383614051565b15611de657611de5838361425f565b5b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f6dc84b66cc948d847632b9d829f7cb1cb904fbf2c084554a9bc22ad9d845334060405160405180910390a3505050565b60008060008060018060046000839350829250819150809050935093509350935090919293565b600080600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd796359d556a890916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611efe57600080fd5b505af4158015611f12573d6000803e3d6000fd5b505050506040513d6020811015611f2857600080fd5b81019080805190602001909291905050506000611f44856131d8565b14611f595769d3c21bcecceda1000000611f5c565b60005b91509150915091565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd79636eafa6c390916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611ff657600080fd5b505af415801561200a573d6000803e3d6000fd5b505050506040513d602081101561202057600080fd5b81019080805190602001909291905050509050919050565b600080600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054141561208b5760055490506120ce565b600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b6120db612e93565b61214d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60086020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081565b83600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661232a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180614b086027913960400191505060405180910390fd5b6000600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd796359d556a890916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156123bb57600080fd5b505af41580156123cf573d6000803e3d6000fd5b505050506040513d60208110156123e557600080fd5b81019080805190602001909291905050509050600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd796395073a799091336040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156124bb57600080fd5b505af41580156124cf573d6000803e3d6000fd5b505050506040513d60208110156124e557600080fd5b81019080805190602001909291905050501561272657600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd7963832a21479091338888886040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b15801561262e57600080fd5b505af4158015612642573d6000803e3d6000fd5b50505050600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd7963c1e728e99091336040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060006040518083038186803b15801561270957600080fd5b505af415801561271d573d6000803e3d6000fd5b50505050612872565b600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd7963d4a092729091338888886040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b15801561285957600080fd5b505af415801561286d573d6000803e3d6000fd5b505050505b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd7963d4a0927290913342600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd79630944c59490916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561295e57600080fd5b505af4158015612972573d6000803e3d6000fd5b505050506040513d602081101561298857600080fd5b810190808051906020019092919050505060006040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b158015612a6f57600080fd5b505af4158015612a83573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f7cebb17173a9ed273d2b7538f64395c0ebf352ff743f1cf8ce66b437a61442134288604051808381526020018281526020019250505060405180910390a36000600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd796359d556a890916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612b8557600080fd5b505af4158015612b99573d6000803e3d6000fd5b505050506040513d6020811015612baf57600080fd5b81019080805190602001909291905050509050818114612c18578673ffffffffffffffffffffffffffffffffffffffff167fa9981ebfc3b766a742486e898f54959b050a66006dbce1a4155c1f84a08bcf41826040518082815260200191505060405180910390a25b600073ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612d2857600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ab02e6c0886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b158015612d0f57600080fd5b505af1158015612d23573d6000803e3d6000fd5b505050505b50505050505050565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015612e8757602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311612e3d575b50505050509050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16612ed56147a0565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b60046020528160005260406000208181548110612f0a57fe5b906000526020600020016000915091509054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060806060600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd79636cfa387390916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015612fd057600080fd5b505af4158015612fe4573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250606081101561300e57600080fd5b810190808051604051939291908464010000000082111561302e57600080fd5b8382019150602082018581111561304457600080fd5b825186602082028301116401000000008211171561306157600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561309857808201518184015260208101905061307d565b50505050905001604052602001805160405193929190846401000000008211156130c157600080fd5b838201915060208201858111156130d757600080fd5b82518660208202830111640100000000821117156130f457600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561312b578082015181840152602081019050613110565b505050509050016040526020018051604051939291908464010000000082111561315457600080fd5b8382019150602082018581111561316a57600080fd5b825186602082028301116401000000008211171561318757600080fd5b8083526020830192505050908051906020019060200280838360005b838110156131be5780820151818401526020810190506131a3565b505050509050016040525050509250925092509193909250565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd79636eafa6c390916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561326957600080fd5b505af415801561327d573d6000803e3d6000fd5b505050506040513d602081101561329357600080fd5b81019080805190602001909291905050509050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156133b05750600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd79636eafa6c390916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561337257600080fd5b505af4158015613386573d6000803e3d6000fd5b505050506040513d602081101561339c57600080fd5b810190808051906020019092919050505081105b613405576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526034815260200180614a7e6034913960400191505060405180910390fd5b60008090505b8181101561345c5760008061341f85613dbc565b91509150811561343857613433858261425f565b61343f565b505061345c565b50506134556001826147a890919063ffffffff16565b905061340b565b505050565b613469612e93565b6134db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60008111613534576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614bd76021913960400191505060405180910390fd5b60055481141561358f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180614bb56022913960400191505060405180910390fd5b806005819055507fc68a9b88effd8a11611ff410efbc83569f0031b7bc70dd455b61344c7f0a042f816040518082815260200191505060405180910390a150565b6000806000600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146136b05760008061369e8360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611e6c565b915091508181945094505050506136bf565b6136b984611e6c565b92509250505b915091565b6000806136d0836135d0565b8092508193505050915091565b6136e5612e93565b613757576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156137c15750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b80156138545750600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6138a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252605e815260200180614b2f605e913960600191505060405180910390fd5b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f828d2be040dede7698182e08dfa8bfbd663c879aee772509c4a2bd961d0ed43f60405160405180910390a35050565b613a47612e93565b613ab9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b613ac281614830565b50565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b613af3612e93565b613b65576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60008111613bbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614bd76021913960400191505060405180910390fd5b600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811415613c56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180614b8d6028913960400191505060405180910390fd5b80600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507ff8324c8592dfd9991ee3e717351afe0a964605257959e3d99b0eb3d45bff94228282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15050565b600060149054906101000a900460ff1615613d8c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f636f6e747261637420616c726561647920696e697469616c697a65640000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff021916908315150217905550613db033614830565b613db981613461565b50565b600080600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415613df957600080fd5b6000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd7963d938ec7b90916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015613e8a57600080fd5b505af4158015613e9e573d6000803e3d6000fd5b505050506040513d6020811015613eb457600080fd5b810190808051906020019092919050505090506000600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd79637c6bb8629091846040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613f8c57600080fd5b505af4158015613fa0573d6000803e3d6000fd5b505050506040513d6020811015613fb657600080fd5b81019080805190602001909291905050509050613fd285612038565b613fe5824261400790919063ffffffff16565b10613ff857600182935093505050614002565b6000829350935050505b915091565b600061404983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614974565b905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd796395073a799091846040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561411657600080fd5b505af415801561412a573d6000803e3d6000fd5b505050506040513d602081101561414057600080fd5b810190808051906020019092919050505080156142575750600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd796395073a799091846040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561421b57600080fd5b505af415801561422f573d6000803e3d6000fd5b505050506040513d602081101561424557600080fd5b81019080805190602001909291905050505b905092915050565b600161426a83611f65565b14801561427d575061427c8282614051565b5b156142875761479c565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd796359d556a890916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561431857600080fd5b505af415801561432c573d6000803e3d6000fd5b505050506040513d602081101561434257600080fd5b81019080805190602001909291905050509050600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd7963c1e728e99091846040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060006040518083038186803b15801561441857600080fd5b505af415801561442c573d6000803e3d6000fd5b50505050600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd7963c1e728e99091846040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060006040518083038186803b1580156144f357600080fd5b505af4158015614507573d6000803e3d6000fd5b505050508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fe21a44017b6fa1658d84e937d56ff408501facdb4ff7427c479ac460d76f789360405160405180910390a36000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd796359d556a890916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156145f657600080fd5b505af415801561460a573d6000803e3d6000fd5b505050506040513d602081101561462057600080fd5b81019080805190602001909291905050509050818114614799578373ffffffffffffffffffffffffffffffffffffffff167fa9981ebfc3b766a742486e898f54959b050a66006dbce1a4155c1f84a08bcf41826040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461479857600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ab02e6c0856040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801561477f57600080fd5b505af1158015614793573d6000803e3d6000fd5b505050505b5b50505b5050565b600033905090565b600080828401905083811015614826576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156148b6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180614a586026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000838311158290614a21576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156149e65780820151818401526020810190506149cb565b50505050905090810190601f168015614a135780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838503905080915050939250505056fe6571756976616c656e74546f6b656e20616464726573732063616e6e6f7420626520304f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373746f6b656e2061646472206e756c6c206f7220747279696e6720746f2072656d6f766520746f6f206d616e79207265706f727473746f6b656e2061646472206e756c6c206f72206f7261636c652061646472206e756c6c206f7220696e646578206f6620746f6b656e206f7261636c65206e6f74206d617070656420746f206f7261636c65206164647273656e64657220776173206e6f7420616e206f7261636c6520666f7220746f6b656e2061646472746f6b656e206164647220776173206e756c6c206f72206f7261636c65206164647220776173206e756c6c206f72206f7261636c65206164647220697320616c726561647920616e206f7261636c6520666f7220746f6b656e2061646472746f6b656e207265706f72744578706972795365636f6e6473206861736e2774206368616e6765647265706f72744578706972795365636f6e6473206861736e2774206368616e6765647265706f727420657870697279207365636f6e6473206d757374206265203e2030a265627a7a723158203daa57540b400f24b4fbc4c054fc2393fd7762ac7683a3fa82d9bb2eda97df2c64736f6c634300050d0032","optimization_enabled":false,"verified_twin_address_hash":null,"is_verified":true,"compiler_settings":{"evmVersion":"istanbul","libraries":{},"metadata":{"useLiteralContent":true},"optimizer":{"enabled":false,"runs":200},"remappings":[]},"optimization_runs":null,"sourcify_repo_url":null,"decoded_constructor_args":[["true",{"internalType":"bool","name":"test","type":"bool"}]],"compiler_version":"0.5.13+commit.5b0b510c","is_verified_via_verifier_alliance":true,"verified_at":"2025-04-15T18:07:09.381814Z","implementations":[],"proxy_type":null,"external_libraries":[],"creation_bytecode":"0x60806040523480156200001157600080fd5b5060405162004d6738038062004d67833981810160405260208110156200003757600080fd5b81019080805190602001909291905050508060006200005b6200012360201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a350806200011b576001600060146101000a81548160ff0219169083151502179055505b50506200012b565b600033905090565b614c2c806200013b6000396000f3fe608060405234801561001057600080fd5b50600436106102065760003560e01c8063858975121161011a578063ebc1d6bb116100ad578063f2fde38b1161007c578063f2fde38b14610d8e578063f414c5e414610dd2578063fc20935d14610e1c578063fe4b84df14610e6a578063ffe736bf14610e9857610206565b8063ebc1d6bb14610c3e578063ef90e1b014610c6c578063efb7601d14610ccb578063f0ca4adb14610d2a57610206565b8063a00a8b2c116100e9578063a00a8b2c146109e1578063b929215814610a6f578063bbc66a9414610b98578063dd34ca3b14610bf057610206565b806385897512146108585780638da5cb5b146108dc5780638e749281146109265780638f32d59b146109bf57610206565b8063493a353c1161019d5780636dd6ef0c1161016c5780636dd6ef0c1461068c5780636deb6799146106e4578063715018a61461073c578063749aa17e1461074657806380e50744146107ca57610206565b8063493a353c1461056e57806353a572971461058c57806354255be0146105fa57806363d9a6561461062d57610206565b8063158ef93e116101d9578063158ef93e146104345780631cbe9970146104565780632e86bc011461049a578063370c998e146104f257610206565b806302f55b611461020b578063040bbd3514610334578063071b48fc14610378578063145d8d18146103d0575b600080fd5b61024d6004803603602081101561022157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050610f27565b60405180806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b8381101561029857808201518184015260208101905061027d565b50505050905001848103835286818151815260200191508051906020019060200280838360005b838110156102da5780820151818401526020810190506102bf565b50505050905001848103825285818151815260200191508051906020019060200280838360005b8381101561031c578082015181840152602081019050610301565b50505050905001965050505050505060405180910390f35b6103766004803603602081101561034a57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506111c3565b005b6103ba6004803603602081101561038e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611367565b6040518082815260200191505060405180910390f35b610432600480360360408110156103e657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061143a565b005b61043c6116e9565b604051808215151515815260200191505060405180910390f35b6104986004803603602081101561046c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506116fc565b005b6104dc600480360360208110156104b057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118e0565b6040518082815260200191505060405180910390f35b6105546004803603604081101561050857600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506118f8565b604051808215151515815260200191505060405180910390f35b610576611927565b6040518082815260200191505060405180910390f35b6105f8600480360360608110156105a257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291908035906020019092919050505061192d565b005b610602611e45565b6040518085815260200184815260200183815260200182815260200194505050505060405180910390f35b61066f6004803603602081101561064357600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611e6c565b604051808381526020018281526020019250505060405180910390f35b6106ce600480360360208110156106a257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050611f65565b6040518082815260200191505060405180910390f35b610726600480360360208110156106fa57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612038565b6040518082815260200191505060405180910390f35b6107446120d3565b005b6107886004803603602081101561075c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061220c565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610856600480360360808110156107e057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff16906020019092919050505061224a565b005b61089a6004803603602081101561086e57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612d31565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6108e4612d9d565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b6109686004803603602081101561093c57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612dc6565b6040518080602001828103825283818151815260200191508051906020019060200280838360005b838110156109ab578082015181840152602081019050610990565b505050509050019250505060405180910390f35b6109c7612e93565b604051808215151515815260200191505060405180910390f35b610a2d600480360360408110156109f757600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050612ef1565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610ab160048036036020811015610a8557600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050612f3c565b60405180806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b83811015610afc578082015181840152602081019050610ae1565b50505050905001848103835286818151815260200191508051906020019060200280838360005b83811015610b3e578082015181840152602081019050610b23565b50505050905001848103825285818151815260200191508051906020019060200280838360005b83811015610b80578082015181840152602081019050610b65565b50505050905001965050505050505060405180910390f35b610bda60048036036020811015610bae57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506131d8565b6040518082815260200191505060405180910390f35b610c3c60048036036040811015610c0657600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803590602001909291905050506132ab565b005b610c6a60048036036020811015610c5457600080fd5b8101908080359060200190929190505050613461565b005b610cae60048036036020811015610c8257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506135d0565b604051808381526020018281526020019250505060405180910390f35b610d0d60048036036020811015610ce157600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506136c4565b604051808381526020018281526020019250505060405180910390f35b610d8c60048036036040811015610d4057600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190803573ffffffffffffffffffffffffffffffffffffffff1690602001909291905050506136dd565b005b610dd060048036036020811015610da457600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613a3f565b005b610dda613ac5565b604051808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200191505060405180910390f35b610e6860048036036040811015610e3257600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff16906020019092919080359060200190929190505050613aeb565b005b610e9660048036036020811015610e8057600080fd5b8101908080359060200190929190505050613d09565b005b610eda60048036036020811015610eae57600080fd5b81019080803573ffffffffffffffffffffffffffffffffffffffff169060200190929190505050613dbc565b60405180831515151581526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060405180910390f35b6060806060600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd79636cfa387390916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015610fbb57600080fd5b505af4158015610fcf573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f820116820180604052506060811015610ff957600080fd5b810190808051604051939291908464010000000082111561101957600080fd5b8382019150602082018581111561102f57600080fd5b825186602082028301116401000000008211171561104c57600080fd5b8083526020830192505050908051906020019060200280838360005b83811015611083578082015181840152602081019050611068565b50505050905001604052602001805160405193929190846401000000008211156110ac57600080fd5b838201915060208201858111156110c257600080fd5b82518660208202830111640100000000821117156110df57600080fd5b8083526020830192505050908051906020019060200280838360005b838110156111165780820151818401526020810190506110fb565b505050509050016040526020018051604051939291908464010000000082111561113f57600080fd5b8382019150602082018581111561115557600080fd5b825186602082028301116401000000008211171561117257600080fd5b8083526020830192505050908051906020019060200280838360005b838110156111a957808201518184015260208101905061118e565b505050509050016040525050509250925092509193909250565b6111cb612e93565b61123d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156112e0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601e8152602001807f427265616b6572426f782061646472657373206d75737420626520736574000081525060200191505060405180910390fd5b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff167f21921b3b46ef2c939e85d6a14410c6e3b9ce132b66e944357ff4f789f68e00e260405160405180910390a250565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd796359d556a890916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156113f857600080fd5b505af415801561140c573d6000803e3d6000fd5b505050506040513d602081101561142257600080fd5b81019080805190602001909291905050509050919050565b611442612e93565b6114b4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415611557576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f746f6b656e20616464726573732063616e6e6f7420626520300000000000000081525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156115dd576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180614a356023913960400191505060405180910390fd5b60405180602001604052808273ffffffffffffffffffffffffffffffffffffffff16815250600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055509050508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f50029dfdec1fc4684fff6b60e99fd3972a724662f5b4235e5082c447344ea01f60405160405180910390a35050565b600060149054906101000a900460ff1681565b611704612e93565b611776576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611819576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260198152602001807f746f6b656e20616464726573732063616e6e6f7420626520300000000000000081525060200191505060405180910390fd5b600860008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020600080820160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690555050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f50029dfdec1fc4684fff6b60e99fd3972a724662f5b4235e5082c447344ea01f60405160405180910390a350565b60066020528060005260406000206000915090505481565b60036020528160005260406000206020528060005260406000206000915091509054906101000a900460ff1681565b60055481565b611935612e93565b6119a7576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614158015611a115750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b8015611a5e575080600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080549050115b8015611b0957508173ffffffffffffffffffffffffffffffffffffffff16600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110611ac657fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16145b611b5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526056815260200180614ab26056913960600191505060405180910390fd5b6000600360008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020611c886001600460008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054905061400790919063ffffffff16565b81548110611c9257fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16600460008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110611d0757fe5b9060005260206000200160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480611d9757fe5b6001900381819060005260206000200160006101000a81549073ffffffffffffffffffffffffffffffffffffffff02191690559055611dd68383614051565b15611de657611de5838361425f565b5b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f6dc84b66cc948d847632b9d829f7cb1cb904fbf2c084554a9bc22ad9d845334060405160405180910390a3505050565b60008060008060018060046000839350829250819150809050935093509350935090919293565b600080600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd796359d556a890916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611efe57600080fd5b505af4158015611f12573d6000803e3d6000fd5b505050506040513d6020811015611f2857600080fd5b81019080805190602001909291905050506000611f44856131d8565b14611f595769d3c21bcecceda1000000611f5c565b60005b91509150915091565b6000600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd79636eafa6c390916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611ff657600080fd5b505af415801561200a573d6000803e3d6000fd5b505050506040513d602081101561202057600080fd5b81019080805190602001909291905050509050919050565b600080600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054141561208b5760055490506120ce565b600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000205490505b919050565b6120db612e93565b61214d576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b60086020528060005260406000206000915090508060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081565b83600360008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1661232a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526027815260200180614b086027913960400191505060405180910390fd5b6000600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd796359d556a890916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156123bb57600080fd5b505af41580156123cf573d6000803e3d6000fd5b505050506040513d60208110156123e557600080fd5b81019080805190602001909291905050509050600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd796395073a799091336040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b1580156124bb57600080fd5b505af41580156124cf573d6000803e3d6000fd5b505050506040513d60208110156124e557600080fd5b81019080805190602001909291905050501561272657600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd7963832a21479091338888886040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b15801561262e57600080fd5b505af4158015612642573d6000803e3d6000fd5b50505050600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd7963c1e728e99091336040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060006040518083038186803b15801561270957600080fd5b505af415801561271d573d6000803e3d6000fd5b50505050612872565b600160008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd7963d4a092729091338888886040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b15801561285957600080fd5b505af415801561286d573d6000803e3d6000fd5b505050505b600260008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd7963d4a0927290913342600260008c73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd79630944c59490916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561295e57600080fd5b505af4158015612972573d6000803e3d6000fd5b505050506040513d602081101561298857600080fd5b810190808051906020019092919050505060006040518663ffffffff1660e01b8152600401808681526020018573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019550505050505060006040518083038186803b158015612a6f57600080fd5b505af4158015612a83573d6000803e3d6000fd5b505050503373ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167f7cebb17173a9ed273d2b7538f64395c0ebf352ff743f1cf8ce66b437a61442134288604051808381526020018281526020019250505060405180910390a36000600160008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd796359d556a890916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015612b8557600080fd5b505af4158015612b99573d6000803e3d6000fd5b505050506040513d6020811015612baf57600080fd5b81019080805190602001909291905050509050818114612c18578673ffffffffffffffffffffffffffffffffffffffff167fa9981ebfc3b766a742486e898f54959b050a66006dbce1a4155c1f84a08bcf41826040518082815260200191505060405180910390a25b600073ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614612d2857600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ab02e6c0886040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b158015612d0f57600080fd5b505af1158015612d23573d6000803e3d6000fd5b505050505b50505050505050565b6000600860008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6060600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020805480602002602001604051908101604052809291908181526020018280548015612e8757602002820191906000526020600020905b8160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019060010190808311612e3d575b50505050509050919050565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16612ed56147a0565b73ffffffffffffffffffffffffffffffffffffffff1614905090565b60046020528160005260406000208181548110612f0a57fe5b906000526020600020016000915091509054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b6060806060600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd79636cfa387390916040518263ffffffff1660e01b81526004018082815260200191505060006040518083038186803b158015612fd057600080fd5b505af4158015612fe4573d6000803e3d6000fd5b505050506040513d6000823e3d601f19601f82011682018060405250606081101561300e57600080fd5b810190808051604051939291908464010000000082111561302e57600080fd5b8382019150602082018581111561304457600080fd5b825186602082028301116401000000008211171561306157600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561309857808201518184015260208101905061307d565b50505050905001604052602001805160405193929190846401000000008211156130c157600080fd5b838201915060208201858111156130d757600080fd5b82518660208202830111640100000000821117156130f457600080fd5b8083526020830192505050908051906020019060200280838360005b8381101561312b578082015181840152602081019050613110565b505050509050016040526020018051604051939291908464010000000082111561315457600080fd5b8382019150602082018581111561316a57600080fd5b825186602082028301116401000000008211171561318757600080fd5b8083526020830192505050908051906020019060200280838360005b838110156131be5780820151818401526020810190506131a3565b505050509050016040525050509250925092509193909250565b6000600160008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd79636eafa6c390916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561326957600080fd5b505af415801561327d573d6000803e3d6000fd5b505050506040513d602081101561329357600080fd5b81019080805190602001909291905050509050919050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156133b05750600260008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd79636eafa6c390916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561337257600080fd5b505af4158015613386573d6000803e3d6000fd5b505050506040513d602081101561339c57600080fd5b810190808051906020019092919050505081105b613405576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526034815260200180614a7e6034913960400191505060405180910390fd5b60008090505b8181101561345c5760008061341f85613dbc565b91509150811561343857613433858261425f565b61343f565b505061345c565b50506134556001826147a890919063ffffffff16565b905061340b565b505050565b613469612e93565b6134db576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60008111613534576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614bd76021913960400191505060405180910390fd5b60055481141561358f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526022815260200180614bb56022913960400191505060405180910390fd5b806005819055507fc68a9b88effd8a11611ff410efbc83569f0031b7bc70dd455b61344c7f0a042f816040518082815260200191505060405180910390a150565b6000806000600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209050600073ffffffffffffffffffffffffffffffffffffffff168160000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16146136b05760008061369e8360000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16611e6c565b915091508181945094505050506136bf565b6136b984611e6c565b92509250505b915091565b6000806136d0836135d0565b8092508193505050915091565b6136e5612e93565b613757576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16141580156137c15750600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b80156138545750600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16155b6138a9576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252605e815260200180614b2f605e913960600191505060405180910390fd5b6001600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190806001815401808255809150509060018203906000526020600020016000909192909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550508073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f828d2be040dede7698182e08dfa8bfbd663c879aee772509c4a2bd961d0ed43f60405160405180910390a35050565b613a47612e93565b613ab9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b613ac281614830565b50565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b613af3612e93565b613b65576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260208152602001807f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657281525060200191505060405180910390fd5b60008111613bbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180614bd76021913960400191505060405180910390fd5b600660008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054811415613c56576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180614b8d6028913960400191505060405180910390fd5b80600660008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507ff8324c8592dfd9991ee3e717351afe0a964605257959e3d99b0eb3d45bff94228282604051808373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020018281526020019250505060405180910390a15050565b600060149054906101000a900460ff1615613d8c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f636f6e747261637420616c726561647920696e697469616c697a65640000000081525060200191505060405180910390fd5b6001600060146101000a81548160ff021916908315150217905550613db033614830565b613db981613461565b50565b600080600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415613df957600080fd5b6000600260008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd7963d938ec7b90916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015613e8a57600080fd5b505af4158015613e9e573d6000803e3d6000fd5b505050506040513d6020811015613eb457600080fd5b810190808051906020019092919050505090506000600260008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd79637c6bb8629091846040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b158015613f8c57600080fd5b505af4158015613fa0573d6000803e3d6000fd5b505050506040513d6020811015613fb657600080fd5b81019080805190602001909291905050509050613fd285612038565b613fe5824261400790919063ffffffff16565b10613ff857600182935093505050614002565b6000829350935050505b915091565b600061404983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614974565b905092915050565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd796395073a799091846040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561411657600080fd5b505af415801561412a573d6000803e3d6000fd5b505050506040513d602081101561414057600080fd5b810190808051906020019092919050505080156142575750600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd796395073a799091846040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060206040518083038186803b15801561421b57600080fd5b505af415801561422f573d6000803e3d6000fd5b505050506040513d602081101561424557600080fd5b81019080805190602001909291905050505b905092915050565b600161426a83611f65565b14801561427d575061427c8282614051565b5b156142875761479c565b6000600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd796359d556a890916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561431857600080fd5b505af415801561432c573d6000803e3d6000fd5b505050506040513d602081101561434257600080fd5b81019080805190602001909291905050509050600160008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd7963c1e728e99091846040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060006040518083038186803b15801561441857600080fd5b505af415801561442c573d6000803e3d6000fd5b50505050600260008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd7963c1e728e99091846040518363ffffffff1660e01b8152600401808381526020018273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019250505060006040518083038186803b1580156144f357600080fd5b505af4158015614507573d6000803e3d6000fd5b505050508173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fe21a44017b6fa1658d84e937d56ff408501facdb4ff7427c479ac460d76f789360405160405180910390a36000600160008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002073176697bb5fa930a84d3bfccacf052dfbc2adfd796359d556a890916040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156145f657600080fd5b505af415801561460a573d6000803e3d6000fd5b505050506040513d602081101561462057600080fd5b81019080805190602001909291905050509050818114614799578373ffffffffffffffffffffffffffffffffffffffff167fa9981ebfc3b766a742486e898f54959b050a66006dbce1a4155c1f84a08bcf41826040518082815260200191505060405180910390a2600073ffffffffffffffffffffffffffffffffffffffff16600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff161461479857600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ab02e6c0856040518263ffffffff1660e01b8152600401808273ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001915050600060405180830381600087803b15801561477f57600080fd5b505af1158015614793573d6000803e3d6000fd5b505050505b5b50505b5050565b600033905090565b600080828401905083811015614826576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156148b6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526026815260200180614a586026913960400191505060405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff166000809054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6000838311158290614a21576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b838110156149e65780820151818401526020810190506149cb565b50505050905090810190601f168015614a135780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838503905080915050939250505056fe6571756976616c656e74546f6b656e20616464726573732063616e6e6f7420626520304f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373746f6b656e2061646472206e756c6c206f7220747279696e6720746f2072656d6f766520746f6f206d616e79207265706f727473746f6b656e2061646472206e756c6c206f72206f7261636c652061646472206e756c6c206f7220696e646578206f6620746f6b656e206f7261636c65206e6f74206d617070656420746f206f7261636c65206164647273656e64657220776173206e6f7420616e206f7261636c6520666f7220746f6b656e2061646472746f6b656e206164647220776173206e756c6c206f72206f7261636c65206164647220776173206e756c6c206f72206f7261636c65206164647220697320616c726561647920616e206f7261636c6520666f7220746f6b656e2061646472746f6b656e207265706f72744578706972795365636f6e6473206861736e2774206368616e6765647265706f72744578706972795365636f6e6473206861736e2774206368616e6765647265706f727420657870697279207365636f6e6473206d757374206265203e2030a265627a7a723158203daa57540b400f24b4fbc4c054fc2393fd7762ac7683a3fa82d9bb2eda97df2c64736f6c634300050d00320000000000000000000000000000000000000000000000000000000000000001","name":"SortedOracles","is_blueprint":false,"license_type":"none","is_fully_verified":true,"is_verified_via_eth_bytecode_db":true,"language":"solidity","evm_version":"istanbul","can_be_visualized_via_sol2uml":true,"is_verified_via_sourcify":false,"additional_sources":[{"file_path":"project:/contracts/common/FixidityLib.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.5.13 <0.9.0;\n\n/**\n * @title FixidityLib\n * @author Gadi Guy, Alberto Cuesta Canada\n * @notice This library provides fixed point arithmetic with protection against\n * overflow.\n * All operations are done with uint256 and the operands must have been created\n * with any of the newFrom* functions, which shift the comma digits() to the\n * right and check for limits, or with wrap() which expects a number already\n * in the internal representation of a fraction.\n * When using this library be sure to use maxNewFixed() as the upper limit for\n * creation of fixed point numbers.\n * @dev All contained functions are pure and thus marked internal to be inlined\n * on consuming contracts at compile time for gas efficiency.\n */\nlibrary FixidityLib {\n  struct Fraction {\n    uint256 value;\n  }\n\n  uint256 private constant FIXED1_UINT = 1000000000000000000000000;\n\n  /**\n   * @notice Number of positions that the comma is shifted to the right.\n   */\n  function digits() internal pure returns (uint8) {\n    return 24;\n  }\n\n  /**\n   * @notice This is 1 in the fixed point units used in this library.\n   * @dev Test fixed1() equals 10^digits()\n   * Hardcoded to 24 digits.\n   */\n  function fixed1() internal pure returns (Fraction memory) {\n    return Fraction(FIXED1_UINT);\n  }\n\n  /**\n   * @notice Wrap a uint256 that represents a 24-decimal fraction in a Fraction\n   * struct.\n   * @param x Number that already represents a 24-decimal fraction.\n   * @return A Fraction struct with contents x.\n   */\n  function wrap(uint256 x) internal pure returns (Fraction memory) {\n    return Fraction(x);\n  }\n\n  /**\n   * @notice Unwraps the uint256 inside of a Fraction struct.\n   */\n  function unwrap(Fraction memory x) internal pure returns (uint256) {\n    return x.value;\n  }\n\n  /**\n   * @notice The amount of decimals lost on each multiplication operand.\n   * @dev Test mulPrecision() equals sqrt(fixed1)\n   */\n  function mulPrecision() internal pure returns (uint256) {\n    return 1000000000000;\n  }\n\n  /**\n   * @notice Maximum value that can be converted to fixed point. Optimize for deployment.\n   * @dev\n   * Test maxNewFixed() equals maxUint256() / fixed1()\n   */\n  function maxNewFixed() internal pure returns (uint256) {\n    return 115792089237316195423570985008687907853269984665640564;\n  }\n\n  /**\n   * @notice Converts a uint256 to fixed point Fraction\n   * @dev Test newFixed(0) returns 0\n   * Test newFixed(1) returns fixed1()\n   * Test newFixed(maxNewFixed()) returns maxNewFixed() * fixed1()\n   * Test newFixed(maxNewFixed()+1) fails\n   */\n  function newFixed(uint256 x) internal pure returns (Fraction memory) {\n    require(x <= maxNewFixed(), \"can't create fixidity number larger than maxNewFixed()\");\n    return Fraction(x * FIXED1_UINT);\n  }\n\n  /**\n   * @notice Converts a uint256 in the fixed point representation of this\n   * library to a non decimal. All decimal digits will be truncated.\n   */\n  function fromFixed(Fraction memory x) internal pure returns (uint256) {\n    return x.value / FIXED1_UINT;\n  }\n\n  /**\n   * @notice Converts two uint256 representing a fraction to fixed point units,\n   * equivalent to multiplying dividend and divisor by 10^digits().\n   * @param numerator numerator must be <= maxNewFixed()\n   * @param denominator denominator must be <= maxNewFixed() and denominator can't be 0\n   * @dev\n   * Test newFixedFraction(1,0) fails\n   * Test newFixedFraction(0,1) returns 0\n   * Test newFixedFraction(1,1) returns fixed1()\n   * Test newFixedFraction(1,fixed1()) returns 1\n   */\n  function newFixedFraction(\n    uint256 numerator,\n    uint256 denominator\n  ) internal pure returns (Fraction memory) {\n    Fraction memory convertedNumerator = newFixed(numerator);\n    Fraction memory convertedDenominator = newFixed(denominator);\n    return divide(convertedNumerator, convertedDenominator);\n  }\n\n  /**\n   * @notice Returns the integer part of a fixed point number.\n   * @dev\n   * Test integer(0) returns 0\n   * Test integer(fixed1()) returns fixed1()\n   * Test integer(newFixed(maxNewFixed())) returns maxNewFixed()*fixed1()\n   */\n  function integer(Fraction memory x) internal pure returns (Fraction memory) {\n    return Fraction((x.value / FIXED1_UINT) * FIXED1_UINT); // Can't overflow\n  }\n\n  /**\n   * @notice Returns the fractional part of a fixed point number.\n   * In the case of a negative number the fractional is also negative.\n   * @dev\n   * Test fractional(0) returns 0\n   * Test fractional(fixed1()) returns 0\n   * Test fractional(fixed1()-1) returns 10^24-1\n   */\n  function fractional(Fraction memory x) internal pure returns (Fraction memory) {\n    return Fraction(x.value - (x.value / FIXED1_UINT) * FIXED1_UINT); // Can't overflow\n  }\n\n  /**\n   * @notice x+y.\n   * @dev The maximum value that can be safely used as an addition operator is defined as\n   * maxFixedAdd = maxUint256()-1 / 2, or\n   * 57896044618658097711785492504343953926634992332820282019728792003956564819967.\n   * Test add(maxFixedAdd,maxFixedAdd) equals maxFixedAdd + maxFixedAdd\n   * Test add(maxFixedAdd+1,maxFixedAdd+1) throws\n   */\n  function add(Fraction memory x, Fraction memory y) internal pure returns (Fraction memory) {\n    uint256 z = x.value + y.value;\n    require(z >= x.value, \"add overflow detected\");\n    return Fraction(z);\n  }\n\n  /**\n   * @notice x-y.\n   * @dev\n   * Test subtract(6, 10) fails\n   */\n  function subtract(Fraction memory x, Fraction memory y) internal pure returns (Fraction memory) {\n    require(x.value >= y.value, \"substraction underflow detected\");\n    return Fraction(x.value - y.value);\n  }\n\n  /**\n   * @notice x*y. If any of the operators is higher than the max multiplier value it\n   * might overflow.\n   * @dev The maximum value that can be safely used as a multiplication operator\n   * (maxFixedMul) is calculated as sqrt(maxUint256()*fixed1()),\n   * or 340282366920938463463374607431768211455999999999999\n   * Test multiply(0,0) returns 0\n   * Test multiply(maxFixedMul,0) returns 0\n   * Test multiply(0,maxFixedMul) returns 0\n   * Test multiply(fixed1()/mulPrecision(),fixed1()*mulPrecision()) returns fixed1()\n   * Test multiply(maxFixedMul,maxFixedMul) is around maxUint256()\n   * Test multiply(maxFixedMul+1,maxFixedMul+1) fails\n   */\n  function multiply(Fraction memory x, Fraction memory y) internal pure returns (Fraction memory) {\n    if (x.value == 0 || y.value == 0) return Fraction(0);\n    if (y.value == FIXED1_UINT) return x;\n    if (x.value == FIXED1_UINT) return y;\n\n    // Separate into integer and fractional parts\n    // x = x1 + x2, y = y1 + y2\n    uint256 x1 = integer(x).value / FIXED1_UINT;\n    uint256 x2 = fractional(x).value;\n    uint256 y1 = integer(y).value / FIXED1_UINT;\n    uint256 y2 = fractional(y).value;\n\n    // (x1 + x2) * (y1 + y2) = (x1 * y1) + (x1 * y2) + (x2 * y1) + (x2 * y2)\n    uint256 x1y1 = x1 * y1;\n    if (x1 != 0) require(x1y1 / x1 == y1, \"overflow x1y1 detected\");\n\n    // x1y1 needs to be multiplied back by fixed1\n    // solium-disable-next-line mixedcase\n    uint256 fixed_x1y1 = x1y1 * FIXED1_UINT;\n    if (x1y1 != 0) require(fixed_x1y1 / x1y1 == FIXED1_UINT, \"overflow x1y1 * fixed1 detected\");\n    x1y1 = fixed_x1y1;\n\n    uint256 x2y1 = x2 * y1;\n    if (x2 != 0) require(x2y1 / x2 == y1, \"overflow x2y1 detected\");\n\n    uint256 x1y2 = x1 * y2;\n    if (x1 != 0) require(x1y2 / x1 == y2, \"overflow x1y2 detected\");\n\n    x2 = x2 / mulPrecision();\n    y2 = y2 / mulPrecision();\n    uint256 x2y2 = x2 * y2;\n    if (x2 != 0) require(x2y2 / x2 == y2, \"overflow x2y2 detected\");\n\n    // result = fixed1() * x1 * y1 + x1 * y2 + x2 * y1 + x2 * y2 / fixed1();\n    Fraction memory result = Fraction(x1y1);\n    result = add(result, Fraction(x2y1)); // Add checks for overflow\n    result = add(result, Fraction(x1y2)); // Add checks for overflow\n    result = add(result, Fraction(x2y2)); // Add checks for overflow\n    return result;\n  }\n\n  /**\n   * @notice 1/x\n   * @dev\n   * Test reciprocal(0) fails\n   * Test reciprocal(fixed1()) returns fixed1()\n   * Test reciprocal(fixed1()*fixed1()) returns 1 // Testing how the fractional is truncated\n   * Test reciprocal(1+fixed1()*fixed1()) returns 0 // Testing how the fractional is truncated\n   * Test reciprocal(newFixedFraction(1, 1e24)) returns newFixed(1e24)\n   */\n  function reciprocal(Fraction memory x) internal pure returns (Fraction memory) {\n    require(x.value != 0, \"can't call reciprocal(0)\");\n    return Fraction((FIXED1_UINT * FIXED1_UINT) / x.value); // Can't overflow\n  }\n\n  /**\n   * @notice x/y. If the dividend is higher than the max dividend value, it\n   * might overflow. You can use multiply(x,reciprocal(y)) instead.\n   * @dev The maximum value that can be safely used as a dividend (maxNewFixed) is defined as\n   * divide(maxNewFixed,newFixedFraction(1,fixed1())) is around maxUint256().\n   * This yields the value 115792089237316195423570985008687907853269984665640564.\n   * Test maxNewFixed equals maxUint256()/fixed1()\n   * Test divide(maxNewFixed,1) equals maxNewFixed*(fixed1)\n   * Test divide(maxNewFixed+1,multiply(mulPrecision(),mulPrecision())) throws\n   * Test divide(fixed1(),0) fails\n   * Test divide(maxNewFixed,1) = maxNewFixed*(10^digits())\n   * Test divide(maxNewFixed+1,1) throws\n   */\n  function divide(Fraction memory x, Fraction memory y) internal pure returns (Fraction memory) {\n    require(y.value != 0, \"can't divide by 0\");\n    uint256 X = x.value * FIXED1_UINT;\n    require(X / FIXED1_UINT == x.value, \"overflow at divide\");\n    return Fraction(X / y.value);\n  }\n\n  /**\n   * @notice x > y\n   */\n  function gt(Fraction memory x, Fraction memory y) internal pure returns (bool) {\n    return x.value > y.value;\n  }\n\n  /**\n   * @notice x >= y\n   */\n  function gte(Fraction memory x, Fraction memory y) internal pure returns (bool) {\n    return x.value >= y.value;\n  }\n\n  /**\n   * @notice x < y\n   */\n  function lt(Fraction memory x, Fraction memory y) internal pure returns (bool) {\n    return x.value < y.value;\n  }\n\n  /**\n   * @notice x <= y\n   */\n  function lte(Fraction memory x, Fraction memory y) internal pure returns (bool) {\n    return x.value <= y.value;\n  }\n\n  /**\n   * @notice x == y\n   */\n  function equals(Fraction memory x, Fraction memory y) internal pure returns (bool) {\n    return x.value == y.value;\n  }\n\n  /**\n   * @notice x <= 1\n   */\n  function isProperFraction(Fraction memory x) internal pure returns (bool) {\n    return lte(x, fixed1());\n  }\n}\n"},{"file_path":"project:/contracts/common/Initializable.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.5.13 <0.9.0;\n\n/**\n * @title Used with proxied contracts that have an `initialize` function.\n * @notice Ensures the `initialize` function:\n *         - gets called only once\n *         - cannot be called on the logic contract.\n */\ncontract Initializable {\n  bool public initialized;\n\n  /**\n   * @notice Ensures the initializer function cannot be called more than once.\n   */\n  modifier initializer() {\n    require(!initialized, \"contract already initialized\");\n    initialized = true;\n    _;\n  }\n\n  /**\n   * @notice By default, ensures that the `initialize` function cannot be called\n   * on the logic contract.\n   * @param testingDeployment When set to true, allows the `initialize` function\n   * to be called, which is useful in testing when not setting up with a Proxy.\n   */\n  constructor(bool testingDeployment) public {\n    if (!testingDeployment) {\n      initialized = true;\n    }\n  }\n}\n"},{"file_path":"project:/contracts/common/interfaces/ICeloVersionedContract.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.5.13 <0.9.0;\n\ninterface ICeloVersionedContract {\n  /**\n   * @notice Returns the storage, major, minor, and patch version of the contract.\n   * @return Storage version of the contract.\n   * @return Major version of the contract.\n   * @return Minor version of the contract.\n   * @return Patch version of the contract.\n   */\n  function getVersionNumber() external pure returns (uint256, uint256, uint256, uint256);\n}\n"},{"file_path":"openzeppelin-solidity/contracts/GSN/Context.sol","source_code":"pragma solidity ^0.5.0;\n\n/*\n * @dev Provides information about the current execution context, including the\n * sender of the transaction and its data. While these are generally available\n * via msg.sender and msg.data, they should not be accessed in such a direct\n * manner, since when dealing with GSN meta-transactions the account sending and\n * paying for execution may not be the actual sender (as far as an application\n * is concerned).\n *\n * This contract is only required for intermediate, library-like contracts.\n */\ncontract Context {\n    // Empty internal constructor, to prevent people from mistakenly deploying\n    // an instance of this contract, which should be used via inheritance.\n    constructor () internal { }\n    // solhint-disable-previous-line no-empty-blocks\n\n    function _msgSender() internal view returns (address payable) {\n        return msg.sender;\n    }\n\n    function _msgData() internal view returns (bytes memory) {\n        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691\n        return msg.data;\n    }\n}\n"},{"file_path":"openzeppelin-solidity/contracts/math/SafeMath.sol","source_code":"pragma solidity ^0.5.0;\n\n/**\n * @dev Wrappers over Solidity's arithmetic operations with added overflow\n * checks.\n *\n * Arithmetic operations in Solidity wrap on overflow. This can easily result\n * in bugs, because programmers usually assume that an overflow raises an\n * error, which is the standard behavior in high level programming languages.\n * `SafeMath` restores this intuition by reverting the transaction when an\n * operation overflows.\n *\n * Using this library instead of the unchecked operations eliminates an entire\n * class of bugs, so it's recommended to use it always.\n */\nlibrary SafeMath {\n    /**\n     * @dev Returns the addition of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `+` operator.\n     *\n     * Requirements:\n     * - Addition cannot overflow.\n     */\n    function add(uint256 a, uint256 b) internal pure returns (uint256) {\n        uint256 c = a + b;\n        require(c >= a, \"SafeMath: addition overflow\");\n\n        return c;\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting on\n     * overflow (when the result is negative).\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     * - Subtraction cannot overflow.\n     */\n    function sub(uint256 a, uint256 b) internal pure returns (uint256) {\n        return sub(a, b, \"SafeMath: subtraction overflow\");\n    }\n\n    /**\n     * @dev Returns the subtraction of two unsigned integers, reverting with custom message on\n     * overflow (when the result is negative).\n     *\n     * Counterpart to Solidity's `-` operator.\n     *\n     * Requirements:\n     * - Subtraction cannot overflow.\n     *\n     * _Available since v2.4.0._\n     */\n    function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n        require(b <= a, errorMessage);\n        uint256 c = a - b;\n\n        return c;\n    }\n\n    /**\n     * @dev Returns the multiplication of two unsigned integers, reverting on\n     * overflow.\n     *\n     * Counterpart to Solidity's `*` operator.\n     *\n     * Requirements:\n     * - Multiplication cannot overflow.\n     */\n    function mul(uint256 a, uint256 b) internal pure returns (uint256) {\n        // Gas optimization: this is cheaper than requiring 'a' not being zero, but the\n        // benefit is lost if 'b' is also tested.\n        // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522\n        if (a == 0) {\n            return 0;\n        }\n\n        uint256 c = a * b;\n        require(c / a == b, \"SafeMath: multiplication overflow\");\n\n        return c;\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers. Reverts on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\n     * uses an invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     * - The divisor cannot be zero.\n     */\n    function div(uint256 a, uint256 b) internal pure returns (uint256) {\n        return div(a, b, \"SafeMath: division by zero\");\n    }\n\n    /**\n     * @dev Returns the integer division of two unsigned integers. Reverts with custom message on\n     * division by zero. The result is rounded towards zero.\n     *\n     * Counterpart to Solidity's `/` operator. Note: this function uses a\n     * `revert` opcode (which leaves remaining gas untouched) while Solidity\n     * uses an invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     * - The divisor cannot be zero.\n     *\n     * _Available since v2.4.0._\n     */\n    function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n        // Solidity only automatically asserts when dividing by 0\n        require(b > 0, errorMessage);\n        uint256 c = a / b;\n        // assert(a == b * c + a % b); // There is no case in which this doesn't hold\n\n        return c;\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * Reverts when dividing by zero.\n     *\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     * - The divisor cannot be zero.\n     */\n    function mod(uint256 a, uint256 b) internal pure returns (uint256) {\n        return mod(a, b, \"SafeMath: modulo by zero\");\n    }\n\n    /**\n     * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),\n     * Reverts with custom message when dividing by zero.\n     *\n     * Counterpart to Solidity's `%` operator. This function uses a `revert`\n     * opcode (which leaves remaining gas untouched) while Solidity uses an\n     * invalid opcode to revert (consuming all remaining gas).\n     *\n     * Requirements:\n     * - The divisor cannot be zero.\n     *\n     * _Available since v2.4.0._\n     */\n    function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {\n        require(b != 0, errorMessage);\n        return a % b;\n    }\n}\n"},{"file_path":"openzeppelin-solidity/contracts/ownership/Ownable.sol","source_code":"pragma solidity ^0.5.0;\n\nimport \"../GSN/Context.sol\";\n/**\n * @dev Contract module which provides a basic access control mechanism, where\n * there is an account (an owner) that can be granted exclusive access to\n * specific functions.\n *\n * This module is used through inheritance. It will make available the modifier\n * `onlyOwner`, which can be applied to your functions to restrict their use to\n * the owner.\n */\ncontract Ownable is Context {\n    address private _owner;\n\n    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);\n\n    /**\n     * @dev Initializes the contract setting the deployer as the initial owner.\n     */\n    constructor () internal {\n        address msgSender = _msgSender();\n        _owner = msgSender;\n        emit OwnershipTransferred(address(0), msgSender);\n    }\n\n    /**\n     * @dev Returns the address of the current owner.\n     */\n    function owner() public view returns (address) {\n        return _owner;\n    }\n\n    /**\n     * @dev Throws if called by any account other than the owner.\n     */\n    modifier onlyOwner() {\n        require(isOwner(), \"Ownable: caller is not the owner\");\n        _;\n    }\n\n    /**\n     * @dev Returns true if the caller is the current owner.\n     */\n    function isOwner() public view returns (bool) {\n        return _msgSender() == _owner;\n    }\n\n    /**\n     * @dev Leaves the contract without owner. It will not be possible to call\n     * `onlyOwner` functions anymore. Can only be called by the current owner.\n     *\n     * NOTE: Renouncing ownership will leave the contract without an owner,\n     * thereby removing any functionality that is only available to the owner.\n     */\n    function renounceOwnership() public onlyOwner {\n        emit OwnershipTransferred(_owner, address(0));\n        _owner = address(0);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     * Can only be called by the current owner.\n     */\n    function transferOwnership(address newOwner) public onlyOwner {\n        _transferOwnership(newOwner);\n    }\n\n    /**\n     * @dev Transfers ownership of the contract to a new account (`newOwner`).\n     */\n    function _transferOwnership(address newOwner) internal {\n        require(newOwner != address(0), \"Ownable: new owner is the zero address\");\n        emit OwnershipTransferred(_owner, newOwner);\n        _owner = newOwner;\n    }\n}\n"},{"file_path":"project:/contracts-0.8/common/interfaces/IOracle.sol","source_code":"// SPDX-License-Identifier: MIT\npragma solidity >=0.5.13 <0.9.0;\n\n/// Possibly not final version\ninterface IOracle {\n  function getExchangeRate(\n    address token\n  ) external view returns (uint256 numerator, uint256 denominator);\n}\n"},{"file_path":"project:/contracts/common/linkedlists/AddressSortedLinkedListWithMedian.sol","source_code":"pragma solidity ^0.5.13;\n\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\n\nimport \"./SortedLinkedListWithMedian.sol\";\n\n/**\n * @title Maintains a sorted list of unsigned ints keyed by address.\n */\nlibrary AddressSortedLinkedListWithMedian {\n  using SafeMath for uint256;\n  using SortedLinkedListWithMedian for SortedLinkedListWithMedian.List;\n\n  /**\n   * @notice Returns the key of the first element in the list.\n   * @param list A storage pointer to the underlying list.\n   * @return The key of the first element in the list.\n   */\n  function getHead(SortedLinkedListWithMedian.List storage list) external view returns (address) {\n    return toAddress(list.getHead());\n  }\n\n  /**\n   * @notice Returns the key of the median element in the list.\n   * @param list A storage pointer to the underlying list.\n   * @return The key of the median element in the list.\n   */\n  function getMedian(SortedLinkedListWithMedian.List storage list) external view returns (address) {\n    return toAddress(list.getMedian());\n  }\n\n  /**\n   * @notice Returns the key of the last element in the list.\n   * @param list A storage pointer to the underlying list.\n   * @return The key of the last element in the list.\n   */\n  function getTail(SortedLinkedListWithMedian.List storage list) external view returns (address) {\n    return toAddress(list.getTail());\n  }\n\n  /**\n   * @notice Returns the number of elements in the list.\n   * @param list A storage pointer to the underlying list.\n   * @return The number of elements in the list.\n   */\n  function getNumElements(\n    SortedLinkedListWithMedian.List storage list\n  ) external view returns (uint256) {\n    return list.getNumElements();\n  }\n\n  /**\n   * @notice Inserts an element into a doubly linked list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The key of the element to insert.\n   * @param value The element value.\n   * @param lesserKey The key of the element less than the element to insert.\n   * @param greaterKey The key of the element greater than the element to insert.\n   */\n  function insert(\n    SortedLinkedListWithMedian.List storage list,\n    address key,\n    uint256 value,\n    address lesserKey,\n    address greaterKey\n  ) public {\n    list.insert(toBytes(key), value, toBytes(lesserKey), toBytes(greaterKey));\n  }\n\n  /**\n   * @notice Removes an element from the doubly linked list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The key of the element to remove.\n   */\n  function remove(SortedLinkedListWithMedian.List storage list, address key) public {\n    list.remove(toBytes(key));\n  }\n\n  /**\n   * @notice Updates an element in the list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The element key.\n   * @param value The element value.\n   * @param lesserKey The key of the element will be just left of `key` after the update.\n   * @param greaterKey The key of the element will be just right of `key` after the update.\n   * @dev Note that only one of \"lesserKey\" or \"greaterKey\" needs to be correct to reduce friction.\n   */\n  function update(\n    SortedLinkedListWithMedian.List storage list,\n    address key,\n    uint256 value,\n    address lesserKey,\n    address greaterKey\n  ) public {\n    list.update(toBytes(key), value, toBytes(lesserKey), toBytes(greaterKey));\n  }\n\n  /**\n   * @notice Returns whether or not a particular key is present in the sorted list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The element key.\n   * @return Whether or not the key is in the sorted list.\n   */\n  function contains(\n    SortedLinkedListWithMedian.List storage list,\n    address key\n  ) public view returns (bool) {\n    return list.contains(toBytes(key));\n  }\n\n  /**\n   * @notice Returns the value for a particular key in the sorted list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The element key.\n   * @return The element value.\n   */\n  function getValue(\n    SortedLinkedListWithMedian.List storage list,\n    address key\n  ) public view returns (uint256) {\n    return list.getValue(toBytes(key));\n  }\n\n  /**\n   * @notice Returns the median value of the sorted list.\n   * @param list A storage pointer to the underlying list.\n   * @return The median value.\n   */\n  function getMedianValue(\n    SortedLinkedListWithMedian.List storage list\n  ) public view returns (uint256) {\n    return list.getValue(list.median);\n  }\n\n  /**\n   * @notice Gets all elements from the doubly linked list.\n   * @param list A storage pointer to the underlying list.\n   * @return Array of all keys in the list.\n   * @return Values corresponding to keys, which will be ordered largest to smallest.\n   * @return Array of relations to median of corresponding list elements.\n   */\n  function getElements(\n    SortedLinkedListWithMedian.List storage list\n  )\n    public\n    view\n    returns (address[] memory, uint256[] memory, SortedLinkedListWithMedian.MedianRelation[] memory)\n  {\n    bytes32[] memory byteKeys = list.getKeys();\n    address[] memory keys = new address[](byteKeys.length);\n    uint256[] memory values = new uint256[](byteKeys.length);\n    // prettier-ignore\n    SortedLinkedListWithMedian.MedianRelation[] memory relations =\n      new SortedLinkedListWithMedian.MedianRelation[](keys.length);\n    for (uint256 i = 0; i < byteKeys.length; i = i.add(1)) {\n      keys[i] = toAddress(byteKeys[i]);\n      values[i] = list.getValue(byteKeys[i]);\n      relations[i] = list.relation[byteKeys[i]];\n    }\n    return (keys, values, relations);\n  }\n\n  function toBytes(address a) public pure returns (bytes32) {\n    return bytes32(uint256(a) << 96);\n  }\n\n  function toAddress(bytes32 b) public pure returns (address) {\n    return address(uint256(b) >> 96);\n  }\n}\n"},{"file_path":"project:/contracts/common/linkedlists/LinkedList.sol","source_code":"pragma solidity ^0.5.13;\n\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\n\n/**\n * @title Maintains a doubly linked list keyed by bytes32.\n * @dev Following the `next` pointers will lead you to the head, rather than the tail.\n */\nlibrary LinkedList {\n  using SafeMath for uint256;\n\n  struct Element {\n    bytes32 previousKey;\n    bytes32 nextKey;\n    bool exists;\n  }\n\n  struct List {\n    bytes32 head;\n    bytes32 tail;\n    uint256 numElements;\n    mapping(bytes32 => Element) elements;\n  }\n\n  /**\n   * @notice Inserts an element into a doubly linked list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The key of the element to insert.\n   * @param previousKey The key of the element that comes before the element to insert.\n   * @param nextKey The key of the element that comes after the element to insert.\n   */\n  function insert(List storage list, bytes32 key, bytes32 previousKey, bytes32 nextKey) internal {\n    require(key != bytes32(0), \"Key must be defined\");\n    require(!contains(list, key), \"Can't insert an existing element\");\n    require(\n      previousKey != key && nextKey != key,\n      \"Key cannot be the same as previousKey or nextKey\"\n    );\n\n    Element storage element = list.elements[key];\n    element.exists = true;\n\n    if (list.numElements == 0) {\n      list.tail = key;\n      list.head = key;\n    } else {\n      require(\n        previousKey != bytes32(0) || nextKey != bytes32(0),\n        \"Either previousKey or nextKey must be defined\"\n      );\n\n      element.previousKey = previousKey;\n      element.nextKey = nextKey;\n\n      if (previousKey != bytes32(0)) {\n        require(\n          contains(list, previousKey),\n          \"If previousKey is defined, it must exist in the list\"\n        );\n        Element storage previousElement = list.elements[previousKey];\n        require(previousElement.nextKey == nextKey, \"previousKey must be adjacent to nextKey\");\n        previousElement.nextKey = key;\n      } else {\n        list.tail = key;\n      }\n\n      if (nextKey != bytes32(0)) {\n        require(contains(list, nextKey), \"If nextKey is defined, it must exist in the list\");\n        Element storage nextElement = list.elements[nextKey];\n        require(nextElement.previousKey == previousKey, \"previousKey must be adjacent to nextKey\");\n        nextElement.previousKey = key;\n      } else {\n        list.head = key;\n      }\n    }\n\n    list.numElements = list.numElements.add(1);\n  }\n\n  /**\n   * @notice Inserts an element at the tail of the doubly linked list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The key of the element to insert.\n   */\n  function push(List storage list, bytes32 key) internal {\n    insert(list, key, bytes32(0), list.tail);\n  }\n\n  /**\n   * @notice Removes an element from the doubly linked list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The key of the element to remove.\n   */\n  function remove(List storage list, bytes32 key) internal {\n    Element storage element = list.elements[key];\n    require(key != bytes32(0) && contains(list, key), \"key not in list\");\n    if (element.previousKey != bytes32(0)) {\n      Element storage previousElement = list.elements[element.previousKey];\n      previousElement.nextKey = element.nextKey;\n    } else {\n      list.tail = element.nextKey;\n    }\n\n    if (element.nextKey != bytes32(0)) {\n      Element storage nextElement = list.elements[element.nextKey];\n      nextElement.previousKey = element.previousKey;\n    } else {\n      list.head = element.previousKey;\n    }\n\n    delete list.elements[key];\n    list.numElements = list.numElements.sub(1);\n  }\n\n  /**\n   * @notice Updates an element in the list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The element key.\n   * @param previousKey The key of the element that comes before the updated element.\n   * @param nextKey The key of the element that comes after the updated element.\n   */\n  function update(List storage list, bytes32 key, bytes32 previousKey, bytes32 nextKey) internal {\n    require(\n      key != bytes32(0) && key != previousKey && key != nextKey && contains(list, key),\n      \"key on in list\"\n    );\n    remove(list, key);\n    insert(list, key, previousKey, nextKey);\n  }\n\n  /**\n   * @notice Returns whether or not a particular key is present in the sorted list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The element key.\n   * @return Whether or not the key is in the sorted list.\n   */\n  function contains(List storage list, bytes32 key) internal view returns (bool) {\n    return list.elements[key].exists;\n  }\n\n  /**\n   * @notice Returns the keys of the N elements at the head of the list.\n   * @param list A storage pointer to the underlying list.\n   * @param n The number of elements to return.\n   * @return The keys of the N elements at the head of the list.\n   * @dev Reverts if n is greater than the number of elements in the list.\n   */\n  function headN(List storage list, uint256 n) internal view returns (bytes32[] memory) {\n    require(n <= list.numElements, \"not enough elements\");\n    bytes32[] memory keys = new bytes32[](n);\n    bytes32 key = list.head;\n    for (uint256 i = 0; i < n; i = i.add(1)) {\n      keys[i] = key;\n      key = list.elements[key].previousKey;\n    }\n    return keys;\n  }\n\n  /**\n   * @notice Gets all element keys from the doubly linked list.\n   * @param list A storage pointer to the underlying list.\n   * @return All element keys from head to tail.\n   */\n  function getKeys(List storage list) internal view returns (bytes32[] memory) {\n    return headN(list, list.numElements);\n  }\n}\n"},{"file_path":"project:/contracts/common/linkedlists/SortedLinkedList.sol","source_code":"pragma solidity ^0.5.13;\n\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"./LinkedList.sol\";\n\n/**\n * @title Maintains a sorted list of unsigned ints keyed by bytes32.\n */\nlibrary SortedLinkedList {\n  using SafeMath for uint256;\n  using LinkedList for LinkedList.List;\n\n  struct List {\n    LinkedList.List list;\n    mapping(bytes32 => uint256) values;\n  }\n\n  /**\n   * @notice Inserts an element into a doubly linked list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The key of the element to insert.\n   * @param value The element value.\n   * @param lesserKey The key of the element less than the element to insert.\n   * @param greaterKey The key of the element greater than the element to insert.\n   */\n  function insert(\n    List storage list,\n    bytes32 key,\n    uint256 value,\n    bytes32 lesserKey,\n    bytes32 greaterKey\n  ) internal {\n    require(\n      key != bytes32(0) && key != lesserKey && key != greaterKey && !contains(list, key),\n      \"invalid key\"\n    );\n    require(\n      (lesserKey != bytes32(0) || greaterKey != bytes32(0)) || list.list.numElements == 0,\n      \"greater and lesser key zero\"\n    );\n    require(contains(list, lesserKey) || lesserKey == bytes32(0), \"invalid lesser key\");\n    require(contains(list, greaterKey) || greaterKey == bytes32(0), \"invalid greater key\");\n    (lesserKey, greaterKey) = getLesserAndGreater(list, value, lesserKey, greaterKey);\n    list.list.insert(key, lesserKey, greaterKey);\n    list.values[key] = value;\n  }\n\n  /**\n   * @notice Removes an element from the doubly linked list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The key of the element to remove.\n   */\n  function remove(List storage list, bytes32 key) internal {\n    list.list.remove(key);\n    list.values[key] = 0;\n  }\n\n  /**\n   * @notice Updates an element in the list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The element key.\n   * @param value The element value.\n   * @param lesserKey The key of the element will be just left of `key` after the update.\n   * @param greaterKey The key of the element will be just right of `key` after the update.\n   * @dev Note that only one of \"lesserKey\" or \"greaterKey\" needs to be correct to reduce friction.\n   */\n  function update(\n    List storage list,\n    bytes32 key,\n    uint256 value,\n    bytes32 lesserKey,\n    bytes32 greaterKey\n  ) internal {\n    require(contains(list, key), \"key not in list\");\n    require(key != bytes32(0) && key != lesserKey && key != greaterKey, \"invalid key\");\n    require(\n      (lesserKey != bytes32(0) || greaterKey != bytes32(0)) || list.list.numElements == 1,\n      \"greater and lesser key zero\"\n    );\n\n    bytes32 oldLesserKey = list.list.elements[key].previousKey;\n    bytes32 oldGreaterKey = list.list.elements[key].nextKey;\n\n    if (isValueBetween(list, value, oldLesserKey, oldGreaterKey)) {\n      list.values[key] = value;\n    } else {\n      remove(list, key);\n      insert(list, key, value, lesserKey, greaterKey);\n    }\n  }\n\n  /**\n   * @notice Inserts an element at the tail of the doubly linked list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The key of the element to insert.\n   */\n  function push(List storage list, bytes32 key) internal {\n    insert(list, key, 0, bytes32(0), list.list.tail);\n  }\n\n  /**\n   * @notice Removes N elements from the head of the list and returns their keys.\n   * @param list A storage pointer to the underlying list.\n   * @param n The number of elements to pop.\n   * @return The keys of the popped elements.\n   */\n  function popN(List storage list, uint256 n) internal returns (bytes32[] memory) {\n    require(n <= list.list.numElements, \"not enough elements\");\n    bytes32[] memory keys = new bytes32[](n);\n    for (uint256 i = 0; i < n; i = i.add(1)) {\n      bytes32 key = list.list.head;\n      keys[i] = key;\n      remove(list, key);\n    }\n    return keys;\n  }\n\n  /**\n   * @notice Returns whether or not a particular key is present in the sorted list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The element key.\n   * @return Whether or not the key is in the sorted list.\n   */\n  function contains(List storage list, bytes32 key) internal view returns (bool) {\n    return list.list.contains(key);\n  }\n\n  /**\n   * @notice Returns the value for a particular key in the sorted list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The element key.\n   * @return The element value.\n   */\n  function getValue(List storage list, bytes32 key) internal view returns (uint256) {\n    return list.values[key];\n  }\n\n  /**\n   * @notice Gets all elements from the doubly linked list.\n   * @param list A storage pointer to the underlying list.\n   * @return Array of all keys in the list.\n   * @return Values corresponding to keys, which will be ordered largest to smallest.\n   */\n  function getElements(\n    List storage list\n  ) internal view returns (bytes32[] memory, uint256[] memory) {\n    bytes32[] memory keys = getKeys(list);\n    uint256[] memory values = new uint256[](keys.length);\n    for (uint256 i = 0; i < keys.length; i = i.add(1)) {\n      values[i] = list.values[keys[i]];\n    }\n    return (keys, values);\n  }\n\n  /**\n   * @notice Gets all element keys from the doubly linked list.\n   * @param list A storage pointer to the underlying list.\n   * @return All element keys from head to tail.\n   */\n  function getKeys(List storage list) internal view returns (bytes32[] memory) {\n    return list.list.getKeys();\n  }\n\n  /**\n   * @notice Returns first N greatest elements of the list.\n   * @param list A storage pointer to the underlying list.\n   * @param n The number of elements to return.\n   * @return The keys of the first n elements.\n   * @dev Reverts if n is greater than the number of elements in the list.\n   */\n  function headN(List storage list, uint256 n) internal view returns (bytes32[] memory) {\n    return list.list.headN(n);\n  }\n\n  /**\n   * @notice Returns the keys of the elements greaterKey than and less than the provided value.\n   * @param list A storage pointer to the underlying list.\n   * @param value The element value.\n   * @param lesserKey The key of the element which could be just left of the new value.\n   * @param greaterKey The key of the element which could be just right of the new value.\n   * @return The correct lesserKey keys.\n   * @return The correct greaterKey keys.\n   */\n  function getLesserAndGreater(\n    List storage list,\n    uint256 value,\n    bytes32 lesserKey,\n    bytes32 greaterKey\n  ) private view returns (bytes32, bytes32) {\n    // Check for one of the following conditions and fail if none are met:\n    //   1. The value is less than the current lowest value\n    //   2. The value is greater than the current greatest value\n    //   3. The value is just greater than the value for `lesserKey`\n    //   4. The value is just less than the value for `greaterKey`\n    if (lesserKey == bytes32(0) && isValueBetween(list, value, lesserKey, list.list.tail)) {\n      return (lesserKey, list.list.tail);\n    } else if (\n      greaterKey == bytes32(0) && isValueBetween(list, value, list.list.head, greaterKey)\n    ) {\n      return (list.list.head, greaterKey);\n    } else if (\n      lesserKey != bytes32(0) &&\n      isValueBetween(list, value, lesserKey, list.list.elements[lesserKey].nextKey)\n    ) {\n      return (lesserKey, list.list.elements[lesserKey].nextKey);\n    } else if (\n      greaterKey != bytes32(0) &&\n      isValueBetween(list, value, list.list.elements[greaterKey].previousKey, greaterKey)\n    ) {\n      return (list.list.elements[greaterKey].previousKey, greaterKey);\n    } else {\n      require(false, \"get lesser and greater failure\");\n    }\n  }\n\n  /**\n   * @notice Returns whether or not a given element is between two other elements.\n   * @param list A storage pointer to the underlying list.\n   * @param value The element value.\n   * @param lesserKey The key of the element whose value should be lesserKey.\n   * @param greaterKey The key of the element whose value should be greaterKey.\n   * @return True if the given element is between the two other elements.\n   */\n  function isValueBetween(\n    List storage list,\n    uint256 value,\n    bytes32 lesserKey,\n    bytes32 greaterKey\n  ) private view returns (bool) {\n    bool isLesser = lesserKey == bytes32(0) || list.values[lesserKey] <= value;\n    bool isGreater = greaterKey == bytes32(0) || list.values[greaterKey] >= value;\n    return isLesser && isGreater;\n  }\n}\n"},{"file_path":"project:/contracts/common/linkedlists/SortedLinkedListWithMedian.sol","source_code":"pragma solidity ^0.5.13;\n\nimport \"openzeppelin-solidity/contracts/math/SafeMath.sol\";\nimport \"./LinkedList.sol\";\nimport \"./SortedLinkedList.sol\";\n\n/**\n * @title Maintains a sorted list of unsigned ints keyed by bytes32.\n */\nlibrary SortedLinkedListWithMedian {\n  using SafeMath for uint256;\n  using SortedLinkedList for SortedLinkedList.List;\n\n  enum MedianAction {\n    None,\n    Lesser,\n    Greater\n  }\n\n  enum MedianRelation {\n    Undefined,\n    Lesser,\n    Greater,\n    Equal\n  }\n\n  struct List {\n    SortedLinkedList.List list;\n    bytes32 median;\n    mapping(bytes32 => MedianRelation) relation;\n  }\n\n  /**\n   * @notice Inserts an element into a doubly linked list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The key of the element to insert.\n   * @param value The element value.\n   * @param lesserKey The key of the element less than the element to insert.\n   * @param greaterKey The key of the element greater than the element to insert.\n   */\n  function insert(\n    List storage list,\n    bytes32 key,\n    uint256 value,\n    bytes32 lesserKey,\n    bytes32 greaterKey\n  ) internal {\n    list.list.insert(key, value, lesserKey, greaterKey);\n    LinkedList.Element storage element = list.list.list.elements[key];\n\n    MedianAction action = MedianAction.None;\n    if (list.list.list.numElements == 1) {\n      list.median = key;\n      list.relation[key] = MedianRelation.Equal;\n    } else if (list.list.list.numElements % 2 == 1) {\n      // When we have an odd number of elements, and the element that we inserted is less than\n      // the previous median, we need to slide the median down one element, since we had previously\n      // selected the greater of the two middle elements.\n      if (\n        element.previousKey == bytes32(0) ||\n        list.relation[element.previousKey] == MedianRelation.Lesser\n      ) {\n        action = MedianAction.Lesser;\n        list.relation[key] = MedianRelation.Lesser;\n      } else {\n        list.relation[key] = MedianRelation.Greater;\n      }\n    } else {\n      // When we have an even number of elements, and the element that we inserted is greater than\n      // the previous median, we need to slide the median up one element, since we always select\n      // the greater of the two middle elements.\n      if (\n        element.nextKey == bytes32(0) || list.relation[element.nextKey] == MedianRelation.Greater\n      ) {\n        action = MedianAction.Greater;\n        list.relation[key] = MedianRelation.Greater;\n      } else {\n        list.relation[key] = MedianRelation.Lesser;\n      }\n    }\n    updateMedian(list, action);\n  }\n\n  /**\n   * @notice Removes an element from the doubly linked list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The key of the element to remove.\n   */\n  function remove(List storage list, bytes32 key) internal {\n    MedianAction action = MedianAction.None;\n    if (list.list.list.numElements == 0) {\n      list.median = bytes32(0);\n    } else if (list.list.list.numElements % 2 == 0) {\n      // When we have an even number of elements, we always choose the higher of the two medians.\n      // Thus, if the element we're removing is greaterKey than or equal to the median we need to\n      // slide the median left by one.\n      if (\n        list.relation[key] == MedianRelation.Greater || list.relation[key] == MedianRelation.Equal\n      ) {\n        action = MedianAction.Lesser;\n      }\n    } else {\n      // When we don't have an even number of elements, we just choose the median value.\n      // Thus, if the element we're removing is less than or equal to the median, we need to slide\n      // median right by one.\n      if (\n        list.relation[key] == MedianRelation.Lesser || list.relation[key] == MedianRelation.Equal\n      ) {\n        action = MedianAction.Greater;\n      }\n    }\n    updateMedian(list, action);\n\n    list.list.remove(key);\n  }\n\n  /**\n   * @notice Updates an element in the list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The element key.\n   * @param value The element value.\n   * @param lesserKey The key of the element will be just left of `key` after the update.\n   * @param greaterKey The key of the element will be just right of `key` after the update.\n   * @dev Note that only one of \"lesserKey\" or \"greaterKey\" needs to be correct to reduce friction.\n   */\n  function update(\n    List storage list,\n    bytes32 key,\n    uint256 value,\n    bytes32 lesserKey,\n    bytes32 greaterKey\n  ) internal {\n    remove(list, key);\n    insert(list, key, value, lesserKey, greaterKey);\n  }\n\n  /**\n   * @notice Inserts an element at the tail of the doubly linked list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The key of the element to insert.\n   */\n  function push(List storage list, bytes32 key) internal {\n    insert(list, key, 0, bytes32(0), list.list.list.tail);\n  }\n\n  /**\n   * @notice Removes N elements from the head of the list and returns their keys.\n   * @param list A storage pointer to the underlying list.\n   * @param n The number of elements to pop.\n   * @return The keys of the popped elements.\n   */\n  function popN(List storage list, uint256 n) internal returns (bytes32[] memory) {\n    require(n <= list.list.list.numElements, \"not enough elements\");\n    bytes32[] memory keys = new bytes32[](n);\n    for (uint256 i = 0; i < n; i = i.add(1)) {\n      bytes32 key = list.list.list.head;\n      keys[i] = key;\n      remove(list, key);\n    }\n    return keys;\n  }\n\n  /**\n   * @notice Returns whether or not a particular key is present in the sorted list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The element key.\n   * @return Whether or not the key is in the sorted list.\n   */\n  function contains(List storage list, bytes32 key) internal view returns (bool) {\n    return list.list.contains(key);\n  }\n\n  /**\n   * @notice Returns the value for a particular key in the sorted list.\n   * @param list A storage pointer to the underlying list.\n   * @param key The element key.\n   * @return The element value.\n   */\n  function getValue(List storage list, bytes32 key) internal view returns (uint256) {\n    return list.list.values[key];\n  }\n\n  /**\n   * @notice Returns the median value of the sorted list.\n   * @param list A storage pointer to the underlying list.\n   * @return The median value.\n   */\n  function getMedianValue(List storage list) internal view returns (uint256) {\n    return getValue(list, list.median);\n  }\n\n  /**\n   * @notice Returns the key of the first element in the list.\n   * @param list A storage pointer to the underlying list.\n   * @return The key of the first element in the list.\n   */\n  function getHead(List storage list) internal view returns (bytes32) {\n    return list.list.list.head;\n  }\n\n  /**\n   * @notice Returns the key of the median element in the list.\n   * @param list A storage pointer to the underlying list.\n   * @return The key of the median element in the list.\n   */\n  function getMedian(List storage list) internal view returns (bytes32) {\n    return list.median;\n  }\n\n  /**\n   * @notice Returns the key of the last element in the list.\n   * @param list A storage pointer to the underlying list.\n   * @return The key of the last element in the list.\n   */\n  function getTail(List storage list) internal view returns (bytes32) {\n    return list.list.list.tail;\n  }\n\n  /**\n   * @notice Returns the number of elements in the list.\n   * @param list A storage pointer to the underlying list.\n   * @return The number of elements in the list.\n   */\n  function getNumElements(List storage list) internal view returns (uint256) {\n    return list.list.list.numElements;\n  }\n\n  /**\n   * @notice Gets all elements from the doubly linked list.\n   * @param list A storage pointer to the underlying list.\n   * @return Array of all keys in the list.\n   * @return Values corresponding to keys, which will be ordered largest to smallest.\n   * @return Array of relations to median of corresponding list elements.\n   */\n  function getElements(\n    List storage list\n  ) internal view returns (bytes32[] memory, uint256[] memory, MedianRelation[] memory) {\n    bytes32[] memory keys = getKeys(list);\n    uint256[] memory values = new uint256[](keys.length);\n    MedianRelation[] memory relations = new MedianRelation[](keys.length);\n    for (uint256 i = 0; i < keys.length; i = i.add(1)) {\n      values[i] = list.list.values[keys[i]];\n      relations[i] = list.relation[keys[i]];\n    }\n    return (keys, values, relations);\n  }\n\n  /**\n   * @notice Gets all element keys from the doubly linked list.\n   * @param list A storage pointer to the underlying list.\n   * @return All element keys from head to tail.\n   */\n  function getKeys(List storage list) internal view returns (bytes32[] memory) {\n    return list.list.getKeys();\n  }\n\n  /**\n   * @notice Moves the median pointer right or left of its current value.\n   * @param list A storage pointer to the underlying list.\n   * @param action Which direction to move the median pointer.\n   */\n  function updateMedian(List storage list, MedianAction action) private {\n    LinkedList.Element storage previousMedian = list.list.list.elements[list.median];\n    if (action == MedianAction.Lesser) {\n      list.relation[list.median] = MedianRelation.Greater;\n      list.median = previousMedian.previousKey;\n    } else if (action == MedianAction.Greater) {\n      list.relation[list.median] = MedianRelation.Lesser;\n      list.median = previousMedian.nextKey;\n    }\n    list.relation[list.median] = MedianRelation.Equal;\n  }\n}\n"},{"file_path":"project:/contracts/stability/interfaces/IBreakerBox.sol","source_code":"// SPDX-License-Identifier: GPL-3.0-or-later\npragma solidity ^0.5.13;\n\n/**\n * @title Breaker Box Interface\n * @notice Defines the basic interface for the Breaker Box\n */\ninterface IBreakerBox {\n  /**\n   * @dev Used to keep track of the status of a breaker for a specific rate feed.\n   *\n   * - TradingMode: Represents the trading mode the breaker is in for a rate feed.\n   *                This uses a bitmask approach, meaning each bit represents a\n   *                different trading mode. The final trading mode of the rate feed\n   *                is obtained by applying a logical OR operation to the TradingMode\n   *                of all breakers associated with that rate feed. This allows multiple\n   *                breakers to contribute to the final trading mode simultaneously.\n   *                Possible values:\n   *                0: bidirectional trading.\n   *                1: inflow only.\n   *                2: outflow only.\n   *                3: trading halted.\n   *\n   * - LastUpdatedTime: Records the last time the breaker status was updated. This is\n   *                    used to manage cooldown periods before the breaker can be reset.\n   *\n   * - Enabled:     Indicates whether the breaker is enabled for the associated rate feed.\n   */\n  struct BreakerStatus {\n    uint8 tradingMode;\n    uint64 lastUpdatedTime;\n    bool enabled;\n  }\n\n  /**\n   * @notice Emitted when a new breaker is added to the breaker box.\n   * @param breaker The address of the breaker.\n   */\n  event BreakerAdded(address indexed breaker);\n\n  /**\n   * @notice Emitted when a breaker is removed from the breaker box.\n   * @param breaker The address of the breaker.\n   */\n  event BreakerRemoved(address indexed breaker);\n\n  /**\n   * @notice Emitted when a breaker is tripped by a rate feed.\n   * @param breaker The address of the breaker.\n   * @param rateFeedID The address of the rate feed.\n   */\n  event BreakerTripped(address indexed breaker, address indexed rateFeedID);\n\n  /**\n   * @notice Emitted when a new rate feed is added to the breaker box.\n   * @param rateFeedID The address of the rate feed.\n   */\n  event RateFeedAdded(address indexed rateFeedID);\n\n  /**\n   * @notice Emitted when dependencies for a rate feed are set.\n   * @param rateFeedID The address of the rate feed.\n   * @param dependencies The addresses of the dependendent rate feeds.\n   */\n  event RateFeedDependenciesSet(address indexed rateFeedID, address[] indexed dependencies);\n\n  /**\n   * @notice Emitted when a rate feed is removed from the breaker box.\n   * @param rateFeedID The address of the rate feed.\n   */\n  event RateFeedRemoved(address indexed rateFeedID);\n\n  /**\n   * @notice Emitted when the trading mode for a rate feed is updated\n   * @param rateFeedID The address of the rate feed.\n   * @param tradingMode The new trading mode.\n   */\n  event TradingModeUpdated(address indexed rateFeedID, uint256 tradingMode);\n\n  /**\n   * @notice Emitted after a reset attempt is successful.\n   * @param rateFeedID The address of the rate feed.\n   * @param breaker The address of the breaker.\n   */\n  event ResetSuccessful(address indexed rateFeedID, address indexed breaker);\n\n  /**\n   * @notice  Emitted after a reset attempt fails when the\n   *          rate feed fails the breakers reset criteria.\n   * @param rateFeedID The address of the rate feed.\n   * @param breaker The address of the breaker.\n   */\n  event ResetAttemptCriteriaFail(address indexed rateFeedID, address indexed breaker);\n\n  /**\n   * @notice Emitted after a reset attempt fails when cooldown time has not elapsed.\n   * @param rateFeedID The address of the rate feed.\n   * @param breaker The address of the breaker.\n   */\n  event ResetAttemptNotCool(address indexed rateFeedID, address indexed breaker);\n\n  /**\n   * @notice Emitted when the sortedOracles address is updated.\n   * @param newSortedOracles The address of the new sortedOracles.\n   */\n  event SortedOraclesUpdated(address indexed newSortedOracles);\n\n  /**\n   * @notice Emitted when the breaker is enabled or disabled for a rate feed.\n   * @param breaker The address of the breaker.\n   * @param rateFeedID The address of the rate feed.\n   * @param status Indicating the status.\n   */\n  event BreakerStatusUpdated(address breaker, address rateFeedID, bool status);\n\n  /**\n   * @notice Checks breakers for the rateFeedID and sets correct trading mode\n   * if any breakers are tripped or need to be reset.\n   * @param rateFeedID The address of the rate feed to run checks for.\n   */\n  function checkAndSetBreakers(address rateFeedID) external;\n\n  /**\n   * @notice Retrives an array of all breaker addresses.\n   */\n  function getBreakers() external view returns (address[] memory);\n\n  /**\n   * @notice Checks if a breaker with the specified address has been added to the breaker box.\n   * @param breaker The address of the breaker to check;\n   * @return A bool indicating whether or not the breaker has been added.\n   */\n  function isBreaker(address breaker) external view returns (bool);\n\n  /**\n   * @notice Gets the trading mode for the specified rateFeedID.\n   * @param rateFeedID The address of the rate feed to retrieve the trading mode for.\n   */\n  function getRateFeedTradingMode(address rateFeedID) external view returns (uint8 tradingMode);\n}\n"},{"file_path":"project:/contracts/stability/interfaces/ISortedOracles.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.5.13 <0.9.0;\n\ninterface ISortedOracles {\n  function addOracle(address, address) external;\n  function removeOracle(address, address, uint256) external;\n  function report(address, uint256, address, address) external;\n  function removeExpiredReports(address, uint256) external;\n  function isOldestReportExpired(address token) external view returns (bool, address);\n  function numRates(address) external view returns (uint256);\n  function medianRate(address) external view returns (uint256, uint256);\n  function numTimestamps(address) external view returns (uint256);\n  function medianTimestamp(address) external view returns (uint256);\n}\n"},{"file_path":"project:/contracts/stability/interfaces/ISortedOraclesInitializer.sol","source_code":"// SPDX-License-Identifier: LGPL-3.0-only\npragma solidity >=0.5.13 <0.9.0;\n\ninterface ISortedOraclesInitializer {\n  function initialize(uint256) external;\n}\n"}],"certified":false,"conflicting_implementations":null,"abi":[{"inputs":[{"internalType":"bool","name":"test","type":"bool"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newBreakerBox","type":"address"}],"name":"BreakerBoxUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"equivalentToken","type":"address"}],"name":"EquivalentTokenSet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"MedianUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"oracleAddress","type":"address"}],"name":"OracleAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"oracleAddress","type":"address"}],"name":"OracleRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"oracle","type":"address"}],"name":"OracleReportRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":true,"internalType":"address","name":"oracle","type":"address"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"OracleReported","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"reportExpiry","type":"uint256"}],"name":"ReportExpirySet","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"reportExpiry","type":"uint256"}],"name":"TokenReportExpirySet","type":"event"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"oracleAddress","type":"address"}],"name":"addOracle","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"breakerBox","outputs":[{"internalType":"contract IBreakerBox","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"deleteEquivalentToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"equivalentTokens","outputs":[{"internalType":"address","name":"token","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getEquivalentToken","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getExchangeRate","outputs":[{"internalType":"uint256","name":"numerator","type":"uint256"},{"internalType":"uint256","name":"denominator","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getOracles","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getRates","outputs":[{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"enum SortedLinkedListWithMedian.MedianRelation[]","name":"","type":"uint8[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getTimestamps","outputs":[{"internalType":"address[]","name":"","type":"address[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"enum SortedLinkedListWithMedian.MedianRelation[]","name":"","type":"uint8[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"getTokenReportExpirySeconds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"getVersionNumber","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_reportExpirySeconds","type":"uint256"}],"name":"initialize","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"initialized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"isOldestReportExpired","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isOracle","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isOwner","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"medianRate","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"medianRateWithoutEquivalentMapping","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"medianTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"numRates","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"numTimestamps","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"oracles","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"n","type":"uint256"}],"name":"removeExpiredReports","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"oracleAddress","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"removeOracle","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"address","name":"lesserKey","type":"address"},{"internalType":"address","name":"greaterKey","type":"address"}],"name":"report","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"reportExpirySeconds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"contract IBreakerBox","name":"newBreakerBox","type":"address"}],"name":"setBreakerBox","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"address","name":"equivalentToken","type":"address"}],"name":"setEquivalentToken","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_reportExpirySeconds","type":"uint256"}],"name":"setReportExpiry","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_reportExpirySeconds","type":"uint256"}],"name":"setTokenReportExpiry","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenReportExpirySeconds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"}],"is_changed_bytecode":false,"is_partially_verified":false,"constructor_args":"0x0000000000000000000000000000000000000000000000000000000000000001"}