mirror of
https://github.com/Instadapp/smart-contract.git
synced 2024-07-29 22:08:07 +00:00
30 lines
1.4 KiB
Solidity
30 lines
1.4 KiB
Solidity
|
pragma solidity 0.5.0;
|
||
|
|
||
|
|
||
|
interface UniswapFactoryInterface {
|
||
|
// Get Exchange and Token Info
|
||
|
function getExchange(address token) external view returns (address exchange);
|
||
|
function getToken(address exchange) external view returns (address token);
|
||
|
}
|
||
|
|
||
|
// Solidity Interface
|
||
|
|
||
|
interface UniswapPool {
|
||
|
// Address of ERC20 token sold on this exchange
|
||
|
function tokenAddress() external view returns (address token);
|
||
|
// Address of Uniswap Factory
|
||
|
function factoryAddress() external view returns (address factory);
|
||
|
// Provide Liquidity
|
||
|
function addLiquidity(uint256 min_liquidity, uint256 max_tokens, uint256 deadline) external payable returns (uint256);
|
||
|
function removeLiquidity(uint256 amount, uint256 min_eth, uint256 min_tokens, uint256 deadline) external returns (uint256, uint256);
|
||
|
// ERC20 comaptibility for liquidity tokens
|
||
|
function name() external returns (bytes32);
|
||
|
function symbol() external returns (bytes32);
|
||
|
function decimals() external returns (uint256);
|
||
|
function transfer(address _to, uint256 _value) external returns (bool);
|
||
|
function transferFrom(address _from, address _to, uint256 value) external returns (bool);
|
||
|
function approve(address _spender, uint256 _value) external returns (bool);
|
||
|
function allowance(address _owner, address _spender) external view returns (uint256);
|
||
|
function balanceOf(address _owner) external view returns (uint256);
|
||
|
}
|