Horizon contracts#1115
Open
brandonleekramer wants to merge 3 commits into
Open
Conversation
Drive the Arbitrum One and Arbitrum Sepolia contract tables from the @graphprotocol/address-book package (horizon, subgraph-service, issuance) so Horizon-era deployments stay current with each release bump. Ethereum Mainnet and Sepolia continue to be sourced from @graphprotocol/contracts. Page is organized network-first with per-product sub-tables on Arbitrum. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TTTzmumskQuqnV1PoaTnpV
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Source the Protocol Contracts page from
@graphprotocol/address-bookSummary
Drives the Arbitrum One and Arbitrum Sepolia contract tables on
/en/contractsdirectly from the@graphprotocol/address-bookpackage instead of hardcoding addresses. Horizon-era deployments (Horizon, Subgraph Service, Issuance) now stay current with each package release — bumping the dependency is all that's needed to pick up new deployments or address changes.Ethereum Mainnet and Ethereum Sepolia continue to be sourced from
@graphprotocol/contractsas before.What changed
website/package.json— added@graphprotocol/address-book(^1.2.0) as a dependency.website/src/contracts.tsx— refactored to a shared name/address table and added aHorizonContractsTablecomponent that reads a given network + product (horizon/subgraph-service/issuance) straight from the address-book package.ProtocolContractsTable(legacy@graphprotocol/contractssource) is unchanged in behavior.website/src/pages/en/contracts.mdx— reorganized network-first with per-product sub-tables on the Arbitrum sections.Page structure
Tables show contract name + address (linked to the block explorer), matching the existing minimalist page.
Why
The old page hardcoded Arbitrum addresses via
@graphprotocol/contracts/addresses.json, which predates the Horizon migration and drifts out of date as contracts are deployed/upgraded. Reading from the maintained address-book package makes the docs self-updating for the common case (new contracts and address changes within existing products/networks).Testing
pnpm install(updatespnpm-lock.yamlwith the new dependency)pnpm dev→ openhttp://localhost:3000/en/contracts/pnpm --filter @graphprotocol/docs typecheck@graphprotocol/address-book@1.2.0resolves the three subpath imports, that its data matches the source repo, and that every product is populated on both Arbitrum chains (no empty tables). JSON-import typing passestscunder the repo's strict settings. Prettier reports no changes.Notes for reviewers
L2Curation,L2GNS, andSubgraphNFTappear in both thehorizonandsubgraph-servicepackage files, so they render under both sub-sections. This faithfully mirrors the address-book; happy to de-duplicate if preferred.@graphprotocol/address-bookversion can be pinned/bumped inwebsite/package.jsonto control which deployment set the docs reflect.