Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/project-serum/swap
Swap on the Serum Order Book
https://github.com/project-serum/swap
Last synced: 7 days ago
JSON representation
Swap on the Serum Order Book
- Host: GitHub
- URL: https://github.com/project-serum/swap
- Owner: project-serum
- License: apache-2.0
- Created: 2021-04-30T05:12:17.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2022-10-28T15:52:35.000Z (over 2 years ago)
- Last Synced: 2024-04-25T01:21:11.549Z (9 months ago)
- Language: JavaScript
- Homepage:
- Size: 66.4 KB
- Stars: 77
- Watchers: 6
- Forks: 85
- Open Issues: 18
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Swap
[![Crates.io](https://img.shields.io/crates/v/serum-swap?color=blue)](https://crates.io/crates/serum-swap)
[![Docs.rs](https://docs.rs/serum-swap/badge.svg)](https://docs.rs/serum-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](https://github.com/project-serum/anchor) is used for developoment, and it's
recommended workflow is used here. To get started, see the [guide](https://project-serum.github.io/anchor/getting-started/introduction.html).```bash
anchor build --verifiable
```The `--verifiable` flag should be used before deploying so that your build artifacts
can be deterministically generated with docker.### Test
```bash
anchor test
```### Verify
To verify the program deployed on Solana matches your local source code, install
docker, `cd programs/swap`, and run```bash
anchor verify
```A list of build artifacts can be found under [releases](https://github.com/project-serum/swap/releases).
### Run the Test
Run the test
```
anchor test
```