Gundler is...
- High Performance
- Low Footprint
- Minimal Dependency
eth_chainId
eth_supportedEntryPoints
eth_sendUserOperation
eth_getUserOperationReceipt
- Create a config file (or copy from the example):
cp example.config.json config.json- Edit the config file with your settings:
{
"mode": "DEBUG",
"ethereum_rpc": "https://rpc.testnet.telos.net",
"port": 3000,
"beneficiary": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
"max_bundle_size": 5,
"supported_entry_points": [
"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789",
"0x0000000071727De22E5E9d8BAf0edAc6f37da032",
"0x4337084D9E255Ff0702461CF8895CE9E3b5Ff108"
]
}- Run gundler:
go run cmd/main.goOr specify a custom config file path:
go run cmd/main.go --config /path/to/config.json| Flag | Description | Default |
|---|---|---|
| --config | Path to JSON config file | ./config.json |
The config file must be a JSON file with the following fields:
| Field | Type | Required | Description |
|---|---|---|---|
| mode | string | Yes | Runtime mode: DEBUG, DEV, or PROD (case-insensitive) |
| ethereum_rpc | string | Yes | Ethereum RPC URL |
| port | number | No | Port to run the server on (default: 3000) |
| beneficiary | string | Yes | Beneficiary address |
| max_bundle_size | number | No | Maximum number of user operations per bundle (default: 5) |
| supported_entry_points | array[string] | Yes | Array of supported ERC-4337 entry point contract addresses |
- DEBUG: Enables all debug RPC methods (
debug_mempools,debug_pause,debug_clear) - DEV: Development mode (debug methods disabled)
- PROD: Production mode (debug methods disabled)
Note: Debug RPC methods are only available when mode is set to DEBUG
debug_mempools
- Returns detailed information about all mempools
- Params:
[](no parameters) - Response: Array of mempool info containing:
label: Version label (MempoolV06, MempoolV07, MempoolV08)address: Entry point addresssize: Current number of user operations in the mempooluserops: Array of all user operations in the mempool
debug_pause
- Toggles pause state of all processors
- When paused, processors stop processing user operations (bundling and submitting)
- User operations can still be added to mempools while paused
- Params:
[](no parameters) - Response: JSON object with
pausedfield (boolean) indicating new state
debug_clear
- Clears all user operations from all mempools
- Params:
[](no parameters) - Response: JSON object with
clearedcount andmessagefields
# Healthcheck
curl http://localhost:3000/health
# eth_chainId Method
curl -X POST http://localhost:3000 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1}'
# eth_supportedEntryPoints Method
curl -X POST http://localhost:3000 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_supportedEntryPoints","params":[],"id":1}'
# eth_sendUserOperation Method
curl -X POST http://localhost:3000 \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_sendUserOperation",
"params": [
{
"sender": "0x1234567890123456789012345678901234567890",
"nonce": "0x1",
"factory": "0x0000000000000000000000000000000000000000",
"factoryData": "0x",
"callData": "0xabcdef",
"callGasLimit": "0x10000",
"verificationGasLimit": "0x20000",
"preVerificationGas": "0x5000",
"maxFeePerGas": "0x3b9aca00",
"maxPriorityFeePerGas": "0x3b9aca00",
"paymaster": "0x0000000000000000000000000000000000000000",
"paymasterVerificationGasLimit": "0x0",
"paymasterPostOpGasLimit": "0x0",
"paymasterData": "0x",
"signature": "0x1234"
},
"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789"
],
"id": 1
}'
# debug_mempools Method (DEBUG mode only)
curl -X POST http://localhost:3000 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"debug_mempools","params":[],"id":1}'
# debug_pause Method (DEBUG mode only)
curl -X POST http://localhost:3000 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"debug_pause","params":[],"id":1}'
# debug_clear Method (DEBUG mode only)
curl -X POST http://localhost:3000 \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"debug_clear","params":[],"id":5}'