Replies: 1 comment 2 replies
-
Currently, with standard ethereum APIs, there's really no straight way to do that. You can use debug_traceCall module of geth/erigon to get execution info and you can extract logs from it. For this you need an eth node that has tracing enabled (usually its not or being a paywall because it's a computationally expensive API). Otherwise, a hacky way would be to use hardhat network or anvil to start a mainnet fork at current block and make a transaction on the block and get its events from the receipt. This is a slower option since the mainnet fork needs to query all the state involved but might be just worth it if you cannot manage an archive/trace node. MEV searchers usually modify geth's |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi @zemse @ricmoo
I have a contract that emits the events.. Not returns it, but emits.
I want to simulate the function ! If I use ethers's staticcall feature, problem is, I can't get events.
Isn't there any way in ethers to do this ?
Beta Was this translation helpful? Give feedback.
All reactions