Skip to content

SPL token-swap (AMM) implemented in Anchor

Notifications You must be signed in to change notification settings

WaqasAyubShah/anchor-amm

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Anchor Example: Token Swap AMM

SPL Token-swap (AMM) implemented in Anchor.

Build, Deploy and Test

First, install dependencies:

$ yarn

Next, we will build and deploy the program via Anchor.

Get the program ID:

$ anchor keys list
anchor_amm: 4CkSf34hTH2rGmgFDCm5WCFE8sHpfdBzrBChEScJBxoM

Here, make sure you update your program ID in Anchor.toml and lib.rs.

Build the program:

$ anchor build

Let's deploy the program. Notice that anchor-amm will be deployed on a mainnet-fork test validator run by Dappio:

$ anchor deploy
...

Program Id: 4CkSf34hTH2rGmgFDCm5WCFE8sHpfdBzrBChEScJBxoM

Deploy success

Finally, run the test:

$ anchor test --skip-build --skip-deploy

About

SPL token-swap (AMM) implemented in Anchor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 85.6%
  • TypeScript 12.1%
  • Python 2.3%