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

Acessing custom return for stateful precompiles #1837

Open
vch9 opened this issue Oct 24, 2024 · 1 comment
Open

Acessing custom return for stateful precompiles #1837

vch9 opened this issue Oct 24, 2024 · 1 comment

Comments

@vch9
Copy link

vch9 commented Oct 24, 2024

Hey,

First of all I'd like to mention that I'm just discovering revm so this issue might be completely wrong, perhaps what I'm "asking" is already supported.

I'd like to implement a precompiled contract that have a very custom outcome, completely unrelated to EVM. To instantiate a bit the issue, I would like to collect a list of Withdrawal which are produced when funds are transferred to a specific precompiled contract. The withdrawal in my case is unrelated to EVM, and needs to be handled in a very specific way for a L1-L2 communication.

From my understand it's not possible to do it with revm as the outcome is rightfully limited to gas used and output. One alternative I believe would be that I rely on logs and inspect the transaction result. If revm supported it, I could let the interpreter collect these custom outcome and handle them after the execution, without having to deal with subcalls and all.

Does it make any sense to you? Do you see any value to this feature request?

Edit: I have not yet full grasped the difference between StatefulPrecompileMut and StatefulPrecompileMut, perhaps this is doable with a custom handler

@rakita
Copy link
Member

rakita commented Nov 20, 2024

Hey, i missed this issue.

This should be a lot easier with the new restructuring and Evm framework I am building towards. First version should last around the middle of December.

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

3 participants
@rakita @vch9 and others