diff --git a/src/interfaces/IStablecoinDEX.sol b/src/interfaces/IStablecoinDEX.sol index 44ee229..fa0d06b 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 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; @@ -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);