PatrickAlphaC / minimal-account-abstraction

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Note: This repo is not complete and a work in progress

Account Abstraction

What is Account Abstraction?

EoAs are now smart contracts. That's all account abstraction is.

But what does that mean?

Right now, every single transaction in web3 stems from a single private key.

account abstraction means that not only the execution of a transaction can be arbitrarily complex computation logic as specified by the EVM, but also the authorization logic.

What's this repo show?

  1. A minimal EVM "Smart Wallet" using alt-mempool AA
    1. We even send a transactoin to the EntryPoint.sol
  2. A minimal zkSync "Smart Wallet" using native AA
    1. zkSync uses native AA, which is slightly different than ERC-4337
    2. We do send our zkSync transaction to the alt-mempool

What does this repo not show?

  1. Sending your userop to the alt-mempool
    1. You can learn how to do this via the alchemy docs

Getting Started

Requirements

  • git
    • You'll know you did it right if you can run git --version and you see a response like git version x.x.x
  • foundry
    • You'll know you did it right if you can run forge --version and you see a response like forge 0.2.0 (816e00b 2023-03-16T00:05:26.396218Z)
  • foundry-zksync
    • You'll know you did it right if you can run forge-zksync --help and you see zksync somewhere in the output

Installation

git clone https://github.com/PatrickAlphaC/minimal-account-abstraction
cd minimal-account-abstraction
make

Quickstart

make test

Example Deployments

zkSync

  • TODO

Ethereum (Arbitrum)

Acknowledgements

Disclaimer

This codebase is for educational purposes only and has not undergone a security review.

About


Languages

Language:Solidity 97.7%Language:Makefile 2.3%