amm.usePool
Gets the reserves for a liquidity pool.
Usage
ts
import { } from 'wagmi/tempo'
const { : } = ..({
: '0x20c0000000000000000000000000000000000000',
: '0x20c0000000000000000000000000000000000001',
})
.('User token reserve:', ?.)
.('Validator token reserve:', ?.)User token reserve: 1000000000000000000000n.('Total supply:', ?.)Validator token reserve: 1000000000000000000000nTotal 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 amm.getPool Return Type
Parameters
See Wagmi Action amm.getPool Parameters
query
See the TanStack Query query docs for more info hook parameters.