Skip to content

Latest commit

 

History

History
228 lines (203 loc) · 6.4 KB

FakeUniswapV2RouterLike.md

File metadata and controls

228 lines (203 loc) · 6.4 KB

FakeUniswapV2RouterLike.sol

View Source: contracts/fakes/FakeUniswapV2RouterLike.sol

↗ Extends: IUniswapV2RouterLike

FakeUniswapV2RouterLike

Contract Members

Constants & Variables

address public tokenA;
address public tokenB;

Functions

getAmountsOut

function getAmountsOut(uint256 multiplier, address[] ) external pure
returns(uint256[])

Arguments

Name Type Description
multiplier uint256
address[]
Source Code
function getAmountsOut(uint256 multiplier, address[] calldata) external pure override returns (uint256[] memory) {
    uint256[] memory amounts = new uint256[](2);

    amounts[0] = multiplier;
    amounts[1] = multiplier;

    return amounts;
  }

addLiquidity

function addLiquidity(address _tokenA, address _tokenB, uint256 _amountADesired, uint256 _amountBDesired, uint256 , uint256 , address , uint256 ) external nonpayable
returns(amountA uint256, amountB uint256, liquidity uint256)

Arguments

Name Type Description
_tokenA address
_tokenB address
_amountADesired uint256
_amountBDesired uint256
uint256
uint256
address
uint256
Source Code
function addLiquidity(
    address _tokenA,
    address _tokenB,
    uint256 _amountADesired,
    uint256 _amountBDesired,
    uint256,
    uint256,
    address,
    uint256
  )
    external
    override
    returns (
      uint256 amountA,
      uint256 amountB,
      uint256 liquidity
    )
  {
    tokenA = _tokenA;
    tokenB = _tokenB;

    amountA = _amountADesired;
    amountB = _amountBDesired;
    liquidity = 1;
  }

Contracts