Setting up a local fork environment requires two servers to be deployed. The hardhat fork will be deployed on http://127.0.0.1:8545 and the bundler service will be deployed on http://127.0.0.1:3000.
How to set up a fork:
Clone the Bundler repository
git clone https://github.com/TheFunGroup/AA_Bundler.git
Change directory into localfork
Install packages in localfork
Run the fork on localhost:8545
npx hardhat node --fork "https://eth-mainnet.g.alchemy.com/v2/lcA7Kyqv42J1Qh-wLm__DdqSCJBtZyd1"
How to set up a bundler:
OPEN A SEPERATE TERMINAL (in /AA-Bundler home repo)
yarn && yarn preprocess
IGNORE THIS ERROR: Error: test/Flow.test.ts(7,30): error TS2307: Cannot find module '../src/SimpleAccountABI' or its corresponding type declarations
Change Directory into localfork
Give permission to run setup.sh
chmod +x setup.sh
Run setup.sh to prefund accounts, deploy contracts, and start bundler.
It's expected to see running on http://localhost:3000/rpc after ./setup.sh is run.
(Optional) Run tests
Run the tests outlined in our ReadMe