Skip to content

hippospace/aux-exchange

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Aux Exchange

Aptos Quickstart with podman

Run aux-exchange/aptos/testing/run.sh to start a podman container. The container will have a local validator with the aux contract deployed.

In the container: - Run ./example_amm.sh to trade the AMM locally - Run ./example_clob.sh to trade the CLOB locally

The example code is located in aptos/api/aux-ts/examples. The core package is located in aptos/api/aux-ts. You can modify the code and rerun the example scripts in the container.

Run the integration tests with ./test.sh. Note that the integration tests pollute the container state so subsequent runs may not be reliable, especially if you have been interacting with the local validator in other ways.

Running on localnet manually

node.js, yarn, golang, and rust are all necessary to run.

  • Install https://github.com/nvm-sh/nvm
  • nvm install 18; nvm use 18
  • npm install -g yarn
  • yarn set version berry
  • Install golang.
  • Install rust
  1. Setup Aptos and deploy AUX to localnet:

    go run ./go-util/aptos/cmd/setup-aux  -f
  2. Run end to end tests:

    cd aptos/api/aux-ts
    APTOS_LOCAL=true yarn test
  3. Publish a local package for examples:

    cd aptos/api/aux-ts
    yarn publish:local
  4. Run examples:

    cd aptos/api/aux-ts/examples
    APTOS_LOCAL=true yarn start:localnet-amm-trader
    APTOS_LOCAL=true yarn start:localnet-clob-trader

Using the API

See aptos/api/aux-ts/examples for examples of interacting with the AMM and CLOB.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 45.1%
  • HTML 29.8%
  • CSS 13.6%
  • Move 5.6%
  • TypeScript 4.9%
  • Go 0.6%
  • Other 0.4%