Skip to content

Update _src/event_scanner/scanner/common.rs_ Function Signatures To Support Mocking Behavior #241

@0xNeshi

Description

@0xNeshi

Two words: Dependency Injection.

Example: instead of relying RobustProvider in the function signature, we could rely on alloy's Provider trait.

This would enable unit testing functions that can currently only be tested with integration tests; some of the flows can't even be tested that way, e.g. reorgs during latest events mode.

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: refactorCode improvement without changing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions