ReputationRegistry
ReputationRegistry stores a score per identity, a default score per identity type, and one threshold. The ERC734Validator reads it to decide whether a Claim Issuer can add its own claims to an identity that did not give it a claim key. The concept is in Claim issuers, trust and reputation.
At a glance
Source
contracts/reputation/ReputationRegistry.sol
Interface
IReputationRegistry
Deployed as
One contract per network, not upgradeable. Built with the access manager of the network and the IdentityFactory
Scores
uint128 values. The registry gives them no unit and no maximum
Reads
reputationOf(identity)
The score of the identity when one was set, zero included. Otherwise the default of its type, for an identity the factory deployed. Otherwise 0
entryOf(identity)
The stored score and the time it was set, setAt. Both are 0 when no score was set
defaultFor(identityType)
The default score of a type
claimAddThreshold()
The score a Claim Issuer needs to add or remove its own claims on an identity without a claim key
Writes
setReputation(identity, newScore)
Network governance
ZeroAddress. Emits ReputationSet
setDefault(identityType, newDefault)
Network governance
Emits DefaultSet
setClaimAddThreshold(newThreshold)
Network governance
Emits ClaimAddThresholdSet
A score that was set stays set: the default of the type no longer applies to that identity, even when the score is zero.
What the score decides
addClaimTo and addClaim by a Claim Issuer on an identity where it holds no claim key
The signature of a claim, and the validity of claims already issued
removeClaim by a Claim Issuer on an identity where it holds no CLAIM_SIGNER key
Delivery of a claim by the Identity Owner, or under a key grant
Revocation by digest
Eligibility for any asset: each Issuer lists the Claim Issuers it trusts
Events
ReputationSet(address indexed identity, uint128 oldScore, uint128 newScore, address indexed setter)
A score is set
DefaultSet(uint256 indexed identityType, uint128 oldDefault, uint128 newDefault, address indexed setter)
The default of a type is set
ClaimAddThresholdSet(uint128 oldThreshold, uint128 newThreshold, address indexed setter)
The threshold is set
Last updated