Closed brockelmore closed 1 year ago
That is a really good idea, and variants make senes!
Return
was for a reason left as a simple dummy (not rust like) enum, so the change would be just adding a new field to it
Recently Result
was renamed to InstructionResult
: https://github.com/bluealloy/revm/blob/main/crates/interpreter/src/instruction_result.rs
And new type for Return is made for better ux: https://github.com/bluealloy/revm/blob/main/crates/primitives/src/result.rs#L117
i can take this on.
i can take this on.
Go for it! Add ordinary fields to InstructionResult
and add struct that @brockelmore wrote to Halt
: https://github.com/bluealloy/revm/blob/main/crates/primitives/src/result.rs#L117
It would be nice for foundry (and likely reth) if there were a few different kinds of
OutOfGas
error types. For example, in https://github.com/foundry-rs/foundry/issues/3971 I had to patch foundry and add debugging lines torevm
to figure out this was a memory limit OOG error.Some variants may be:
then the
Return::OutOfGas
would becomeReturn::OutOfGas(OutOfGasError::OOG)
or whatever variant best suits the error