-
Notifications
You must be signed in to change notification settings - Fork 9
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
Showing
1 changed file
with
35 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// SPDX-License-Identifier: GPL-3.0-or-later | ||
pragma solidity ^0.8.13; | ||
|
||
interface ISolver { | ||
function prepareInit( | ||
uint256[] memory reserves, | ||
bytes calldata poolParams | ||
) external view returns (bytes memory); | ||
|
||
function prepareAllocation( | ||
uint256 poolId, | ||
uint256 tokenIndex, | ||
uint256 amount | ||
) external view returns (bytes memory); | ||
|
||
function prepareDeallocation( | ||
uint256 poolId, | ||
uint256 tokenIndex, | ||
uint256 amount | ||
) external view returns (bytes memory); | ||
|
||
function prepareSwap( | ||
uint256 poolId, | ||
uint256 tokenInIndex, | ||
uint256 tokenOutIndex, | ||
uint256 amountIn | ||
) external view returns (bool, uint256, bytes memory); | ||
|
||
function getPrice(uint256 poolId) external view returns (uint256); | ||
|
||
function getReservesAndLiquidity(uint256 poolId) | ||
external | ||
view | ||
returns (uint256[] memory reserves, uint256 totalLiquidity); | ||
} |