IUniswapV2Pair
Title: IUniswapV2Pair
Author: Vendored minimal subset of Uniswap V2 (https://github.com/Uniswap/v2-core/blob/master/contracts/interfaces/IUniswapV2Pair.sol).
Upstream license: GPL-3.0 (repository license; the upstream file has no SPDX tag).
Minimal interface for Uniswap V2 pair contracts.
Vendored subset covering cumulative prices and reserves — do not add a uniswap-v2-core dependency.
Functions
price0CumulativeLast
Returns the cumulative price of token0 since the pair was created.
function price0CumulativeLast() external view returns (uint256);Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint256 |
price1CumulativeLast
Returns the cumulative price of token1 since the pair was created.
function price1CumulativeLast() external view returns (uint256);Returns
| Name | Type | Description |
|---|---|---|
| <none> | uint256 |
getReserves
Returns the current reserves of both tokens and the last update timestamp.
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);Returns
| Name | Type | Description |
|---|---|---|
| reserve0 | uint112 | Reserve of token0. |
| reserve1 | uint112 | Reserve of token1. |
| blockTimestampLast | uint32 | Timestamp of the last reserve update (mod 2**32). |