Skip to content

feat: chain name overrides + ssh-safe project name - #7

Merged
david-uniswap merged 4 commits into
mainfrom
david/chain-name-overrides
Sep 22, 2026
Merged

david-uniswap merged 4 commits into
mainfrom
david/chain-name-overrides

Conversation

@david-uniswap

@david-uniswap david-uniswap commented Sep 18, 2026 •

Copy link
Copy Markdown

Three small fixes found while generating the HyperEVM (999) deployment markdown in Uniswap/contracts#164:

  • chain-overrides.json wins over chains.json for the network name. chainid.network still lists chain 999 as "Wanchain Testnet" although HyperEVM reuses that id, so a refresh of chains.json can never fix it on its own. Seeded with 999: HyperEVM Mainnet.

  • getProjectName() handles git@github.com:org/repo.git remotes. With an ssh remote it returned an empty string and the markdown heading rendered as # .

  • chains.json refreshed (just fetch-chains). Adds Robinhood Chain, Arc, Tempo and MegaETH, which currently render as "Chain N" in deployments/index.md.

  • note rendering: a registry entry's note field renders as a blockquote under its heading, so provenance or deprecation warnings reach the published markdown (chronicles previously ignored the field).

Tested from inside Uniswap/contracts with node lib/forge-chronicles -c 999 --skip-json: heading # contracts, index row HyperEVM Mainnet, other rows pick up their names, chain markdown body unchanged.

🤖 Generated with Claude Code

david-uniswap and others added 2 commits September 18, 2026 15:58
- chain-overrides.json takes precedence over chains.json for the network name. chainid.network still lists
  chain 999 as Wanchain Testnet although HyperEVM reuses that id, so the registry alone can't be right.
- getProjectName() now parses git@github.com:org/repo.git remotes too; with an ssh remote the markdown heading
  rendered as an empty "# ".
- chains.json refreshed from chainid.network (adds Robinhood Chain, Arc, Tempo, MegaETH, which rendered as
  "Chain N" in the deployments index).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@david-uniswap
david-uniswap marked this pull request as ready for review September 21, 2026 16:34
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Lets a deployment record carry provenance or deprecation warnings that reach the published markdown.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Comment thread chain-overrides.json
@@ -0,0 +1,4 @@
{
"_comment": "Chain names that take precedence over chains.json (a snapshot of chainid.network). Use when the public registry is stale or lists a different network under the same chain id.",
"999": "HyperEVM Mainnet"

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The chains.json refresh also renames two rows that already exist in contracts/deployments/index.md: 143 "Monad Mainnet" becomes "Monad" and 11155111 "Sepolia" becomes "Ethereum Sepolia". Fine if intended, otherwise pin the old names here.

Comment thread generateMarkdown.js
// works for both https://github.com/org/repo.git and git@github.com:org/repo.git
const url = execSync("git remote get-url origin", { encoding: "utf-8" }).trim();
return url
.replace(/\.git$/, "")

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A remote with a trailing slash (https://github.com/Uniswap/contracts/ or .../contracts.git/) still yields an empty name. Strip trailing slashes before the .git replace.

@david-uniswap
david-uniswap merged commit 526af8e into main Sep 22, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants