Skip to content

Add EIP-7702 Examples #4015

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

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

avdheshcharjan
Copy link
Contributor

This PR adds example files for the EIP-7702 implementation, demonstrating how to create and enable EIP-7702 transactions in various scenarios. It includes basic enabling, ERC20 atomic operations, and a Uniswap integration example.

Copy link

codecov bot commented Apr 24, 2025

Codecov Report

Attention: Patch coverage is 0% with 373 lines in your changes missing coverage. Please review.

Project coverage is 79.03%. Comparing base (1f8f8c7) to head (b4ac203).
Report is 2 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

Flag Coverage Δ
block 84.33% <ø> (ø)
blockchain 89.32% <ø> (ø)
client 67.99% <ø> (ø)
common 97.51% <ø> (ø)
devp2p 86.78% <ø> (+0.53%) ⬆️
evm 73.11% <ø> (ø)
mpt 90.05% <ø> (+0.35%) ⬆️
statemanager 69.06% <ø> (ø)
static 99.11% <ø> (ø)
tx 90.59% <ø> (ø)
util 89.36% <ø> (ø)
vm 48.97% <0.00%> (-6.53%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@holgerd77
Copy link
Member

Hi hi, great start on this! 🤩 The examples are not yet working (this is likely partly AI generated?), so the examples CI is misleading, showing green even on failed runs, see #4016 (discovered it here along, actually great side effect, totally unfortunate otherwise for our releases since this might hide some bugs 🙏).

So, examples are using e.g. VM.create(), this API does not exist any more. Can you have a closer look and make sure that the examples are compatible and run with latest master?

@@ -64,5 +64,8 @@
"engines": {
"node": ">=18",
"npm": ">=7"
},
"dependencies": {
"@ethersproject/abi": "^5.8.0"
Copy link
Member

Choose a reason for hiding this comment

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

We have an Ethers dev dependency in package.json root which you should be able to use, no need to add a dependency here + alter the package-lock.json file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok

@@ -57,9 +57,9 @@ See PR [#3524](https://github.com/ethereumjs/ethereumjs-monorepo/pull/3524):
See PR [#3544](https://github.com/ethereumjs/ethereumjs-monorepo/pull/3544):
Copy link
Member

Choose a reason for hiding this comment

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

Commenting here, since I can't do above: accicental removal (+ committed) of the packages/ethereum-tests directory.

I think it might generally be wise to just pick the relevant changes from this PR (by just copying over) and submit a new PR, best from a branch on your side (git checkout -b new-eip-7702-examples) and not from master, otherwise things will likely get too messy.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok ill do it

@gabrocheleau
Copy link
Contributor

Hi @avdheshcharjan!
Thanks a lot for tacking this! Just a quick headsup that we have move some 7702-related helpers (e.g. authorizationLists) into the util package rather than the tx one in this PR: #4032 . This will allow more flexibility for future usage and fits our monorepo architecture better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants