Go to file
Henry-E 24c6e5c984
Bump solana program version (#33)
2022-10-28 11:52:35 -04:00
deps Add init and close open orders instructions (#1) 2021-05-31 13:45:24 -07:00
migrations Init repo 2021-04-30 01:29:48 -07:00
programs/swap Bump solana program version (#33) 2022-10-28 11:52:35 -04:00
tests use new Provider interface (#30) 2022-04-11 14:23:45 -04:00
.gitignore Init repo 2021-04-30 01:29:48 -07:00
.gitmodules Init repo 2021-04-30 01:29:48 -07:00
.travis.yml Add init and close open orders instructions (#1) 2021-05-31 13:45:24 -07:00
Anchor.toml Anchor.toml: remove safety check feature (#29) 2022-02-20 19:22:54 -05:00
Cargo.lock bump dep 2022-07-04 18:47:25 -04:00
Cargo.toml Init repo 2021-04-30 01:29:48 -07:00
LICENSE Add LICENSE 2021-05-12 20:49:35 -07:00
README.md Init repo 2021-04-30 01:29:48 -07:00

README.md

Swap

Swap provides a convenient API to the Serum DEX for performing instantly settled token swaps directly on the order book.

Developing

This program requires building the Serum DEX from source, which is done using git submodules.

Install Submodules

Pull the source

git submodule init
git submodule update

Build the DEX

Build it

cd deps/serum-dex/dex/ && cargo build-bpf && cd ../../../

Build

Anchor is used for developoment, and it's recommended workflow is used here. To get started, see the guide.

anchor build --verifiable

The --verifiable flag should be used before deploying so that your build artifacts can be deterministically generated with docker.

Test

anchor test

Verify

To verify the program deployed on Solana matches your local source code, install docker, cd programs/swap, and run

anchor verify <program-id | write-buffer>

A list of build artifacts can be found under releases.

Run the Test

Run the test

anchor test