Swap provides a convenient API to the Serum DEX for performing instantly settled token swaps directly on the order book.
This program requires building the Serum DEX from source, which is done using git submodules.
Pull the source
git submodule init git submodule update
cd deps/serum-dex/dex/ && cargo build-bpf && cd ../../../
anchor build --verifiable
--verifiable flag should be used before deploying so that your build artifacts
can be deterministically generated with docker.
To verify the program deployed on Solana matches your local source code, install
cd programs/swap, and run
anchor verify <program-id | write-buffer>
A list of build artifacts can be found under releases.
Run the test