CreditScoreLens
Read Credit scores, rarity, traits, and Statement totals from the deployed mainnet helper.
Credit reads
creditScore(uint256 creditId) → uint256 scoreviewScore in ten-thousandths of a point. For example, 1,324,012 means 132.4012 points.
May revert: UnknownCredit for a never-minted ID
creditScores(uint256[] creditIds) → uint256[] scoresviewScores in input order, preserving duplicates. An empty input returns an empty array; an unknown ID reverts the whole call. Chunk large batches to fit the RPC call gas limit.
May revert: UnknownCredit for any never-minted ID
creditRarity(uint256 creditId) → uint256 rarityviewRaw sum of rarity trait points, including the doubled eights contribution. It is not a percentile or the Credit score.
May revert: UnknownCredit for a never-minted ID
creditTraits(uint256 creditId) → (mask, active, occupied, eights, band)viewNumeric CreditScore traits: active plate mask, inked bits, occupied cells, count of ASCII 8s, and registration band (0 to 5).
May revert: UnknownCredit for a never-minted ID
Statement read
statementScore(uint256 statementId) → uint256 scoreviewStored total across all pages, including overprints. A never-composed ID returns zero. This read does not indicate ownership.
Data sources
The helper reads the fixed Ethereum mainnet Credits, CreditScore, and Statements contracts. It has no write methods or events.
Burned Credits retain their scores and traits. A Statement's total can change after an overprint.
Registration bands: 0 Registered, 1 Nudge, 2 Slip, 3 Skew, 4 Drift, 5 Loose.
All scores use 10,000 units per point. Preserve the raw integer for calculations.
Complete interface
Functions, events, and errors from the generated interfaces.
src/interfaces/ICreditScoreLens.sol
Functions 5
function creditRarity(uint256 creditId) external view returns (uint256 rarity)function creditScore(uint256 creditId) external view returns (uint256 score)function creditScores(uint256[] memory creditIds) external view returns (uint256[] memory scores)function creditTraits(uint256 creditId) external view returns (uint256 mask, uint256 active, uint256 occupied, uint256 eights, uint256 band)function statementScore(uint256 statementId) external view returns (uint256 score)Errors 1
error UnknownCredit(uint256 creditId)