token.useGetMetadata
Gets the metadata for a TIP-20 token, including name, symbol, decimals, currency, and total supply.
Usage
ts
import { } from 'wagmi/tempo'
const { : } = ..({
: '0x20c0000000000000000000000000000000000000',
})
.('Currency:', ?.)
.('Name:', ?.)Currency: USD.('Symbol:', ?.)Name: United States Dollar.('Decimals:', ?.)Symbol: USD.('Total Supply:', ?.)Decimals: 18Total Supply: 1000000000000000000000nts
import { createConfig, http } from 'wagmi'
import { tempoTestnet } from 'wagmi/chains'
import { KeyManager, webAuthn } from 'wagmi/tempo'
export const config = createConfig({
connectors: [
webAuthn({
keyManager: KeyManager.localStorage(),
}),
],
chains: [tempoTestnet],
multiInjectedProviderDiscovery: false,
transports: {
[tempoTestnet.id]: http(),
},
})Return Type
See TanStack Query query docs for more info hook return types.
data
See Wagmi Action token.getMetadata Return Type
Parameters
See Wagmi Action token.getMetadata Parameters
query
See the TanStack Query query docs for more info hook parameters.