Skip to content

feat: add callvalue (msg.value) support to e2e test harness #64

@refcell

Description

@refcell

In crates/evm-tests/tests/suites/stress.rs, a TODO comment documents that the e2e test harness cannot send ETH value with test transactions: "deposit needs callvalue support in test host, skip for now". This means any payable function or function that reads @callvalue() cannot be tested in the e2e suite.

The test harness builds transactions via revm's TxEnv but the helper functions that construct call transactions do not expose the value field. The fix involves adding a call_fn_with_value variant (or an optional value parameter) to the test helpers in crates/evm-tests/ so that tx.value can be set on call transactions. This would also require the target contract address to hold sufficient balance in the test database, and test assertions should be able to verify balance changes after payable calls. Once shared test helpers are extracted (see #48), the callvalue support should be part of the shared API.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions