Merkle Tree Builder for Carbonable in Rust and Cairo compatible.
cargo build
💄 Code Style
cargo fmt
🌡️ Test Rust Code
cargo test
Compile Cairo Code
scarb build
Test Cairo Code
scarb test
The automation script (script.py) simplifies converting .txt files generated by the Rust code in merkle_tree_rust/data into a properly formatted constants.cairo file for Cairo tests.
- Reads .txt files from the output directory.
- Generates constants.cairo in the merkle_tree_cairo/tests directory.
- Supports the first and second waves of allocations.
- Handles errors (e.g., missing files or invalid formats).
- Python 3.6 or higher.
Run the script with the following command: python3 <relative_path_to_script.py> <relative_path_to_output_folder> <relative_path_to_test_folder>
- <relative_path_to_script.py>: Path to the Python script.
- <relative_path_to_output_folder>: Path to the folder containing .txt files generated by the Rust code.
- <relative_path_to_test_folder>: Path to the merkle_tree_cairo/tests directory where constants.cairo will be generated.
From project root:
python3 merkle_tree_rust/script.py merkle_tree_rust/output/ merkle_tree_cairo/tests/
Add a GitHub Star ⭐ to the project. Share your experience and write about it on platforms like Medium or Dev.to.
Contributions are welcome! Please read CONTRIBUTING.md for guidelines.
Merkle Tree Builder follows best security practices but is provided as-is without any warranty. This project is licensed under the Apache License 2.0.