#test #bindings #testing

dev tg-bindings-test

Multitest (and other test helpers) support for Tgrade-specific contracts

26 releases (12 breaking)

0.17.1 Jan 26, 2023
0.16.0 Dec 16, 2022
0.15.1 Sep 22, 2022
0.13.0 Jul 26, 2022
0.8.1 Mar 29, 2022

#826 in Magic Beans

Download history 15/week @ 2023-06-12 86/week @ 2023-06-19 32/week @ 2023-06-26 66/week @ 2023-07-03 167/week @ 2023-07-10 33/week @ 2023-07-17 110/week @ 2023-07-24 14/week @ 2023-07-31 29/week @ 2023-08-07 53/week @ 2023-08-14 7/week @ 2023-08-21 34/week @ 2023-08-28 62/week @ 2023-09-04 16/week @ 2023-09-11 46/week @ 2023-09-18 21/week @ 2023-09-25

145 downloads per month
Used in 7 crates


876 lines

PoE Contracts

This repo maintains contracts and support libraries for building the Tgrade PoE contracts. These are not available under an open source license, you need permission from Confio to use them.

It is organized like cosmwasm-plus. You can use that as a reference.


To compile all the contracts, run the following in the repo 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 \

This will compile all packages in the contracts directory and output the stripped and optimized wasm code under the artifacts directory as output, along with a checksums.txt file.

If you hit any issues there and want to debug, you can try to run the following in each contract dir: RUSTFLAGS="-C link-arg=-s" cargo build --release --target=wasm32-unknown-unknown --locked

Creating a new contract

You can start with cosmwasm-template as a basis:

cd contracts
cargo generate --git https://github.com/CosmWasm/cosmwasm-template.git --name CONTRACT_NAME

# remove unneeded files
rm -rf .circleci .github .git
rm .cargo-ok .editorconfig .gitignore rustfmt.toml
rm Developing.md Importing.md Publishing.md LICENSE NOTICE

# regenerate schema for CI tests
cargo schema

git add .

Then add it to CI, by editing .circleci/config.yml. Just copy the contract_tgrade_dso section and rename it, pointing to your new contract.

Finally, update Cargo.toml to use the current version used by all other contracts in this repo.


Sometimes errors might be not helpful enough, or actual error with vague description might come from depths of other tgrade or cosmwasm related dependencies. In such case you might want to check backtraces.

Make sure you have nightly installed:

$ rustup install nightly

and then run:

$ RUST_BACKTRACE=1 cargo +nightly test --features backtraces

to get more detailed backtraces.


~164K SLoC