Skip to content

Hooks.useCallsHistory

Hook for retrieving call bundle history for an account.

Internally uses wallet_getCallsHistory.

import { Hooks } from 'porto/wagmi'
 
function Example() {
  const result = Hooks.useCallsHistory({
    limit: 10,
    sort: 'desc',
  })
}

Parameters

account

Address | undefined

Account address to fetch history for. Defaults to the connected account.

config

Config | undefined

Wagmi config override for the query.

connector

Connector | undefined

Connector to use. Defaults to the active connector.

index

number | undefined

Optional cursor for pagination.

limit

number

Maximum number of bundles to return.

sort

'asc' | 'desc'

Ordering for results.

query

UseQueryOptions | undefined

Additional @tanstack/react-query options.

Return Type

UseQueryResult<CallHistoryEntry[]>

Returns a TanStack Query result object mirroring the shape documented on wallet_getCallsHistory.