From dd03d8920668ecb5cd6cd72e67da13af1dc6d8c6 Mon Sep 17 00:00:00 2001 From: Big Boss Date: Tue, 23 Apr 2024 10:06:31 -0500 Subject: [PATCH] aabundler: docs and ex config (#344) --- Tiltfile | 6 +-- apps/aabundler/README.md | 43 +++++++++++++++++++ .../aabundler/etc/aabundler.config.json | 2 +- 3 files changed, 47 insertions(+), 4 deletions(-) create mode 100644 apps/aabundler/README.md rename etc/aa-bundler/aa-bundler.config.json => apps/aabundler/etc/aabundler.config.json (87%) diff --git a/Tiltfile b/Tiltfile index f89997ca5..df3ce3016 100644 --- a/Tiltfile +++ b/Tiltfile @@ -454,14 +454,14 @@ local_resource( docker run --rm \ --name aa-bundler \ --add-host=host.docker.internal:host-gateway \ - -p 3030:3030 \ + -p 127.0.0.1:3030:3030 \ -v ./keys/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266:/app/keys/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 \ - -v ./etc/aa-bundler:/app/etc/aa-bundler \ + -v ./apps/aabundler/etc:/app/etc/aabundler \ -e "DEBUG={bundler_debug}" \ -e "DEBUG_COLORS=true" \ docker.io/0xbigboss/bundler:0.7.0 \ --port 3030 \ - --config /app/etc/aa-bundler/aa-bundler.config.json \ + --config /app/etc/aabundler/aabundler.config.json \ --mnemonic /app/keys/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 \ --network http://host.docker.internal:8546 \ --entryPoint 0x0000000071727De22E5E9d8BAf0edAc6f37da032 \ diff --git a/apps/aabundler/README.md b/apps/aabundler/README.md new file mode 100644 index 000000000..ebe825eb1 --- /dev/null +++ b/apps/aabundler/README.md @@ -0,0 +1,43 @@ +# Account Abstraction Bundler + +The account abstraction bundler is responsible for writing user operations onchain via the Entrypoint contract. + +## Usage + +```shell +docker run --rm \ + --name aa-bundler \ + --add-host=host.docker.internal:host-gateway \ + -p 127.0.0.1:3030:3030 \ + -v ./keys/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266:/app/keys/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 \ + -v ./etc/aabundler:/app/etc/aabundler \ + -e "DEBUG=aa.rpc" \ + -e "DEBUG_COLORS=true" \ + accountabstraction/bundler:0.7.0 \ + --port 3030 \ + --config /app/etc/aabundler/aabundler.config.json \ + --mnemonic /app/keys/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 \ + --network http://host.docker.internal:8546 \ + --entryPoint 0x0000000071727De22E5E9d8BAf0edAc6f37da032 \ + --beneficiary 0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266 \ +``` + +## Configuration + +The bundler is configured via a JSON file or command line arguments. Below is an example configuration file. + +```json +{ + "gasFactor": "1", + "minBalance": "50000000000000", + "maxBundleGas": 5e6, + "minStake": "50000000000000", + "minUnstakeDelay": 86400, + "autoBundleInterval": 2, + "autoBundleMempoolSize": 10, + "mnemonic": "/app/keys/0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266", + "network": "http://host.docker.internal:8546", + "entryPoint": "0x0000000071727De22E5E9d8BAf0edAc6f37da032", + "beneficiary": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266" +} +``` diff --git a/etc/aa-bundler/aa-bundler.config.json b/apps/aabundler/etc/aabundler.config.json similarity index 87% rename from etc/aa-bundler/aa-bundler.config.json rename to apps/aabundler/etc/aabundler.config.json index fcce1372b..f003697b2 100644 --- a/etc/aa-bundler/aa-bundler.config.json +++ b/apps/aabundler/etc/aabundler.config.json @@ -1,5 +1,5 @@ { - "gasFactor": "1", + "gasFactor": "1.1", "minBalance": "1", "maxBundleGas": 5e6, "minStake": "1",