Skip to content
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

Consider adding a setShadowContract #1505

Open
roninjin10 opened this issue Feb 3, 2025 · 0 comments
Open

Consider adding a setShadowContract #1505

roninjin10 opened this issue Feb 3, 2025 · 0 comments

Comments

@roninjin10
Copy link
Collaborator

Because tevm extends viem api most methods such as getLogs or traceTransaction do not support modifying the bytecode. Consider allowing user to specifically call setShadowContract({ code, address}) and removeShadoeComtract methods so you can do this and then use Tevm as normal.

The tricky part here will be cache invalidation for the ReceiptManager. This task would depend on always keeping track of which contracts have been called or inner called by a tx

This also is tricky if getLogs is called on old blocks as normally today we fetch those logs from rpc. We likely need to throw an error by default in this case with the user able to explicitly force it to fetch past blocks with an option

This functionality will be much more useful if we add a replayTransaction method too

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

No branches or pull requests

1 participant