forked from Uniswap/v4-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8e9ffb1
commit 5216582
Showing
5 changed files
with
52 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
pragma solidity ^0.5.11; | ||
|
||
interface IUniswapERC20 { | ||
|
||
event SwapAForB(address indexed buyer, uint256 amountSold, uint256 amountBought); | ||
event SwapBForA(address indexed buyer, uint256 amountSold, uint256 amountBought); | ||
event AddLiquidity(address indexed provider, uint256 amountTokenA, uint256 amountTokenB); | ||
event RemoveLiquidity(address indexed provider, uint256 amountTokenA, uint256 amountTokenB); | ||
|
||
|
||
function getInputPrice(uint256 inputAmount, uint256 inputReserve, uint256 outputReserve) external pure returns (uint256); | ||
|
||
|
||
function getOutputPrice(uint256 outputAmount, uint256 inputReserve, uint256 outputReserve) external pure returns (uint256); | ||
|
||
|
||
//TO: DO msg.sender is wrapper | ||
function swapInput(address inputToken, uint256 amountSold, address recipient) external returns (uint256); | ||
|
||
|
||
//TO: DO msg.sender is wrapper | ||
function swapOutput(address outputToken, uint256 amountBought, address recipient) external returns (uint256); | ||
|
||
|
||
function getInputPrice(address inputToken, uint256 amountSold) external view returns (uint256); | ||
|
||
|
||
function getOutputPrice(address outputToken, uint256 amountBought) external view returns (uint256); | ||
|
||
|
||
function tokenAAddress() external view returns (address); | ||
|
||
|
||
function tokenBAddress() external view returns (address); | ||
|
||
|
||
function addLiquidity(uint256 amountA, uint256 maxTokenB, uint256 minLiquidity) external returns (uint256); | ||
|
||
|
||
function removeLiquidity(uint256 amount, uint256 minTokenA, uint256 minTokenB) external returns (uint256, uint256); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
pragma solidity ^0.5.11; | ||
|
||
interface IUniswapERC20Factory { | ||
|
||
event NewERC20Exchange(address indexed tokenA, address indexed tokenB, address indexed exchange); | ||
|
||
function createExchange(address token1, address token2) external returns (address); | ||
} |