Before starting, create a file .env like in the example.
- Install root dependencies
pnpm install
- Run local hardhat node
pnpm run node
- Run local bundler (this will also install required packages at first run)
pnpm run bundler
- Deploy Entrypoint and Account factory contracts
pnpm run deployer
optional: use pnpm run bundler:deployer to have everything in the same terminal
- Deploy and Fund Paymaster contracts. This will expose a
POST /andGET /balancesendpoints.
pnpm run paymaster
To test an end-to-end sponsored user operation:
npx hardhat run scripts/mockUserop.ts