Source Code
Overview
GLMR Balance
GLMR Value
$0.00View more zero value Internal Transactions in Advanced View mode
Cross-Chain Transactions
Loading...
Loading
Contract Name:
UniswapCheckpoints
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
Yes with 999999 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity =0.8.15;
import "@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.sol";
import "./interfaces/IUniswapCheckpoints.sol";
import "./interfaces/IUniswapV2Factory.sol";
import "./interfaces/IUniswapV2Pair.sol";
import "./libraries/FixedPoint.sol";
contract UniswapCheckpoints is IUniswapCheckpoints, OwnableUpgradeable {
event CheckpointerUpdated(address oldCheckpointer, address newCheckpointer);
event NewCheckpoint(address baseToken, address quoteToken, uint256 priceCumulative, uint256 timestamp);
IUniswapV2Factory public uniswapFactory;
address public checkpointer;
// Base Currency -> Quote Currency -> Checkpoint Interval
mapping(address => mapping(address => uint256)) public minCheckpointIntervals;
// Base Currency -> Quote Currency -> Checkpoint Counts
mapping(address => mapping(address => uint256)) public checkpointCounts;
// Base Currency -> Quote Currency -> (Wrapped) Buffer Index -> Checkpoint
mapping(address => mapping(address => mapping(uint256 => Checkpoint))) public checkpoints;
uint256 public constant RING_BUFFER_SIZE = 128;
uint256 public constant DEFAULT_MIN_CHECKPOINT_INTERVAL = 60;
modifier onlyCheckpointer() {
require(msg.sender == checkpointer, "UniswapCheckpoints: not checkpointer");
_;
}
function getCurrentCumulativePrice(address baseToken, address quoteToken)
external
view
returns (uint256 priceCumulative)
{
priceCumulative = _getCurrentCumulativePrice(baseToken, quoteToken);
}
function getLatestCheckpointOlderThan(address baseToken, address quoteToken, uint256 minAge)
external
view
returns (Checkpoint memory checkpoint)
{
checkpoint = _getLatestCheckpointOlderThan(baseToken, quoteToken, minAge);
}
function __UniswapCheckpoints_init(IUniswapV2Factory _uniswapFactory) public initializer {
__Ownable_init();
require(address(_uniswapFactory) != address(0), "UniswapCheckpoints: zero address");
uniswapFactory = _uniswapFactory;
}
function setCheckpointer(address newCheckpointer) external onlyOwner {
address oldCheckpointer = checkpointer;
checkpointer = newCheckpointer;
emit CheckpointerUpdated(oldCheckpointer, newCheckpointer);
}
function makeCheckpoint(address baseToken, address quoteToken) external onlyCheckpointer {
uint256 checkpointCount = checkpointCounts[baseToken][quoteToken];
if (checkpointCount > 0) {
// Check if min interval has passed
uint256 minInterval = getMinCheckpointInterval(baseToken, quoteToken);
Checkpoint memory lastCheckpoint = getCheckpointAt(baseToken, quoteToken, checkpointCount - 1);
require(
block.timestamp - lastCheckpoint.timestamp >= minInterval,
"UniswapCheckpoints: checkpointing too frequent"
);
}
uint256 priceCumulative = _getCurrentCumulativePrice(baseToken, quoteToken);
// Insert new checkpoint into ring buffer
checkpointCounts[baseToken][quoteToken] = checkpointCount + 1;
checkpoints[baseToken][quoteToken][checkpointCount % RING_BUFFER_SIZE] =
Checkpoint({priceCumulative: priceCumulative, timestamp: block.timestamp});
// Emit event for off-chain tracking
emit NewCheckpoint(baseToken, quoteToken, priceCumulative, block.timestamp);
}
function updateMinCheckpointInterval(address baseToken, address quoteToken, uint256 interval)
external
onlyOwner
{
minCheckpointIntervals[baseToken][quoteToken] = interval;
}
function getMinCheckpointInterval(address baseToken, address quoteToken)
private
view
returns (uint256 minInterval)
{
minInterval = minCheckpointIntervals[baseToken][quoteToken];
if (minInterval == 0) {
minInterval = DEFAULT_MIN_CHECKPOINT_INTERVAL;
}
}
function getCheckpointAt(address baseToken, address quoteToken, uint256 index)
private
view
returns (Checkpoint memory checkpoint)
{
checkpoint = checkpoints[baseToken][quoteToken][index % RING_BUFFER_SIZE];
}
// Adapted from: https://github.com/compound-finance/open-oracle/blob/0e148fdb0e8cbe4d412548490609679621ab2325/contracts/Uniswap/UniswapLib.sol#L42
function _getCurrentCumulativePrice(address baseToken, address quoteToken)
private
view
returns (uint256 priceCumulative)
{
IUniswapV2Pair pair = IUniswapV2Pair(uniswapFactory.getPair(baseToken, quoteToken));
require(address(pair) != address(0), "UniswapCheckpoints: pair not found");
uint32 blockTimestamp = currentBlockTimestamp();
if (uint160(baseToken) < uint160(quoteToken)) {
// Base token is token0
priceCumulative = pair.price0CumulativeLast();
} else {
// Base token is token1
priceCumulative = pair.price1CumulativeLast();
}
// if time has elapsed since the last update on the pair, mock the accumulated price values
(uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast) = pair.getReserves();
if (blockTimestampLast != blockTimestamp) {
unchecked {
// subtraction overflow is desired
uint32 timeElapsed = blockTimestamp - blockTimestampLast;
// addition overflow is desired
if (uint160(baseToken) < uint160(quoteToken)) {
// Base token is token0
// counterfactual
priceCumulative += uint256(FixedPoint.fraction(reserve1, reserve0)._x) * timeElapsed;
} else {
// Base token is token1
// counterfactual
priceCumulative += uint256(FixedPoint.fraction(reserve0, reserve1)._x) * timeElapsed;
}
}
}
}
function _getLatestCheckpointOlderThan(address baseToken, address quoteToken, uint256 minAge)
private
view
returns (Checkpoint memory checkpoint)
{
uint256 checkpointCount = checkpointCounts[baseToken][quoteToken];
require(checkpointCount > 0, "UniswapCheckpoints: no checkpoint found");
// Expensive loop. Cost limited by setting min checkpoint interval to reduce iterations
uint256 indCheckpoint = checkpointCount - 1;
while (true) {
Checkpoint memory currentCheckpoint = getCheckpointAt(baseToken, quoteToken, indCheckpoint);
if (block.timestamp - currentCheckpoint.timestamp >= minAge) {
return currentCheckpoint;
}
// All items checked?
require(
indCheckpoint > 0 && checkpointCount - indCheckpoint < RING_BUFFER_SIZE,
"UniswapCheckpoints: no valid checkpoint"
);
indCheckpoint -= 1;
}
}
// Taken from: https://github.com/compound-finance/open-oracle/blob/0e148fdb0e8cbe4d412548490609679621ab2325/contracts/Uniswap/UniswapLib.sol#L37
function currentBlockTimestamp() private view returns (uint32) {
return uint32(block.timestamp % 2 ** 32);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/ContextUpgradeable.sol";
import "../proxy/utils/Initializable.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init() internal onlyInitializing {
__Ownable_init_unchained();
}
function __Ownable_init_unchained() internal onlyInitializing {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[49] private __gap;
}// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.6.12 <0.9.0;
interface IUniswapCheckpoints {
struct Checkpoint {
uint256 priceCumulative;
uint256 timestamp;
}
function getCurrentCumulativePrice(address baseToken, address quoteToken)
external
view
returns (uint256 priceCumulative);
function getLatestCheckpointOlderThan(address baseToken, address quoteToken, uint256 minAge)
external
view
returns (Checkpoint memory checkpoint);
function makeCheckpoint(address baseToken, address quoteToken) external;
}// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.6.12 <0.9.0;
// Taken from: https://github.com/Uniswap/v2-core/blob/4dd59067c76dea4a0e8e4bfdda41877a6b16dedc/contracts/interfaces/IUniswapV2Factory.sol
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint256);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint256) external view returns (address pair);
function allPairsLength() external view returns (uint256);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.6.12 <0.9.0;
// Taken from: https://github.com/Uniswap/v2-core/blob/4dd59067c76dea4a0e8e4bfdda41877a6b16dedc/contracts/interfaces/IUniswapV2Pair.sol
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint256 value);
event Transfer(address indexed from, address indexed to, uint256 value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint256);
function balanceOf(address owner) external view returns (uint256);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 value) external returns (bool);
function transfer(address to, uint256 value) external returns (bool);
function transferFrom(address from, address to, uint256 value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint256);
function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s)
external;
event Mint(address indexed sender, uint256 amount0, uint256 amount1);
event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to);
event Swap(
address indexed sender,
uint256 amount0In,
uint256 amount1In,
uint256 amount0Out,
uint256 amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint256);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint256);
function price1CumulativeLast() external view returns (uint256);
function kLast() external view returns (uint256);
function mint(address to) external returns (uint256 liquidity);
function burn(address to) external returns (uint256 amount0, uint256 amount1);
function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}// SPDX-License-Identifier: GPL-3.0
pragma solidity =0.8.15;
// Taken from: https://github.com/compound-finance/open-oracle/blob/0e148fdb0e8cbe4d412548490609679621ab2325/contracts/Uniswap/UniswapLib.sol
// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
library FixedPoint {
// range: [0, 2**112 - 1]
// resolution: 1 / 2**112
struct uq112x112 {
uint224 _x;
}
// returns a uq112x112 which represents the ratio of the numerator to the denominator
// equivalent to encode(numerator).div(denominator)
function fraction(uint112 numerator, uint112 denominator) internal pure returns (uq112x112 memory) {
require(denominator > 0, "FixedPoint: DIV_BY_ZERO");
return uq112x112((uint224(numerator) << 112) / denominator);
}
// decode a uq112x112 into a uint with 18 decimals of precision
function decode112with18(uq112x112 memory self) internal pure returns (uint256) {
// we only have 256 - 224 = 32 bits to spare, so scaling up by ~60 bits is dangerous
// instead, get close to:
// (x * 1e18) >> 112
// without risk of overflowing, e.g.:
// (x) / 2 ** (112 - lg(1e18))
return uint256(self._x) / 5192296858534827;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
import "../proxy/utils/Initializable.sol";
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract ContextUpgradeable is Initializable {
function __Context_init() internal onlyInitializing {
}
function __Context_init_unchained() internal onlyInitializing {
}
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
/**
* @dev This empty reserved space is put in place to allow future versions to add new
* variables without shifting down storage in the inheritance chain.
* See https://docs.openzeppelin.com/contracts/4.x/upgradeable#storage_gaps
*/
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (proxy/utils/Initializable.sol)
pragma solidity ^0.8.2;
import "../../utils/AddressUpgradeable.sol";
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since proxied contracts do not make use of a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* The initialization functions use a version number. Once a version number is used, it is consumed and cannot be
* reused. This mechanism prevents re-execution of each "step" but allows the creation of new initialization steps in
* case an upgrade adds a module that needs to be initialized.
*
* For example:
*
* [.hljs-theme-light.nopadding]
* ```
* contract MyToken is ERC20Upgradeable {
* function initialize() initializer public {
* __ERC20_init("MyToken", "MTK");
* }
* }
* contract MyTokenV2 is MyToken, ERC20PermitUpgradeable {
* function initializeV2() reinitializer(2) public {
* __ERC20Permit_init("MyToken");
* }
* }
* ```
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To prevent the implementation contract from being used, you should invoke
* the {_disableInitializers} function in the constructor to automatically lock it when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() {
* _disableInitializers();
* }
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
* @custom:oz-retyped-from bool
*/
uint8 private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Triggered when the contract has been initialized or reinitialized.
*/
event Initialized(uint8 version);
/**
* @dev A modifier that defines a protected initializer function that can be invoked at most once. In its scope,
* `onlyInitializing` functions can be used to initialize parent contracts. Equivalent to `reinitializer(1)`.
*/
modifier initializer() {
bool isTopLevelCall = !_initializing;
require(
(isTopLevelCall && _initialized < 1) || (!AddressUpgradeable.isContract(address(this)) && _initialized == 1),
"Initializable: contract is already initialized"
);
_initialized = 1;
if (isTopLevelCall) {
_initializing = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
emit Initialized(1);
}
}
/**
* @dev A modifier that defines a protected reinitializer function that can be invoked at most once, and only if the
* contract hasn't been initialized to a greater version before. In its scope, `onlyInitializing` functions can be
* used to initialize parent contracts.
*
* `initializer` is equivalent to `reinitializer(1)`, so a reinitializer may be used after the original
* initialization step. This is essential to configure modules that are added through upgrades and that require
* initialization.
*
* Note that versions can jump in increments greater than 1; this implies that if multiple reinitializers coexist in
* a contract, executing them in the right order is up to the developer or operator.
*/
modifier reinitializer(uint8 version) {
require(!_initializing && _initialized < version, "Initializable: contract is already initialized");
_initialized = version;
_initializing = true;
_;
_initializing = false;
emit Initialized(version);
}
/**
* @dev Modifier to protect an initialization function so that it can only be invoked by functions with the
* {initializer} and {reinitializer} modifiers, directly or indirectly.
*/
modifier onlyInitializing() {
require(_initializing, "Initializable: contract is not initializing");
_;
}
/**
* @dev Locks the contract, preventing any future reinitialization. This cannot be part of an initializer call.
* Calling this in the constructor of a contract will prevent that contract from being initialized or reinitialized
* to any version. It is recommended to use this to lock implementation contracts that are designed to be called
* through proxies.
*/
function _disableInitializers() internal virtual {
require(!_initializing, "Initializable: contract is initializing");
if (_initialized < type(uint8).max) {
_initialized = type(uint8).max;
emit Initialized(type(uint8).max);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.7.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
(bool success, ) = recipient.call{value: amount}("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(
address target,
bytes memory data,
string memory errorMessage
) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value
) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(
address target,
bytes memory data,
uint256 value,
string memory errorMessage
) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(
address target,
bytes memory data,
string memory errorMessage
) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}{
"optimizer": {
"enabled": true,
"runs": 999999
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"oldCheckpointer","type":"address"},{"indexed":false,"internalType":"address","name":"newCheckpointer","type":"address"}],"name":"CheckpointerUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint8","name":"version","type":"uint8"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"baseToken","type":"address"},{"indexed":false,"internalType":"address","name":"quoteToken","type":"address"},{"indexed":false,"internalType":"uint256","name":"priceCumulative","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"timestamp","type":"uint256"}],"name":"NewCheckpoint","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"},{"inputs":[],"name":"DEFAULT_MIN_CHECKPOINT_INTERVAL","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"RING_BUFFER_SIZE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IUniswapV2Factory","name":"_uniswapFactory","type":"address"}],"name":"__UniswapCheckpoints_init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"checkpointCounts","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"checkpointer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"checkpoints","outputs":[{"internalType":"uint256","name":"priceCumulative","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"baseToken","type":"address"},{"internalType":"address","name":"quoteToken","type":"address"}],"name":"getCurrentCumulativePrice","outputs":[{"internalType":"uint256","name":"priceCumulative","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"baseToken","type":"address"},{"internalType":"address","name":"quoteToken","type":"address"},{"internalType":"uint256","name":"minAge","type":"uint256"}],"name":"getLatestCheckpointOlderThan","outputs":[{"components":[{"internalType":"uint256","name":"priceCumulative","type":"uint256"},{"internalType":"uint256","name":"timestamp","type":"uint256"}],"internalType":"struct IUniswapCheckpoints.Checkpoint","name":"checkpoint","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"baseToken","type":"address"},{"internalType":"address","name":"quoteToken","type":"address"}],"name":"makeCheckpoint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"minCheckpointIntervals","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newCheckpointer","type":"address"}],"name":"setCheckpointer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapFactory","outputs":[{"internalType":"contract IUniswapV2Factory","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"baseToken","type":"address"},{"internalType":"address","name":"quoteToken","type":"address"},{"internalType":"uint256","name":"interval","type":"uint256"}],"name":"updateMinCheckpointInterval","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b506115b4806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c806384fdd2b011610097578063b5b3181211610066578063b5b318121461029f578063e0d94af9146102b2578063f2fde38b146102c5578063ff441dda146102d857600080fd5b806384fdd2b0146101fe5780638bdb2afa146102115780638da5cb5b146102565780639c80f2f11461027457600080fd5b806331439b86116100d357806331439b86146101b0578063715018a6146101c3578063787e5a66146101cb57806382d93d89146101d357600080fd5b806310597be6146101055780631b55763d1461015757806326bb45631461016d5780632cf0765e14610182575b600080fd5b61013d610113366004611362565b60696020908152600093845260408085208252928452828420905282529020805460019091015482565b604080519283526020830191909152015b60405180910390f35b61015f608081565b60405190815260200161014e565b61018061017b366004611362565b6102f8565b005b610195610190366004611362565b610339565b6040805182518152602092830151928101929092520161014e565b6101806101be3660046113a3565b610360565b6101806105b6565b61015f603c81565b61015f6101e13660046113c0565b606860209081526000928352604080842090915290825290205481565b61015f61020c3660046113c0565b6105ca565b6065546102319073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161014e565b60335473ffffffffffffffffffffffffffffffffffffffff16610231565b61015f6102823660046113c0565b606760209081526000928352604080842090915290825290205481565b6101806102ad3660046113c0565b6105dd565b6101806102c03660046113a3565b61088e565b6101806102d33660046113a3565b610915565b6066546102319073ffffffffffffffffffffffffffffffffffffffff1681565b6103006109cc565b73ffffffffffffffffffffffffffffffffffffffff92831660009081526067602090815260408083209490951682529290925291902055565b6040805180820190915260008082526020820152610358848484610a4d565b949350505050565b600054610100900460ff16158080156103805750600054600160ff909116105b8061039a5750303b15801561039a575060005460ff166001145b61042b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561048957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b610491610c14565b73ffffffffffffffffffffffffffffffffffffffff821661050e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f556e6973776170436865636b706f696e74733a207a65726f20616464726573736044820152606401610422565b606580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841617905580156105b257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b5050565b6105be6109cc565b6105c86000610cb3565b565b60006105d68383610d2a565b9392505050565b60665473ffffffffffffffffffffffffffffffffffffffff163314610683576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f556e6973776170436865636b706f696e74733a206e6f7420636865636b706f6960448201527f6e746572000000000000000000000000000000000000000000000000000000006064820152608401610422565b73ffffffffffffffffffffffffffffffffffffffff80831660009081526068602090815260408083209385168352929052205480156107855760006106c884846110c7565b905060006106e185856106dc600187611428565b61110e565b9050818160200151426106f49190611428565b1015610782576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f556e6973776170436865636b706f696e74733a20636865636b706f696e74696e60448201527f6720746f6f206672657175656e740000000000000000000000000000000000006064820152608401610422565b50505b60006107918484610d2a565b905061079e82600161143f565b73ffffffffffffffffffffffffffffffffffffffff808616600081815260686020908152604080832094891680845294825280832095909555845180860186528681524281830152928252606981528482209382529290925291812090610806608086611486565b815260208082019290925260409081016000208351815592820151600190930192909255815173ffffffffffffffffffffffffffffffffffffffff80881682528616918101919091529081018290524260608201527f01ede493ec4497543c7509f3016ed5fc3a5999751ad7770e8eb99beac8f292269060800160405180910390a150505050565b6108966109cc565b6066805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f1466468e771ec9220ea2a8c51c7213e816e2c3e0f07814db2b86a361910c514491016105a9565b61091d6109cc565b73ffffffffffffffffffffffffffffffffffffffff81166109c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610422565b6109c981610cb3565b50565b60335473ffffffffffffffffffffffffffffffffffffffff1633146105c8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610422565b6040805180820182526000808252602080830182905273ffffffffffffffffffffffffffffffffffffffff87811683526068825284832090871683529052919091205480610b1d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f556e6973776170436865636b706f696e74733a206e6f20636865636b706f696e60448201527f7420666f756e64000000000000000000000000000000000000000000000000006064820152608401610422565b6000610b2a600183611428565b90505b6000610b3a87878461110e565b905084816020015142610b4d9190611428565b10610b5c5792506105d6915050565b600082118015610b7557506080610b738385611428565b105b610c01576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f556e6973776170436865636b706f696e74733a206e6f2076616c69642063686560448201527f636b706f696e74000000000000000000000000000000000000000000000000006064820152608401610422565b610c0c600183611428565b915050610b2d565b600054610100900460ff16610cab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610422565b6105c8611192565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6065546040517fe6a4390500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301528381166024830152600092839291169063e6a4390590604401602060405180830381865afa158015610da6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dca919061149a565b905073ffffffffffffffffffffffffffffffffffffffff8116610e6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f556e6973776170436865636b706f696e74733a2070616972206e6f7420666f7560448201527f6e640000000000000000000000000000000000000000000000000000000000006064820152608401610422565b6000610e79611232565b90508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161015610f25578173ffffffffffffffffffffffffffffffffffffffff16635909c0d56040518163ffffffff1660e01b8152600401602060405180830381865afa158015610efa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1e91906114b7565b9250610f97565b8173ffffffffffffffffffffffffffffffffffffffff16635a3d54936040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9491906114b7565b92505b60008060008473ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610fe7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100b91906114f3565b9250925092508363ffffffff168163ffffffff16146110bc5780840373ffffffffffffffffffffffffffffffffffffffff808916908a161015611083578063ffffffff166110598486611248565b517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff160296909601956110ba565b8063ffffffff166110948585611248565b517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff160296909601955b505b505050505092915050565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152606760209081526040808320938516835292905290812054908190036111085750603c5b92915050565b6040805180820182526000808252602080830182905273ffffffffffffffffffffffffffffffffffffffff87811683526069825284832090871683529052918220909161115c608085611486565b81526020019081526020016000206040518060400160405290816000820154815260200160018201548152505090509392505050565b600054610100900460ff16611229576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610422565b6105c833610cb3565b600061124364010000000042611486565b905090565b6040805160208101909152600081526000826dffffffffffffffffffffffffffff16116112d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4669786564506f696e743a204449565f42595f5a45524f0000000000000000006044820152606401610422565b6040805160208101909152806113196dffffffffffffffffffffffffffff85167bffffffffffffffffffffffffffff0000000000000000000000000000607088901b16611543565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690529392505050565b73ffffffffffffffffffffffffffffffffffffffff811681146109c957600080fd5b60008060006060848603121561137757600080fd5b833561138281611340565b9250602084013561139281611340565b929592945050506040919091013590565b6000602082840312156113b557600080fd5b81356105d681611340565b600080604083850312156113d357600080fd5b82356113de81611340565b915060208301356113ee81611340565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561143a5761143a6113f9565b500390565b60008219821115611452576114526113f9565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261149557611495611457565b500690565b6000602082840312156114ac57600080fd5b81516105d681611340565b6000602082840312156114c957600080fd5b5051919050565b80516dffffffffffffffffffffffffffff811681146114ee57600080fd5b919050565b60008060006060848603121561150857600080fd5b611511846114d0565b925061151f602085016114d0565b9150604084015163ffffffff8116811461153857600080fd5b809150509250925092565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8084168061157257611572611457565b9216919091049291505056fea2646970667358221220ceaf8a95cf6e2a3752bfc9a02dbfea7f4fc02eb8616f67002a842e428766b32764736f6c634300080f0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101005760003560e01c806384fdd2b011610097578063b5b3181211610066578063b5b318121461029f578063e0d94af9146102b2578063f2fde38b146102c5578063ff441dda146102d857600080fd5b806384fdd2b0146101fe5780638bdb2afa146102115780638da5cb5b146102565780639c80f2f11461027457600080fd5b806331439b86116100d357806331439b86146101b0578063715018a6146101c3578063787e5a66146101cb57806382d93d89146101d357600080fd5b806310597be6146101055780631b55763d1461015757806326bb45631461016d5780632cf0765e14610182575b600080fd5b61013d610113366004611362565b60696020908152600093845260408085208252928452828420905282529020805460019091015482565b604080519283526020830191909152015b60405180910390f35b61015f608081565b60405190815260200161014e565b61018061017b366004611362565b6102f8565b005b610195610190366004611362565b610339565b6040805182518152602092830151928101929092520161014e565b6101806101be3660046113a3565b610360565b6101806105b6565b61015f603c81565b61015f6101e13660046113c0565b606860209081526000928352604080842090915290825290205481565b61015f61020c3660046113c0565b6105ca565b6065546102319073ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff909116815260200161014e565b60335473ffffffffffffffffffffffffffffffffffffffff16610231565b61015f6102823660046113c0565b606760209081526000928352604080842090915290825290205481565b6101806102ad3660046113c0565b6105dd565b6101806102c03660046113a3565b61088e565b6101806102d33660046113a3565b610915565b6066546102319073ffffffffffffffffffffffffffffffffffffffff1681565b6103006109cc565b73ffffffffffffffffffffffffffffffffffffffff92831660009081526067602090815260408083209490951682529290925291902055565b6040805180820190915260008082526020820152610358848484610a4d565b949350505050565b600054610100900460ff16158080156103805750600054600160ff909116105b8061039a5750303b15801561039a575060005460ff166001145b61042b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201527f647920696e697469616c697a656400000000000000000000000000000000000060648201526084015b60405180910390fd5b600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00166001179055801561048957600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff166101001790555b610491610c14565b73ffffffffffffffffffffffffffffffffffffffff821661050e576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f556e6973776170436865636b706f696e74733a207a65726f20616464726573736044820152606401610422565b606580547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff841617905580156105b257600080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff00ff169055604051600181527f7f26b83ff96e1f2b6a682f133852f6798a09c465da95921460cefb3847402498906020015b60405180910390a15b5050565b6105be6109cc565b6105c86000610cb3565b565b60006105d68383610d2a565b9392505050565b60665473ffffffffffffffffffffffffffffffffffffffff163314610683576040517f08c379a0000000000000000000000000000000000000000000000000000000008152602060048201526024808201527f556e6973776170436865636b706f696e74733a206e6f7420636865636b706f6960448201527f6e746572000000000000000000000000000000000000000000000000000000006064820152608401610422565b73ffffffffffffffffffffffffffffffffffffffff80831660009081526068602090815260408083209385168352929052205480156107855760006106c884846110c7565b905060006106e185856106dc600187611428565b61110e565b9050818160200151426106f49190611428565b1015610782576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602e60248201527f556e6973776170436865636b706f696e74733a20636865636b706f696e74696e60448201527f6720746f6f206672657175656e740000000000000000000000000000000000006064820152608401610422565b50505b60006107918484610d2a565b905061079e82600161143f565b73ffffffffffffffffffffffffffffffffffffffff808616600081815260686020908152604080832094891680845294825280832095909555845180860186528681524281830152928252606981528482209382529290925291812090610806608086611486565b815260208082019290925260409081016000208351815592820151600190930192909255815173ffffffffffffffffffffffffffffffffffffffff80881682528616918101919091529081018290524260608201527f01ede493ec4497543c7509f3016ed5fc3a5999751ad7770e8eb99beac8f292269060800160405180910390a150505050565b6108966109cc565b6066805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff000000000000000000000000000000000000000083168117909355604080519190921680825260208201939093527f1466468e771ec9220ea2a8c51c7213e816e2c3e0f07814db2b86a361910c514491016105a9565b61091d6109cc565b73ffffffffffffffffffffffffffffffffffffffff81166109c0576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610422565b6109c981610cb3565b50565b60335473ffffffffffffffffffffffffffffffffffffffff1633146105c8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610422565b6040805180820182526000808252602080830182905273ffffffffffffffffffffffffffffffffffffffff87811683526068825284832090871683529052919091205480610b1d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f556e6973776170436865636b706f696e74733a206e6f20636865636b706f696e60448201527f7420666f756e64000000000000000000000000000000000000000000000000006064820152608401610422565b6000610b2a600183611428565b90505b6000610b3a87878461110e565b905084816020015142610b4d9190611428565b10610b5c5792506105d6915050565b600082118015610b7557506080610b738385611428565b105b610c01576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602760248201527f556e6973776170436865636b706f696e74733a206e6f2076616c69642063686560448201527f636b706f696e74000000000000000000000000000000000000000000000000006064820152608401610422565b610c0c600183611428565b915050610b2d565b600054610100900460ff16610cab576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610422565b6105c8611192565b6033805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6065546040517fe6a4390500000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff84811660048301528381166024830152600092839291169063e6a4390590604401602060405180830381865afa158015610da6573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dca919061149a565b905073ffffffffffffffffffffffffffffffffffffffff8116610e6f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602260248201527f556e6973776170436865636b706f696e74733a2070616972206e6f7420666f7560448201527f6e640000000000000000000000000000000000000000000000000000000000006064820152608401610422565b6000610e79611232565b90508373ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161015610f25578173ffffffffffffffffffffffffffffffffffffffff16635909c0d56040518163ffffffff1660e01b8152600401602060405180830381865afa158015610efa573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f1e91906114b7565b9250610f97565b8173ffffffffffffffffffffffffffffffffffffffff16635a3d54936040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f70573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f9491906114b7565b92505b60008060008473ffffffffffffffffffffffffffffffffffffffff16630902f1ac6040518163ffffffff1660e01b8152600401606060405180830381865afa158015610fe7573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061100b91906114f3565b9250925092508363ffffffff168163ffffffff16146110bc5780840373ffffffffffffffffffffffffffffffffffffffff808916908a161015611083578063ffffffff166110598486611248565b517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff160296909601956110ba565b8063ffffffff166110948585611248565b517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff160296909601955b505b505050505092915050565b73ffffffffffffffffffffffffffffffffffffffff8083166000908152606760209081526040808320938516835292905290812054908190036111085750603c5b92915050565b6040805180820182526000808252602080830182905273ffffffffffffffffffffffffffffffffffffffff87811683526069825284832090871683529052918220909161115c608085611486565b81526020019081526020016000206040518060400160405290816000820154815260200160018201548152505090509392505050565b600054610100900460ff16611229576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602b60248201527f496e697469616c697a61626c653a20636f6e7472616374206973206e6f74206960448201527f6e697469616c697a696e670000000000000000000000000000000000000000006064820152608401610422565b6105c833610cb3565b600061124364010000000042611486565b905090565b6040805160208101909152600081526000826dffffffffffffffffffffffffffff16116112d1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601760248201527f4669786564506f696e743a204449565f42595f5a45524f0000000000000000006044820152606401610422565b6040805160208101909152806113196dffffffffffffffffffffffffffff85167bffffffffffffffffffffffffffff0000000000000000000000000000607088901b16611543565b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1690529392505050565b73ffffffffffffffffffffffffffffffffffffffff811681146109c957600080fd5b60008060006060848603121561137757600080fd5b833561138281611340565b9250602084013561139281611340565b929592945050506040919091013590565b6000602082840312156113b557600080fd5b81356105d681611340565b600080604083850312156113d357600080fd5b82356113de81611340565b915060208301356113ee81611340565b809150509250929050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60008282101561143a5761143a6113f9565b500390565b60008219821115611452576114526113f9565b500190565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60008261149557611495611457565b500690565b6000602082840312156114ac57600080fd5b81516105d681611340565b6000602082840312156114c957600080fd5b5051919050565b80516dffffffffffffffffffffffffffff811681146114ee57600080fd5b919050565b60008060006060848603121561150857600080fd5b611511846114d0565b925061151f602085016114d0565b9150604084015163ffffffff8116811461153857600080fd5b809150509250925092565b60007bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8084168061157257611572611457565b9216919091049291505056fea2646970667358221220ceaf8a95cf6e2a3752bfc9a02dbfea7f4fc02eb8616f67002a842e428766b32764736f6c634300080f0033
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in GLMR
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
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.