Example account abstraction (EIP-3074) invoker contract. For demonstration purposes only.
Account Abstraction Invoker uses AUTH
and AUTHCALL
opcodes introduced in EIP-3074 to delegate control of the externally owned account (EOA) to itself (smart contract). This adds more functionality to EOAs, such as batching capabilities, allowing for gas sponsoring, expirations, scripting, and beyond.
Use cases are showcased in the tests. The invoker works with ✨ all ✨ contracts:
Commit is EIP-712 hash of the this structure. This means the invoker inherits the security of EIP-712, in addition to following the Secure Invoker recommendations and implementing additional security measures.
- Network with EIP-3074
git clone https://github.com/0xPolygon/account-abstraction-invoker
cd account-abstraction-invoker
yarn
cp .env.example .env
-
Set RPC URL in
.env
Hardhat accounts
0
and1
are included in.env
for your convinience. Do not send real funds to those accounts. -
Change chain ID in
hardhat.config.ts
Hardhat does not support EIP-3074 at the moment. All testing is done on a live network.
yarn hardhat test
To redeploy contracts, set environment variable REDEPLOY=true
. Otherwise, last deployed contracts will be used.
- This example was based on Maarten Zuidhoorn's EIP-3074 (Batch) Transaction Invoker
- Reentrancy Guard by OpenZeppelin