Go to file
Sheheryar 001a4ca220
Bump anchor v0.19.0 and solana v1.8.5 (#20)
2021-12-09 23:41:13 -05:00
deps Updates for registry publishing (#12) 2021-08-09 02:11:36 -07:00
migrations Init repo 2021-04-30 01:29:48 -07:00
programs/swap Bump anchor v0.19.0 and solana v1.8.5 (#20) 2021-12-09 23:41:13 -05:00
tests Updates for registry publishing (#12) 2021-08-09 02:11:36 -07: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 empty ata check (#19) 2021-11-23 10:58:44 -08:00
Anchor.toml Add empty ata check (#19) 2021-11-23 10:58:44 -08:00
Cargo.lock Bump anchor v0.19.0 and solana v1.8.5 (#20) 2021-12-09 23:41:13 -05: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 Update Cargo.toml 2021-07-04 18:59:29 -07:00

README.md

Swap

Crates.io Docs.rs

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