This repo contains the source code for a minimum smart contract of a reputation system in ink!.
Repute at it's core is a book-keeper.
It keep track of registered user reputation since their registration.
A user's reputation is updated when they interact with this contract.
Repute has an important function calculate_reputation_score
that mocks a time based reputation scoring engine.
Repute uses score from calculate_reputation_score
to update user reputation and rank.
- Install
rustup
via https://rustup.rs/ - Run the following:
rustup install 1.68.0
rustup target add wasm32-unknown-unknown
- Install cargo-contract here
- To install contract node, run:
cargo install contracts-node --git https://github.com/paritytech/substrate-contracts-node.git --tag v0.23.0 --force --locked
You can build release version by running:
cargo contract build --release
Run:
cargo contract test