Some accounts are special and nothing about the address said so. The treasury looked like any other empty account, the minting sentinel looked like a wallet, and the twenty-one accounts endowed at genesis looked like they earned it. No curated list. The chain names them itself, in three places that are three different claims and are not flattened into one badge: a runtime constant (compiled in, immutable for that spec_version), a storage value (assigned, and changeable), and a balance in block zero (history, and not a role — an account can be endowed and have no job). Labels derive from the chain's own name, so a pallet added next year is labelled without an edit. The chip is the claim; the citation beneath it is the evidence. Two rules hold it together, both learned the hard way and both now in CLAUDE.md. An account is told from a hash by registry path, never by shape — after `normalise` both are `0x` and sixty-four hex characters, so `decode_typed` now returns the account set the decoder collected while it still knew. And a storage entry names an account only if its value *is* one: `System::Events` is full of accounts and names none, and the first cut labelled half the chain's active addresses `Events`. Computing all of this walks every plain storage entry and enumerates block zero — dozens of round trips, fine once and pathological on every account page view — so it is cached for five minutes. Constants change with the runtime, state assignments almost never, genesis never. Block zero gets the endowments, because they have no extrinsic and no event and are invisible to anyone who has not read the chainspec, and a Genesis link sits in the nav to give somebody who would never think to look an unmissable way to. Mainnet started with 5,670,000 QTC across 21 accounts — one holds 5,669,940 and the other twenty got 3 each — shown beside what each holds today, so what a founding account did with its stake is one row. When genesis state cannot be read the page says so rather than showing an empty table: missing data and a chain that endowed nobody are different claims. Closes #2 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Jp6a8EDar9ueEhAxzep4V5
27 lines
683 B
TypeScript
27 lines
683 B
TypeScript
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
|
|
import type { ChainId } from "./ChainId";
|
|
import type { NamedAccount } from "./NamedAccount";
|
|
|
|
/**
|
|
* Every account this chain names.
|
|
*/
|
|
export type ChainRoles = {
|
|
/**
|
|
* Which chain.
|
|
*/
|
|
chain: ChainId,
|
|
/**
|
|
* The runtime the constants and entries were read from.
|
|
*/
|
|
spec_version: number,
|
|
/**
|
|
* The named accounts.
|
|
*/
|
|
accounts: Array<NamedAccount>,
|
|
/**
|
|
* Whether genesis state could be read at all. An archive node holds block
|
|
* zero; a pruning one does not, and the endowed accounts would then be
|
|
* missing rather than absent.
|
|
*/
|
|
genesis_readable: boolean, };
|