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

Suggesting specifc Create Inspector return type for call call_end #873

Closed
mattsse opened this issue Nov 20, 2023 · 6 comments
Closed

Suggesting specifc Create Inspector return type for call call_end #873

mattsse opened this issue Nov 20, 2023 · 6 comments
Labels
good first issue Good for newcomers refactor Refactor of the code

Comments

@mattsse
Copy link
Collaborator

mattsse commented Nov 20, 2023

While it is possible and perhaps desired to override the address:

) -> (InterpreterResult, Option<Address>) {

most of the time it is not needed.

Since we already made changes to the Inspector, I'm suggesting to make this return type a bit easier as well like

struct CreateOutcome {result: InterpreterResult, address: Option<Address>}

and some helper functions like CreateOutcome::continue() -> Self

what's the difference between the Option here:

fn create(
&mut self,
context: &mut EvmContext<'_, DB>,
inputs: &mut CreateInputs,
) -> Option<(InterpreterResult, Option<Address>)> {

and non optional here:

fn create_end(
&mut self,
context: &mut EvmContext<'_, DB>,
result: InterpreterResult,
address: Option<Address>,
) -> (InterpreterResult, Option<Address>) {

@rakita rakita added refactor Refactor of the code good first issue Good for newcomers labels Dec 25, 2023
@loocapro
Copy link
Contributor

May I take this?

@rakita
Copy link
Member

rakita commented Dec 26, 2023

Can you do it on top of the external_field branch? There are a few conflicting changes there

@loocapro
Copy link
Contributor

Sure!

@mahmudsudo
Copy link

has this been taken already

@loocapro
Copy link
Contributor

has this been taken already

Yes sorry.

@rakita
Copy link
Member

rakita commented Jan 30, 2024

done

@rakita rakita closed this as completed Jan 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers refactor Refactor of the code
Projects
None yet
Development

No branches or pull requests

4 participants