Overview
ETH Balance
0 ETH
ETH Value
$0.00Token Holdings
More Info
Private Name Tags
ContractCreator
Sponsored
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block | From | To | |||
---|---|---|---|---|---|---|
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH | ||||
107558382 | 409 days ago | 0 ETH |
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0xc98ef849...9BEb48FAf The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
ChainlinkPriceFeedV3
Compiler Version
v0.7.6+commit.7338295f
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.7.6; import { Address } from "@openzeppelin/contracts/utils/Address.sol"; import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol"; import { AggregatorV3Interface } from "@chainlink/contracts/src/v0.6/interfaces/AggregatorV3Interface.sol"; import { IChainlinkPriceFeed } from "./interface/IChainlinkPriceFeed.sol"; import { IPriceFeed } from "./interface/IPriceFeed.sol"; import { IChainlinkPriceFeedV3 } from "./interface/IChainlinkPriceFeedV3.sol"; import { IPriceFeedUpdate } from "./interface/IPriceFeedUpdate.sol"; import { BlockContext } from "./base/BlockContext.sol"; import { CachedTwap } from "./twap/CachedTwap.sol"; contract ChainlinkPriceFeedV3 is IPriceFeed, IChainlinkPriceFeedV3, IPriceFeedUpdate, BlockContext, CachedTwap { using SafeMath for uint256; using Address for address; // // STATE // uint8 internal immutable _decimals; uint256 internal immutable _timeout; uint256 internal _lastValidPrice; uint256 internal _lastValidTimestamp; AggregatorV3Interface internal immutable _aggregator; // // EXTERNAL NON-VIEW // constructor( AggregatorV3Interface aggregator, uint256 timeout, uint80 twapInterval ) CachedTwap(twapInterval) { // CPF_ANC: Aggregator is not contract require(address(aggregator).isContract(), "CPF_ANC"); _aggregator = aggregator; _timeout = timeout; _decimals = aggregator.decimals(); } /// @inheritdoc IPriceFeedUpdate /// @notice anyone can help with updating /// @dev this function is used by PriceFeedUpdater for updating _lastValidPrice, /// _lastValidTimestamp and observation arry. /// The keeper can invoke callstatic on this function to check if those states nened to be updated. function update() external override { bool isUpdated = _cachePrice(); // CPF_NU: not updated require(isUpdated, "CPF_NU"); _update(_lastValidPrice, _lastValidTimestamp); } /// @inheritdoc IChainlinkPriceFeedV3 function cacheTwap(uint256 interval) external override { _cachePrice(); _cacheTwap(interval, _lastValidPrice, _lastValidTimestamp); } // // EXTERNAL VIEW // /// @inheritdoc IChainlinkPriceFeedV3 function getLastValidPrice() external view override returns (uint256) { return _lastValidPrice; } /// @inheritdoc IChainlinkPriceFeedV3 function getLastValidTimestamp() external view override returns (uint256) { return _lastValidTimestamp; } /// @inheritdoc IPriceFeed /// @dev This is the view version of cacheTwap(). /// If the interval is zero, returns the latest valid price. /// Else, returns TWAP calculating with the latest valid price and timestamp. function getPrice(uint256 interval) external view override returns (uint256) { (uint256 latestValidPrice, uint256 latestValidTime) = _getLatestOrCachedPrice(); if (interval == 0) { return latestValidPrice; } return _getCachedTwap(interval, latestValidPrice, latestValidTime); } /// @inheritdoc IChainlinkPriceFeedV3 function getLatestOrCachedPrice() external view override returns (uint256, uint256) { return _getLatestOrCachedPrice(); } /// @inheritdoc IChainlinkPriceFeedV3 function isTimedOut() external view override returns (bool) { // Fetch the latest timstamp instead of _lastValidTimestamp is to prevent stale data // when the update() doesn't get triggered. (, uint256 lastestValidTimestamp) = _getLatestOrCachedPrice(); return lastestValidTimestamp > 0 && lastestValidTimestamp.add(_timeout) < _blockTimestamp(); } /// @inheritdoc IChainlinkPriceFeedV3 function getFreezedReason() external view override returns (FreezedReason) { ChainlinkResponse memory response = _getChainlinkResponse(); return _getFreezedReason(response); } /// @inheritdoc IChainlinkPriceFeedV3 function getAggregator() external view override returns (address) { return address(_aggregator); } /// @inheritdoc IChainlinkPriceFeedV3 function getTimeout() external view override returns (uint256) { return _timeout; } /// @inheritdoc IPriceFeed function decimals() external view override returns (uint8) { return _decimals; } // // INTERNAL // function _cachePrice() internal returns (bool) { ChainlinkResponse memory response = _getChainlinkResponse(); if (_isAlreadyLatestCache(response)) { return false; } bool isUpdated = false; FreezedReason freezedReason = _getFreezedReason(response); if (_isNotFreezed(freezedReason)) { _lastValidPrice = uint256(response.answer); _lastValidTimestamp = response.updatedAt; isUpdated = true; } emit ChainlinkPriceUpdated(_lastValidPrice, _lastValidTimestamp, freezedReason); return isUpdated; } function _getLatestOrCachedPrice() internal view returns (uint256, uint256) { ChainlinkResponse memory response = _getChainlinkResponse(); if (_isAlreadyLatestCache(response)) { return (_lastValidPrice, _lastValidTimestamp); } FreezedReason freezedReason = _getFreezedReason(response); if (_isNotFreezed(freezedReason)) { return (uint256(response.answer), response.updatedAt); } // if freezed return (_lastValidPrice, _lastValidTimestamp); } function _getChainlinkResponse() internal view returns (ChainlinkResponse memory chainlinkResponse) { try _aggregator.decimals() returns (uint8 decimals) { chainlinkResponse.decimals = decimals; } catch { // if the call fails, return an empty response with success = false return chainlinkResponse; } try _aggregator.latestRoundData() returns ( uint80 roundId, int256 answer, uint256, // startedAt uint256 updatedAt, uint80 // answeredInRound ) { chainlinkResponse.roundId = roundId; chainlinkResponse.answer = answer; chainlinkResponse.updatedAt = updatedAt; chainlinkResponse.success = true; return chainlinkResponse; } catch { // if the call fails, return an empty response with success = false return chainlinkResponse; } } function _isAlreadyLatestCache(ChainlinkResponse memory response) internal view returns (bool) { return _lastValidTimestamp > 0 && _lastValidTimestamp == response.updatedAt; } /// @dev see IChainlinkPriceFeedV3Event.FreezedReason for each FreezedReason function _getFreezedReason(ChainlinkResponse memory response) internal view returns (FreezedReason) { if (!response.success) { return FreezedReason.NoResponse; } if (response.decimals != _decimals) { return FreezedReason.IncorrectDecimals; } if (response.roundId == 0) { return FreezedReason.NoRoundId; } if ( response.updatedAt == 0 || response.updatedAt < _lastValidTimestamp || response.updatedAt > _blockTimestamp() ) { return FreezedReason.InvalidTimestamp; } if (response.answer <= 0) { return FreezedReason.NonPositiveAnswer; } return FreezedReason.NotFreezed; } function _isNotFreezed(FreezedReason freezedReason) internal pure returns (bool) { return freezedReason == FreezedReason.NotFreezed; } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.7.6; interface IChainlinkPriceFeed { function getAggregator() external view returns (address); /// @param roundId The roundId that fed into Chainlink aggregator. function getRoundData(uint80 roundId) external view returns (uint256, uint256); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.7.6; interface IPriceFeed { function decimals() external view returns (uint8); /// @dev Returns the index price of the token. /// @param interval The interval represents twap interval. function getPrice(uint256 interval) external view returns (uint256); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.7.6; interface IChainlinkPriceFeedV3Event { /// @param NotFreezed Default state: Chainlink is working as expected /// @param NoResponse Fails to call Chainlink /// @param IncorrectDecimals Inconsistent decimals between aggregator and price feed /// @param NoRoundId Zero round Id /// @param InvalidTimestamp No timestamp or it’s invalid, either outdated or in the future /// @param NonPositiveAnswer Price is zero or negative enum FreezedReason { NotFreezed, NoResponse, IncorrectDecimals, NoRoundId, InvalidTimestamp, NonPositiveAnswer } event ChainlinkPriceUpdated(uint256 price, uint256 timestamp, FreezedReason freezedReason); } interface IChainlinkPriceFeedV3 is IChainlinkPriceFeedV3Event { struct ChainlinkResponse { uint80 roundId; int256 answer; uint256 updatedAt; bool success; uint8 decimals; } /// @param interval TWAP interval /// when 0, cache price only, without TWAP; else, cache price & twap /// @dev This is the non-view version of cacheTwap() without return value function cacheTwap(uint256 interval) external; /// @notice Get the last cached valid price /// @return price The last cached valid price function getLastValidPrice() external view returns (uint256 price); /// @notice Get the last cached valid timestamp /// @return timestamp The last cached valid timestamp function getLastValidTimestamp() external view returns (uint256 timestamp); /// @notice Retrieve the latest price and timestamp from Chainlink aggregator, /// or return the last cached valid price and timestamp if the aggregator hasn't been updated or is frozen. /// @return price The latest valid price /// @return timestamp The latest valid timestamp function getLatestOrCachedPrice() external view returns (uint256 price, uint256 timestamp); function isTimedOut() external view returns (bool isTimedOut); /// @return reason The freezen reason function getFreezedReason() external view returns (FreezedReason reason); /// @return aggregator The address of Chainlink price feed aggregator function getAggregator() external view returns (address aggregator); /// @return period The timeout period function getTimeout() external view returns (uint256 period); }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.7.6; interface IPriceFeedUpdate { /// @dev Update latest price. function update() external; }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.7.6; abstract contract BlockContext { function _blockTimestamp() internal view virtual returns (uint256) { // Reply from Arbitrum // block.timestamp returns timestamp at the time at which the sequencer receives the tx. // It may not actually correspond to a particular L1 block return block.timestamp; } function _blockNumber() internal view virtual returns (uint256) { return block.number; } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.7.6; import { CumulativeTwap } from "./CumulativeTwap.sol"; abstract contract CachedTwap is CumulativeTwap { uint256 internal _cachedTwap; uint160 internal _lastUpdatedAt; uint80 internal _interval; constructor(uint80 interval) { _interval = interval; } function _cacheTwap( uint256 interval, uint256 latestPrice, uint256 latestUpdatedTimestamp ) internal virtual returns (uint256) { // always help update price for CumulativeTwap _update(latestPrice, latestUpdatedTimestamp); // if interval is not the same as _interval, won't update _lastUpdatedAt & _cachedTwap // and if interval == 0, return latestPrice directly as there won't be twap if (_interval != interval) { return interval == 0 ? latestPrice : _getTwap(interval, latestPrice, latestUpdatedTimestamp); } // only calculate twap and cache it when there's a new timestamp if (_blockTimestamp() != _lastUpdatedAt) { _lastUpdatedAt = uint160(_blockTimestamp()); _cachedTwap = _getTwap(interval, latestPrice, latestUpdatedTimestamp); } return _cachedTwap; } function _getCachedTwap( uint256 interval, uint256 latestPrice, uint256 latestUpdatedTimestamp ) internal view returns (uint256) { if (_blockTimestamp() == _lastUpdatedAt && interval == _interval) { return _cachedTwap; } return _getTwap(interval, latestPrice, latestUpdatedTimestamp); } /// @dev since we're plugging this contract to an existing system, we cannot return 0 upon the first call /// thus, return the latest price instead function _getTwap( uint256 interval, uint256 latestPrice, uint256 latestUpdatedTimestamp ) internal view returns (uint256) { uint256 twap = _calculateTwap(interval, latestPrice, latestUpdatedTimestamp); return twap == 0 ? latestPrice : twap; } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity 0.7.6; import { BlockContext } from "../base/BlockContext.sol"; import { SafeMath } from "@openzeppelin/contracts/math/SafeMath.sol"; contract CumulativeTwap is BlockContext { using SafeMath for uint256; // // STRUCT // struct Observation { uint256 price; uint256 priceCumulative; uint256 timestamp; } // // STATE // uint16 public currentObservationIndex; uint16 internal constant MAX_OBSERVATION = 1800; // let's use 15 mins and 1 hr twap as example // if the price is updated every 2 secs, 1hr twap Observation should have 60 / 2 * 60 = 1800 slots Observation[MAX_OBSERVATION] public observations; // // INTERNAL // function _update(uint256 price, uint256 lastUpdatedTimestamp) internal returns (bool) { // for the first time updating if (currentObservationIndex == 0 && observations[0].timestamp == 0) { observations[0] = Observation({ price: price, priceCumulative: 0, timestamp: lastUpdatedTimestamp }); return true; } Observation memory lastObservation = observations[currentObservationIndex]; // CT_IT: invalid timestamp require(lastUpdatedTimestamp >= lastObservation.timestamp, "CT_IT"); // DO NOT accept same timestamp and different price // CT_IPWU: invalid price when update if (lastUpdatedTimestamp == lastObservation.timestamp) { require(price == lastObservation.price, "CT_IPWU"); } // if the price remains still, there's no need for update if (price == lastObservation.price) { return false; } // ring buffer index, make sure the currentObservationIndex is less than MAX_OBSERVATION currentObservationIndex = (currentObservationIndex + 1) % MAX_OBSERVATION; uint256 timestampDiff = lastUpdatedTimestamp - lastObservation.timestamp; observations[currentObservationIndex] = Observation({ priceCumulative: lastObservation.priceCumulative + (lastObservation.price * timestampDiff), timestamp: lastUpdatedTimestamp, price: price }); return true; } /// @dev This function will return 0 in following cases: /// 1. Not enough historical data (0 observation) /// 2. Not enough historical data (not enough observation) /// 3. interval == 0 function _calculateTwap( uint256 interval, uint256 price, uint256 latestUpdatedTimestamp ) internal view returns (uint256) { // for the first time calculating if ((currentObservationIndex == 0 && observations[0].timestamp == 0) || interval == 0) { return 0; } Observation memory latestObservation = observations[currentObservationIndex]; // DO NOT accept same timestamp and different price // CT_IPWCT: invalid price when calculating twap // it's to be consistent with the logic of _update if (latestObservation.timestamp == latestUpdatedTimestamp) { require(price == latestObservation.price, "CT_IPWCT"); } uint256 currentTimestamp = _blockTimestamp(); uint256 targetTimestamp = currentTimestamp.sub(interval); uint256 currentCumulativePrice = latestObservation.priceCumulative.add( (latestObservation.price.mul(latestUpdatedTimestamp.sub(latestObservation.timestamp))).add( price.mul(currentTimestamp.sub(latestUpdatedTimestamp)) ) ); // case 1 // beforeOrAt (it doesn't matter) // targetTimestamp atOrAfter // ------------------+-------------+---------------+-----------------> // case 2 // (it doesn't matter) atOrAfter // beforeOrAt targetTimestamp // ------------------+-------------+---------------------------------> // case 3 // beforeOrAt targetTimestamp atOrAfter // ------------------+-------------+---------------+-----------------> // atOrAfter // beforeOrAt targetTimestamp // ------------------+-------------+---------------+-----------------> (Observation memory beforeOrAt, Observation memory atOrAfter) = _getSurroundingObservations(targetTimestamp); uint256 targetCumulativePrice; // case1. left boundary if (targetTimestamp == beforeOrAt.timestamp) { targetCumulativePrice = beforeOrAt.priceCumulative; } // case2. right boundary else if (atOrAfter.timestamp == targetTimestamp) { targetCumulativePrice = atOrAfter.priceCumulative; } // not enough historical data else if (beforeOrAt.timestamp == atOrAfter.timestamp) { return 0; } // case3. in the middle else { // atOrAfter.timestamp == 0 implies beforeOrAt = observations[currentObservationIndex] // which means there's no atOrAfter from _getSurroundingObservations // and atOrAfter.priceCumulative should eaual to targetCumulativePrice if (atOrAfter.timestamp == 0) { targetCumulativePrice = beforeOrAt.priceCumulative + (beforeOrAt.price * (targetTimestamp - beforeOrAt.timestamp)); } else { uint256 targetTimeDelta = targetTimestamp - beforeOrAt.timestamp; uint256 observationTimeDelta = atOrAfter.timestamp - beforeOrAt.timestamp; targetCumulativePrice = beforeOrAt.priceCumulative.add( ((atOrAfter.priceCumulative.sub(beforeOrAt.priceCumulative)).mul(targetTimeDelta)).div( observationTimeDelta ) ); } } return currentCumulativePrice.sub(targetCumulativePrice).div(interval); } function _getSurroundingObservations(uint256 targetTimestamp) internal view returns (Observation memory beforeOrAt, Observation memory atOrAfter) { beforeOrAt = observations[currentObservationIndex]; // if the target is chronologically at or after the newest observation, we can early return if (observations[currentObservationIndex].timestamp <= targetTimestamp) { // if the observation is the same as the targetTimestamp // atOrAfter doesn't matter // if the observation is less than the targetTimestamp // simply return empty atOrAfter // atOrAfter repesents latest price and timestamp return (beforeOrAt, atOrAfter); } // now, set before to the oldest observation beforeOrAt = observations[(currentObservationIndex + 1) % MAX_OBSERVATION]; if (beforeOrAt.timestamp == 0) { beforeOrAt = observations[0]; } // ensure that the target is chronologically at or after the oldest observation // if no enough historical data, simply return two beforeOrAt and return 0 at _calculateTwap if (beforeOrAt.timestamp > targetTimestamp) { return (beforeOrAt, beforeOrAt); } return _binarySearch(targetTimestamp); } function _binarySearch(uint256 targetTimestamp) private view returns (Observation memory beforeOrAt, Observation memory atOrAfter) { uint256 l = (currentObservationIndex + 1) % MAX_OBSERVATION; // oldest observation uint256 r = l + MAX_OBSERVATION - 1; // newest observation uint256 i; while (true) { i = (l + r) / 2; beforeOrAt = observations[i % MAX_OBSERVATION]; // we've landed on an uninitialized observation, keep searching higher (more recently) if (beforeOrAt.timestamp == 0) { l = i + 1; continue; } atOrAfter = observations[(i + 1) % MAX_OBSERVATION]; bool targetAtOrAfter = beforeOrAt.timestamp <= targetTimestamp; // check if we've found the answer! if (targetAtOrAfter && targetTimestamp <= atOrAfter.timestamp) break; if (!targetAtOrAfter) r = i - 1; else l = i + 1; } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0; interface AggregatorV3Interface { function decimals() external view returns (uint8); function description() external view returns (string memory); function version() external view returns (uint256); // getRoundData and latestRoundData should both raise "No data present" // if they do not have data to report, instead of returning unset values // which could be misinterpreted as actual reported values. function getRoundData(uint80 _roundId) external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); function latestRoundData() external view returns ( uint80 roundId, int256 answer, uint256 startedAt, uint256 updatedAt, uint80 answeredInRound ); }
{ "metadata": { "useLiteralContent": true }, "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract AggregatorV3Interface","name":"aggregator","type":"address"},{"internalType":"uint256","name":"timeout","type":"uint256"},{"internalType":"uint80","name":"twapInterval","type":"uint80"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"},{"indexed":false,"internalType":"enum IChainlinkPriceFeedV3Event.FreezedReason","name":"freezedReason","type":"uint8"}],"name":"ChainlinkPriceUpdated","type":"event"},{"inputs":[{"internalType":"uint256","name":"interval","type":"uint256"}],"name":"cacheTwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentObservationIndex","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAggregator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getFreezedReason","outputs":[{"internalType":"enum IChainlinkPriceFeedV3Event.FreezedReason","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLastValidPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLastValidTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getLatestOrCachedPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"interval","type":"uint256"}],"name":"getPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getTimeout","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isTimedOut","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"observations","outputs":[{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"priceCumulative","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"update","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100ce5760003560e01c80633499ba951161008c578063a2e6204511610066578063a2e62045146101d6578063aed3aff7146101de578063e7572230146101fd578063efe9c2531461021a576100ce565b80633499ba95146101895780633ad59dbc14610191578063954eba95146101b5576100ce565b80626059a0146100d3578063086a855e146100ed5780631d1a111a146100f55780631d7866de14610114578063252c09d714610130578063313ce5671461016b575b600080fd5b6100db610243565b60408051918252519081900360200190f35b6100db61024b565b6101126004803603602081101561010b57600080fd5b5035610252565b005b61011c610270565b604080519115158252519081900360200190f35b61014d6004803603602081101561014657600080fd5b50356102c3565b60408051938452602084019290925282820152519081900360600190f35b6101736102eb565b6040805160ff9092168252519081900360200190f35b6100db61030f565b610199610333565b604080516001600160a01b039092168252519081900360200190f35b6101bd610357565b6040805192835260208301919091528051918290030190f35b61011261036b565b6101e66103c2565b6040805161ffff9092168252519081900360200190f35b6100db6004803603602081101561021357600080fd5b50356103cc565b610222610403565b6040518082600581111561023257fe5b815260200191505060405180910390f35b61151b545b90565b61151c5490565b61025a61041f565b5061026c8161151b5461151c546104d6565b5050565b60008061027b61057f565b9150506000811180156102bd57506102916105f0565b6102bb827f00000000000000000000000000000000000000000000000000000000000012c06105f4565b105b91505090565b60018161070881106102d457600080fd5b600302018054600182015460029092015490925083565b7f000000000000000000000000000000000000000000000000000000000000000890565b7f00000000000000000000000000000000000000000000000000000000000012c090565b7f000000000000000000000000338ed6787f463394d24813b297401b9f05a8c9d190565b60008061036261057f565b915091505b9091565b600061037561041f565b9050806103b2576040805162461bcd60e51b81526020600482015260066024820152654350465f4e5560d01b604482015290519081900360640190fd5b61026c61151b5461151c54610657565b60005461ffff1681565b60008060006103d961057f565b9150915083600014156103ee575090506103fe565b6103f984838361083c565b925050505b919050565b60008061040e610898565b90506102bd816109fb565b3b151590565b60008061042a610898565b905061043581610ab6565b15610444576000915050610248565b600080610450836109fb565b905061045b81610ad2565b1561047757602083015161151b55604083015161151c55600191505b7fcfc00d555c19103be8966c15035956ddd6912f374557b4e585dd076399400c3061151b5461151c5483604051808481526020018381526020018260058111156104bd57fe5b8152602001935050505060405180910390a15091505090565b60006104e28383610657565b5061151a54600160a01b900469ffffffffffffffffffff16841461051f57831561051657610511848484610ae8565b610518565b825b9050610578565b61151a546001600160a01b03166105346105f0565b14610572576105416105f0565b61151a80546001600160a01b0319166001600160a01b039290921691909117905561056d848484610ae8565b611519555b50611519545b9392505050565b600080600061058c610898565b905061059781610ab6565b156105ae5761151b5461151c549250925050610367565b60006105b9826109fb565b90506105c481610ad2565b156105de5781602001518260400151935093505050610367565b61151b5461151c549350935050509091565b4290565b60008282018381101561064e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b6000805461ffff1615801561066c5750600354155b156106ca576040518060600160405280848152602001600081526020018381525060016000610708811061069c57fe5b6003020160008201518160000155602082015181600101556040820151816002015590505060019050610651565b6000805460019061ffff1661070881106106e057fe5b6040805160608101825260039290920292909201805482526001810154602083015260020154918101829052915083101561074a576040805162461bcd60e51b815260206004820152600560248201526410d517d25560da1b604482015290519081900360640190fd5b80604001518314156107955780518414610795576040805162461bcd60e51b815260206004820152600760248201526643545f4950575560c81b604482015290519081900360640190fd5b80518414156107a8576000915050610651565b6000805461ffff19811661070861ffff928316600190810184168290068416929092179384905560408581015181516060810183528a815287516020808a0151938c03918202909301928201929092529182018990529490931690811061080b57fe5b6003020160008201518160000155602082015181600101556040820151816002015590505060019250505092915050565b61151a546000906001600160a01b03166108546105f0565b148015610876575061151a54600160a01b900469ffffffffffffffffffff1684145b15610885575061151954610578565b610890848484610ae8565b949350505050565b6108a061107f565b7f000000000000000000000000338ed6787f463394d24813b297401b9f05a8c9d16001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b1580156108f957600080fd5b505afa92505050801561091e57506040513d602081101561091957600080fd5b505160015b61092757610248565b60ff1660808201527f000000000000000000000000338ed6787f463394d24813b297401b9f05a8c9d16001600160a01b031663feaf968c6040518163ffffffff1660e01b815260040160a06040518083038186803b15801561098857600080fd5b505afa9250505080156109ca57506040513d60a08110156109a857600080fd5b5080516020820151604083015160608401516080909401519293919290919060015b6109d357610248565b5069ffffffffffffffffffff9093168452506020830152604082015260016060820152610248565b60008160600151610a0e575060016103fe565b7f000000000000000000000000000000000000000000000000000000000000000860ff16826080015160ff1614610a47575060026103fe565b815169ffffffffffffffffffff16610a61575060036103fe565b60408201511580610a78575061151c548260400151105b80610a8d5750610a866105f0565b8260400151115b15610a9a575060046103fe565b6000826020015113610aae575060056103fe565b506000919050565b60008061151c541180156106515750506040015161151c541490565b600080826005811115610ae157fe5b1492915050565b600080610af6858585610b0f565b90508015610b045780610b06565b835b95945050505050565b6000805461ffff16158015610b245750600354155b80610b2d575083155b15610b3a57506000610578565b6000805460019061ffff166107088110610b5057fe5b60408051606081018252600392909202929092018054825260018101546020830152600201549181018290529150831415610bc55780518414610bc5576040805162461bcd60e51b815260206004820152600860248201526710d517d25415d0d560c21b604482015290519081900360640190fd5b6000610bcf6105f0565b90506000610bdd8288610d29565b90506000610c2e610c23610bfb610bf4868a610d29565b8a90610d86565b610c1d610c1588604001518b610d2990919063ffffffff16565b885190610d86565b906105f4565b6020860151906105f4565b9050600080610c3c84610ddf565b9150915060008260400151851415610c5957506020820151610d0c565b8482604001511415610c7057506020810151610d0c565b816040015183604001511415610c90576000975050505050505050610578565b6040820151610cb057506040820151825160208401519186030201610d0c565b6000836040015186039050600084604001518460400151039050610d07610cfc82610cf685610cf08a602001518a60200151610d2990919063ffffffff16565b90610d86565b90610f05565b6020870151906105f4565b925050505b610d1a8b610cf68684610d29565b9b9a5050505050505050505050565b600082821115610d80576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082610d9557506000610651565b82820282848281610da257fe5b041461064e5760405162461bcd60e51b81526004018080602001828103825260218152602001806110cf6021913960400191505060405180910390fd5b610de76110ad565b610def6110ad565b60005460019061ffff166107088110610e0457fe5b600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050915082600160008054906101000a900461ffff1661ffff166107088110610e5457fe5b600302016002015411610e6657610f00565b6000546001906107089061ffff9081168301160661ffff166107088110610e8957fe5b60408051606081018252600392909202929092018054825260018101546020830152600201549181018290529250610edf5760408051606081018252600154815260025460208201526003549181019190915291505b8282604001511115610ef2575080610f00565b610efb83610f6c565b915091505b915091565b6000808211610f5b576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381610f6457fe5b049392505050565b610f746110ad565b610f7c6110ad565b60008054610708600161ffff9283160182160616906107078201905b6002838301049050600161070882066107088110610fb257fe5b60408051606081018252600392909202929092018054825260018101546020830152600201549181018290529550610fef57806001019250610f98565b600161070882820106610708811061100357fe5b600302016040518060600160405290816000820154815260200160018201548152602001600282015481525050935060008686604001511115905080801561104f575084604001518711155b1561105a5750611077565b8061106a57600182039250611071565b8160010193505b50610f98565b505050915091565b6040805160a08101825260008082526020820181905291810182905260608101829052608081019190915290565b6040518060600160405280600081526020016000815260200160008152509056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220d840f6ebce12b4e732d40d29b64fd58a70d790ff629611c977eea31765b7972b64736f6c63430007060033
Deployed Bytecode Sourcemap
705:7168:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2367:109;;;:::i;:::-;;;;;;;;;;;;;;;;2524:117;;;:::i;2129:154::-;;;;;;;;;;;;;;;;-1:-1:-1;2129:154:0;;:::i;:::-;;3448:384;;;:::i;:::-;;;;;;;;;;;;;;;;;;697:48:7;;;;;;;;;;;;;;;;-1:-1:-1;697:48:7;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;4413:92:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;4281:95;;;:::i;4123:110::-;;;:::i;:::-;;;;-1:-1:-1;;;;;4123:110:0;;;;;;;;;;;;;;3267:133;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;1873:208;;;:::i;448:37:7:-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;2892:327:0;;;;;;;;;;;;;;;;-1:-1:-1;2892:327:0;;:::i;3880:195::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;2367:109;2454:15;;2367:109;;:::o;2524:117::-;2615:19;;2524:117;:::o;2129:154::-;2194:13;:11;:13::i;:::-;;2218:58;2229:8;2239:15;;2256:19;;2218:10;:58::i;:::-;;2129:154;:::o;3448:384::-;3502:4;3666:29;3699:25;:23;:25::i;:::-;3663:61;;;3765:1;3741:21;:25;:84;;;;;3808:17;:15;:17::i;:::-;3770:35;:21;3796:8;3770:25;:35::i;:::-;:55;3741:84;3734:91;;;3448:384;:::o;697:48:7:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;697:48:7;:::o;4413:92:0:-;4489:9;4413:92;:::o;4281:95::-;4361:8;4281:95;:::o;4123:110::-;4214:11;4123:110;:::o;3267:133::-;3333:7;3342;3368:25;:23;:25::i;:::-;3361:32;;;;3267:133;;;:::o;1873:208::-;1919:14;1936:13;:11;:13::i;:::-;1919:30;;1998:9;1990:28;;;;;-1:-1:-1;;;1990:28:0;;;;;;;;;;;;-1:-1:-1;;;1990:28:0;;;;;;;;;;;;;;;2029:45;2037:15;;2054:19;;2029:7;:45::i;448:37:7:-;;;;;;:::o;2892:327:0:-;2960:7;2980:24;3006:23;3033:25;:23;:25::i;:::-;2979:79;;;;3073:8;3085:1;3073:13;3069:67;;;-1:-1:-1;3109:16:0;-1:-1:-1;3102:23:0;;3069:67;3153:59;3168:8;3178:16;3196:15;3153:14;:59::i;:::-;3146:66;;;;2892:327;;;;:::o;3880:195::-;3940:13;3965:33;4001:23;:21;:23::i;:::-;3965:59;;4041:27;4059:8;4041:17;:27::i;726:413:10:-;1086:20;1124:8;;;726:413::o;4542:616:0:-;4583:4;4599:33;4635:23;:21;:23::i;:::-;4599:59;;4672:31;4694:8;4672:21;:31::i;:::-;4668:74;;;4726:5;4719:12;;;;;4668:74;4752:14;4784:27;4814;4832:8;4814:17;:27::i;:::-;4784:57;;4855:28;4869:13;4855;:28::i;:::-;4851:185;;;4925:15;;;;4899;:42;4977:18;;;;4955:19;:40;5021:4;;-1:-1:-1;4851:185:0;5051:74;5073:15;;5090:19;;5111:13;5051:74;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5142:9:0;-1:-1:-1;;4542:616:0;:::o;353:909:6:-;500:7;574:44;582:11;595:22;574:7;:44::i;:::-;-1:-1:-1;812:9:6;;-1:-1:-1;;;812:9:6;;;;:21;;808:144;;856:13;;:85;;886:55;895:8;905:11;918:22;886:8;:55::i;:::-;856:85;;;872:11;856:85;849:92;;;;808:144;1060:14;;-1:-1:-1;;;;;1060:14:6;1039:17;:15;:17::i;:::-;:35;1035:192;;1115:17;:15;:17::i;:::-;1090:14;:43;;-1:-1:-1;;;;;;1090:43:6;-1:-1:-1;;;;;1090:43:6;;;;;;;;;;1161:55;1170:8;1180:11;1193:22;1161:8;:55::i;:::-;1147:11;:69;1035:192;-1:-1:-1;1244:11:6;;353:909;;;;;;:::o;5164:535:0:-;5222:7;5231;5250:33;5286:23;:21;:23::i;:::-;5250:59;;5323:31;5345:8;5323:21;:31::i;:::-;5319:107;;;5378:15;;5395:19;;5370:45;;;;;;;5319:107;5436:27;5466;5484:8;5466:17;:27::i;:::-;5436:57;;5507:28;5521:13;5507;:28::i;:::-;5503:112;;;5567:8;:15;;;5585:8;:18;;;5551:53;;;;;;;;5503:112;5655:15;;5672:19;;5647:45;;;;;;5164:535;;:::o;106:301:1:-;385:15;106:301;:::o;2690:175:9:-;2748:7;2779:5;;;2802:6;;;;2794:46;;;;;-1:-1:-1;;;2794:46:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;2857:1;-1:-1:-1;2690:175:9;;;;;:::o;783:1486:7:-;863:4;922:23;;;;:28;:62;;;;-1:-1:-1;954:15:7;:25;:30;922:62;918:218;;;1018:82;;;;;;;;1039:5;1018:82;;;;1063:1;1018:82;;;;1077:20;1018:82;;;1000:12;1013:1;1000:15;;;;;;;;;;:100;;;;;;;;;;;;;;;;;;;;;;;;;;;1121:4;1114:11;;;;918:218;1146:34;1196:23;;1183:12;;1196:23;;1183:37;;;;;;;1146:74;;;;;;;;1183:37;;;;;;;;;1146:74;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1275:49:7;;;1267:67;;;;;-1:-1:-1;;;1267:67:7;;;;;;;;;;;;-1:-1:-1;;;1267:67:7;;;;;;;;;;;;;;;1479:15;:25;;;1455:20;:49;1451:130;;;1537:21;;1528:30;;1520:50;;;;;-1:-1:-1;;;1520:50:7;;;;;;;;;;;;-1:-1:-1;;;1520:50:7;;;;;;;;;;;;;;;1670:21;;1661:30;;1657:73;;;1714:5;1707:12;;;;;1657:73;1864:23;;;-1:-1:-1;;1837:73:7;;534:4;1863:47;1864:23;;;;:27;;;1863:47;;;;;1837:73;;;;;;;;;;1968:25;;;;;2043:198;;;;;;;;;;2121:21;;2043:198;2086:31;;;;1945:48;;;2121:37;;;2086:73;;;2043:198;;;;;;;;;;;;;1945:48;2043:198;;2016:23;;2003:37;;;;;;;;;:238;;;;;;;;;;;;;;;;;;;;;;;;;;;2258:4;2251:11;;;;783:1486;;;;:::o;1268:354:6:-;1460:14;;1416:7;;-1:-1:-1;;;;;1460:14:6;1439:17;:15;:17::i;:::-;:35;:60;;;;-1:-1:-1;1490:9:6;;-1:-1:-1;;;1490:9:6;;;;1478:21;;1439:60;1435:109;;;-1:-1:-1;1522:11:6;;1515:18;;1435:109;1560:55;1569:8;1579:11;1592:22;1560:8;:55::i;:::-;1553:62;1268:354;-1:-1:-1;;;;1268:354:6:o;5705:968:0:-;5761:42;;:::i;:::-;5819:11;-1:-1:-1;;;;;5819:20:0;;:22;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5819:22:0;;;5815:250;;6030:24;;5815:250;5881:37;;:26;;;:37;6079:11;-1:-1:-1;;;;;6079:27:0;;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;6079:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;6075:592;;6632:24;;6075:592;-1:-1:-1;6301:35:0;;;;;;-1:-1:-1;6350:24:0;;;:33;6397:27;;;:39;6478:4;6450:25;;;:32;6496:24;;6953:766;7038:13;7068:8;:16;;;7063:79;;-1:-1:-1;7107:24:0;7100:31;;7063:79;7176:9;7155:30;;:8;:17;;;:30;;;7151:99;;-1:-1:-1;7208:31:0;7201:38;;7151:99;7263:16;;:21;;7259:82;;-1:-1:-1;7307:23:0;7300:30;;7259:82;7367:18;;;;:23;;:79;;;7427:19;;7406:8;:18;;;:40;7367:79;:133;;;;7483:17;:15;:17::i;:::-;7462:8;:18;;;:38;7367:133;7350:223;;;-1:-1:-1;7532:30:0;7525:37;;7350:223;7605:1;7586:8;:15;;;:20;7582:89;;-1:-1:-1;7629:31:0;7622:38;;7582:89;-1:-1:-1;7688:24:0;6953:766;;;:::o;6679:187::-;6768:4;6813:1;6791:19;;:23;:68;;;;-1:-1:-1;;6841:18:0;;;6818:19;;:41;;6679:187::o;7725:146::-;7800:4;;7823:13;:41;;;;;;;;;;7725:146;-1:-1:-1;;7725:146:0:o;1789:291:6:-;1931:7;1950:12;1965:61;1980:8;1990:11;2003:22;1965:14;:61::i;:::-;1950:76;-1:-1:-1;2043:9:6;;:30;;2069:4;2043:30;;;2055:11;2043:30;2036:37;1789:291;-1:-1:-1;;;;;1789:291:6:o;2478:3714:7:-;2620:7;2686:23;;;;:28;:62;;;;-1:-1:-1;2718:15:7;:25;:30;2686:62;2685:81;;;-1:-1:-1;2753:13:7;;2685:81;2681:120;;;-1:-1:-1;2789:1:7;2782:8;;2681:120;2811:36;2863:23;;2850:12;;2863:23;;2850:37;;;;;;;2811:76;;;;;;;;2850:37;;;;;;;;;2811:76;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3078:53:7;;3074:137;;;3164:23;;3155:32;;3147:53;;;;;-1:-1:-1;;;3147:53:7;;;;;;;;;;;;-1:-1:-1;;;3147:53:7;;;;;;;;;;;;;;;3221:24;3248:17;:15;:17::i;:::-;3221:44;-1:-1:-1;3275:23:7;3301:30;3221:44;3322:8;3301:20;:30::i;:::-;3275:56;-1:-1:-1;3341:30:7;3386:254;3441:185;3553:55;3563:44;:16;3584:22;3563:20;:44::i;:::-;3553:5;;:9;:55::i;:::-;3442:84;3470:55;3497:17;:27;;;3470:22;:26;;:55;;;;:::i;:::-;3442:23;;;:27;:84::i;:::-;3441:90;;:185::i;:::-;3386:33;;;;;:37;:254::i;:::-;3341:299;;4486:29;4517:28;4549:44;4577:15;4549:27;:44::i;:::-;4485:108;;;;4603:29;4698:10;:20;;;4679:15;:39;4675:1430;;;-1:-1:-1;4758:26:7;;;;4675:1430;;;4869:15;4846:9;:19;;;:38;4842:1263;;;-1:-1:-1;4924:25:7;;;;4842:1263;;;5040:9;:19;;;5016:10;:20;;;:43;5012:1093;;;5082:1;5075:8;;;;;;;;;;;5012:1093;5421:19;;;;5417:678;;-1:-1:-1;5597:20:7;;;;5559:16;;5509:26;;;;5579:38;;;5559:59;5509:110;5417:678;;;5658:23;5702:10;:20;;;5684:15;:38;5658:64;;5740:28;5793:10;:20;;;5771:9;:19;;;:42;5740:73;;5856:224;5908:154;6020:20;5909:80;5973:15;5910:57;5940:10;:26;;;5910:9;:25;;;:29;;:57;;;;:::i;:::-;5909:63;;:80::i;:::-;5908:86;;:154::i;:::-;5856:26;;;;;:30;:224::i;:::-;5832:248;;5417:678;;;6122:63;6176:8;6122:49;:22;6149:21;6122:26;:49::i;:63::-;6115:70;2478:3714;-1:-1:-1;;;;;;;;;;;2478:3714:7:o;3136:155:9:-;3194:7;3226:1;3221;:6;;3213:49;;;;;-1:-1:-1;;;3213:49:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3279:5:9;;;3136:155::o;3538:215::-;3596:7;3619:6;3615:20;;-1:-1:-1;3634:1:9;3627:8;;3615:20;3657:5;;;3661:1;3657;:5;:1;3680:5;;;;;:10;3672:56;;;;-1:-1:-1;;;3672:56:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6198:1339:7;6307:29;;:::i;:::-;6338:28;;:::i;:::-;6408:23;;6395:12;;6408:23;;6395:37;;;;;;;;;;6382:50;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;6598:15;6547:12;6560:23;;;;;;;;;;6547:37;;;;;;;;;;;;:47;;;:66;6543:410;;6912:30;;6543:410;7043:23;;7029:12;;534:4;;7042:47;7043:23;;;:27;;7042:47;;7029:61;;;;;;;;;7016:74;;;;;;;;7029:61;;;;;;;;;7016:74;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7100:84:7;;7145:28;;;;;;;;7158:12;7145:28;;;;;;;;;7158:15;7145:28;;;;;;;;;-1:-1:-1;7100:84:7;7410:15;7387:10;:20;;;:38;7383:100;;;-1:-1:-1;7449:10:7;7441:31;;7383:100;7500:30;7514:15;7500:13;:30::i;:::-;7493:37;;;;6198:1339;;;;:::o;4217:150:9:-;4275:7;4306:1;4302;:5;4294:44;;;;;-1:-1:-1;;;4294:44:9;;;;;;;;;;;;;;;;;;;;;;;;;;;;4359:1;4355;:5;;;;;;;4217:150;-1:-1:-1;;;4217:150:9:o;7543:1027:7:-;7637:29;;:::i;:::-;7668:28;;:::i;:::-;7712:9;7725:23;;534:4;7725:23;7724:47;7725:23;;;:27;7724:47;;;7712:59;;7815:23;;;;7890:674;7931:1;7922:5;;;7921:11;;-1:-1:-1;7960:12:7;534:4;7921:11;7973:19;7960:33;;;;;;;7947:46;;;;;;;;7960:33;;;;;;;;;7947:46;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8107:99:7;;8160:1;8164;8160:5;8156:9;;8183:8;;8107:99;8232:12;534:4;8246:5;;;8245:25;8232:39;;;;;;;;;;8220:51;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8286:20;8333:15;8309:10;:20;;;:39;;8286:62;;8415:15;:57;;;;;8453:9;:19;;;8434:15;:38;;8415:57;8411:68;;;8474:5;;;8411:68;8499:15;8494:59;;8524:1;8520;:5;8516:9;;8494:59;;;8548:1;8552;8548:5;8544:9;;8494:59;7890:674;;;;7543:1027;;;;;;:::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;:::o
Swarm Source
ipfs://d840f6ebce12b4e732d40d29b64fd58a70d790ff629611c977eea31765b7972b
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.