/jet-v2

Implementation of the Jet Protocol V2 programs for Solana

Primary LanguageTypeScriptGNU Affero General Public License v3.0AGPL-3.0

Jet V2

Build Discord License

Install

Solana

Make sure you update Solana to a newer version.

sh -c "$(curl -sSfL https://release.solana.com/v1.11.10/install)"

Install anchor. Please see the Anchor Documentation

cargo install --git https://github.com/project-serum/anchor avm --locked --force

avm install 0.24.2
avm use 0.24.2
anchor --version # anchor-cli 0.24.2

Wasm Pack

Install the wasm-pack tool

cargo install wasm-pack

Yarn

Install the project's node_modules

yarn

Test

Run the full test suite used by the github CI workflow. This requires all dependencies to be installed:

./check

Run it in a docker container that already contains all the solana and anchor dependencies. This only requires docker:

./check in-docker

Run a single job from the workflow:

./check [in-docker] [job-name (e.g. anchor-test)]

App

Ensure you have a /app/.env file with the required variables:

REACT_APP_RPC_TOKEN = <YOUR_RPC_TOKEN>
REACT_APP_RPC_DEV_TOKEN = <YOUR_DEV_RPC_TOKEN>
REACT_APP_IP_REGISTRY = <YOUR_IP_REGISTRY_TOKEN>
REACT_APP_LOGROCKET_PROJECT = ""

Run

yarn
yarn dev

to run the app.

If watch or wasm-pack are missing (they should be installed automatically after running yarn) Install Cargo dependencies

cargo install cargo-watch
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh

Documentations

Docs Docs

Developer resources for integrating with Jet Margin Program.

Margin Program

View the rust docs for the full package documentation and available API.

Margin TypeScript Client

View the typedocs for the full package documentation and available API.

View more examples for usage reference.