Skip to content

Improve reference-generation tooling + coverage#3430

Merged
anegg0 merged 6 commits into
masterfrom
TW-884-add-canonical-contract-address-tables-per-chain
Jul 1, 2026
Merged

Improve reference-generation tooling + coverage#3430
anegg0 merged 6 commits into
masterfrom
TW-884-add-canonical-contract-address-tables-per-chain

Conversation

@anegg0

@anegg0 anegg0 commented Jul 1, 2026

Copy link
Copy Markdown
Contributor

Description

This PR makes some improvements to the ref generators: these are scripts that populate the docs with Nitro variables, contract addresses, and Docker images.
There were stale ones and the need for new ones, as the docs repo grows and references an increasing amount of code.
It fixes some legacy generator and adds its own **Contract addresses ** that generate the Chain-info contract-address partial from @arbitrum/sdk + a small data file for non-SDK contracts. Also adds the missing RollupCreator/TokenBridgeCreator tables and corrects a stale Arbitrum Sepolia Rollup address.
Some Nitro version tags and Docker data will now be pulled into the directory regularly

Unrelated: it also fixes very old ts compile errors, which will allow us to use Husky's pre-commit hook again.

anegg0 added 4 commits June 30, 2026 23:57
Add scripts/generate-contract-addresses.ts (+ contract-addresses.data.ts)
to build the Chain info contract-address partial. Protocol-core and token
bridge addresses are read live from @arbitrum/sdk; contracts the SDK does
not expose (core proxy admin, fraud proof, resource constraint manager,
canonical factories) and constant precompiles live in the data file.

Addresses are checksummed via getAddress so the strict AddressExplorerLink
never throws. Adds a --check mode for CI. Regenerating corrected a stale
Arbitrum Sepolia Rollup address and a malformed ResourceConstraintManager
row, and added RollupCreator / TokenBridgeCreator tables (TW-884).
Add scripts/lib/generated-partial.ts (writeOrCheck + --check + runScript) and
adopt it in the precompile, contract-address, and glossary generators so they
share deterministic Prettier-formatted output, a uniform --check mode, and one
error/exit path.

De-duplicate the @@name=value@@ syntax into scripts/lib/variable-refs.js,
consumed by both markdown-preprocessor.js and update-variable-references.ts;
the updater also gains a --check mode.

Make build-glossary deterministic (drop the generation timestamp), fail loudly
on a missing glossary dir instead of emitting an empty file, and remove its
dead renderKey/imports/items code. Add yarn generate and yarn generate:check.
check-releases.ts now updates nitroVersionTag alongside latestNitroNodeImage
from the latest Nitro release, and the daily workflow regenerates the
precompile tables after a bump so their version-pinned links stay fresh.

Removes the dead createPullRequest function and the ESM-only @actions/* imports
that prevented the script from loading under tsx, replacing core.setOutput with
a GITHUB_OUTPUT write.
Add @types/react-dom and .d.ts declarations for untyped local modules
(globalVars.js, precompilesInformation.js, sidebars.js, the CentralizedAuction
jsx components) plus an ambient decl for markdown-link-extractor. Add real
types and null-guards across components and scripts (VendingMachine, Modal,
find-orphan-pages, precompile generator, Quicklooks, D3EdgeTree, Footer,
Layout, check-markdown, and others). Remove the now-unused @actions/*
devDependencies.

Full-project typecheck is now green, so commits no longer require HUSKY=0.
@vercel

vercel Bot commented Jul 1, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
arbitrum-docs Ready Ready Preview Jul 1, 2026 4:56pm

Request Review

@anegg0 anegg0 requested a review from pete-vielhaber July 1, 2026 08:11
@anegg0 anegg0 changed the title TW-884: canonical contract address tables + reference-generation tooling Improve reference-generation tooling + coverage Jul 1, 2026
@anegg0 anegg0 merged commit 8983991 into master Jul 1, 2026
9 checks passed
@anegg0 anegg0 deleted the TW-884-add-canonical-contract-address-tables-per-chain branch July 1, 2026 19:09
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