An embeddable, programmable order book framework
npm install @verto/flexor
yarn add @verto/flexYour SmartWeave contract state MUST contain the following variables in order for the Verto Components to function properly:
{
emergencyHaltWallet: "",
halted: false,
pairs: [],
usedTransfers: [],
invocations: [],
foreignCalls: []
}This framework includes the core functions necessary to give SmartWeave contracts the ability to embed and manage a central limit order book.
To use the library, you'll need to import its functions
import {
AddPair,
CancelOrder,
CreateOrder,
Halt,
ReadOutbox,
} from "@verto/flex";const { newState, result } = await AddPair(state, action);