Skip to content

Conversation

@pbkompasz
Copy link
Contributor

@pbkompasz pbkompasz commented Apr 22, 2025

EIP-7702

Expanded EIP-7702 article with new transaction type, transaction execution details, etc.

@github-actions
Copy link

Hi @pbkompasz,

⚠️ Potential typos found in your pull request:

  • 📄 ./docs/eps/intro.md (line(s) 102):
    1. ❌ Karim

ℹ️ How to fix this error:

  1. If these are actual typos:

    • Open the files at the specified line numbers and fix them
  2. If these are names or one-off nouns:

    • Wrap them in <name> tags
    • Example: <name>Alex Pereira</name>
    • Use this for people's names or unique terms that appear rarely
  3. If these are valid terms:

    • Add them to wordlist.txt (one word per line)
    • Terms must be plain text without spaces/special chars
    • The list is case-insensitive
  4. If these are code terms:

    • Wrap them in backticks (`) in your markdown

ℹ️ Checking for typos locally

  1. Install aspell for your platform
  2. Navigate to project root and run:
for f in **/*.md ; do echo $f ; aspell --lang=en_US --mode=markdown --home-dir=. --personal=wordlist.txt --ignore-case=true --camel-case --add-sgml-skip nospellcheck list < $f | sort | uniq -c ; done

Learn more about wordlist format

@github-actions
Copy link

Hi @pbkompasz,

⚠️ Potential typos found in your pull request:

  • 📄 ./docs/eps/intro.md (line(s) 102):
    1. ❌ Karim
  • 📄 ./docs/wiki/research/account-abstraction/eip-7702.md (line(s) 19):
    1. ❌ precedeed
  • 📄 ./docs/wiki/research/account-abstraction/eip-7702.md (line(s) 29):
    1. ❌ AUTHCALL
  • 📄 ./docs/wiki/research/account-abstraction/eip-7702.md (line(s) 42):
    1. ❌ resubmission
  • 📄 ./docs/wiki/research/account-abstraction/eip-7702.md (line(s) 43):
    1. ❌ seralized
  • 📄 ./docs/wiki/research/account-abstraction/eip-7702.md (line(s) 50):
    1. ❌ EOA's
  • 📄 ./docs/wiki/research/account-abstraction/eip-7702.md (line(s) 62):
    1. ❌ follwing
  • 📄 ./docs/wiki/research/account-abstraction/eip-7702.md (line(s) 62):
    1. ❌ designator
  • 📄 ./docs/wiki/research/account-abstraction/eip-7702.md (line(s) 69):
    1. ❌ EXTCODEHASH
  • 📄 ./docs/wiki/research/account-abstraction/eip-7702.md (line(s) 70):
    1. ❌ EXTCODECOPY
  • 📄 ./docs/wiki/research/account-abstraction/eip-7702.md (line(s) 71):
    1. ❌ Exeuction

ℹ️ How to fix this error:

  1. If these are actual typos:

    • Open the files at the specified line numbers and fix them
  2. If these are names or one-off nouns:

    • Wrap them in <name> tags
    • Example: <name>Alex Pereira</name>
    • Use this for people's names or unique terms that appear rarely
  3. If these are valid terms:

    • Add them to wordlist.txt (one word per line)
    • Terms must be plain text without spaces/special chars
    • The list is case-insensitive
  4. If these are code terms:

    • Wrap them in backticks (`) in your markdown

ℹ️ Checking for typos locally

  1. Install aspell for your platform
  2. Navigate to project root and run:
for f in **/*.md ; do echo $f ; aspell --lang=en_US --mode=markdown --home-dir=. --personal=wordlist.txt --ignore-case=true --camel-case --add-sgml-skip nospellcheck list < $f | sort | uniq -c ; done

Learn more about wordlist format

@github-actions
Copy link

Hi @pbkompasz,

⚠️ Potential typos found in your pull request:

  • 📄 ./docs/eps/intro.md (line(s) 102):
    1. ❌ Karim
  • 📄 ./docs/wiki/research/account-abstraction/eip-7702.md (line(s) 19):
    1. ❌ AUTHCALL
  • 📄 ./docs/wiki/research/account-abstraction/eip-7702.md (line(s) 19):
    1. ❌ bundlers
  • 📄 ./docs/wiki/research/account-abstraction/eip-7702.md (line(s) 28,41):
    1. ❌ EOA's
  • 📄 ./docs/wiki/research/account-abstraction/eip-7702.md (line(s) 29):
    1. ❌ EOA’s
  • 📄 ./docs/wiki/research/account-abstraction/eip-7702.md (line(s) 29):
    1. ❌ resubmission
  • 📄 ./docs/wiki/research/account-abstraction/eip-7702.md (line(s) 30):
    1. ❌ seralized
  • 📄 ./docs/wiki/research/account-abstraction/eip-7702.md (line(s) 28,41):
    1. ❌ EOA's
  • 📄 ./docs/wiki/research/account-abstraction/eip-7702.md (line(s) 51):
    1. ❌ designator
  • 📄 ./docs/wiki/research/account-abstraction/eip-7702.md (line(s) 57):
    1. ❌ EXTCODEHASH
  • 📄 ./docs/wiki/research/account-abstraction/eip-7702.md (line(s) 58):
    1. ❌ EXTCODECOPY

ℹ️ How to fix this error:

  1. If these are actual typos:

    • Open the files at the specified line numbers and fix them
  2. If these are names or one-off nouns:

    • Wrap them in <name> tags
    • Example: <name>Alex Pereira</name>
    • Use this for people's names or unique terms that appear rarely
  3. If these are valid terms:

    • Add them to wordlist.txt (one word per line)
    • Terms must be plain text without spaces/special chars
    • The list is case-insensitive
  4. If these are code terms:

    • Wrap them in backticks (`) in your markdown

ℹ️ Checking for typos locally

  1. Install aspell for your platform
  2. Navigate to project root and run:
for f in **/*.md ; do echo $f ; aspell --lang=en_US --mode=markdown --home-dir=. --personal=wordlist.txt --ignore-case=true --camel-case --add-sgml-skip nospellcheck list < $f | sort | uniq -c ; done

Learn more about wordlist format

@pbkompasz pbkompasz changed the title [WIP] docs: Expand EIP-7702 and AA articles docs: Expand EIP-7702 Apr 27, 2025
@pbkompasz pbkompasz marked this pull request as ready for review April 27, 2025 17:57
@raxhvl
Copy link
Member

raxhvl commented May 19, 2025

Hey @pbkompasz since pectra went live, this is no longer a research topic. You could add it to EL specs.

Each authorization tuple incurs a gas cost of 25,000 gas, calculated using the following formula:
```21000 + 16 * non-zero calldata bytes + 4 * zero calldata bytes + 1900 * access list storage key count + 2400 * access list address count```
This approach charges the maximum gas amount upfront. A partial refund of 12,500 gas is issued if the contract already exists, which happens through the global refund mechanism.

Copy link
Contributor

Choose a reason for hiding this comment

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

could be nice to tie together all the info above with a simple example, i.e.
Step 1: user submits tsx with authorization_list pointing to a SC with e.g. session key logic capabilities
Step 2:***

5. Verify that `nonce` is equal to nonce of `authority` if the `authority` exists in the trie otherwise `nonce` has to equal `0`.
6. If `authority` exists in the trie the refund amount of `PER_EMPTY_ACCOUNT_COST - PER_AUTH_BASE_COST` is added to the global refund mechanism.
7. In case of a non-zero `address` the code of the authority is set to `0xef0100 || address` (where `||` denotes concatenation), otherwise the EOA's code is cleared and the code hash is set to the hash of a null address (`0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470`). This serves as a revocation mechanism.
8. The nonce of `authority` is incremented by one.
Copy link
Contributor

Choose a reason for hiding this comment

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

after this, it would be nice to know what happens if any of the steps above fail. from the EIP, "If any step above fails, immediately stop processing the tuple and continue to the next tuple in the list. When multiple tuples from the same authority are present, set the code using the address in the last valid occurrence. Note, if transaction execution results in failure (e.g. any exceptional condition or code reverting), the processed delegation indicators is not rolled back"

<iframe width="560" height="315" src="https://www.youtube.com/embed/_k5fKlKBWV4?si=Y4DehqLu5fpT7-a3" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe>

other resources:
Although ERC-4337 introduces account abstraction, EIP-7702 serves a different purpose by providing externally owned accounts (EOAs) with temporary programmability. The benefits of introducing programmability to externally owned accounts (EOAs) include transaction batching, transaction sponsorship, privilege de-escalation and session keys, and social recovery.
Copy link
Contributor

@shane-moore shane-moore May 29, 2025

Choose a reason for hiding this comment

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

seems a bit misleading to say, "EIP-7702 serves a different purpose by providing externally owned accounts (EOAs) with temporary programmability." since the account's code property can stay pointed to a delegation indicator indefinitely. Ofcourse, you can update it by sending another type-4 tsx.

perhaps update to something like this, "Although ERC-4337 introduces account abstraction through a smart account framework, EIP-7702 takes a complementary approach by allowing externally owned accounts (EOAs) to delegate their execution logic to a smart contract. That contract can be ERC-4337-compatible, meaning 7702 lets you plug directly into the 4337 ecosystem using your existing wallet."

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants