-
Notifications
You must be signed in to change notification settings - Fork 39
feat: Internalize evm tracing functionalitiy #437
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
base: main
Are you sure you want to change the base?
Conversation
Move away from depending on foundry for traces. Instead implement trace functionality within tycho-simulation using only publicly available crates.
Remove the now unused decode_internal parameter and adjust call sites.
126c61e to
d55e269
Compare
|
Some test are currently failing due to this: foundry-rs/foundry#2696 |
This got lost in a previous update since it is now feature gated in revm.
dianacarvalho1
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @kayibal ! This is amazing 🙏🏼 Only have small comments!
| .map_err(|err| SimulationEngineError::TraceError(err.to_string())) | ||
| handle_traces( | ||
| trace_res, | ||
| env::var("ETHERSCAN_API_KEY").ok(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to mention this in the docs!
| // Query 4byte.directory | ||
| let hex_selector = format!("0x{}", hex::encode(selector.as_slice())); | ||
| let url = format!( | ||
| "https://www.4byte.directory/api/v1/signatures/?hex_signature={}", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've played with this before and got a loooot of weird values 😕 like sub2juniononyoutube and honeypot for very common selectors. Did you stumble on this too?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm weird because foundry doesn't do anything fancy here so it should be pretty much the same logic...
| /// Handle traces with Etherscan identification and pretty printing | ||
| /// This is the main public function used by SimulationEngine |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and 4byte signature identification
Move away from depending on foundry for traces. Instead implement trace functionality within tycho-simulation using only publicly available crates.
Traces with etherscan api key look like this now: