Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

wallet_getCallsStatus

Get the status of a batch of calls.

Authentication Required: No

Request

await jaw.provider.request({
  method: 'wallet_getCallsStatus',
  params: ['0x123abc...'],
});

Parameters

NameTypeRequiredDescription
batchIdstringYesBatch ID returned from wallet_sendCalls

Example

["0x123abc456def..."]

Response

Returns detailed status information about the batch execution.

Example

{
  "id": "0x123abc...",
  "chainId": "0x1",
  "status": 200,
  "atomic": true,
  "receipts": [{
    "logs": [{
      "address": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
      "data": "0x...",
      "topics": ["0x..."]
    }],
    "status": "0x1",
    "blockHash": "0x...",
    "blockNumber": "0x...",
    "gasUsed": "0x...",
    "transactionHash": "0x..."
  }]
}

Response Fields

FieldTypeDescription
idstringBatch identifier
chainIdstringChain ID (hex)
statusnumberStatus code (see below)
atomicbooleanWhether calls are atomic
receiptsarrayTransaction receipts (when completed)

Status Codes

CodeStatusDescription
100PendingNot yet on-chain
200CompletedSuccessfully executed on-chain
400Offchain FailureFailed before submission (wallet won't retry)
500Onchain RevertReverted on-chain (has receipt with status 0x0)
600Partial RevertSome calls reverted (not applicable for atomic ops)

Behavior

  • Can be called without authentication
  • Returns current status of the batch operation
  • Receipts included only when status is 200 or 500
  • Background monitoring updates status automatically

Example

Poll for Completion

const result = await jaw.provider.request({
  method: 'wallet_sendCalls',
  params: [{
    version: '1.0',
    chainId: '0x1',
    from: account,
    calls: [...],
  }],
});
 
// Poll until completed
async function waitForCompletion(batchId: string) {
  while (true) {
    const status = await jaw.provider.request({
      method: 'wallet_getCallsStatus',
      params: [batchId],
    });
 
    if (status.status === 200) {
      console.log('Batch completed successfully!');
      return status;
    } else if (status.status >= 400) {
      console.error('Batch failed:', status);
      throw new Error('Batch execution failed');
    }
 
    // Still pending, wait and retry
    await new Promise(resolve => setTimeout(resolve, 2000));
  }
}
 
await waitForCompletion(result.id);

Related Methods