- 示例AA账户见contracts目录
- js调用见scripts目录
git clone https://github.com/eth-infinitism/bundler
cd bundler
yarn
hardhat-node
再开一个窗口,进入bundler目录,执行
yarn preprocess
yarn hardhat-deploy --network localhost
yarn run bundler --unsafe
进入本目录,如果想查看基本的全流程,执行
yarn
yarn hardhat run scripts/basic.js
如果想查看paymaster的使用,执行
yarn
yarn hardhat run scripts/paymaster.js
-
eip-4337文档:4337的规范。https://eips.ethereum.org/EIPS/eip-4337
-
sdk:提供了构建UserOperation,推送UserOperation的能力。源码位于https://github.com/eth-infinitism/bundler/tree/main/packages/sdk。 npm包位于 https://www.npmjs.com/package/@account-abstraction/sdk。
-
bundler:收集UserOperation,验证并推送到EntryPoint合约。git地址https://github.com/eth-infinitism/bundler
-
contracts: 主要是EntryPoint,验证UserOperation,并调用AA账户的业务逻辑。git地址https://github.com/eth-infinitism/account-abstraction