Skip to content

Latest commit

 

History

History
51 lines (36 loc) · 1.26 KB

04-project.md

File metadata and controls

51 lines (36 loc) · 1.26 KB

Provenance Smart Contract Tutorial

The smart contract created in this tutorial is located in the contracts/tutorial folder.

Generate Project

CosmWasm has a template repo that can be used as a starting point for development. To generate the tutorial project, run

cargo generate --git https://github.com/CosmWasm/cw-template.git --name tutorial

Navigate to the project

cd ./tutorial

Edit Cargo.toml to have the following contract dependencies

[dependencies]
cosmwasm-schema = "2.1.4"
cosmwasm-std = "2.1.4"
cw-storage-plus = "2.0.0"
cw2 = "1.0.1"
provwasm-std = "2.5.0"
schemars = "0.8.16"
serde = { version = "1.0.197", default-features = false, features = ["derive"] }
thiserror = { version = "1.0.58" }

[dev-dependencies]
provwasm-mocks = "2.5.0"

Reset the README and clear out the current JSON schema artifacts.

echo '# Purchase Smart Contact' > README.md

Clear out unnecessary files and directories you don't want hanging around. For example

rm -rf .circleci Developing.md .git .github .gitpod.Dockerfile .gitpod.yml Importing.md LICENSE NOTICE Publishing.md src/helpers.rs src/integration_tests.rs

Up Next

Proceed to the Requirements section to define smart contract functionality.