Skip to content

feat(EDSL): first-class modifiers, inheritance (is X, Y), and virtual/override #2087

Description

@Th0rgal

Child of #1724. #3 convergent gap across the parity maps (docs/parity/): ~30 Lido hits, 8 ERC-4337 hits, 4 Morpho hits.

Goal

  • User-defined modifiers beyond the built-in nonReentrant (fix: release nonreentrant lock before EVM return/stop, not as dead code after (#2075) #2076): onlyOwner-style require-prefix modifiers first (pre-condition-only), then pre/post (_; placement)
  • Single + multiple inheritance headers (is X, Y) with parent-constructor calls
  • virtual/override template slots so abstract bases (BaseAccount._validateSignature, BasePaymaster._validatePaymasterUserOp) can be modeled

Suggested staging

  1. Pre-condition-only modifiers (desugar to inlined require blocks; no proof change needed beyond inlining)
  2. Flattened single inheritance (compile-time flattening into one contract, C3 linearization out of scope initially)
  3. Abstract/virtual dispatch as compile-time specialization

Done when

  • onlyOwner-pattern contracts express without inlined require workarounds
  • At least one flattened-inheritance reference contract (e.g. SimpleAccount minus UUPS) compiles
  • Parity map rows updated in the same PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1: core languageBlocks writing common contractsblocks:erc4337Blocks ERC-4337 EntryPoint parity/verificationblocks:lidoBlocks Lido StakingRouter parity/verificationblocks:morphoBlocks Morpho Blue parity/verificationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions