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 |
-
Make sure Docker is installed
-
Pull the SN-testnet image
make server-download
- Open a terminal inside this repo and run:
make server-start
- Inside another terminal run:
make server-connect
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
Each contract contains Rust unit and integration tests embedded within the contract source directories. You can run:
cargo unit-test
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