gakonst / ethers-rs

Complete Ethereum & Celo library and wallet implementation in Rust. https://docs.rs/ethers
Apache License 2.0
2.49k stars 795 forks source link

Geth debug_traceTransaction #1347

Open drawnwren opened 2 years ago

drawnwren commented 2 years ago

Working on implementing support for debug_traceTransaction for geth. It looks like most of the outline for this was already sketched in #558.

geth debug_traceTransaction

Do we just want this tacked onto the Middleware trait for now?

gakonst commented 2 years ago

yeah let's go for it on the middleware trait

MetaZeroFairyProof commented 2 years ago

Expect!

drawnwren commented 2 years ago

So I got a starting version working, but one of the hairy parts is that geth has the option to pass a filter that is a json object containing Javascript that it evaluates during the trace. I didn't really have a good sense of how to integrate that correctly w/ Rust's type system and ended up just writing w/ GETH's native debug API for my use case.

drawnwren commented 2 years ago

If anyone picks this up in the future, anvil actually has the tracing options type already done here: https://github.com/foundry-rs/foundry/blob/695bff10ab048625eb8487bd09a310b001f37383/anvil/core/src/types.rs