EIP-7702 Guide
Small balance convertor uses smart account of EIP-7702 to facilitate exchanges. Here we will make introduction on EIP-7702 to help you better understand what happens when you are making transactions.
What does EIP-7702 enable?
With EIP-7702, your EOA (Externally Owned Account) can temporarily become a smart contract for one transaction.
This enables you to:
Batch multiple calls in a single transaction.
Use custom transaction validation logic.
Potentially sponsor gas fees or enable social recovery.
How does it work in practice?
Temporary contract behavior:
You send a transaction from your EOA that includes contract code.
The EOA executes as if it were a smart contract, but only for this one transaction.
After the transaction, the EOA reverts to its normal behavior.
initCode in transaction:
You embed the smart contract code (or reference it) in your transaction.
Ethereum’s EVM executes that code within the scope of this transaction.
Steps to Use EIP-7702
While EIP-7702 is still in proposal stage (as of 2024/2025), here’s what using it would typically involve once integrated into clients like Geth or Nethermind:
Step 1: Craft your transaction
Include the
initCode
that defines the temporary contract logic you want to run.This might be for batching, custom signatures, or gas sponsorship.
Step 2: Sign and send your transaction
Your EOA signs this transaction like a normal one.
Send it to the network.
Step 3: Execute within EIP-7702 framework
Ethereum will recognize the
initCode
field and execute it in the transaction context.You can call multiple contracts, add custom validation, etc.
Step 4: Return to EOA
Once the transaction ends, your EOA reverts to normal EOA behavior—no permanent change.
Example Use Cases
Batch transactions (send multiple transfers or calls at once).
Social recovery or guardians for this transaction only.
Sponsored gas fees by a third-party within this transaction.
Custom authentication (like using a passkey instead of private key signature).
More Official Resources
Last updated