Skip to content

Latest commit

 

History

History
38 lines (26 loc) · 1.31 KB

README.md

File metadata and controls

38 lines (26 loc) · 1.31 KB

Tgrade RegFi

Components to build out Regulated DeFi for Tgrade blockchain

Current state:

  • AMM (ported from terraswap)
  • Whitelisted Token

Contracts

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

Running this contract

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.