Giter VIP home page Giter VIP logo

openbook-v2's Introduction

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  network program ID
v1.7 mainnet opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb
v1.7 devnet opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb
v1.7 testnet opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb

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

openbook-v2's People

Contributors

skrrb avatar binyebarwe avatar metaproph3t avatar silas-x avatar lou-kamades avatar mschneider avatar godmodegalactus avatar riordanp avatar 0xbridges avatar grooviegermanikus avatar brittcyr avatar kizmt avatar ozodimgba avatar arrowana avatar dboures avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.