Skip to content

N-09: fix naming inconsistencies for v31#2127

Open
valera-grinenko-ai wants to merge 3 commits intomatter-labs:draft-v31from
valera-grinenko-ai:pr/N-09-naming-inconsistencies
Open

N-09: fix naming inconsistencies for v31#2127
valera-grinenko-ai wants to merge 3 commits intomatter-labs:draft-v31from
valera-grinenko-ai:pr/N-09-naming-inconsistencies

Conversation

@valera-grinenko-ai
Copy link
Copy Markdown

@valera-grinenko-ai valera-grinenko-ai commented Apr 7, 2026

Summary

Addressed

  • Replace NotHyperchain() with NotAZKChain(msg.sender) in Mailbox.requestL2TransactionToGatewayMailboxWithBalanceChange — uses the existing error from L1ContractErrors which follows current ZKChain terminology and includes the caller address for better debuggability. Removes the now-unused NotHyperchain definition from L1StateTransitionErrors.sol
  • Rename l1AssetHandlerassetHandler in AssetRouterBase._burn — the variable holds the resolved handler for the given assetId, which may be an L2 handler in interop (L2→L2) flows; the "l1" prefix is misleading since v31

Test plan

  • Verify forge build passes
  • Confirm NotAZKChain is reverted with the correct sender address when caller is not the expected ZKChain

🤖 Generated with Claude Code

The variable holds the resolved asset handler for the given assetId,
which may be an L2 handler in interop (L2-to-L2) flows. The "l1"
prefix is misleading since v31.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Agent Review and others added 2 commits April 7, 2026 16:57
Replace the outdated NotHyperchain() error with the existing
NotAZKChain(address) error in requestL2TransactionToGatewayMailbox-
WithBalanceChange. NotAZKChain already exists in L1ContractErrors
and includes the caller address for better debuggability.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
No remaining references in the codebase after replacing with
NotAZKChain.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@valera-grinenko-ai valera-grinenko-ai changed the title N-09: rename misleading l1AssetHandler variable N-09: fix naming inconsistencies for v31 Apr 7, 2026
import {IEIP7702Checker} from "contracts/state-transition/chain-interfaces/IEIP7702Checker.sol";

import {AddressNotZero, ZeroAddress} from "contracts/common/L1ContractErrors.sol";
import {AddressNotZero, NotAZKChain, ZeroAddress} from "contracts/common/L1ContractErrors.sol";
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

it appears that this error is never tested, right? we added it here inside the imports and never ended up using it

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.

2 participants