Here are a number of useful contracts that either implement or consume
the interfaces defined in packages/cw*
.
Use cosmwasm-template
as a
basis, in particular the cw-plus
branch.
cd contracts
cargo generate --git https://github.com/CosmWasm/cosmwasm-template.git --branch cw-plus --name PROJECT_NAME
cd PROJECT_NAME
rm -rf .git
rm .gitignore
rm .cargo-ok
git add .
Now, integrate it into the CI and build system
-
Edit
.circleci/config.yml
, copy an existing contracts job and replace the name. Then add your new job to the jobs list on top. (eg. copycontracts_cw1_whitelist
tocontracts_cw721_base
and then replace the 3 instances ofcw1-whitelist
in that job description withcw721-base
. And don't forget to addcontracts_cw721_base
toworkflows.test.jobs
) -
Add to the
ALL_CONTRACTS
variable inscripts/publish.sh
-
Set the
version
variable inCargo.toml
to the same version aspackages/cw20
. For example, "0.5.0" rather than the default "0.1.0" -
Edit the root
Cargo.toml
file and add aprofile.release.package.CONTRACT_NAME
section, just likeprofile.release.package.cw1-subkeys
, but with your package name. -
Run
cargo build && cargo test
in the new contract dir -
Commit all changes and push the branch. Open a PR and ensure the CI runs this.