Implementation of contracts for ERC-4337 account abstraction via alternative mempool.
contract | address |
---|---|
EntryPoint(stack up) | 0x0576a174D229E3cFA37253523E645A78A0C91B57 |
SimpleAccountFactory(stack up) | 0x71D63edCdA95C61D6235552b5Bc74E32d8e2527B |
SimpleAccount | 0x8E00E6c2823B855DE57eD508331308660c979F43 |
TokenPaymaster | 0x3E9da1e6111B9140858c7b2171cc5e6C2A33D09C |
- setup config.json
yarn run init
- set your stackup api key to
<API-KEY>
- generate your wallet account address
yarn run simpleAccount address
- when the transaction is sent, contract account is deployed to this address.
- deposit native token to your wallet account
- recommend to use mumbai faucet or metamask
- deposit erc20 token to your wallet account
- recommend to use mumbai faucet
- transfer native token from wallet account to another account
yarn run simpleAccount transfer --to <to-address> --amount <amount>
yarn run simpleAccount transfer --to 0xf4aAA4b38a0E749415E37638879BeDfe47645a77 --amount 0.01
- transfer erc20 token from wallet account to another account
yarn run simpleAccount erc20Transfer --token <erc20-contract-address> --to <to-address> --amount <amount>
yarn run simpleAccount erc20Transfer --token 0xfe4f5145f6e09952a5ba9e956ed0c25e3fa4c7f1 --to 0xf4aAA4b38a0E749415E37638879BeDfe47645a77 --amount 0.01
- set .env
- paramas are
ENTRY_POINT_ADDRESS
,ACCOUNT_FACTORY_ADDRESS
andACCOUNT_ADDRESS
- paramas are
- deploy paymaster
yarn paymaster:deploy
- set address to
PAYMASTER_ADDRESS
- setup paymaster included following tasks
yarn paymaster:setup
- stake ETH to EntryPoint
- deposit ETH to EntryPoint
- mint ERC20 to Account for using ERC20 as gas
- transfer native token from wallet account to another account with paymaster
yarn run simpleAccount transfer --to <to-address> --amount <amount> --withPaymaster
yarn run simpleAccount transfer --to 0xf4aAA4b38a0E749415E37638879BeDfe47645a77 --amount 0.01 --withPaymaster
- transfer erc20 token from wallet account to another account with paymaster
yarn run simpleAccount erc20Transfer --token <erc20-contract-address> --to <to-address> --amount <amount> --withPaymaster
yarn run simpleAccount erc20Transfer --token 0xfe4f5145f6e09952a5ba9e956ed0c25e3fa4c7f1 --to 0xf4aAA4b38a0E749415E37638879BeDfe47645a77 --amount 0.01 --withPaymaster
Vitalik's post on account abstraction without Ethereum protocol changes