Repository navigation
Conversation
Add the ETHDebug output selections `evm.bytecode.ethdebug`, `evm.deployedBytecode.ethdebug`, `ethdebug.resources`, and `ethdebug.compilation`. Keep the ETHDebug programs on `Bytecode` and `CompactBytecode`, and keep the global `ethdebug` output in the build info at `output.metadata.ethdebug`. Solar and solc use the same standard-JSON shape for these outputs. `ExtraOutputValues::ethdebug` requests both programs and keeps them in `ConfigurableContractArtifact`. The sparse output filter keeps the global ETHDebug selections under `*`, because Solar and solc 0.8.35 and later read them only there. Projects that do not request ETHDebug get the same output selection, artifacts, and build info.
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.
Why
Before: foundry-compilers drops the compiler's ETHDebug output.
After: artifacts keep the ETHDebug programs, so Foundry can give them to SolDB (foundry-rs/foundry#16557, foundry-rs/foundry#17430).
Change
Adds output selections for the per-contract programs and the global
ethdebug.resourcesandethdebug.compilationrecords. WithExtraOutputValues::ethdebug, artifacts keep the programs on their bytecode, and the build info keeps the global output atoutput.metadata.ethdebug. The sparse output filter keeps the global selections under"*": {"*": [...]}, where solar and solc 0.8.35+ read them.Downstream
BytecodeandCompactBytecodeget a publicethdebugfield, so struct literals needethdebug: None. Solc emits this output only withexperimental,viaIR, and the optimizer off, andexperimentaladds 14 bytes to the CBOR metadata; solar emits it with the optimizer on.