Skip to content

feat: enable decoding non-Ethereum precompiles when tracing #4821

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

4meta5
Copy link
Contributor

@4meta5 4meta5 commented Apr 25, 2023

Closes #1078

Enable decoding calls from non-Ethereum precompiles when tracing by adding a field to foundry_config::Config for precompiles: Vec<(Address, Function)>.

Motivation

Enable decoding calls from non Ethereum precompiles when tracing #1078

Solution

Define with_precompiles method on CallTraceDecoderBuilder to augment the Ethereum precompiles included in new method with non-Ethereum precompiles specified by a config.

@4meta5 4meta5 changed the title Enable decoding non-Ethereum precompiles when tracing feat: enable decoding non-Ethereum precompiles when tracing Apr 25, 2023
Comment on lines 201 to 203
/// Information for decoding custom precompile calls
#[serde(default)]
pub precompiles: Vec<(Address, Function)>,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is reasonable,

I'd like to see some tests/examples for this in toml format

Copy link
Member

@Evalir Evalir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be good now—just needs examples

@Evalir
Copy link
Member

Evalir commented Sep 25, 2023

Will close this—while "complete", it's a pretty sensitive change that will get overwritten by the alloy migration, and on top of this we're still debating a bit on how to include these external precompiles. Once the migration is done we can include a configuration option to detect and decode these.

@Evalir Evalir closed this Sep 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat(tracing): decode non-mainnet precompiles when tracing
4 participants