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

[Feature] Use AccessListResult type for createAccessList call #1109

Closed
mattsse opened this issue Jul 29, 2024 · 3 comments
Closed

[Feature] Use AccessListResult type for createAccessList call #1109

mattsse opened this issue Jul 29, 2024 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@mattsse
Copy link
Member

mattsse commented Jul 29, 2024

Component

network, json-rpc, provider, pubsub

Describe the feature you would like

createAccessList returns an optional error if the transaction failed

paradigmxyz/reth#9811

image

this is slightly annoying because this now returns an object that can represent a failed transaction

TODO

  • port reth type and update provider call
  • add helper functions to AccessListresult that check if the result has an error and properly document

Additional context

No response

@mattsse mattsse added enhancement New feature or request good first issue Good for newcomers labels Jul 29, 2024
@mvares
Copy link
Contributor

mvares commented Jul 29, 2024

where can I add the AccessListResult type?

@mattsse
Copy link
Member Author

mattsse commented Jul 29, 2024

here:

/// Access list with gas used appended.
#[derive(Clone, Debug, Default, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
#[cfg_attr(feature = "serde", serde(rename_all = "camelCase"))]
pub struct AccessListWithGasUsed {
/// List with accounts accessed during transaction.
pub access_list: AccessList,
/// Estimated gas used with access list.
pub gas_used: U256,
}

@mvares
Copy link
Contributor

mvares commented Aug 2, 2024

closes? @mattsse

@mattsse mattsse closed this as completed Aug 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants