Calculates the pre-match odds value for specific selections at which the bet can be placed on. If the current odds value is lower than the specified value, the bet cannot be placed and will be rejected by the contract.
Usage
import { calcPrematchOdds } from '@azuro-org/sdk'
const prematchOdds = await calcPrematchOdds({
betAmount: '1' // 1 USDT
selections: [ { conditionId, outcomeId, coreAddress } ],
chainId: 80002,
})
Props
import { type Config } from 'wagmi'
{
config: Config
betAmount: string
selections: Selection[]
chainId: ChainId
}
type ChainId = 100 | 137 | 80002 | 88888 | 88882
type Selection = {
conditionId: string
outcomeId: string
coreAddress: string
}
Return Value
Promise<number>