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_whitelisttocontracts_cw721_baseand then replace the 3 instances ofcw1-whitelistin that job description withcw721-base. And don't forget to addcontracts_cw721_basetoworkflows.test.jobs) -
Add to the
ALL_CONTRACTSvariable inscripts/publish.sh -
Set the
versionvariable inCargo.tomlto the same version aspackages/cw20. For example, "0.5.0" rather than the default "0.1.0" -
Edit the root
Cargo.tomlfile and add aprofile.release.package.CONTRACT_NAMEsection, just likeprofile.release.package.cw1-subkeys, but with your package name. -
Run
cargo build && cargo testin the new contract dir -
Commit all changes and push the branch. Open a PR and ensure the CI runs this.