Components to build out Regulated DeFi for Tgrade blockchain
Current state:
- AMM (ported from
terraswap
) - Whitelisted Token
Name | Description |
---|---|
tfi_factory |
Factory Contract to create new trading pair |
tfi_pair |
Trading Pair that can swap two tokens |
trusted-token |
CW20 Token that limits all holders to a whitelist |
You will need Rust 1.51+ with wasm32-unknown-unknown target installed.
You can run unit tests on this on each contracts directory via :
cargo unit-test
cargo integration-test
Or for a production-ready (compressed) build, run the following from the repository root:
docker run --rm -v "$(pwd)":/code \
--mount type=volume,source="$(basename "$(pwd)")_cache",target=/code/target \
--mount type=volume,source=registry_cache,target=/usr/local/cargo/registry \
cosmwasm/workspace-optimizer:0.12.1
The optimized contracts are generated in the artifacts/ directory.