Summary
The /rep page added by #167 hardcodes the REP total supply and leaves an inline TODO(publish) to manually re-read totalSupply() before publishing. The current values can become stale as the token supply changes, and the three related fields can drift apart:
totalSupply
totalSupplyRaw
totalSupplyReadOn
Goal
Source the displayed REP total supply from the current Ethereum mainnet contract at build/publish time, or through another agreed data pipeline, so maintaining the page does not depend on remembering a manual TODO.
Acceptance criteria
- Read
totalSupply() from 0xCf6A0A7826fa124B7705d6f3c675eAD76f1e540D on Ethereum mainnet (chain ID 1).
- Derive the formatted supply and exact raw value from the same on-chain response, respecting the contract's 18 decimals.
- Derive
totalSupplyReadOn from that same read; the three values cannot be updated independently.
- Document the RPC/provider configuration and define failure behavior so a failed read does not silently publish stale data.
- Keep the public
/rep page static and free of a client-side RPC dependency unless the architecture intentionally changes.
- Add appropriate validation or test coverage and verify with the normal typecheck, lint, and build commands.
Reference
Summary
The
/reppage added by #167 hardcodes the REP total supply and leaves an inlineTODO(publish)to manually re-readtotalSupply()before publishing. The current values can become stale as the token supply changes, and the three related fields can drift apart:totalSupplytotalSupplyRawtotalSupplyReadOnGoal
Source the displayed REP total supply from the current Ethereum mainnet contract at build/publish time, or through another agreed data pipeline, so maintaining the page does not depend on remembering a manual TODO.
Acceptance criteria
totalSupply()from0xCf6A0A7826fa124B7705d6f3c675eAD76f1e540Don Ethereum mainnet (chain ID 1).totalSupplyReadOnfrom that same read; the three values cannot be updated independently./reppage static and free of a client-side RPC dependency unless the architecture intentionally changes.Reference
src/pages/rep.astroTODO