Introduction

Hi, I'm cardene, a software engineer and technical writer focused on blockchain and AI.

I've also authored Japanese technical books on specification-driven development with LLMs and decentralized application (DApp) development.

I also build and publish a variety of tools, libraries, and open-source projects.

This article examines EIP5792, which defines new JSON-RPC methods that let applications submit batches of on-chain calls to wallets and check their execution status.

This article translates, summarizes, and expands on the proposal below.

I have also written about other EIPs, BIPs, SLIPs, CAIPs, ENSIPs, RFCs, and ACPs.

Overview

EIP5792 defines new JSON-RPC methods for applications to send multiple on-chain calls to a wallet as a batch and check the status of that batch.

The traditional eth_sendTransaction method accepts one transaction per request, whereas EIP5792 lets an application submit multiple calls in a single request. When a smart account is used, those calls may even be executed atomically within one transaction. The proposal also provides methods for querying which features (capabilities) a wallet supports and checking the execution status of a submitted batch.

EIP5792 is designed to address the limitations of eth_sendTransaction and accommodate modern wallet features such as paymasters and atomic batch execution.

Motivation

Several limitations motivated this proposal.

Limitations of eth_sendTransaction

The traditional eth_sendTransaction method was designed to send a single transaction and does not accommodate all the requirements of modern wallets.

Developers want to submit multiple calls as a batch in a single RPC request. Many smart accounts can execute these calls atomically within one transaction, but the traditional method does not expose that functionality. There was also no standard way to use newer wallet features such as paymasters through that method.

Adoption of smart accounts

With the adoption of ERC4337 (Account Abstraction), smart contract wallets (smart accounts) have become more common. Smart accounts can execute multiple calls within a single transaction, which can improve gas efficiency and the user experience.

EIP5792 addresses these issues by updating the communication interface between wallets and applications and defining new JSON-RPC methods for modern applications. This gives applications a standardized way to request batching and atomic execution and to integrate advanced features such as paymasters through capabilities.

Specification

RPC methods

EIP5792 defines four new JSON-RPC methods.

Method Description
wallet_sendCalls Submit multiple calls to a wallet as a batch
wallet_getCallsStatus Retrieve the status of a submitted call batch
wallet_showCallsStatus Ask the wallet to display information about a call batch
wallet_getCapabilities Query the wallet's capabilities for a specified address and chain

wallet_sendCalls

This method submits multiple calls to a wallet as a batch.

Parameters

javascript
type SendCallsParams = {
  version: string;           // 必須: 使用するプロトコルバージョン(例: "2.0.0")
  id?: string;               // オプション: 呼び出しバッチの識別子
  from?: `0x${string}`;      // オプション: 送信元アドレス
  chainId: `0x${string}`;    // 必須: 16進数でエンコードされたチェーンID
  atomicRequired: boolean;   // 必須: アトミック実行が必要かどうか
  calls: {
    to?: `0x${string}`;      // オプション: 送信先アドレス
    data?: `0x${string}`;    // オプション: 呼び出しデータ
    value?: `0x${string}`;   // オプション: 送信するネイティブトークンの量
    capabilities?: Record<string, Capability>;  // オプション: 呼び出し固有のケーパビリティ
  }[];
  capabilities?: Record<string, Capability>;    // オプション: バッチ全体のケーパビリティ
};

The following table describes the parameters in detail.

Parameter Type Required Description
version string Yes Protocol version to use, currently "2.0.0" in this example
id string Optional Unique identifier for the call batch; it must be unique per application and sender
from 0x${string} Optional Sender address; if omitted, the wallet should give the user an opportunity to select an address
chainId 0x${string} Yes Hexadecimal ID of the chain on which the calls will be executed
atomicRequired boolean Yes If true, all calls must execute atomically and contiguously
calls array Yes Array of calls to execute
capabilities object Optional Capabilities that apply to the entire batch

Return value

The return type is defined as follows.

javascript
type SendCallsResult = {
  id: string;                              // バッチの識別子
  capabilities?: Record<string, any>;      // ウォレットからのケーパビリティレスポンス
};

The id field contains the batch identifier. The optional capabilities field contains capability-specific responses from the wallet.

Wallet requirements

A wallet implementing wallet_sendCalls has the following obligations.

Requirement Description
Execution order Execute the calls in the specified order on the specified chain
Sender address Send calls from the from address if provided; otherwise, the wallet should allow the user to select an address
Atomic execution If atomicRequired is true, execute all calls atomically and contiguously
Capability handling Reject unsupported capabilities that are not optional
Identifier handling Respect the supplied id and reject duplicate identifiers

Example

The following example illustrates a token swap on a DEX.

javascript
const params = {
  version: "2.0.0",
  chainId: "0x1", // Ethereum Mainnet
  atomicRequired: true,
  from: "0x1234567890abcdef1234567890abcdef12345678",
  calls: [
    {
      // 1. トークンのapprove
      to: "0xA0b86a33E6e7eF3d0b7e8e3d9e3e3e3e3e3e3e3e", // USDCコントラクト
      data: "0x095ea7b3000000000000000000000000def1c0ded9bec7f1a1670819833240f027b25eee0000000000000000000000000000000000000000000000000000000005f5e100", // approve(spender, amount)
    },
    {
      // 2. スワップの実行
      to: "0xDEF1C0ded9bec7F1a1670819833240f027b25EeE", // DEXルーターコントラクト
      data: "0x...", // swap関数のcalldata
      value: "0x0",
    }
  ]
};

const response = await provider.request({
  method: "wallet_sendCalls",
  params: [params]
});

console.log("Batch ID:", response.id);

The code submits the ERC20 token's approve call and the DEX router's swap call as one batch. Setting atomicRequired: true requests atomic execution of both calls.

The addresses and incomplete swap calldata are illustrative placeholders rather than a ready-to-run mainnet transaction.

wallet_getCallsStatus

This method retrieves the status of a previously submitted call batch.

Parameters

Pass the batch ID as the parameter.

javascript
type GetCallsParams = [string];

Return value

The return type is defined as follows.

javascript
type GetCallsResult = {
  version: string;
  id: `0x${string}`;
  chainId: `0x${string}`;
  status: number;
  atomic: boolean;
  receipts?: {
    logs: {
      address: `0x${string}`;
      data: `0x${string}`;
      topics: `0x${string}`[];
    }[];
    status: `0x${string}`;
    blockHash: `0x${string}`;
    blockNumber: `0x${string}`;
    gasUsed: `0x${string}`;
    transactionHash: `0x${string}`;
  }[];
  capabilities?: Record<string, any>;
};

The following table describes the fields.

Field Type Description
version string Protocol version
id 0x${string} Batch identifier
chainId 0x${string} ID of the chain on which the calls were executed
status number Code indicating the current status
atomic boolean Whether all calls were handled atomically; this does not imply a single transaction
receipts array Array of transaction receipts when the batch has been included on-chain

Example

The following example retrieves the batch status and processes the result.

javascript
const status = await provider.request({
  method: "wallet_getCallsStatus",
  params: ["0xabc123..."]
});

console.log("Status:", status.status);
console.log("Atomic:", status.atomic);

if (status.receipts) {
  status.receipts.forEach((receipt, index) => {
    console.log(`Transaction ${index + 1}:`, receipt.transactionHash);
    console.log(`  Status: ${receipt.status === "0x1" ? "Success" : "Failed"}`);
    console.log(`  Gas Used: ${parseInt(receipt.gasUsed, 16)}`);
  });
}

The code passes the batch ID to retrieve its status and, if receipts are available, prints information about each transaction.

wallet_showCallsStatus

This method asks the wallet to display information about a specific call batch to the user.

Parameters

Pass the batch ID as the parameter.

javascript
type ShowCallsStatusParams = [string];

Return value

The method returns no value on success. It returns an error if the batch ID is unknown.

Example

The following example asks the wallet to display the batch status.

javascript
try {
  await provider.request({
    method: "wallet_showCallsStatus",
    params: ["0xabc123..."]
  });
  console.log("Wallet is showing the batch status to the user.");
} catch (error) {
  if (error.code === 5730) {
    console.log("Unknown batch ID");
  }
}

The code passes the batch ID to the wallet and requests that the status be displayed. Error code 5730 indicates an unknown batch ID.

wallet_getCapabilities

This method queries a wallet's capabilities for a specified address and chain.

Parameters

Pass the wallet address and an array of chain IDs as parameters.

javascript
type GetCapabilitiesParams = [
  `0x${string}`,
  `0x${string}`[]
];

The first argument is the wallet address, and the second is an optional array of chain IDs to query. The illustrative tuple above shows both arguments explicitly.

Return value

The return type is defined as follows.

javascript
type GetCapabilitiesResult = Record<
  `0x${string}`,
  Record<string, any>
>;

The returned object maps each chain ID to a map of capabilities supported on that chain.

Example

The following example retrieves capabilities for multiple chains.

javascript
const capabilities = await provider.request({
  method: "wallet_getCapabilities",
  params: [
    "0x1234567890abcdef1234567890abcdef12345678",
    ["0x1", "0x89"]
  ]
});

console.log("Ethereum capabilities:", capabilities["0x1"]);
console.log("Polygon capabilities:", capabilities["0x89"]);

if (capabilities["0x1"]?.atomic?.status === "supported") {
  console.log("Atomic batch execution is supported on Ethereum!");
}

The code retrieves capabilities on Ethereum Mainnet (0x1) and Polygon (0x89) and checks whether the wallet supports the atomic capability.

Status codes

wallet_getCallsStatus returns the following status codes.

Code Description
100 The batch is pending
200 The batch has been included on-chain without a revert
400 The batch has not been included on-chain, and the wallet will not retry
500 The entire batch reverted; only gas-related changes may have been recorded on-chain
600 Part of the batch reverted; some changes from the calls may have been included on-chain

The status codes follow a design similar to HTTP status codes. Codes in the 100 range indicate pending execution, the 200 range indicates success, the 400 range indicates an off-chain failure, and the 500 and 600 ranges indicate full and partial execution failures, respectively.

Error codes

The methods defined by EIP5792 use the following error codes.

Code Message Applicable methods
-32602 Invalid params All methods
4001 User Rejected Request wallet_sendCalls
4100 Unauthorized wallet_sendCalls, wallet_getCapabilities
5700 Unsupported non-optional capability wallet_sendCalls
5710 Unsupported chain id wallet_sendCalls
5720 Duplicate ID wallet_sendCalls
5730 Unknown bundle id wallet_getCallsStatus, wallet_showCallsStatus
5740 Bundle too large wallet_sendCalls
5750 Atomic-ready wallet rejected upgrade wallet_sendCalls
5760 Atomicity not supported wallet_sendCalls

-32602 indicates malformed parameters. 4001 indicates that the user rejected the request, and 4100 indicates that the application is not authorized to access the wallet as requested.

Errors in the 5700 range are specific to EIP5792. 5700 indicates a required capability that the wallet does not support, and 5710 indicates an unsupported chain ID. 5720 indicates an ID already in use, and 5730 indicates an unknown batch ID. 5740 indicates that the call batch is too large for the wallet to process. 5750 indicates that the user rejected an upgrade that would enable atomic execution, and 5760 indicates that atomicRequired is true but the wallet does not support atomic execution.

The atomic capability

The atomic capability describes the guarantees a wallet provides for batch execution on each chain.

Capability structure

The atomic capability has the following type definition.

javascript
type AtomicCapability = {
  status: 'supported' | 'ready' | 'unsupported';
};

The status field takes one of three values that indicate the availability of atomic execution.

Status meanings

Status Description
supported The wallet can execute calls atomically and contiguously
ready The wallet can upgrade to support atomic execution, subject to user approval
unsupported The wallet provides no atomic execution guarantee

When the status is supported, the wallet guarantees atomic and contiguous execution of all calls for requests with atomicRequired: true. This can be achieved within a single transaction, but the specification does not require a single transaction.

When the status is ready, the wallet does not currently support atomic execution but can upgrade with the user's approval. One example is an EOA obtaining smart-account functionality.

When the status is unsupported, the wallet does not support atomic execution. A request with atomicRequired: true is rejected with error 5760.

Checking the atomic capability

The following example checks the atomic capability in an application and selects an appropriate action.

javascript
const capabilities = await provider.request({
  method: "wallet_getCapabilities",
  params: [walletAddress, ["0x1"]]
});

const atomicStatus = capabilities["0x1"]?.atomic?.status;

switch (atomicStatus) {
  case "supported":
    console.log("アトミック実行がサポートされています");
    break;
  case "ready":
    console.log("アップグレードでアトミック実行が可能になります");
    break;
  case "unsupported":
    console.log("アトミック実行はサポートされていません");
    break;
  default:
    console.log("atomicケーパビリティが不明です");
}

The code displays an appropriate message for each status. If the status is supported, the application can send a batch with atomicRequired: true. If the status is ready, it can offer the user an upgrade. If the status is unsupported, it can use a fallback.

Additional examples

End-to-end DEX swap flow

The following example illustrates the complete flow for swapping tokens on a DEX, from querying capabilities through submitting a batch, polling its status, and processing the result.

javascript
async function swapTokens(provider, userAddress, tokenAddress, spenderAddress, amount, swapData) {
  const capabilities = await provider.request({
    method: "wallet_getCapabilities",
    params: [userAddress, ["0x1"]]
  });

  const supportsAtomic = capabilities["0x1"]?.atomic?.status === "supported";
  console.log("Atomic support:", supportsAtomic);

  // 2. バッチリクエストを構築
  const sendCallsParams = {
    version: "2.0.0",
    chainId: "0x1",
    atomicRequired: supportsAtomic, // アトミックがサポートされている場合のみtrue
    from: userAddress,
    calls: [
      {
        // approve呼び出し
        to: tokenAddress,
        data: encodeApprove(spenderAddress, amount),
      },
      {
        // swap呼び出し
        to: spenderAddress,
        data: swapData,
      }
    ]
  };

  // 3. バッチを送信
  const { id: batchId } = await provider.request({
    method: "wallet_sendCalls",
    params: [sendCallsParams]
  });

  console.log("Batch submitted:", batchId);

  // 4. ステータスをポーリング
  let status;
  do {
    await sleep(2000); // 2秒待機
    status = await provider.request({
      method: "wallet_getCallsStatus",
      params: [batchId]
    });
    console.log("Current status:", status.status);
  } while (status.status === 100); // 100 = pending

  // 5. 結果を処理
  if (status.status === 200) {
    console.log("Swap completed successfully!");
    console.log("Atomic execution:", status.atomic);
    if (status.receipts) {
      console.log("Transaction hashes:", status.receipts.map(r => r.transactionHash));
    }
    return { success: true, receipts: status.receipts };
  } else if (status.status === 400) {
    console.log("Batch was not submitted");
    return { success: false, error: "Not submitted" };
  } else if (status.status === 500) {
    console.log("Batch completely reverted");
    return { success: false, error: "Reverted" };
  } else if (status.status === 600) {
    console.log("Partial revert occurred");
    return { success: false, error: "Partial revert", receipts: status.receipts };
  }
}

// ヘルパー関数
function encodeApprove(spender, amount) {
  // ERC20 approve(address,uint256) のエンコード
  const functionSelector = "0x095ea7b3";
  const encodedSpender = spender.slice(2).padStart(64, "0");
  const encodedAmount = amount.toString(16).padStart(64, "0");
  return functionSelector + encodedSpender + encodedAmount;
}

function sleep(ms) {
  return new Promise(resolve => setTimeout(resolve, ms));
}

The code first checks the wallet's capabilities and sets atomicRequired: true only when atomic execution is supported. After submitting the batch, it continues polling while the status is 100 (pending) and returns a result according to the final status. The encodeApprove helper encodes calldata for the ERC20 approve function.

In production, use bounded polling and require atomicity when a partially completed approval-and-swap sequence would be unacceptable.

Fallback example

The following example implements a fallback for wallets that do not support atomic execution. It selects between required atomic execution and execution without that requirement based on the wallet's capabilities.

javascript
async function executeWithFallback(provider, userAddress, calls) {
  const capabilities = await provider.request({
    method: "wallet_getCapabilities",
    params: [userAddress, ["0x1"]]
  });

  const atomicStatus = capabilities["0x1"]?.atomic?.status;

  if (atomicStatus === "supported") {
    // アトミック実行を使用
    return await executeAtomic(provider, userAddress, calls);
  } else if (atomicStatus === "ready") {
    // ユーザーにアップグレードを提案
    const userWantsUpgrade = await promptUserForUpgrade();
    if (userWantsUpgrade) {
      try {
        return await executeAtomic(provider, userAddress, calls);
      } catch (error) {
        if (error.code === 5750) {
          // ユーザーがアップグレードを拒否した場合
          console.log("User rejected upgrade, falling back to sequential");
          return await executeSequential(provider, userAddress, calls);
        }
        throw error;
      }
    } else {
      return await executeSequential(provider, userAddress, calls);
    }
  } else {
    // アトミック実行非対応 - 順次実行
    return await executeSequential(provider, userAddress, calls);
  }
}

async function executeAtomic(provider, userAddress, calls) {
  const { id } = await provider.request({
    method: "wallet_sendCalls",
    params: [{
      version: "2.0.0",
      chainId: "0x1",
      atomicRequired: true,
      from: userAddress,
      calls
    }]
  });
  return await waitForCompletion(provider, id);
}

async function executeSequential(provider, userAddress, calls) {
  const { id } = await provider.request({
    method: "wallet_sendCalls",
    params: [{
      version: "2.0.0",
      chainId: "0x1",
      atomicRequired: false,
      from: userAddress,
      calls
    }]
  });
  return await waitForCompletion(provider, id);
}

async function waitForCompletion(provider, batchId) {
  let status;
  do {
    await sleep(2000);
    status = await provider.request({
      method: "wallet_getCallsStatus",
      params: [batchId]
    });
  } while (status.status === 100);
  return status;
}

async function promptUserForUpgrade() {
  return confirm("スマートアカウントにアップグレードしてアトミック実行を有効にしますか?");
}

The executeWithFallback function checks capabilities and requests atomic execution for supported, offers the user an upgrade for ready, and selects the sequential-execution fallback for unsupported. executeAtomic and executeSequential submit a batch with different atomicRequired values, and waitForCompletion waits for execution to finish.

Despite the helper's name, setting atomicRequired: false permits non-atomic execution; a wallet may still execute the calls atomically. A wallet without batching support may instead require a fallback using eth_sendTransaction.

Why the method is named this way

The name wallet_sendCalls was chosen deliberately.

The term "calls" is used instead of "transactions" because the resulting execution depends on the wallet implementation. With an EOA wallet, multiple calls may result in multiple transactions. With a smart account, however, multiple calls may result in a single transaction.

Using "calls" abstracts away that implementation detail: the number of transactions.

Gas limits

EIP5792 does not define a gas limit for each individual call. This maintains compatibility with ERC4337 UserOperation semantics.

In ERC4337, the execution gas limit covers the calls in a UserOperation collectively rather than assigning a separate limit to every call. A per-call gas limit would therefore be misleading for this type of wallet. The wallet is expected to estimate the appropriate gas limits.

Backward compatibility

EIP5792 defines new JSON-RPC methods without modifying existing ones. It therefore does not introduce a breaking change to existing methods.

Existing applications can continue using eth_sendTransaction, while applications that need new functionality can adopt the EIP5792 methods. Both interfaces can coexist, making gradual migration possible. A fallback based on wallet support lets applications use the appropriate interface.

Security

Unpredictable batch IDs

Predictable batch IDs could let malicious third parties infer information about users' transactions. Batch identifiers must therefore be unpredictable. Wallets should use cryptographically secure randomness when generating batch IDs.

Information disclosure

Capability responses in wallet_getCallsStatus could expose sensitive data. Wallets must avoid including confidential information in those responses.

Assumptions about atomicity

Code written on the assumption that a batch always maps to a single transaction can fail when execution is arranged differently. Even when a wallet reports atomic execution, developers must not assume that every call was sent in a single transaction. Depending on the implementation, the batch may span multiple transactions while still satisfying the atomicity and contiguity guarantees.

When atomicRequired: true is specified, a conforming wallet must satisfy the required atomicity guarantees. Check the atomic field in wallet_getCallsStatus to determine how the wallet handled the batch, but do not use it to infer the transaction count.

Privacy considerations

EIP5792 highlights the following points to protect user anonymity.

Wallets must distinguish between a capability being unsupported and a caller lacking authorization. They should also avoid revealing capabilities to untrusted callers without appropriate authorization. Excessive queries and unnecessary disclosure of capabilities can enable user fingerprinting and should be avoided.

References

Conclusion

This article examined EIP5792 and its Wallet Call API for submitting multiple on-chain calls as a batch.

EIP5792 improves communication between modern wallets and applications. In particular, a smart account can combine calls that would otherwise require multiple transactions into a single atomic execution, improving the user experience and potentially reducing gas costs.

If you have any questions, feel free to send me a direct message on Twitter.

Twitter @cardene777

I also write on the following platforms.