gretzke / transaction-invoker

Account Abstraction (EIP-3074) invoker contract example

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Transaction Invoker

Example EIP-3074 (account abstraction) invoker contract.

About

Transaction 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.

Requirements

  • Network with EIP-3074

Instructions

Quickstart

git clone https://github.com/ZeroEkkusu/transaction-invoker
cd transaction-invoker
yarn

Setup

  • Set RPC URL in .env

    cp .env.example .env

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

  • Set 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 REDEPLOY=true.

Acknowledgements

This example was based on Maarten Zuidhoorn's EIP-3074 (Batch) Transaction Invoker.

About

Account Abstraction (EIP-3074) invoker contract example


Languages

Language:TypeScript 58.6%Language:Solidity 40.6%Language:Shell 0.8%