This guide provides example commands for running user operations (userops) using the Free Bundler client.
- Node.js >= 18.0.0 or Bun >= 1.0.0
- A private key for the smart account
The example script accepts the following command line arguments:
--chain-id(optional): Chain ID for the userop, defaults to 11155111--account-type(optional): Type of smart account implementation, defaults tosimple7702--private-key(required): Private key that controls the smart account--paymaster-url(optional): Paymaster URL to sponsor user ops--paymaster-context(optional): JSON string for paymaster context
bun run ./examples/index.ts \
--chain-id 1 \
--account-type simple7702 \
--private-key "0x..."bun run ./examples/index.ts \
--chain-id 10 \
--account-type simple7702 \
--private-key "0x..." \bun run ./examples/index.ts \
--chain-id 10 \
--account-type simple7702 \
--private-key "0x..." \
--paymaster-url "https://api.stackup.sh/v1/paymaster/YOUR_STACKUP_KEY" \
--paymaster-context '{"sponsor": true}'The following networks are supported by the free bundler:
- Ethereum Mainnet: Chain ID
1 - Optimism: Chain ID
10 - Arbitrum One: Chain ID
42161
Currently supported smart account implementations:
- simple7702: EIP-7702 compatible smart account
The example script demonstrates:
- Smart Account Creation: Creates a Simple7702 smart account from a private key
- Authorization Check: Automatically handles EIP-7702 authorization if needed
- UserOp Execution: Sends a user operation that transfers 0.0000001 ETH to a test address
- Paymaster Integration: Optional paymaster support for sponsored transactions
bun run ./examples/index.ts --helpThis will display all available options and their descriptions.
To run in development mode with auto-reload:
bun run devTo build the project:
bun run build