Thanks for your interest in improving the LedgerLens on-chain risk score registry.
- Install the Rust toolchain (stable) and the
wasm32-unknown-unknowntarget:rustup target add wasm32-unknown-unknown
- Fork the repo and create a feature branch off
main. - Make your changes inside
contracts/ledgerlens-score/.
Run the same checks CI runs:
cargo fmt --all -- --check
cargo clippy --all-targets -- -D warnings
cargo test
cargo build --target wasm32-unknown-unknown --release- Keep
contracts/ledgerlens-score/src/types.rschanges minimal and deliberate —RiskScoreandDataKeyare shared, cross-repo data contracts (see README.md § Organization Architecture). Any field/shape change is breaking for theapi,core, anddashboardrepos and must be coordinated. - Add or update tests in
src/test.rsfor any behavioral change. - Keep error codes in
errors.rsstable; append new variants rather than reordering or removing existing ones, since their numeric values are part of the deployed contract's ABI. - Update
README.mdif you change contract function signatures, events, or the deployment flow indeploy.sh.
- Describe what changed and why.
- Note any cross-repo coordination needed (e.g. "requires
apito update itsRiskScoreschema"). - Ensure all CI checks pass.