Skip to content

Horizon contracts#1115

Open
brandonleekramer wants to merge 3 commits into
mainfrom
horizon-contracts
Open

Horizon contracts#1115
brandonleekramer wants to merge 3 commits into
mainfrom
horizon-contracts

Conversation

@brandonleekramer

Copy link
Copy Markdown
Member

Source the Protocol Contracts page from @graphprotocol/address-book

Summary

Drives the Arbitrum One and Arbitrum Sepolia contract tables on /en/contracts directly from the @graphprotocol/address-book package 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/contracts as 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 a HorizonContractsTable component that reads a given network + product (horizon / subgraph-service / issuance) straight from the address-book package. ProtocolContractsTable (legacy @graphprotocol/contracts source) is unchanged in behavior.
  • website/src/pages/en/contracts.mdx — reorganized network-first with per-product sub-tables on the Arbitrum sections.

Page structure

  • Arbitrum One: Horizon, Subgraph Service, Issuance
  • Arbitrum Sepolia: Horizon, Subgraph Service, Issuance
  • Ethereum Mainnet: legacy protocol contracts
  • Ethereum Sepolia: legacy protocol contracts
    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 (updates pnpm-lock.yaml with the new dependency)
  • pnpm dev → open http://localhost:3000/en/contracts/
  • pnpm --filter @graphprotocol/docs typecheck
  • Verified the published @graphprotocol/address-book@1.2.0 resolves 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 passes tsc under the repo's strict settings. Prettier reports no changes.

Notes for reviewers

  • L2Curation, L2GNS, and SubgraphNFT appear in both the horizon and subgraph-service package files, so they render under both sub-sections. This faithfully mirrors the address-book; happy to de-duplicate if preferred.
  • Adding a new product file or a new network still requires a small MDX edit (one new import / section); new contracts within existing products/networks are picked up automatically.
  • The @graphprotocol/address-book version can be pinned/bumped in website/package.json to control which deployment set the docs reflect.

brandonleekramer and others added 2 commits July 17, 2026 21:09
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
@brandonleekramer
brandonleekramer requested a review from a team as a code owner July 17, 2026 21:33
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.

1 participant