Skip to content

Add automated tests (unit / integration) for core functionality #507

@casks-mutters

Description

@casks-mutters

Currently, the repo appears to rely on manual usage, and there is no test suite. Having tests would help maintain correctness, especially if future changes add complexity (e.g. batch mode, tree building, retries).

Suggested tests:

  • Unit tests for commitment computation: given known inputs (chain_id, address, slot, block number, value), ensure leaf and pair commitment outputs are as expected.
  • Integration tests (on a local / mock RPC or a public testnet) that read a known contract slot at two blocks and verify the result.
  • Edge cases: slot not present, invalid address/slot input, non-EVM blockchains, RPC failures.

Benefits:

  • Increase reliability and maintainability.
  • Make future refactors safer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions