aa-batching-paymasters

Batch multiple contract calls into one UserOperation and sponsor gas with ERC-4337 paymasters.

2.3k|744|Updated Nov 23, 2015
One-click install
npx skills add https://github.com/Nethereum/Nethereum --skill aa-batching-paymasters
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: aa-batching-paymasters
Source: https://github.com/Nethereum/Nethereum/tree/main/plugins/nethereum-skills/skills/aa-batching-paymasters
Command: npx skills add https://github.com/Nethereum/Nethereum --skill aa-batching-paymasters

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers building ERC-4337 account abstraction applications in .NET need to execute multiple contract calls atomically in a single UserOperation and sponsor gas fees so end users do not need ETH, which requires coordinating batching APIs and paymaster configurations correctly.

Core Features & Use Cases

  • Atomic Batching: Combine multiple calls (approve + swap, multi-transfer) into one UserOperation using BatchExecuteAsync, ToBatchCall, or ERC-7579 ExecuteBatchAsync.
  • Gas Sponsorship: Configure simple, verifying, deposit, or dynamic paymasters via WithPaymaster and PaymasterConfig so users transact gaslessly.
  • Use Case: A dApp wants users to approve a token and swap it on a DEX in one click without holding ETH. Batch the approve and swap calls, then attach a verifying paymaster that signs each UserOperation so the paymaster covers gas.

Quick Start

Use the aa-batching-paymasters skill to batch an ERC-20 approve and a DEX swap into a single UserOperation with a verifying paymaster sponsoring the gas.

Frequently Asked Questions about aa-batching-paymasters

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I batch multiple transactions into one UserOperation in .NET?

Use BatchExecuteAsync from Nethereum.AccountAbstraction to combine calls atomically. For same-contract calls pass typed messages directly; for cross-contract calls convert each message with ToBatchCall() and pass them together.

How to sponsor gas fees with a paymaster in Nethereum?

Call handler.WithPaymaster(paymasterAddress) for simple sponsorship, or pass a PaymasterConfig with an async callback for verifying paymasters that sign each UserOperation off-chain. Deposit paymasters work with a static address once pre-funded.

What is the difference between verifying and deposit paymasters?

A verifying paymaster signs each UserOperation off-chain and requires dynamic paymaster data with validity windows. A deposit paymaster is pre-funded at the EntryPoint and sponsors operations using only its static address.

Why does my paymaster transaction fail with AA31 or AA32 errors?

AA31/AA32 errors mean the paymaster deposit at the EntryPoint is insufficient or the paymaster is not staked correctly. Fund the paymaster deposit before submitting UserOperations, and ensure verifying paymaster data has not expired.

Does Nethereum support ERC-7579 batched execution?

Yes, ERC-7579 modular smart accounts can batch calls through account.ExecuteBatchAsync with an array of Call structs containing Target, Value, and Data for each operation.