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

eth_createAccessList - Closes #4081 #4332

Merged
merged 21 commits into from Oct 5, 2021
Merged

Conversation

spacesailor24
Copy link
Contributor

@spacesailor24 spacesailor24 commented Sep 16, 2021

  • Adds createAccessList to web3.eth (web3.eth.createAccessList)
  • Adds createAccessList to contract method wrappers
    • e.g. contract.methods.myMethod(some, parameters).createAccessList({ from: '0x0...' })

I believe only Geth supports eth_createAccessList right now, but I'm not sure

Closes #4081

@spacesailor24 spacesailor24 added the 1.x 1.0 related issues label Sep 16, 2021
@render
Copy link

render bot commented Sep 16, 2021

@spacesailor24
Copy link
Contributor Author

spacesailor24 commented Sep 16, 2021

Docs for this method were added here, but the PR was reverted. The subsequent PR to add back the docs was closed, and there doesn't seem to be anything adding it to the mentioned repo

So I'm operating under the assumption that eth_createAccessList takes two parameters as documented here

@spacesailor24
Copy link
Contributor Author

I've tested that this works as expected using this repo

Access list generated by these changes:

{
    "accessList": [
        {
            "address": "0x35288259dc7fd6a6986cb3827965a4b711f73d81",
            "storageKeys": [
                "0x0000000000000000000000000000000000000000000000000000000000000002",
                "0x405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad0",
                "0x405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad1"
            ]
        }
    ],
    "gasUsed": "0x76ee"
}

Access list by submitting the same transaction directly to Geth:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "accessList": [
            {
                "address": "0x35288259dc7fd6a6986cb3827965a4b711f73d81",
                "storageKeys": [
                    "0x0000000000000000000000000000000000000000000000000000000000000002",
                    "0x405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad0",
                    "0x405787fa12a823e0f2b7631cc41b3ba8828b3321ca811111fa75cd3aa3bb5ad1"
                ]
            }
        ],
        "gasUsed": "0x76ee"
    }
}

@spacesailor24 spacesailor24 marked this pull request as ready for review September 18, 2021 00:56
docs/web3-eth.rst Outdated Show resolved Hide resolved
nazarhussain
nazarhussain previously approved these changes Sep 20, 2021
Copy link
Contributor

@nazarhussain nazarhussain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the feedback of @jdevcs LGTM.

jdevcs
jdevcs previously approved these changes Sep 22, 2021
@fallingicarus
Copy link

Ok

@0xall 0xall mentioned this pull request Jun 17, 2022
16 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1.x 1.0 related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

eth_createAccessList Support
6 participants