Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eth-infinitism/bundler
https://github.com/eth-infinitism/bundler
Last synced: 7 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/eth-infinitism/bundler
- Owner: eth-infinitism
- License: gpl-3.0
- Created: 2022-04-22T18:31:12.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-22T08:49:14.000Z (8 months ago)
- Last Synced: 2024-05-22T13:28:23.081Z (8 months ago)
- Language: TypeScript
- Size: 1.7 MB
- Stars: 300
- Watchers: 14
- Forks: 195
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-erc-4337 - eth-infinitism bundler
- awesome-web3-tools-and-dapps - Infinitism Bundler - Discover an amazing open-source Typescript bundler created by the talented authors of ERC-4337. (dApps directory / Account Abstraction (ERC-4337) Bundlers)
- awesome-account-abstraction - TypeScript Implementation
README
# EIP4337 reference modules
## Bundler
A basic eip4337 "bundler"
This is a reference implementation for a bundler, implementing the full EIP-4337
RPC calls (both production and debug calls), required to pass the [bundler-spec-tests](https://github.com/eth-infinitism/bundler-spec-tests) test suite.### Running local node
In order to implement the full spec storage access rules and opcode banning, it must run
against a GETH node, which supports debug_traceCall with javascript "tracer"
Specifically, `hardhat node` and `ganache` do NOT support this API.
You can still run the bundler with such nodes, but with `--unsafe` so it would skip these security checksIf you don't have geth installed locally, you can use docker to run it:
```
docker run --rm -ti --name geth -p 8545:8545 ethereum/client-go:v1.13.5 \
--miner.gaslimit 12000000 \
--http --http.api personal,eth,net,web3,debug \
--http.vhosts '*,localhost,host.docker.internal' --http.addr "0.0.0.0" \
--allow-insecure-unlock --rpc.allow-unprotected-txs \
--dev \
--verbosity 2 \
--nodiscover --maxpeers 0 --mine \
--networkid 1337
```### Usage:
1. run `yarn && yarn preprocess`
2. deploy contracts with `yarn hardhat-deploy --network localhost`
3. run `yarn run bundler`
(or `yarn run bundler --unsafe`, if working with "hardhat node")Now your bundler is active on local url http://localhost:3000/rpc
To run a simple test, do `yarn run runop --deployFactory --network http://localhost:8545/ --entryPoint 0x0000000071727De22E5E9d8BAf0edAc6f37da032`
The runop script:
- deploys a wallet deployer (if not already there)
- creates a random signer (owner for wallet)
- determines the wallet address, and funds it
- sends a transaction (which also creates the wallet)
- sends another transaction, on this existing wallet
- (uses account[0] or mnemonic file for funding, and creating deployer if needed)NOTE: if running on a testnet, you need to supply the bundler (and runop) the network and mnemonic file, e.g.
`yarn run bundler --network localhost --mnemonic file.txt`
To run the full test bundler spec test suite, visit https://github.com/eth-infinitism/bundler-spec-tests
## sdk
SDK to create and send UserOperations
see [SDK Readme](./packages/sdk/README.md)## utils
internal utility methods/test contracts, used by other packages.