Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

eth_createAccessList - Closes #4081 - #4332

Merged
Spacesai1or merged 21 commits into
1.xfrom
wyatt/1.x/4081-createAccessList
Oct 5, 2021
Merged

eth_createAccessList - Closes #4081#4332
Spacesai1or merged 21 commits into
1.xfrom
wyatt/1.x/4081-createAccessList

Conversation

@Spacesai1or

@Spacesai1or Spacesai1or commented Sep 16, 2021

Copy link
Copy Markdown
Contributor
  • 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

@Spacesai1or Spacesai1or added the 1.x 1.0 related issues label Sep 16, 2021
@render

render Bot commented Sep 16, 2021

Copy link
Copy Markdown

@Spacesai1or

Spacesai1or commented Sep 16, 2021

Copy link
Copy Markdown
Contributor Author

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

@Spacesai1or

Copy link
Copy Markdown
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"
    }
}

@Spacesai1or
Spacesai1or marked this pull request as ready for review September 18, 2021 00:56
Comment thread docs/web3-eth-contract.rst Outdated
Comment thread docs/web3-eth-contract.rst Outdated
Comment thread docs/web3-eth-contract.rst Outdated
Comment thread docs/web3-eth-contract.rst Outdated
Comment thread docs/web3-eth-contract.rst Outdated
Comment thread docs/web3-eth.rst Outdated
Comment thread packages/web3-eth-contract/src/index.js
nazarhussain
nazarhussain previously approved these changes Sep 20, 2021

@nazarhussain nazarhussain left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown

Ok

@0xall 0xall mentioned this pull request Jun 17, 2022
16 tasks
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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