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