Here are all Rooch examples introduction and source code indices.
Rooch provides the command
rooch move new to automatically create and initialize projects. When we want to write a new contract project, we can use this command to simplify our initialization work.
We can use any legal character as the project name, including
-, but when we use a project name with
rooch move new command will automatically use the project name as the address of this project.
move rooch new hello-world
- is not a legal character for naming addresses (variables), so after we create the project using
rooch move new, be sure to check the project address alias in the
Move.toml file for illegal characters.
rooch move new to create a project (name) with
-. We recommend manually modifying the
Move.toml file and replacing
Another way is to directly use
_ as the hyphen for the project name word when creating the project.
move rooch new hello_world
examples, the names of the projects we create use
_ connection. As for the actual development, which style to use, please decide according to your preferences.
When we contribute a example to
examples, after using
rooch move new to initialize the project, in addition to replacing the project address of the
Move.toml file with
_ wildcards, we also need to add a
[dev-addresses] table and fill in a field for unit testing. address.
[dev-addresses] table not added to
BUILDING quick_start_counter Success Finished dev [unoptimized + debuginfo] target(s) in 0.53s Running `target/debug/rooch move test -p examples/quick_start_counter` thread 'main' panicked at 'resolve package dep failed: Unresolved addresses found: [ Named address 'quick_start_counter' in package 'quick_start_counter' ] To fix this, add an entry for each unresolved address to the [addresses] section of examples/quick_start_counter/Move.toml: e.g., [addresses] Std = "0x1" Alternatively, you can also define [dev-addresses] and call with the -d flag', crates/rooch/src/commands/move_cli/commands/unit_test.rs:64:14 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace Error: Process completed with exit code 101.
This example introduces how to use the Rooch object.
This example introduces how to use a low-code tool to develop a blog sample application.