A cargo utility that helps to create, manage and test your smart contracts written using Odra framework.
To create a new project use init
or new
command:
bash
$ cargo odra new --name myproject && cd myproject
A sample contract - Flipper - will be created for you, with some sample tests. To run them against MockVM, simply type:
$ cargo odra test
If you want to test your code using real backend VM, first you need to add it:
$ cargo odra backend add --package casper --name casper-latest
This will add latest version of odra-casper-backend from crates.io as a backend named "casper-latest".
To run the tests, type:
$ cargo odra test -b casper-latest
new
- creates a new project in a new folderinit
- creates a new project in an existing, empty folderbuild
- builds the contracts, generates wasm filestest
- runs testsgenerate
- generates sample contractclean
- removes temporary files (builders and wasm files)backend
- manages backendsWrite contact@odra.dev