Adding `sendBatchTransaction` function in the wallet provider

Account Abstraction has come a long way since the start of 2023 and there are multiple mobile and browser-based wallets built on top of Account Abstraction.
Research, discussion, and development have been going on in the space of Account Abstraction (EIP-4337), Modular Smart Contract Accounts (ERC-6900), Native Account Abstraction in the form of a RIP (Rollup Improvement Proposal) (RIP-7560).

Among many other smart functionalities, AA enables sending batch transactions that have huge implications in terms of improvement in user experience and security.

Batching enables atomicity that ensures that if one transaction in the batch fails, the whole batch reverts. This is particularly useful if the user wants to perform a token swap. If the approval transaction is successful and the swap fails for some reason, there is a pending approval on the contract that can act as an attack surface. Batching can ensure that the approval and swap happen in one go or revert completely, thus maintaining atomicity.

Even though batching is supported by some wallets like WalletX, the dApps cannot leverage that functionality because of not have a provider function to send transaction parameters in an array of objects.

This is the start of a proposal to add a new function to the provider as part of standardization. The provider function can be named sendBatchTransaction and this can be utilized by AA-compatible wallets. DApps can recognize AA-compatible wallets by using a getter function called isAAWallet.

More details and specifics to be added in the coming days.

Hoping to see the views and opinions of the community.


It sounds great and I would love to see it implemented across the dApp ecosystem.