Skip to content

transeptorlabs/transeptor-bundler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

94 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

A light weight blazing fast, modular ERC-4337 TypeScript bundler built with functional programming.

Node Version TypeScript codecov ESM Supported Docker pulls

⚠️ This repository is currently under active development.

Support ERC-4337 Entrypoint contract releases/v0.7

πŸš€ Development

Everything you need to get started developing with Transeptor.

Run local development

  1. git submodule update --init
  2. Use correct node version nvm use
  3. Add PRIVATE_KEY to contracts/.env file to deploy the entrypoint contract locally.
  4. Install dependencies yarn install
  5. Start local eth node yarn local-eth - Will also deploy the entrypoint contract please wait for environment vars to be printed in the console and copy it to the nodes .env files.
  6. In a new terminal window start the bundler node with live watch for local dev. yarn dev
  • The node will start on http://localhost:4337/rpc.

You can now make changes to the code and each node will automatically restart.

Local dev e2e scripts

Make sure bundler node is running before running to to send a userOp through the bundler

yarn send-op

Test

yarn test

Lint

yarn lint

or

yarn lint:fix

Build

You can build Transeptor from source or use the Docker image.

πŸ”§ Run from source

  1. Use correct node version: nvm use
  2. Install dependencies: yarn install
  3. Build node: yarn build

Now let's start the bundler node.

./transeptor --httpApi web3,eth,debug --txMode base

🐳 Run from Docker images

Build image

yarn build:image

Run image in the background

yarn start:image

stop image

yarn stop:image

Node Configuration

Command line arguments

List of all command line arguments supported by the bundler.

Options:
  -V, --version                  output the version number
  --httpApi <string>             ERC4337 rpc method name spaces to enable. (default: "web3,eth")
  --network <string>             ETH execution client url. (default: "http://localhost:8545")
  --p2p                          p2p mode enabled (default: false)
  --findPeers                    Search for peers when p2p enabled. (default: false)
  --port <number>                Bundler node listening port. (default: "4337")
  --numberOfSigners <number>     Number of signers HD paths to use from mnmonic (default: "3")
  --minBalance <string>          Maximum ETH balance need for signer address. (default: "1")
  --minStake <string>            Minimum stake a entity has to have to pass reputation system. (default: "1")
  --minUnstakeDelay <number>     Time paymaster has to wait to unlock the stake(seconds). (default: "0")
  --bundleSize <number>          Maximum number of pending mempool entities to start auto bundler. (default: "10")
  --maxBundleGas <number>        Max gas the bundler will use in transactions. (default: "5000000")
  --auto                         Automatic bundling. (default: false)
  --autoBundleInterval <number>  Auto bundler interval in (ms). (default: "12000")
  --txMode <string>              Bundler transaction mode (base, conditional, searcher). (default: "base")
  --unsafe                       Enable no storage or opcode checks during userOp simulation.
  --metrics                      Bundler node metrics tracking enabled. (default: false)
  --influxdbUrl <string>         Url influxdb is running on (requires --metrics to be enabled). (default: "http://localhost:8086")
  --influxdbOrg <string>         Influxdb org (requires --metrics to be enabled). (default: "transeptor-labs")
  --influxdbBucket <string>      Influxdb bucket (requires --metrics to be enabled). (default: "transeptor_metrics")
  -h, --help                     display help for command

Environment variables

List of all environment variables supported by the node.

# Required for production
TRANSEPTOR_ENTRYPOINT_ADDRESS=0x
TRANSEPTOR_BENEFICIARY=<address_to_receive_funds>
TRANSEPTOR_MNEMONIC=<your-mnemonic>

# Optional
TRANSEPTOR_INFLUX_TOKEN=DEV_TOKEN
TRANSEPTOR_ALCHEMY_API_KEY=<your-alcemy-api-key>
TRANSEPTOR_WHITE_LIST=<address_to_whitelist_SEPARATED_BY_COMMA>
TRANSEPTOR_BLACK_LIST=<address_to_blacklist_SEPARATED_BY_COMMA>

Contribute

We welcome contributions to enhance our ERC-4337 Bundler. If you would like to contribute, please follow these guidelines here. There are a few things you can do right now to help out:

  • Add tests. There can never be enough tests.

Contact Us

If you have any questions or feedback about the ERC-4337 Bundler project, please feel free to reach out to us.

License

Licensed under the GPL-3.0 License.

Acknowledgements

We want to express our gratitude to the following individuals and organizations for their contributions and support in making this project possible:

  • Infinitism - for inspiring our project and serving as a reference for implementation techniques.

We are grateful to the open-source community and the countless developers who have shared their knowledge and resources, enabling us to build upon their work.

Thank you all for your support!