feat(interfaces): add pair, factory and callee interfaces
This commit is contained in:
1 parent
4b7a996e41
commit
37278f2d17
3 files changed
+58
No files matched your search
@@ -0,0 +1,6 @@
|
|||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
pragma solidity 0.8.36;
|
||||||
|
|
||||||
|
interface IFluxCallee {
|
||||||
|
function fluxCall(address sender, uint256 amount0, uint256 amount1, bytes calldata data) external;
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
pragma solidity 0.8.36;
|
||||||
|
|
||||||
|
interface IFluxFactory {
|
||||||
|
event PairCreated(address indexed token0, address indexed token1, address pair, uint256 pairCount);
|
||||||
|
|
||||||
|
function feeTo() external view returns (address);
|
||||||
|
function feeToSetter() external view returns (address);
|
||||||
|
function getPair(address tokenA, address tokenB) external view returns (address pair);
|
||||||
|
function allPairs(uint256 index) external view returns (address pair);
|
||||||
|
function allPairsLength() external view returns (uint256);
|
||||||
|
function createPair(address tokenA, address tokenB) external returns (address pair);
|
||||||
|
function setFeeTo(address to) external;
|
||||||
|
function setFeeToSetter(address setter) external;
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
// SPDX-License-Identifier: MIT
|
||||||
|
pragma solidity 0.8.36;
|
||||||
|
|
||||||
|
interface IFluxPair {
|
||||||
|
event Mint(address indexed sender, uint256 amount0, uint256 amount1);
|
||||||
|
event Burn(address indexed sender, uint256 amount0, uint256 amount1, address indexed to);
|
||||||
|
event Swap(
|
||||||
|
address indexed sender,
|
||||||
|
uint256 amount0In,
|
||||||
|
uint256 amount1In,
|
||||||
|
uint256 amount0Out,
|
||||||
|
uint256 amount1Out,
|
||||||
|
address indexed to
|
||||||
|
);
|
||||||
|
event Sync(uint112 reserve0, uint112 reserve1);
|
||||||
|
|
||||||
|
function factory() external view returns (address);
|
||||||
|
function token0() external view returns (address);
|
||||||
|
function token1() external view returns (address);
|
||||||
|
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
|
||||||
|
function price0CumulativeLast() external view returns (uint256);
|
||||||
|
function price1CumulativeLast() external view returns (uint256);
|
||||||
|
function minimumLiquidity() external view returns (uint256);
|
||||||
|
|
||||||
|
function initialize(address firstToken, address secondToken) external;
|
||||||
|
function mint(address to) external returns (uint256 liquidity);
|
||||||
|
function burn(address to) external returns (uint256 amount0, uint256 amount1);
|
||||||
|
function swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data) external;
|
||||||
|
function skim(address to) external;
|
||||||
|
function sync() external;
|
||||||
|
|
||||||
|
function totalSupply() external view returns (uint256);
|
||||||
|
function balanceOf(address owner) external view 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);
|
||||||
|
}
|
||||||
Reference in new issue
Block a user