You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cast: Improve debugger when tracing on-chain transactions/calls (foundry-rs#10596)
* cast: Fetch bytecodes in `run/call` to better match contracts
Without fetching the bytecodes from the current chain, matching the
contracts with `--with-local-artifacts` option only works if the
matching contracts have been deployed in the trace. This is very
limiting when trying to `--debug` an on-chain transaction.
By fetching the contracts' bytecodes, we can increase the matching of
address to source file, by thus providing the runtime bytecode.
* cast: Strip placeholder from bytecode-object for source-map and matching
If a contract contains some libraries, and thus has an "unlinked"
bytecode object, it will never be matched against a deployed instance,
and the source map will never be set.
This fixes this issue by striping from the unlinked bytecode all
placeholders, replacing them with the `0x00..00` address. It doesn't
change anything regarding source-maps, but could change the matching of
the runtime bytecode. The changes are usually minimal in this case, though.
0 commit comments