Invariant protocol is an AMM built on Casper Network, leveraging high capital efficiency and the ability to list markets in a permissionless manner. At the core of the DEX is the Concentrated Liquidity mechanism, designed to handle tokens compatible with the Erc20 standard. The protocol is structured around a single contract architecture.
Usage
It's recommend to install:
To install wasm-strip
using apt, run the following command:
sudo apt install wabt
Additionally, add the wasm32-unknown-unknown target by running:
rustup target add wasm32-unknown-unknown
Build
$ cargo odra build
To build a wasm file, you need to pass the -b parameter.
The result files will be placed in ${project-root}/wasm
directory.
$ cargo odra build -b casper
Test
To run tests, choose between the MockVM
and Casper backend
using the following commands:
Run tests on MockVM
cargo odra test
Run tests on Casper backend
To test actual wasm files against a backend,
you need to specify the backend passing -b argument to cargo-odra
.
cargo odra test -b casper
Typescript SDK
Utilize the Invariant SDK from the npm registry by including it as a dependency. Alternatively, for a customized approach, build the SDK on your own using the commands provided below:
To begin, navigate to the directory dedicated to the SDK
./build.sh
./test.sh