Skip to content

Files

Latest commit

 

History

History
258 lines (230 loc) · 7.36 KB

FakeUniswapV2PairLike.md

File metadata and controls

258 lines (230 loc) · 7.36 KB

FakeUniswapV2PairLike.sol

View Source: contracts/fakes/FakeUniswapV2PairLike.sol

↗ Extends: IUniswapV2PairLike

FakeUniswapV2PairLike

Contract Members

Constants & Variables

address public token0;
address public token1;

Functions

function (address _token0, address _token1) public nonpayable

Arguments

Name Type Description
_token0 address
_token1 address
Source Code
constructor(address _token0, address _token1) {
    token0 = _token0;
    token1 = _token1;
  }

totalSupply

function totalSupply() external pure
returns(uint256)

Arguments

Name Type Description
Source Code
function totalSupply() external pure override returns (uint256) {
    return 100 ether;
  }

getReserves

function getReserves() external view
returns(reserve0 uint112, reserve1 uint112, blockTimestampLast uint32)

Arguments

Name Type Description
Source Code
function getReserves()
    external
    view
    override
    returns (
      uint112 reserve0,
      uint112 reserve1,
      uint32 blockTimestampLast
    )
  {
    reserve0 = 200 ether;
    reserve1 = 100 ether;
    blockTimestampLast = uint32(block.timestamp); // solhint-disable-line
  }

Contracts