Skip to content

Commit

Permalink
feat: add wip ISolver
Browse files Browse the repository at this point in the history
  • Loading branch information
clemlak committed Apr 12, 2024
1 parent 469e524 commit e93f4c6
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions src/interfaces/ISolver.sol
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);
}

0 comments on commit e93f4c6

Please sign in to comment.