A suite of common on-chain system contracts for the Polkadot contract ecosystem, built with cargo-pvm-contract and managed with CDM (Contract Dependency Manager).
- Rust nightly
- bun:
curl -fsSL https://bun.sh/install | bash - cdm cli
Context registry — registers and manages context ownership. A context is an on-chain namespace owned by an address, used by other contracts for access control.
Reputation system — manages reviews and ratings for entities within contexts. Depends on contexts via CDM for ownership verification.
Dispute system — manages the lifecycle of disputes (open, judge, resolve/dismiss) within contexts. Depends on contexts via CDM for ownership verification.
reputation --depends on--> contexts <--depends on-- disputes
|
[context ownership]
ContextId -> Address
Common types used across contracts:
UUID— 32-byte identifier ([u8; 32])EntityId— identifier for any unique entity in the systemContextId— identifier for a context owned & controlled by an address
Build
cdm buildDeploy
cdm deploy --bootstrap ws://localhost:9944Validate (TypeScript)
bun install
bun run startcontract-developer-tools/
Cargo.toml # Workspace root
cdm.json # CDM deployment config
package.json # TypeScript dependencies
src/
lib/ # Shared types library (crate: common)
Cargo.toml
lib.rs
contracts/
contexts/ # Context registry (base contract)
Cargo.toml
lib.rs
reputation/ # Reputation system (depends on contexts)
Cargo.toml
lib.rs
disputes/ # Dispute system (depends on contexts)
Cargo.toml
lib.rs
index.ts # TypeScript validation script