Skip to main content

MockUniswapV2PairTrade

Functions

constructor

function constructor(
uint256 _price0CumulativeLast,
uint256 _price1CumulativeLast,
uint32 _blockTimestampLast,
uint112 r0,
uint112 r1
) public

Parameters

NameTypeDescription
_price0CumulativeLastuint256
_price1CumulativeLastuint256
_blockTimestampLastuint32
r0uint112
r1uint112

getReserves

function getReserves() public returns (uint112, uint112, uint32)

simulateTrade

function simulateTrade(
uint112 newReserve0,
uint112 newReserve1,
uint32 blockTimestamp
) external

Parameters

NameTypeDescription
newReserve0uint112
newReserve1uint112
blockTimestampuint32

set

function set(
uint256 _price0CumulativeLast,
uint256 _price1CumulativeLast,
uint32 _blockTimestampLast
) public

Parameters

NameTypeDescription
_price0CumulativeLastuint256
_price1CumulativeLastuint256
_blockTimestampLastuint32

setReserves

function setReserves(
uint112 r0,
uint112 r1
) public

Parameters

NameTypeDescription
r0uint112
r1uint112