Skip to content

Latest commit

 

History

History
978 lines (499 loc) · 13.3 KB

Keno.md

File metadata and controls

978 lines (499 loc) · 13.3 KB

Keno

Methods

bank

function bank() external view returns (contract IBank)

Returns

Name Type Description
_0 contract IBank undefined

bets

function bets(uint256) external view returns (bool resolved, address user, address token, uint256 id, uint256 amount, uint256 blockNumber, uint256 payout, uint256 vrfCost)

Parameters

Name Type Description
_0 uint256 undefined

Returns

Name Type Description
resolved bool undefined
user address undefined
token address undefined
id uint256 undefined
amount uint256 undefined
blockNumber uint256 undefined
payout uint256 undefined
vrfCost uint256 undefined

gain

function gain(address token, uint256 played, uint256 matchCount) external view returns (uint256 _factor)

Parameters

Name Type Description
token address undefined
played uint256 undefined
matchCount uint256 undefined

Returns

Name Type Description
_factor uint256 undefined

gains

function gains(address token) external view returns (uint256 biggestNumber, uint256 maxNumbersPlayed, uint256[] _gains)

Parameters

Name Type Description
token address undefined

Returns

Name Type Description
biggestNumber uint256 undefined
maxNumbersPlayed uint256 undefined
_gains uint256[] undefined

getChainlinkConfig

function getChainlinkConfig() external view returns (uint16 requestConfirmations, bytes32 keyHash, contract IVRFCoordinatorV2 chainlinkCoordinator, uint256 gasAfterCalculation)

Returns

Name Type Description
requestConfirmations uint16 undefined
keyHash bytes32 undefined
chainlinkCoordinator contract IVRFCoordinatorV2 undefined
gasAfterCalculation uint256 undefined

getChainlinkVRFCost

function getChainlinkVRFCost(address token) external view returns (uint256)

Parameters

Name Type Description
token address undefined

Returns

Name Type Description
_0 uint256 undefined

getLastUserBets

function getLastUserBets(address user, uint256 dataLength) external view returns (struct Keno.FullKenoBet[])

Parameters

Name Type Description
user address undefined
dataLength uint256 undefined

Returns

Name Type Description
_0 Keno.FullKenoBet[] undefined

getNumbersOutOfRandomWord

function getNumbersOutOfRandomWord(address token, uint256 randomWord) external view returns (uint40)

Parameters

Name Type Description
token address undefined
randomWord uint256 undefined

Returns

Name Type Description
_0 uint40 undefined

hasPendingBets

function hasPendingBets(address token) external view returns (bool)

Parameters

Name Type Description
token address undefined

Returns

Name Type Description
_0 bool undefined

kenoBets

function kenoBets(uint256) external view returns (uint40 numbers, uint40 rolled)

Parameters

Name Type Description
_0 uint256 undefined

Returns

Name Type Description
numbers uint40 undefined
rolled uint40 undefined

multicall

function multicall(bytes[] data) external nonpayable returns (bytes[] results)

Parameters

Name Type Description
data bytes[] undefined

Returns

Name Type Description
results bytes[] undefined

owner

function owner() external view returns (address)

Returns

Name Type Description
_0 address undefined

pause

function pause() external nonpayable

paused

function paused() external view returns (bool)

Returns

Name Type Description
_0 bool undefined

rawFulfillRandomWords

function rawFulfillRandomWords(uint256 requestId, uint256[] randomWords) external nonpayable

Parameters

Name Type Description
requestId uint256 undefined
randomWords uint256[] undefined

refundBet

function refundBet(uint256 id) external nonpayable

Parameters

Name Type Description
id uint256 undefined

renounceOwnership

function renounceOwnership() external nonpayable

setChainlinkConfig

function setChainlinkConfig(uint16 requestConfirmations, bytes32 keyHash, uint256 gasAfterCalculation) external nonpayable

Parameters

Name Type Description
requestConfirmations uint16 undefined
keyHash bytes32 undefined
gasAfterCalculation uint256 undefined

setHouseEdge

function setHouseEdge(address token, uint16 houseEdge) external nonpayable

Parameters

Name Type Description
token address undefined
houseEdge uint16 undefined

setVRFCallbackGasLimit

function setVRFCallbackGasLimit(address token, uint32 callbackGasLimit) external nonpayable

Parameters

Name Type Description
token address undefined
callbackGasLimit uint32 undefined

tokenConfigurations

function tokenConfigurations(address) external view returns (uint128 biggestNumber, uint128 maxNumbersPlayed)

Parameters

Name Type Description
_0 address undefined

Returns

Name Type Description
biggestNumber uint128 undefined
maxNumbersPlayed uint128 undefined

tokens

function tokens(address) external view returns (uint16 houseEdge, uint64 pendingCount, uint32 VRFCallbackGasLimit, uint256 VRFFees)

Parameters

Name Type Description
_0 address undefined

Returns

Name Type Description
houseEdge uint16 undefined
pendingCount uint64 undefined
VRFCallbackGasLimit uint32 undefined
VRFFees uint256 undefined

transferOwnership

function transferOwnership(address newOwner) external nonpayable

Parameters

Name Type Description
newOwner address undefined

updateTokenConfig

function updateTokenConfig(address token, uint128 newBiggestNumber, uint128 newMaxNumbers) external nonpayable

Parameters

Name Type Description
token address undefined
newBiggestNumber uint128 undefined
newMaxNumbers uint128 undefined

userOverchargedVRFCost

function userOverchargedVRFCost(address) external view returns (uint256)

Parameters

Name Type Description
_0 address undefined

Returns

Name Type Description
_0 uint256 undefined

wager

function wager(uint40 numbers, address token, uint256 tokenAmount) external payable

Parameters

Name Type Description
numbers uint40 undefined
token address undefined
tokenAmount uint256 undefined

withdrawOverchargedVRFCost

function withdrawOverchargedVRFCost(address user) external nonpayable

Parameters

Name Type Description
user address undefined

withdrawTokensVRFFees

function withdrawTokensVRFFees(address token) external nonpayable

Parameters

Name Type Description
token address undefined

Events

AccountOverchargedVRFCost

event AccountOverchargedVRFCost(address indexed user, uint256 overchargedVRFCost)

Parameters

Name Type Description
user indexed address undefined
overchargedVRFCost uint256 undefined

BetRefunded

event BetRefunded(uint256 id, address user, uint256 amount, uint256 chainlinkVRFCost)

Parameters

Name Type Description
id uint256 undefined
user address undefined
amount uint256 undefined
chainlinkVRFCost uint256 undefined

DistributeOverchargedVRFCost

event DistributeOverchargedVRFCost(address indexed user, uint256 overchargedVRFCost)

Parameters

Name Type Description
user indexed address undefined
overchargedVRFCost uint256 undefined

DistributeTokenVRFFees

event DistributeTokenVRFFees(address indexed token, uint256 amount)

Parameters

Name Type Description
token indexed address undefined
amount uint256 undefined

OwnershipTransferred

event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)

Parameters

Name Type Description
previousOwner indexed address undefined
newOwner indexed address undefined

Paused

event Paused(address account)

Parameters

Name Type Description
account address undefined

PlaceBet

event PlaceBet(uint256 id, address indexed user, address indexed token, uint256 amount, uint256 vrfCost, uint40 numbers)

Parameters

Name Type Description
id uint256 undefined
user indexed address undefined
token indexed address undefined
amount uint256 undefined
vrfCost uint256 undefined
numbers uint40 undefined

Roll

event Roll(uint256 id, address indexed user, address indexed token, uint256 amount, uint40 numbers, uint40 rolled, uint256 payout)

Parameters

Name Type Description
id uint256 undefined
user indexed address undefined
token indexed address undefined
amount uint256 undefined
numbers uint40 undefined
rolled uint40 undefined
payout uint256 undefined

SetChainlinkConfig

event SetChainlinkConfig(uint16 requestConfirmations, bytes32 keyHash, uint256 gasAfterCalculation)

Parameters

Name Type Description
requestConfirmations uint16 undefined
keyHash bytes32 undefined
gasAfterCalculation uint256 undefined

SetHouseEdge

event SetHouseEdge(address indexed token, uint16 houseEdge)

Parameters

Name Type Description
token indexed address undefined
houseEdge uint16 undefined

SetVRFCallbackGasLimit

event SetVRFCallbackGasLimit(address indexed token, uint32 callbackGasLimit)

Parameters

Name Type Description
token indexed address undefined
callbackGasLimit uint32 undefined

TokenConfigUpdated

event TokenConfigUpdated(address token, uint128 newBiggestNumber, uint128 newMaxNumbers)

Parameters

Name Type Description
token address undefined
newBiggestNumber uint128 undefined
newMaxNumbers uint128 undefined

Unpaused

event Unpaused(address account)

Parameters

Name Type Description
account address undefined

Errors

AccessDenied

error AccessDenied()

ExcessiveHouseEdge

error ExcessiveHouseEdge()

ForbiddenToken

error ForbiddenToken()

InvalidAddress

error InvalidAddress()

InvalidLinkWeiPrice

error InvalidLinkWeiPrice(int256 linkWei)

Parameters

Name Type Description
linkWei int256 undefined

InvalidSettings

error InvalidSettings()

NoOverchargedVRFCost

error NoOverchargedVRFCost()

NotFulfilled

error NotFulfilled()

NotPendingBet

error NotPendingBet()

NumbersNotInRange

error NumbersNotInRange()

OnlyCoordinatorCanFulfill

error OnlyCoordinatorCanFulfill(address have, address want)

Parameters

Name Type Description
have address undefined
want address undefined

TokenHasPendingBets

error TokenHasPendingBets()

TooManyNumbersPlayed

error TooManyNumbersPlayed()

UnderMinBetAmount

error UnderMinBetAmount(uint256 minBetAmount)

Parameters

Name Type Description
minBetAmount uint256 undefined

WrongGasValueToCoverFee

error WrongGasValueToCoverFee()