Skip to content

Conversation

ernestognw
Copy link
Member

@ernestognw ernestognw commented Sep 11, 2025

ERC-6909 is now in Last Call: https://eips.ethereum.org/EIPS/eip-6909

PR Checklist

  • Tests
  • Documentation
  • Changeset entry (run npx changeset add)

Summary by Sourcery

Remove the 'draft-' prefix from ERC6909 contracts and interfaces now that the EIP is in Last Call, and update all related filenames, headers, and imports accordingly.

Enhancements:

  • Rename draft-ERC6909.sol and its extension files to remove the 'draft-' prefix in filenames and contract headers
  • Update import statements to reference the finalized ERC6909.sol and IERC6909.sol interfaces instead of their draft versions
  • Adjust mock contracts to import from the updated ERC6909Metadata path

Copy link

changeset-bot bot commented Sep 11, 2025

⚠️ No Changeset found

Latest commit: b26960a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@ernestognw ernestognw marked this pull request as ready for review September 11, 2025 07:46
@ernestognw ernestognw requested a review from a team as a code owner September 11, 2025 07:46
Copy link
Contributor

sourcery-ai bot commented Sep 11, 2025

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

This PR removes the “draft-” prefix from the ERC6909 implementation and its extensions to align with the EIP-6909 last call status by renaming files and updating header comments and import paths.

Class diagram for updated ERC6909 implementation and extensions

classDiagram
    class ERC6909 {
    }
    class ERC6909ContentURI {
        ERC6909ContentURI --> ERC6909
    }
    class ERC6909Metadata {
        ERC6909Metadata --> ERC6909
    }
    class ERC6909TokenSupply {
        ERC6909TokenSupply --> ERC6909
    }
    class ERC6909GameItems {
        ERC6909GameItems --> ERC6909Metadata
        GOLD : uint256
    }
Loading

File-Level Changes

Change Details Files
Refactor ERC6909 contracts and mock to drop “draft-” prefix and adjust references
  • Rename base and extension contract files and update SPDX header comments
  • Update internal ERC6909 import paths in implementation and extensions
  • Adjust main interface import path in the base contract to non-draft interface
  • Correct mock contract import to point to the renamed extension
contracts/token/ERC6909/draft-ERC6909.sol
contracts/token/ERC6909/ERC6909.sol
contracts/token/ERC6909/extensions/draft-ERC6909ContentURI.sol
contracts/token/ERC6909/extensions/ERC6909ContentURI.sol
contracts/token/ERC6909/extensions/draft-ERC6909Metadata.sol
contracts/token/ERC6909/extensions/ERC6909Metadata.sol
contracts/token/ERC6909/extensions/draft-ERC6909TokenSupply.sol
contracts/token/ERC6909/extensions/ERC6909TokenSupply.sol
contracts/mocks/docs/token/ERC6909/ERC6909GameItems.sol

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@ernestognw ernestognw requested a review from arr00 September 11, 2025 07:46
Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey there - I've reviewed your changes and they look great!


Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Copy link

coderabbitai bot commented Sep 11, 2025

Walkthrough

This change updates ERC-6909 references from draft to final paths across several contracts. Header comments and import paths are revised in IERC6909.sol, ERC6909.sol, and extensions (ERC6909ContentURI.sol, ERC6909Metadata.sol, ERC6909TokenSupply.sol), as well as a mock (ERC6909GameItems.sol). References switch from draft-IERC6909.sol and draft-ERC6909*.sol to IERC6909.sol and ERC6909*.sol. No functional logic, control flow, or public API signatures are modified.

Pre-merge checks (3 passed)

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title "Remove draft- prefix for ERC6909" is concise and accurately summarizes the primary change in the PR — removing the 'draft-' prefix from ERC6909 filenames, headers, and imports — making it clear and relevant for reviewers scanning history.
Description Check ✅ Passed The PR description explains that ERC-6909 is in Last Call and summarizes the renaming of draft-ERC6909 artifacts and updated imports, which directly matches the changes shown in the diff and is therefore on-topic.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.

✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (6)
contracts/interfaces/IERC6909.sol (1)

2-2: Header path update looks correct; consider syncing the “last updated” version tag.

This file shows v5.4.0 while sibling ERC6909 files still say v5.3.0. If this PR lands in the same release, align the version tag across touched files; otherwise, keep as-is per release process.

contracts/token/ERC6909/ERC6909.sol (2)

2-2: Confirm version tag consistency before release.

This file still says v5.3.0 while IERC6909 uses v5.4.0. Align during release bump if intended.


6-6: Optional: add deprecation shims to ease downstream migration.

Consider keeping thin forwarding files at old paths (e.g., token/ERC6909/extensions/draft-ERC6909Metadata.sol) that only import the new files, so existing importers don’t break immediately. You can remove them in the next major.

contracts/token/ERC6909/extensions/ERC6909Metadata.sol (1)

2-2: Minor: check the “last updated” version tag.

Keep consistent with the targeted release (v5.3.0 vs v5.4.0).

contracts/token/ERC6909/extensions/ERC6909ContentURI.sol (1)

2-2: Version tag consistency.

Same note as other files; align during release bump.

contracts/token/ERC6909/extensions/ERC6909TokenSupply.sol (1)

2-2: Minor: sync “last updated” tag with the intended release.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 8f8d61c and 3c005d5.

📒 Files selected for processing (6)
  • contracts/interfaces/IERC6909.sol (1 hunks)
  • contracts/mocks/docs/token/ERC6909/ERC6909GameItems.sol (1 hunks)
  • contracts/token/ERC6909/ERC6909.sol (1 hunks)
  • contracts/token/ERC6909/extensions/ERC6909ContentURI.sol (1 hunks)
  • contracts/token/ERC6909/extensions/ERC6909Metadata.sol (1 hunks)
  • contracts/token/ERC6909/extensions/ERC6909TokenSupply.sol (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: tests-foundry
  • GitHub Check: tests-upgradeable
  • GitHub Check: coverage
  • GitHub Check: halmos
🔇 Additional comments (6)
contracts/token/ERC6909/ERC6909.sol (2)

6-6: Import path switched to non-draft interface — LGTM.


2-2: No draft-ERC6909 references found — verify and close.
Executed the provided rg/fd script; no matches were returned in the repo.

contracts/token/ERC6909/extensions/ERC6909Metadata.sol (1)

6-7: Updated imports to non-draft names — looks good.

contracts/mocks/docs/token/ERC6909/ERC6909GameItems.sol (1)

4-4: Mock import updated to new path — LGTM.

contracts/token/ERC6909/extensions/ERC6909ContentURI.sol (1)

6-7: Non-draft imports in place — LGTM.

contracts/token/ERC6909/extensions/ERC6909TokenSupply.sol (1)

6-7: Imports migrated from draft to final — looks correct.

@Amxx
Copy link
Collaborator

Amxx commented Sep 15, 2025

Lets wait before it is actually final before we merge that.

@Amxx
Copy link
Collaborator

Amxx commented Sep 15, 2025

Note: In 4.9.0 we had the following changelog entry

### Deprecation

  • ERC20Permit: Added the file IERC20Permit.sol and ERC20Permit.sol and deprecated draft-IERC20Permit.sol and draft-ERC20Permit.sol since EIP-2612 is no longer a Draft. Developers are encouraged to update their imports. (#3793)

I believe we should have a similar changelog entry. I'm also wondering if we should should not keep the old (draft) files as a redirect.

@Amxx Amxx added this to the 5.5 milestone Sep 16, 2025
Amxx
Amxx previously approved these changes Sep 16, 2025
@Amxx
Copy link
Collaborator

Amxx commented Sep 16, 2025

ethereum/ERCs#1213

@Amxx Amxx merged commit 0a00486 into OpenZeppelin:master Sep 22, 2025
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants