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

Support for eth_createAccessList #2258

Closed
pipermerriam opened this issue Dec 15, 2021 · 2 comments
Closed

Support for eth_createAccessList #2258

pipermerriam opened this issue Dec 15, 2021 · 2 comments

Comments

@pipermerriam
Copy link
Member

What was wrong?

Unsure if this is standardized but, support for eth_createAccessList would be useful

https://geth.ethereum.org/docs/rpc/ns-eth#eth_createaccesslist

How can it be fixed?

Add support for that JSON-RPC endpoint either in the w3.geth namespace or under w3.eth if it is standardized (I think it is)

@wiseaidev
Copy link
Contributor

Hey there, I think I can work on dis issue. However, after digging a bit deeper, I realized there is a bit of struggle in implementing the formatter for the response. From what I understood from the eip-2930 example, I think it should be something along these lines:

ACCESS_LIST_FORMATTER = apply_list_to_array_formatter({
    'address': to_checksum_address,
    'storageKeys': apply_list_to_array_formatter(to_hexbytes(32))
})

ACCESS_LIST_RESPONCE_FORMATTER = apply_formatters_to_dict({
    "accessList": ACCESS_LIST_FORMATTER,
    "gasUsed": to_integer_if_hex,
})

And under the Eth namespace formatters, we need to add the following line:

    RPC.eth_createAccessList: ACCESS_LIST_RESPONCE_FORMATTER,

Similarly, for the request, the formatter might look like:

    RPC.eth_createAccessList: apply_formatter_at_index(transaction_param_formatter, 0),

Lemme know whether or not I misinterpreted the format of the req/res to continue working on dis issue.

Regards.

@kclowes
Copy link
Collaborator

kclowes commented Feb 28, 2024

closed via #2381

@kclowes kclowes closed this as completed Feb 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants