Repository navigation
fix(anvil): handle eth_simulateV1 calls without to as contract creation - #15784
Merged
figtracer merged 1 commit intoJul 16, 2026
Merged
Conversation
Default calls without a recipient to contract creation and preserve revert output in the standardized simulation error response.
mablr
requested review from
0xrusowsky,
DaniPopes,
figtracer,
grandizzy,
mattsse and
stevencartavia
as code owners
July 16, 2026 11:03
figtracer
enabled auto-merge (squash)
July 16, 2026 11:33
figtracer
approved these changes
Jul 16, 2026
figtracer
deleted the
mablr/oss-562-support-create-style-eth_simulatev1-calls
branch
July 16, 2026 11:50
This was referenced Jul 20, 2026
mmv08
added a commit
to mmv08/viem
that referenced
this pull request
Nov 2, 2026
CI pinned foundry to v1.7.1 (May 2026). Pin the latest release, v1.8.7, and update the tests that depend on Anvil's output. Snapshot updates (Anvil output changed): - Receipts omit `blobGasPrice` on non-blob transactions. - `eth_simulateV1` results include `maxUsedGas`, and the intrinsic-gas error gains an `err:` prefix. - Unknown methods return -32601 "Method not found", and unknown subscription names return a new message. - The unsigned `raw` from `eth_fillTransaction` carries a placeholder signature, so its hash changed. - After `anvil_reset`, fills use the reset block's base fee, which changes the writeContracts hashes and one `effectiveGasPrice`. - Anvil rejects a fill with only `maxPriorityFeePerGas`, so prepareTransactionRequest falls back to its own fee estimate. Test changes: - Transport tests call `eth_chainId` instead of `web3_clientVersion`. They test the RPC client, not the node, and the old snapshot held the Anvil version, so it broke on every bump. - txpool tests look up checksummed addresses, as Anvil now returns them. - `estimateGas` with only `maxPriorityFeePerGas` now asserts the node's rejection. - The local-account insufficient-funds tests pass `gas`, since Anvil's estimate now caps gas by balance and fails first with another error. - Anvil no longer forks zkSync Era, so `anvilZksync` runs a local chain with chain id 324 and `VITE_ANVIL_FORK_URL_ZKSYNC` is gone. - The six `traceAssetChanges` tests in `simulateCalls` run again: v1.8.7 includes foundry-rs/foundry#15784, the `eth_simulateV1` fix they were skipped for. Three local-account `estimateGas` tests still fail until Viem stops sending both `gasPrice` and `maxFeePerGas` from a filled request.
jxom
added a commit
to wevm/viem
that referenced
this pull request
Nov 2, 2026
chore(ci): pin foundry to v1.8.7 CI pinned foundry to v1.7.1 (May 2026). Pin the latest release, v1.8.7, and update the tests that depend on Anvil's output. Snapshot updates (Anvil output changed): - Receipts omit `blobGasPrice` on non-blob transactions. - `eth_simulateV1` results include `maxUsedGas`, and the intrinsic-gas error gains an `err:` prefix. - Unknown methods return -32601 "Method not found", and unknown subscription names return a new message. - The unsigned `raw` from `eth_fillTransaction` carries a placeholder signature, so its hash changed. - After `anvil_reset`, fills use the reset block's base fee, which changes the writeContracts hashes and one `effectiveGasPrice`. - Anvil rejects a fill with only `maxPriorityFeePerGas`, so prepareTransactionRequest falls back to its own fee estimate. Test changes: - Transport tests call `eth_chainId` instead of `web3_clientVersion`. They test the RPC client, not the node, and the old snapshot held the Anvil version, so it broke on every bump. - txpool tests look up checksummed addresses, as Anvil now returns them. - `estimateGas` with only `maxPriorityFeePerGas` now asserts the node's rejection. - The local-account insufficient-funds tests pass `gas`, since Anvil's estimate now caps gas by balance and fails first with another error. - Anvil no longer forks zkSync Era, so `anvilZksync` runs a local chain with chain id 324 and `VITE_ANVIL_FORK_URL_ZKSYNC` is gone. - The six `traceAssetChanges` tests in `simulateCalls` run again: v1.8.7 includes foundry-rs/foundry#15784, the `eth_simulateV1` fix they were skipped for. Three local-account `estimateGas` tests still fail until Viem stops sending both `gasPrice` and `maxFeePerGas` from a filled request. Co-authored-by: jxom <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Close OSS-562.
This treats
eth_simulateV1calls withouttoas contract creation, allowing empty and from-only calls to produce returned transactions. Successful creation output is preserved, while reverts expose their bytes through the simulation error response.Omitted-nonce progression remains tracked by OSS-561. Canonical returned transaction metadata, including chain ID, and exact revert-message conformance remain tracked by OSS-565.