Skip to content

Renamed subregistryId to registryId across ENS Referrals#2047

Open
Goader wants to merge 1 commit intotask/enhance-referrers-data-modelfrom
task/renamed-subregistryid-to-registryid
Open

Renamed subregistryId to registryId across ENS Referrals#2047
Goader wants to merge 1 commit intotask/enhance-referrers-data-modelfrom
task/renamed-subregistryid-to-registryid

Conversation

@Goader
Copy link
Copy Markdown
Member

@Goader Goader commented May 3, 2026

Renamed subregistryId to registryId across ENS Referrals

Tip: Review docs on the ENSNode PR process

Summary

  • What changed (1-3 bullets, no essays).

Why

  • Why this change exists. Link to related GitHub issues where relevant.

Testing

  • How this was tested.
  • If you didn't test it, say why.

Notes for Reviewer (Optional)

  • Anything non-obvious or worth a heads-up.

Pre-Review Checklist (Blocking)

  • This PR does not introduce significant changes and is low-risk to review quickly.
  • Relevant changesets are included (or are not required)

@Goader Goader requested a review from a team as a code owner May 3, 2026 00:59
Copilot AI review requested due to automatic review settings May 3, 2026 00:59
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 3, 2026

🦋 Changeset detected

Latest commit: c73dc24

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 24 packages
Name Type
@namehash/ens-referrals Major
ensapi Major
ensindexer Major
ensadmin Major
ensrainbow Major
fallback-ensapi Major
enssdk Major
enscli Major
enskit Major
ensskills Major
@ensnode/datasources Major
@ensnode/ensrainbow-sdk Major
@ensnode/ensdb-sdk Major
@ensnode/ensnode-react Major
@ensnode/ensnode-sdk Major
@ensnode/integration-test-env Major
@ensnode/ponder-sdk Major
@ensnode/ponder-subgraph Major
@ensnode/shared-configs Major
@docs/ensnode Major
@docs/ensrainbow Major
@namehash/namehash-ui Major
@ensnode/ensindexer-perf-testing Major
@ensnode/enskit-react-example Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented May 3, 2026

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

Project Deployment Actions Updated (UTC)
admin.ensnode.io Ready Ready Preview, Comment May 3, 2026 0:59am
ensnode-enskit-react-example Ready Ready Preview, Comment May 3, 2026 0:59am
ensnode.io Ready Ready Preview, Comment May 3, 2026 0:59am
ensrainbow.io Ready Ready Preview, Comment May 3, 2026 0:59am

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 3, 2026

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: fe055389-8229-4c99-94d7-37d9c7f65ecc

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch task/renamed-subregistryid-to-registryid

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get your free trial and get 200 agent minutes per Slack user (a $50 value).


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Goader Goader self-assigned this May 3, 2026
@Goader Goader changed the title renamed subregistry id to registry id Renamed subregistryId to registryId across ENS Referrals May 3, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 3, 2026

Greptile Summary

This PR renames subregistryId to registryId throughout the ENS Referrals package and the ensapi app to align with ENSv2 terminology. The rename is applied consistently across the TypeScript interface (BaseReferralProgramRules), Zod schemas, serializers, builder functions, database query logic, tests, and documentation — 19 files in total, with no logic changes beyond the field name.

Confidence Score: 4/5

Rename is applied consistently across all 19 files with no logic regressions; the only concern is the changeset bump type.

All P2 findings. The rename is mechanically complete and consistent. The sole flag is whether the changeset should be major given the breaking JSON/API contract change — a clarification rather than a code defect.

.changeset/spotty-peas-run.md — verify minor vs major bump type for the breaking rename.

Important Files Changed

Filename Overview
.changeset/spotty-peas-run.md New changeset correctly describes the rename; bump type is minor for what is a breaking API change to JSON config format and API responses.
packages/ens-referrals/src/award-models/shared/rules.ts Interface field and validation helper correctly renamed from subregistryId to registryId.
packages/ens-referrals/src/edition.ts Grouping key and error messages consistently updated; findOverlappingEditionPair logic is unchanged and correct.
packages/ens-referrals/src/api/zod-schemas.ts Schema field and error message strings updated uniformly; no logic changes.
apps/ensapi/src/lib/ensanalytics/referrer-leaderboard/database.ts DB column (registrarActions.subregistryId) intentionally unchanged; application field access correctly updated to rules.registryId.
packages/ens-referrals/src/award-models/shared/api/zod-schemas.ts Base schema key renamed from subregistryId to registryId; no other changes.
packages/ens-referrals/src/api/zod-schemas.test.ts All test fixtures and describe/it labels updated consistently.
packages/ens-referrals/src/edition.test.ts Test helper parameter and all references renamed correctly.
apps/ensapi/src/cache/referral-edition-snapshots.cache.ts Both the field access and the error message string updated correctly.

Reviews (1): Last reviewed commit: "renamed subregistry id to registry id" | Re-trigger Greptile

Comment thread .changeset/spotty-peas-run.md
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Renames the ENS Referrals rules field subregistryId to registryId throughout @namehash/ens-referrals and the ENSAPI ENSAnalytics referral leaderboard implementation to align with updated ENSv2 terminology.

Changes:

  • Rename rules/config field subregistryIdregistryId across referral program rules, edition overlap logic, serializers, and Zod schemas.
  • Update ENSAPI referral leaderboard DB filtering to use rules.registryId (while still querying registrarActions.subregistryId).
  • Update tests, docs/examples, and add a Changeset entry for the rename.

Reviewed changes

Copilot reviewed 19 out of 19 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
packages/ens-referrals/src/leaderboard-page.test.ts Updates leaderboard page fixtures to use registryId.
packages/ens-referrals/src/edition.ts Updates overlap invariant error text and grouping key to use rules.registryId.
packages/ens-referrals/src/edition.test.ts Renames test fixtures/labels and inputs to registryId.
packages/ens-referrals/src/client.ts Updates example output to reference rules.registryId.
packages/ens-referrals/src/award-models/shared/status.test.ts Updates shared rules fixture to registryId.
packages/ens-referrals/src/award-models/shared/rules.ts Renames base rules field and validation to registryId.
packages/ens-referrals/src/award-models/shared/api/zod-schemas.ts Renames base rules schema key to registryId.
packages/ens-referrals/src/award-models/rev-share-cap/rules.ts Renames builder parameter/property to registryId.
packages/ens-referrals/src/award-models/rev-share-cap/api/serialize.ts Serializes registryId instead of subregistryId.
packages/ens-referrals/src/award-models/pie-split/rules.ts Renames builder parameter/property to registryId.
packages/ens-referrals/src/award-models/pie-split/api/serialize.ts Serializes registryId instead of subregistryId.
packages/ens-referrals/src/api/zod-schemas.ts Updates invariant messaging and schema output to registryId.
packages/ens-referrals/src/api/zod-schemas.test.ts Updates all referral API schema fixtures to registryId.
packages/ens-referrals/src/api/prerequisites.ts Updates documentation comment to reference registryId.
packages/ens-referrals/README.md Updates README example to reference rules.registryId.
apps/ensapi/src/lib/ensanalytics/referrer-leaderboard/mocks.ts Updates ENSAnalytics mock rules to registryId.
apps/ensapi/src/lib/ensanalytics/referrer-leaderboard/database.ts Filters registrar actions by stringifyAccountId(rules.registryId) and uses its chainId for referrer IDs.
apps/ensapi/src/cache/referral-edition-snapshots.cache.ts Uses editionConfig.rules.registryId.chainId for indexing status lookup and error message.
.changeset/spotty-peas-run.md Adds Changeset describing the rename and its impact.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .changeset/spotty-peas-run.md
Comment on lines +55 to 58
registryId: makeAccountIdSchema(`${valueLabel}.registryId`),
rulesUrl: makeUrlSchema(`${valueLabel}.rulesUrl`),
areAwardsDistributed: z.boolean(),
})
* const { aggregatedMetrics, referrers, rules } = response.data;
* console.log(`Edition: ${editionSlug}`);
* console.log(`Subregistry: ${rules.subregistryId}`);
* console.log(`Registry: ${rules.registryId}`);
Comment on lines 72 to 74
console.log(`Edition: ${editionSlug}`);
console.log(`Subregistry: ${leaderboardPage.rules.subregistryId}`);
console.log(`Registry: ${leaderboardPage.rules.registryId}`);
console.log(`Total Referrers: ${leaderboardPage.pageContext.totalRecords}`);
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