⚠️
Important! We’ve moved to V3! This documentation is for V2 only and will be updated in May.
Developer Hub
🔮 For applications
Toolkit
Utils
getBetFee

Returns the relayer fee data for live bets.

ℹ️

For more information check Relayer fee section.

Usage

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

Props

chainId: ChainId

 
type ChainId = 
  | 100     // Gnosis
  | 137     // Polygon
  | 80002   // Polygon Amoy
  | 88888   // Chiliz
  | 88882   // Chiliz Spicy
  | 8453    // Base
  | 84532   // Base Sepolia

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
}>