Skip to content

Refactor MockIPGraph to Support Read-Only Access for Ancestor Count Functions #474

@kingster-will

Description

@kingster-will

Description and context

Currently, getAncestorIpsCount / getAncestorIpsCountExt are invoked via _callIpGraph. While these functions do not modify IPGraph state, we use call (instead of staticcall) primarily for testability, since MockIPGraph writes to storage during simulation.

This creates some inconsistency and can be confusing for reviewers, as the production functions are effectively read-only but appear as regular calls.

This issue is tracking:

  • Refactor related MockIPGraph function to read-only mode.
  • Update test cases accordingly.
  • Refactor production calls to use _staticcallIpGraph for ancestor count queries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions