0.2.6 • Published 21 days ago

@openbook-dex/openbook-v2 v0.2.6

Weekly downloads
-
License
MIT
Repository
github
Last release
21 days ago

OpenBook V2

A central-limit order-book program based on Mango V4 and the previous OpenBook program (which was a fork of Serum).

License

See the LICENSE file.

The majority of this repo is MIT-licensed, but some parts needed for compiling the Solana program are under GPL.

All GPL code is gated behind the enable-gpl feature. If you use the openbook-v2 crate as a dependency with the client or cpi features, you use only MIT parts of it.

The intention is for you to be able to depend on the openbook-v2 crate for building closed-source tools and integrations, including other Solana programs that call into the Openbook program.

But deriving a Solana program with similar functionality to the Openbook program from this codebase would require the changes and improvements to stay publicly available under GPL.

Deployed versions

tag networkprogram ID
v1.7mainnetopnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb
v1.7devnetopnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb
v1.7testnetopnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb

Building & testing

Pre-requisites

Before you can build the program, you will first need to install the following:

Installing

To install the repo, run:

git clone https://github.com/openbook-dex/openbook-v2.git --recursive

The recursive flag ensures that you receive all of the submodules. If you have already cloned without passing in this flag, you can run:

git submodule init
git submodule update

To ensure that you always have the latest submodules, you can configure your git like so:

git config --global submodule.recurse true

Building

To build, run:

just build

IDL

To generate the progam & typescript IDLs, run:

just idl

Testing

To see whether all of the tests are passing, run:

just test-all

To drill down on a specific test (e.g., test_expired_order), run:

just test test_expired_order

If you want to have tests that automatically re-run when you edit a file, install entr and run:

just test-dev

TS Client

yarn build

TS Testing

export SOL_RPC_URL=https://a.b.c
export KEYPAIR="[1,2,3,4,...]"
yarn ts/client/src/test/market.ts
yarn ts/client/src/test/openOrders.ts
0.2.6

21 days ago

0.2.5

26 days ago

0.2.4

27 days ago

0.2.3

1 month ago

0.2.2

2 months ago

0.2.1

2 months ago

0.2.0

2 months ago

0.1.10

3 months ago

0.1.9

3 months ago

0.1.8

3 months ago

0.1.7

4 months ago

0.1.6

4 months ago

0.1.4

4 months ago

0.1.5

4 months ago

0.1.3

4 months ago

0.1.2

5 months ago

0.1.1

5 months ago

0.1.0

5 months ago

0.0.23

5 months ago

0.0.24

5 months ago

0.0.25

5 months ago

0.0.20

5 months ago

0.0.21

5 months ago

0.0.22

5 months ago

0.0.19

5 months ago

0.0.18

6 months ago

0.0.17

6 months ago

0.0.16

6 months ago

0.0.15

6 months ago

0.0.14

6 months ago

0.0.13

6 months ago

0.0.12

6 months ago

0.0.11

6 months ago

0.0.10

7 months ago

0.0.9

7 months ago

0.0.8

7 months ago

0.0.7

7 months ago

0.0.6

8 months ago

0.0.5

9 months ago

0.0.4

9 months ago

0.0.3

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago