diff --git a/src/interfaces/IStablecoinDEX.sol b/src/interfaces/IStablecoinDEX.sol index 44ee229..c061d1e 100644 --- a/src/interfaces/IStablecoinDEX.sol +++ b/src/interfaces/IStablecoinDEX.sol @@ -58,6 +58,7 @@ interface IStablecoinDEX { error BelowMinimumOrderSize(uint128 amount); error InvalidBaseToken(); error OrderNotStale(); + error IndexAlreadySet(); event OrderCancelled(uint128 indexed orderId); event OrderFilled( @@ -110,6 +111,10 @@ interface IStablecoinDEX { view returns (address base, address quote, int16 bestBidTick, int16 bestAskTick); + function bookIndexForKey(bytes32 bookKey) external view returns (bool set, uint32 index); + + function bookKeyForIndex(uint32 index) external view returns (bytes32 bookKey); + function cancel(uint128 orderId) external; function cancelStaleOrder(uint128 orderId) external; @@ -133,6 +138,8 @@ interface IStablecoinDEX { function priceToTick(uint32 price) external pure returns (int16 tick); + function setBookIndex(uint32 index) external; + function quoteSwapExactAmountIn(address tokenIn, address tokenOut, uint128 amountIn) external view