Skip to content

useSmartQuery

Hook for fetching a smart query

Import

import { useSmartQuery } from '@abstract-money/react'

Usage

index.tsx
import { useSmartQuery } from '@abstract-money/react'
 
function App() {
  const smartQuery = useSmartQuery({
    chainName: 'osmosis',
    address: 'osmo1...',
    queryMsg: {},
  })
}

Parameters

chainName

string | undefined

Name of the chain to be used to fetch the query.

address

string

The address to query.

queryMsg

Record<string, unknown>

The query message to send.

query

QueryOptions | undefined

QueryOptions to use.