Skip to content

useModules

Hook for getting modules installed on an account.

Import

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

Usage

index.tsx
import { useModules } from '@abstract-money/react'
import { stringToAccountId } from '@abstract-money/core'
 
function App() {
  const modulesQuery = useModules({
    accountId: stringToAccountId('pion-1'),
    chainName: 'pion',
  })
}

Parameters

accountId

AccountId | undefined

Account Id to be used to fetch the query.

chainName

string | undefined

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

extra

{
    apiUrl?: string | undefined;
    accountId?: AccountId | undefined;
    cosmWasmClient?: CosmWasmClient | undefined;
} | undefined

Extra options to override decorated parameters.

query

QueryOptions | undefined

QueryOptions to use.