Developer Hub
🔮 For applications
Toolkit
Utils
getLiveBetFee

Returns the relayer fee data for live bets.

ℹ️

For more information check Relayer fee section.

Usage

import { getLiveBetFee } from '@azuro-org/toolkit'
 
const { relayerFeeAmount } = await getLiveBetFee(80002)

Props

chainId: ChainId

type ChainId = 100 | 137 | 80002 | 88888 | 88882

Return Value

Promise<{
  gasLimit: number,
  gasPrice: number,
  betTokenRate: number, // bet token / native token rate
  gasPriceInBetToken: number,
  slippage: number,
  gasAmount: number, // gasLimit * gasPrice * (1  + slippage)
  relayerFeeAmount: string, // gasAmount * betTokenRate
  beautyRelayerFeeAmount: string, // formatUnits(relayerFeeAmount, decimals)
  symbol: string,
  decimals: number
}>