Skip to content

refactor: add missing IWorldIDVerifierV2 interface - #863

Closed
kilianglas wants to merge 1 commit into
mainfrom
kilianglas/add-verifier-v2-interface
Closed

refactor: add missing IWorldIDVerifierV2 interface#863
kilianglas wants to merge 1 commit into
mainfrom
kilianglas/add-verifier-v2-interface

Conversation

@kilianglas

Copy link
Copy Markdown
Contributor

Summary

WorldIDVerifierV2 is the only versioned core contract without a matching versioned interface — WorldIDRegistryV2 pairs with IWorldIDRegistryV2 is IWorldIDRegistry, while the verifier V2 declares its InvalidAction error directly on the contract. This adds the missing IWorldIDVerifierV2 so the verifier follows the same pattern, and so future verifier versions (e.g. a V3 adding new entry points) have a proper interface chain to extend.

  • New IWorldIDVerifierV2 is IWorldIDVerifier: declares InvalidAction and documents V2's action-prefix semantics (verify requires MSB 0x00, verifySession requires 0x02).
  • WorldIDVerifierV2 is IWorldIDVerifierV2, WorldIDVerifier (mirrors WorldIDRegistryV2): local error declaration removed; overrides now name both bases (override(IWorldIDVerifier, WorldIDVerifier)), as required by the diamond inheritance and consistent with the registry.
  • Tests reference the error via the interface (IWorldIDVerifierV2.InvalidAction.selector), matching the registry test idiom.
  • Also fixes the stale @title WorldIDVerifier on the V2 contract.

No behavior change: same functions, same checks, same error selector.

Test plan

  • cd contracts && forge test — 331 tests green

@kilianglas
kilianglas requested a review from a team as a code owner July 13, 2026 14:14
@kilianglas

Copy link
Copy Markdown
Contributor Author

Superseded: the V2 interface will be introduced together with verifyWithSession in #862 instead.

@kilianglas kilianglas closed this Jul 13, 2026
@kilianglas
kilianglas deleted the kilianglas/add-verifier-v2-interface branch July 13, 2026 14:29
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