Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/interfaces/IStablecoinDEX.sol
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ interface IStablecoinDEX {
error BelowMinimumOrderSize(uint128 amount);
error InvalidBaseToken();
error OrderNotStale();
error IndexAlreadySet();

event OrderCancelled(uint128 indexed orderId);
event OrderFilled(
Expand Down Expand Up @@ -110,6 +111,10 @@ interface IStablecoinDEX {
view
returns (address base, address quote, int16 bestBidTick, int16 bestAskTick);

function bookIndexForKey(bytes32 key) external view returns (bool exists, uint32 index);

function bookKeyForIndex(uint32 index) external view returns (bytes32 key);

function cancel(uint128 orderId) external;

function cancelStaleOrder(uint128 orderId) external;
Expand Down Expand Up @@ -143,6 +148,8 @@ interface IStablecoinDEX {
view
returns (uint128 amountIn);

function setBookIndex(uint32 index) external;

function swapExactAmountIn(address tokenIn, address tokenOut, uint128 amountIn, uint128 minAmountOut)
external
returns (uint128 amountOut);
Expand Down