wallet_sendCalls
Submit a batch of calls to the wallet for execution
Defined in EIP-5792
Requests that the wallet submits a batch of calls. This method allows applications to send multiple transactions atomically or sequentially.
Parameters
The version of the API format. This must be “2.0.0”.
The ID of the batch of calls for tracking purposes.
The sender’s address.
Pattern: ^0x[0-9a-fA-F]{40}$
The EIP-155 chain ID of the calls. This must match the currently selected network in the wallet.
Pattern: ^0x([1-9a-f]+[0-9a-f]*|0)$
true
if the wallet must execute all calls atomically. If false
, the wallet may execute the calls sequentially without atomicity. If false
and the wallet is capable of executing the calls atomically, it may do so.
An array of call objects to execute.
Dapps can use this object to communicate with the wallet about supported capabilities.
Returns
An object containing information about the sent batch, including transaction details and status.
Example Usage
Error Handling
Error code indicating the type of error that occurred.
Human-readable error message describing what went wrong.
Code | Message | Description |
---|---|---|
-32602 | The wallet cannot parse the request | Invalid request format |
-32000 | Version not supported | API version not supported |
4001 | User rejected the request | User denied the transaction |
4100 | The requested account and/or method has not been authorized by the user | Authorization required |
5700 | The wallet does not support a capability that was not marked as optional | Missing capability |
5710 | EIP-7702 not supported on the specified chain ID | Chain not supported |
5720 | There is already a batch submitted with the specified batch ID | Duplicate batch ID |
5740 | The batch is too large for the wallet to process | Batch size limit exceeded |
5750 | EIP-7702 upgrade rejected for this chain and account | Upgrade rejected |
Ensure that the chainId
matches the currently selected network in the wallet to avoid transaction failures.
When atomicRequired
is set to false
, consider the implications of partial execution if some calls fail while others succeed.