Skip to main content

Utilities

Table of contents

Functions

Functions

createDrawResultsObject

createDrawResultsObject(drawId): DrawResults

Parameters

NameType
drawIdnumber

Returns

DrawResults

Defined in

utils/createDrawResultsObject.ts:5


filterResultsByValue

filterResultsByValue(drawResults, maxPicksPerUser): DrawResults

Parameters

NameType
drawResultsDrawResults
maxPicksPerUsernumber

Returns

DrawResults

Defined in

utils/filterResultsByValue.ts:7


findBitMatchesAtIndex

findBitMatchesAtIndex(word1, word2, matchIndex, bitRangeSize): boolean

Parameters

NameType
word1BigNumber
word2BigNumber
matchIndexnumber
bitRangeSizenumber

Returns

boolean

Defined in

utils/findBitMatchesAtIndex.ts:6


formatTierPercentage

Const formatTierPercentage(tier): BigNumber

Parameters

NameType
tierstring

Returns

BigNumber

Defined in

utils/formatTierPercentage.ts:4


hashUserAddress

hashUserAddress(address): string

Parameters

NameType
addressstring

Returns

string

Defined in

utils/hashUserAddress.ts:3


isBitRangeSizeValid

isBitRangeSizeValid(bitRangeSize, matchCardinality): boolean

Parameters

NameType
bitRangeSizenumber
matchCardinalitynumber

Returns

boolean

Defined in

utils/isBitRangeSizeValid.ts:1


isTiersValid

isTiersValid(tiers): boolean

Parameters

NameType
tiersBigNumberish[]

Returns

boolean

Defined in

utils/isTiersValid.ts:5


sanityCheckPrizeDistribution

sanityCheckPrizeDistribution(prizeDistribution): string

Parameters

NameType
prizeDistributionPrizeDistribution

Returns

string

Defined in

utils/sanityCheckPrizeDistribution.ts:5


sortByBigNumberAsc

Const sortByBigNumberAsc(a, b): 0 | 1 | -1

Parameters

NameType
aBigNumber
bBigNumber

Returns

0 | 1 | -1

Defined in

utils/sortByBigNumber.ts:3


sortByBigNumberDesc

Const sortByBigNumberDesc(a, b): 0 | 1 | -1

Parameters

NameType
aBigNumber
bBigNumber

Returns

0 | 1 | -1

Defined in

utils/sortByBigNumber.ts:10


sumBigNumbers

sumBigNumbers(numbers): BigNumberish

Parameters

NameType
numbersBigNumberish[]

Returns

BigNumberish

Defined in

utils/sumBigNumbers.ts:10


sumTwoBigNumbers

sumTwoBigNumbers(bn1, bn2): BigNumber

Parameters

NameType
bn1BigNumberish
bn2BigNumberish

Returns

BigNumber

Defined in

utils/sumBigNumbers.ts:3


updateDrawResultsWithWinningPicks

updateDrawResultsWithWinningPicks(pickPrizes, results, picks): DrawResults

Parameters

NameType
pickPrizesPickPrize[]
resultsDrawResults
picksany[]

Returns

DrawResults

Defined in

utils/updateDrawResultsWithWinningPicks.ts:5 dateDrawResultsWithWinningPicks.ts#L5)