Skip to content

securesecrets/shadeswap

Repository files navigation

ShadeSwap Core Contracts

Contract Reference Description
amm_pair doc Individual contract used to manage a single LP pool. The contract can inherit some settings from Factory such as custom Fee.
factory doc Factory Contract that can be used to centrally manage pair contracts after initialization
lp_token doc LP Token given to users after they have added liquidity to a amm_pair contract
router doc Router contract used to allow for multi-hop trades
snip20 doc Snip20 reference implementation used for testing
staking doc Staking contract that allows for users to gain rewards from adding liquidity

Development Environment

Environment Setup

  1. Make sure Docker is installed

  2. Pull the SN-testnet image

make server-download
  1. Open a terminal inside this repo and run:
make server-start
  1. Inside another terminal run:
make server-connect

Testing the environment

Inside the container, go to /root/code and compile all the smart contracts:

make

Then test run all the Protocol unit-tests and integration tests using the tester:

make integration-tests

Unit Tests

Each contract contains Rust unit and integration tests embedded within the contract source directories. You can run:

cargo unit-test

CLI

For CLI please download the latest secretcli and add to your path if Linux

export PATH=/to/your/secretcli_folder:$PATH

WSL for linux Example
export PATH=/mnt/d/secretcli:$PATH

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published