View Source: contracts/fakes/FakeUniswapV2RouterLike.sol
↗ Extends: IUniswapV2RouterLike
FakeUniswapV2RouterLike
Constants & Variables
address public tokenA;
address public tokenB;
- factory()
- getAmountOut(uint256 amountIn, uint256 , uint256 )
- getAmountIn(uint256 amountOut, uint256 , uint256 )
- getAmountsOut(uint256 multiplier, address[] )
- quote(uint256 amountA, uint256 , uint256 )
- getAmountsIn(uint256 multiplier, address[] )
- addLiquidity(address _tokenA, address _tokenB, uint256 _amountADesired, uint256 _amountBDesired, uint256 , uint256 , address , uint256 )
function factory() external view
returns(address)
Arguments
Name | Type | Description |
---|
Source Code
function factory() external view override returns (address) {
return address(this);
}
function getAmountOut(uint256 amountIn, uint256 , uint256 ) external pure
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
amountIn | uint256 | |
uint256 | ||
uint256 |
Source Code
function getAmountOut(
uint256 amountIn,
uint256,
uint256
) external pure override returns (uint256) {
return amountIn * 2;
}
function getAmountIn(uint256 amountOut, uint256 , uint256 ) external pure
returns(uint256)
Arguments
Name | Type | Description |
---|---|---|
amountOut | uint256 | |
uint256 | ||
uint256 |
Source Code
function getAmountIn(
uint256 amountOut,
uint256,
uint256
) external pure override returns (uint256) {
return amountOut * 2;
}
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;
}
function quote(uint256 amountA, uint256 , uint256 ) public pure
returns(amountB uint256)
Arguments
Name | Type | Description |
---|---|---|
amountA | uint256 | |
uint256 | ||
uint256 |
Source Code
function quote(
uint256 amountA,
uint256,
uint256
) public pure virtual override returns (uint256 amountB) {
return amountA;
}
function getAmountsIn(uint256 multiplier, address[] ) external pure
returns(uint256[])
Arguments
Name | Type | Description |
---|---|---|
multiplier | uint256 | |
address[] |
Source Code
function getAmountsIn(uint256 multiplier, address[] calldata) external pure override returns (uint256[] memory) {
uint256[] memory amounts = new uint256[](2);
amounts[0] = multiplier;
amounts[1] = multiplier;
return amounts;
}
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;
}
- AaveStrategy
- AccessControl
- AccessControlLibV1
- Address
- BaseLibV1
- BokkyPooBahsDateTimeLibrary
- BondPool
- BondPoolBase
- BondPoolLibV1
- CompoundStrategy
- Context
- Cover
- CoverBase
- CoverLibV1
- CoverReassurance
- CoverStake
- CoverUtilV1
- cxToken
- cxTokenFactory
- cxTokenFactoryLibV1
- Delayable
- Destroyable
- ERC165
- ERC20
- FakeAaveLendingPool
- FakeCompoundDaiDelegator
- FakePriceOracle
- FakeRecoverable
- FakeStore
- FakeToken
- FakeUniswapPair
- FakeUniswapV2FactoryLike
- FakeUniswapV2PairLike
- FakeUniswapV2RouterLike
- FaultyAaveLendingPool
- FaultyCompoundDaiDelegator
- Finalization
- ForceEther
- Governance
- GovernanceUtilV1
- IAaveV2LendingPoolLike
- IAccessControl
- IBondPool
- IClaimsProcessor
- ICompoundERC20DelegatorLike
- ICover
- ICoverReassurance
- ICoverStake
- ICxToken
- ICxTokenFactory
- IERC165
- IERC20
- IERC20Detailed
- IERC20Metadata
- IERC3156FlashBorrower
- IERC3156FlashLender
- IFinalization
- IGovernance
- ILendingStrategy
- ILiquidityEngine
- IMember
- INeptuneRouterV1
- InvalidStrategy
- IPausable
- IPolicy
- IPolicyAdmin
- IPriceOracle
- IProtocol
- IRecoverable
- IReporter
- IResolution
- IResolvable
- IStakingPools
- IStore
- IStoreLike
- IUniswapV2FactoryLike
- IUniswapV2PairLike
- IUniswapV2RouterLike
- IUnstakable
- IVault
- IVaultDelegate
- IVaultFactory
- IWitness
- LiquidityEngine
- MaliciousToken
- MockAccessControlUser
- MockCoverUtilUser
- MockCxToken
- MockCxTokenPolicy
- MockCxTokenStore
- MockFlashBorrower
- MockLiquidityEngineUser
- MockProcessorStore
- MockProcessorStoreLib
- MockProtocol
- MockRegistryClient
- MockStore
- MockStoreKeyUtilUser
- MockValidationLibUser
- MockVault
- MockVaultLibUser
- NeptuneRouterV1
- NPM
- NpmDistributor
- NTransferUtilV2
- NTransferUtilV2Intermediate
- Ownable
- Pausable
- Policy
- PolicyAdmin
- PolicyHelperV1
- PoorMansERC20
- POT
- PriceLibV1
- Processor
- ProtoBase
- Protocol
- ProtoUtilV1
- Recoverable
- ReentrancyGuard
- RegistryLibV1
- Reporter
- Resolution
- Resolvable
- RoutineInvokerLibV1
- SafeERC20
- StakingPoolBase
- StakingPoolCoreLibV1
- StakingPoolInfo
- StakingPoolLibV1
- StakingPoolReward
- StakingPools
- Store
- StoreBase
- StoreKeyUtil
- StrategyLibV1
- Strings
- TimelockController
- Unstakable
- ValidationLibV1
- Vault
- VaultBase
- VaultDelegate
- VaultDelegateBase
- VaultDelegateWithFlashLoan
- VaultFactory
- VaultFactoryLibV1
- VaultLibV1
- VaultLiquidity
- VaultStrategy
- WithFlashLoan
- WithPausability
- WithRecovery
- Witness