Chain Future

Solidity, smart-contract development, developer tools and explained protocol engineering

Foundry nightly preserves local edits in Cast exports and log indexes in Anvil traces

Developers who edit contract source locally can now export it with Cast without losing those edits. The fix is part of Foundry’s December 2, 2026 nightly build (f20c90f), which also changes what Anvil returns for missing accounts and how Forge handles lines marked to skip formatting.

Anvil: tracing calls and checking accounts

Anvil now retains log indexes in Tempo call traces, so developers can see each log’s position when inspecting a call. For a missing account, eth_getProof now returns zero hashes. The build also restores the public signature of filter_logs—the interface callers use to invoke it.

Two fixes make rejection explicit: Anvil rejects calls that specify a blob fee cap without blob hashes, and it rejects unsupported tracers requested through debug_traceTransaction.

Cast: exporting source and validating input

Alongside the export fix, Cast now uses the source address as the key for its storage source cache and resolves creation code for contracts created inside other contracts. In batches, it selects access keys according to the scope of each call.

Cast also rejects three inputs: an empty amount, an empty field before sig in a call specification, and extra bytes after a raw transaction.

Forge: inspecting contracts and formatting source

Forge now preserves signatures that collide in forge inspect output. Its formatter no longer prints an item a second time if a line marked to skip formatting already covers it. It also keeps a disabled first line stable inside an if body and keeps inline documentation comments in block form when docs_style is set to line. The documentation generator now escapes custom tag names and code fences.

The symbolic analysis changes include recognizing mulDiv with a constant denominator and giving the folded-root search its own budget. New tests add soundness controls for two rewrites. Separately, the execution engine now rejects the Celo transfer precompile in a static call, a context in which state changes are not permitted.