Skip to Content

This hook is used to fetch the relayer fee amount for a bet.

ℹ️

For more information check Relayer fee section.

Usage

import { useBetFee } from '@azuro-org/sdk' const { data, isFetching, error } = useBetFee() const { formattedRelayerFeeAmount } = data

Props

{ chainId?: ChainId query?: QueryParameterWithSelect<UseBetFeeQueryFnData, TData> } | undefined
type UseBetFeeQueryFnData = { gasAmount: bigint relayerFeeAmount: bigint formattedRelayerFeeAmount: string }
type ChainId = | 100 // Gnosis | 137 // Polygon | 80002 // Polygon Amoy | 88888 // Chiliz | 88882 // Chiliz Spicy | 8453 // Base | 84532 // Base Sepolia

Return Value

UseQueryResult<{ gasAmount: bigint relayerFeeAmount: bigint formattedRelayerFeeAmount: string }>
import { type UseQueryResult } from '@tanstack/react-query'

Query Options Helper

getUseBetFeeQueryOptions lets you build query options outside a component — useful for prefetching, SSR, or composing queries.

import { getUseBetFeeQueryOptions } from '@azuro-org/sdk' const options = getUseBetFeeQueryOptions({ ...props, chainId }) await queryClient.prefetchQuery(options)
type GetUseBetFeeQueryOptionsProps = UseBetFeeProps & { chainId: ChainId }
Last updated on