-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rename to camelotV2 and add interfaces
- Loading branch information
1 parent
5b0ad2c
commit eeb3296
Showing
9 changed files
with
181 additions
and
39 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
8 changes: 4 additions & 4 deletions
8
...racts/factories/UniswapV2RelayerChild.sol → ...racts/factories/CamelotV2RelayerChild.sol
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 |
---|---|---|
@@ -1,15 +1,15 @@ | ||
// SPDX-License-Identifier: GPL-3.0 | ||
pragma solidity 0.7.6; | ||
|
||
import {UniswapV2Relayer} from '@contracts/oracles/UniswapV2Relayer.sol'; | ||
import {CamelotV2Relayer} from '@contracts/oracles/CamelotV2Relayer.sol'; | ||
import {FactoryChild} from '@contracts/factories/FactoryChild.sol'; | ||
|
||
contract UniswapV2RelayerChild is UniswapV2Relayer, FactoryChild { | ||
contract CamelotV2RelayerChild is CamelotV2Relayer, FactoryChild { | ||
// --- Init --- | ||
constructor( | ||
address _algebraV2Factory, | ||
address _camelotV2Factory, | ||
address _baseToken, | ||
address _quoteToken, | ||
uint32 _quotePeriod | ||
) UniswapV2Relayer(_algebraV2Factory, _baseToken, _quoteToken, _quotePeriod) {} | ||
) CamelotV2Relayer(_camelotV2Factory, _baseToken, _quoteToken, _quotePeriod) {} | ||
} |
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,22 @@ | ||
pragma solidity 0.7.6; | ||
|
||
interface ICamelotFactory { | ||
event PairCreated(address indexed token0, address indexed token1, address pair, uint256); | ||
|
||
function owner() external view returns (address); | ||
function feePercentOwner() external view returns (address); | ||
function setStableOwner() external view returns (address); | ||
function feeTo() external view returns (address); | ||
|
||
function ownerFeeShare() external view returns (uint256); | ||
function referrersFeeShare(address) external view returns (uint256); | ||
|
||
function getPair(address tokenA, address tokenB) external view returns (address pair); | ||
function allPairs(uint256) external view returns (address pair); | ||
function allPairsLength() external view returns (uint256); | ||
|
||
function createPair(address tokenA, address tokenB) external returns (address pair); | ||
|
||
function setFeeTo(address) external; | ||
function feeInfo() external view returns (uint _ownerFeeShare, address _feeTo); | ||
} |
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,93 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
pragma solidity 0.7.6; | ||
|
||
interface ICamelotPair { | ||
event Approval(address indexed owner, address indexed spender, uint256 value); | ||
event Transfer(address indexed from, address indexed to, uint256 value); | ||
|
||
function name() external pure returns (string memory); | ||
|
||
function symbol() external pure returns (string memory); | ||
|
||
function decimals() external pure returns (uint8); | ||
|
||
function totalSupply() external view returns (uint256); | ||
|
||
function balanceOf(address owner) external view returns (uint256); | ||
|
||
function allowance(address owner, address spender) external view returns (uint256); | ||
|
||
function approve(address spender, uint256 value) external returns (bool); | ||
|
||
function transfer(address to, uint256 value) external returns (bool); | ||
|
||
function transferFrom(address from, address to, uint256 value) external returns (bool); | ||
|
||
function DOMAIN_SEPARATOR() external view returns (bytes32); | ||
|
||
function PERMIT_TYPEHASH() external pure returns (bytes32); | ||
|
||
function nonces(address owner) external view returns (uint256); | ||
|
||
function permit( | ||
address owner, | ||
address spender, | ||
uint256 value, | ||
uint256 deadline, | ||
uint8 v, | ||
bytes32 r, | ||
bytes32 s | ||
) external; | ||
|
||
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 precisionMultiplier0() external pure returns (uint256); | ||
|
||
function precisionMultiplier1() external pure returns (uint256); | ||
|
||
function MINIMUM_LIQUIDITY() external pure returns (uint256); | ||
|
||
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, uint16 token0feePercent, uint16 token1FeePercent); | ||
|
||
function getAmountOut(uint256 amountIn, address tokenIn) external view returns (uint256); | ||
|
||
function kLast() external view returns (uint256); | ||
|
||
function setFeePercent(uint16 token0FeePercent, uint16 token1FeePercent) 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 swap(uint256 amount0Out, uint256 amount1Out, address to, bytes calldata data, address referrer) external; | ||
|
||
function skim(address to) external; | ||
|
||
function sync() external; | ||
|
||
function initialize(address, address) external; | ||
|
||
function stableSwap() external view returns (bool); | ||
} |