dex.useSellQuote
Gets the quote for selling a specific amount of tokens.
Usage
ts
import { } from 'wagmi/tempo'
import { } from 'viem'
const { : } = ..({
: ('100', 6),
: '0x20c0000000000000000000000000000000000001',
: '0x20c0000000000000000000000000000000000002',
})
.('Amount received:', )
Amount received: 99700000nts
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 dex.getSellQuote Return Type
Parameters
See Wagmi Action dex.getSellQuote Parameters
query
See the TanStack Query query docs for more info hook parameters.