Skip to content

getCallsStatus ​

Action to fetch the status and receipts of a call batch that was sent via sendCalls.

Read more.

Import ​

ts
import { getCallsStatus } from '@wagmi/core'

Usage ​

ts
import { getCallsStatus } from '@wagmi/core'
import { config } from './config'

const status = await getCallsStatus(config, {
  id: '0x1234567890abcdef',
})
ts
import { createConfig, http } from '@wagmi/core'
import { mainnet, sepolia } from '@wagmi/core/chains'

export const config = createConfig({
  chains: [mainnet, sepolia],
  transports: {
    [mainnet.id]: http(),
    [sepolia.id]: http(),
  },
})

Parameters ​

ts
import { type GetCallsStatusParameters } from '@wagmi/core'

connector ​

Connector | undefined

Connector to get call statuses with.

ts
import { getConnections, getCallsStatus } from '@wagmi/core'
import { config } from './config'

const connections = getConnections(config)
const status = await getCallsStatus(config, {
  connector: connections[0]?.connector, 
  id: '0x1234567890abcdef',
})
ts
import { createConfig, http } from '@wagmi/core'
import { mainnet, sepolia } from '@wagmi/core/chains'

export const config = createConfig({
  chains: [mainnet, sepolia],
  transports: {
    [mainnet.id]: http(),
    [sepolia.id]: http(),
  },
})

id ​

string

Identifier of the call batch.

ts
import { getCallsStatus } from '@wagmi/core'
import { config } from './config'

const status = await getCallsStatus(config, {
  id: '0x1234567890abcdef', 
})
ts
import { createConfig, http } from '@wagmi/core'
import { mainnet, sepolia } from '@wagmi/core/chains'

export const config = createConfig({
  chains: [mainnet, sepolia],
  transports: {
    [mainnet.id]: http(),
    [sepolia.id]: http(),
  },
})

Return Type ​

ts
import { type GetCallsStatusReturnType } from '@wagmi/core'

{ status: 'PENDING' | 'CONFIRMED', receipts: TransactionReceipt[] }

The status and receipts of the call batch.

Error ​

ts
import { type GetCallsStatusErrorType } from '@wagmi/core'

TanStack Query ​

ts
import {
  type GetCallsStatusData,
  type GetCallsStatusOptions,
  type GetCallsStatusQueryFnData,
  type GetCallsStatusQueryKey,
  getCallsStatusQueryKey,
  getCallsStatusQueryOptions,
} from '@wagmi/core/query'

Viem ​

Released under the MIT License.