Skip to content

0xPolygon/account-abstraction-invoker

Repository files navigation

Account Abstraction Invoker

Example account abstraction (EIP-3074) invoker contract. For demonstration purposes only.

About

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:

Sponsoring example

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.

Requirements

  • Network with EIP-3074

Instructions

Quickstart

git clone https://github.com/0xPolygon/account-abstraction-invoker
cd account-abstraction-invoker
yarn

Setup

cp .env.example .env
  • Set RPC URL in .env

    Hardhat accounts 0 and 1 are included in .env for your convinience. Do not send real funds to those accounts.

  • Change chain ID in hardhat.config.ts

Test

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.

Acknowledgements

About

Modular account abstraction with EIP-3074.

Resources

License

Security policy

Stars

Watchers

Forks

Contributors 4

  •  
  •  
  •  
  •