Go to file
SpaceMonkey 286fd40bba fix blockhash bug 2023-02-01 15:10:46 +02:00
src fix blockhash bug 2023-02-01 15:10:46 +02:00
.gitignore init 2023-02-01 02:00:34 +02:00
LICENSE init 2023-02-01 02:00:34 +02:00
README.md support keypair or wallet_path 2023-02-01 13:55:20 +02:00
package.json blockhash 2023-02-01 11:51:18 +02:00
start-cranker.sh init 2023-02-01 02:00:34 +02:00
tsconfig.json init 2023-02-01 02:00:34 +02:00
yarn.lock blockhash 2023-02-01 11:51:18 +02:00

README.md

OpenBook crank script

OpenBook needs to be cranked to process orderbook events. The initial code was taken from the same crank script for openbook in mango-v3-client, so most credit goes to Mango team.

Install deps first:

yarn install

Run:

make sure to create a JSON file containing the keypair formatted as a byte array e.g. [1,3,4...]

ENDPOINT_URL=... WALLET_PATH=./path/to/wallet.json ./start-cranker.sh

Or run with KEYPAIR directly:

ENDPOINT_URL=... KEYPAIR=[1,3,4...] ./start-cranker.sh

to run in the background, pass "-d" or "--daemon"

env args to pay attention to:

  HIGH_FEE_MARKETS,      // markets to apply a priority fee for e.g. [0,1] to apply on the first two markets in markets.json
  DEFAULT_CU_PRICE,     // extra microlamports per cu for any market
  PRIORITY_CU_PRICE,     // extra microlamports per cu for high fee markets

TODO: