Documentation Index
Fetch the complete documentation index at: https://docs.gtfo.vc/llms.txt
Use this file to discover all available pages before exploring further.
All interactions go through Controller.execute. The enum and structs below reflect the current main branch.
enum Action {
OPEN,
MAKE,
LIMIT,
TAKE,
SPEND,
CLAIM,
CANCEL
}
function execute(
Action[] calldata actionList,
bytes[] calldata paramsDataList,
uint64 deadline
) external returns (OrderId[] memory ids);
Structs (IController)
struct MakeOrderParams {
BookId id;
Tick tick;
uint256 quoteAmount;
address referrer;
}
struct LimitOrderParams {
BookId takeBookId;
BookId makeBookId;
uint256 limitPrice;
Tick tick;
uint256 quoteAmount;
address referrer;
}
struct TakeOrderParams {
BookId id;
uint256 limitPrice;
uint256 quoteAmount;
uint256 maxBaseAmount;
address referrer;
}
struct SpendOrderParams {
BookId id;
uint256 limitPrice;
uint256 baseAmount;
uint256 minQuoteAmount;
address referrer;
}
struct ClaimOrderParams {
OrderId id;
}
struct CancelOrderParams {
OrderId id;
uint256 leftQuoteAmount;
}
Encoding schemas
When you build paramsDataList[i], encode the fields above in order using ABI parameter types:
BookId → uint192
OrderId → uint256
Tick → int24