You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function claim(addressuser, addresstoken) external nonpayable
Parameters
Name
Type
Description
user
address
undefined
token
address
undefined
claimAll
function claimAll(addressuser) external nonpayable
Parameters
Name
Type
Description
user
address
undefined
claimNFT
function claimNFT(uint24_betId, uint256nftIndex, uint256tokenId) external nonpayable
Parameters
Name
Type
Description
_betId
uint24
undefined
nftIndex
uint256
undefined
tokenId
uint256
undefined
claimNFTs
function claimNFTs(uint24_betId) external nonpayable
Parameters
Name
Type
Description
_betId
uint24
undefined
claimedNFTs
function claimedNFTs(uint24, contractIERC721, uint256) externalviewreturns (bool)
Maps bet ID -> NFT contract -> token ID for claimed NFTs
Parameters
Name
Type
Description
_0
uint24
undefined
_1
contract IERC721
undefined
_2
uint256
undefined
Returns
Name
Type
Description
_0
bool
undefined
gameCanStart
function gameCanStart(uint24id) externalviewreturns (bool)
Parameters
Name
Type
Description
id
uint24
undefined
Returns
Name
Type
Description
_0
bool
undefined
getBetNFTs
function getBetNFTs(uint24id) externalviewreturns (struct PvPGame.NFTs[])
Parameters
Name
Type
Description
id
uint24
undefined
Returns
Name
Type
Description
_0
PvPGame.NFTs[]
undefined
getChainlinkConfig
function getChainlinkConfig() externalviewreturns (uint16requestConfirmations, bytes32keyHash, contractVRFCoordinatorV2InterfacechainlinkCoordinator, uint256gasAfterCalculation)
Returns the Chainlink VRF config.
Returns
Name
Type
Description
requestConfirmations
uint16
undefined
keyHash
bytes32
undefined
chainlinkCoordinator
contract VRFCoordinatorV2Interface
undefined
gasAfterCalculation
uint256
undefined
getRussianRouletteBet
function getRussianRouletteBet(uint24id) externalviewreturns (struct RussianRoulette.RussianRouletteBet russianRouletteBet, struct PvPGame.Bet bet)
Parameters
Name
Type
Description
id
uint24
undefined
Returns
Name
Type
Description
russianRouletteBet
RussianRoulette.RussianRouletteBet
undefined
bet
PvPGame.Bet
undefined
harvestDividends
function harvestDividends(addresstokenAddress) external nonpayable
Harvests tokens dividends.
Parameters
Name
Type
Description
tokenAddress
address
undefined
harvester
function harvester() externalviewreturns (address)
Address allowed to harvest dividends.
Returns
Name
Type
Description
_0
address
undefined
joinGame
function joinGame(uint24id, uint16seatsNumber) externalpayable
Parameters
Name
Type
Description
id
uint24
undefined
seatsNumber
uint16
undefined
launchGame
function launchGame(uint24id) external nonpayable
Parameters
Name
Type
Description
id
uint24
undefined
maxNFTs
function maxNFTs() externalviewreturns (uint16)
Maximum number of NFTs per game.
Returns
Name
Type
Description
_0
uint16
undefined
maxSeats
function maxSeats() externalviewreturns (uint16)
Maximum number of seats per game.
Returns
Name
Type
Description
_0
uint16
undefined
multicall
function multicall(bytes[] data) external nonpayable returns (bytes[] results)
Receives and executes a batch of function calls on this contract.
Parameters
Name
Type
Description
data
bytes[]
undefined
Returns
Name
Type
Description
results
bytes[]
undefined
owner
function owner() externalviewreturns (address)
Returns the address of the current owner.
Returns
Name
Type
Description
_0
address
undefined
pause
function pause() external nonpayable
Pauses the contract to disable new bets.
paused
function paused() externalviewreturns (bool)
Returns true if the contract is paused, and false otherwise.
Returns
Name
Type
Description
_0
bool
undefined
payouts
function payouts(address, address) externalviewreturns (uint256)
Maps user -> token -> amount for due payouts
Parameters
Name
Type
Description
_0
address
undefined
_1
address
undefined
Returns
Name
Type
Description
_0
uint256
undefined
pullTriggers
function pullTriggers(uint24id) external nonpayable
Pull the triggers killing seats.
Parameters
Name
Type
Description
id
uint24
id of the bet
pvpGamesStore
function pvpGamesStore() externalviewreturns (contractIPvPGamesStore)
The PvPGamesStore contract that contains the tokens configuration.
Returns
Name
Type
Description
_0
contract IPvPGamesStore
undefined
rawFulfillRandomWords
function rawFulfillRandomWords(uint256requestId, uint256[] randomWords) external nonpayable
Parameters
Name
Type
Description
requestId
uint256
undefined
randomWords
uint256[]
undefined
readBet
function readBet(uint24id) externalviewreturns (struct PvPGame.Bet bet)
Returns the bet with the seats list included
Parameters
Name
Type
Description
id
uint24
undefined
Returns
Name
Type
Description
bet
PvPGame.Bet
The required bet
refundBet
function refundBet(uint24id) external nonpayable
Refunds the bet to the user if the Chainlink VRF callback failed.
Parameters
Name
Type
Description
id
uint24
The Bet ID.
renounceOwnership
function renounceOwnership() external nonpayable
Leaves the contract without owner. It will not be possible to call onlyOwner functions anymore. Can only be called by the current owner. NOTE: Renouncing ownership will leave the contract without an owner, thereby removing any functionality that is only available to the owner.
setChainlinkConfig
function setChainlinkConfig(uint16requestConfirmations, bytes32keyHash, uint256gasAfterCalculation) external nonpayable
Sets the Chainlink VRF V2 configuration.
Parameters
Name
Type
Description
requestConfirmations
uint16
How many confirmations the Chainlink node should wait before responding.
keyHash
bytes32
Hash of the public key used to verify the VRF proof.
gasAfterCalculation
uint256
Gas to be added for VRF cost refund.
setHarvester
function setHarvester(addressnewHarvester) external nonpayable
Allows to change the harvester address.
Parameters
Name
Type
Description
newHarvester
address
provides the new address to use.
setHouseEdge
function setHouseEdge(addresstoken, uint16houseEdge) external nonpayable
Sets the game house edge rate for a specific token.
The house edge rate couldn't exceed 4%.
Parameters
Name
Type
Description
token
address
Address of the token.
houseEdge
uint16
House edge rate.
setMaxNFTs
function setMaxNFTs(uint16_maxNFTs) external nonpayable
Parameters
Name
Type
Description
_maxNFTs
uint16
undefined
setMaxSeats
function setMaxSeats(uint16_maxSeats) external nonpayable
Parameters
Name
Type
Description
_maxSeats
uint16
undefined
setVRFCallbackGasLimit
function setVRFCallbackGasLimit(addresstoken, uint32callbackGasLimit) external nonpayable
Sets the Chainlink VRF V2 configuration.
Parameters
Name
Type
Description
token
address
undefined
callbackGasLimit
uint32
How much gas is needed in the Chainlink VRF callback.
tokens
function tokens(address) externalviewreturns (uint16houseEdge, uint32VRFCallbackGasLimit, uint256VRFFees, struct PvPGame.HouseEdgeSplit houseEdgeSplit)
Maps tokens addresses to token configuration.
Parameters
Name
Type
Description
_0
address
undefined
Returns
Name
Type
Description
houseEdge
uint16
undefined
VRFCallbackGasLimit
uint32
undefined
VRFFees
uint256
undefined
houseEdgeSplit
PvPGame.HouseEdgeSplit
undefined
transferOwnership
function transferOwnership(addressnewOwner) external nonpayable
Transfers ownership of the contract to a new account (newOwner). Can only be called by the current owner.
Parameters
Name
Type
Description
newOwner
address
undefined
wager
function wager(addresstoken, uint256tokenAmount, address[] opponents, uint16_maxSeats, uint32startsAt, uint8deathRatio, bytesnfts) externalpayable
Creates a new bet and stores the chosen coin face.
Parameters
Name
Type
Description
token
address
Address of the token.
tokenAmount
uint256
The number of tokens bet.
opponents
address[]
Selected players to play with.
_maxSeats
uint16
Maximum number of seats. The game will start when its reached.
startsAt
uint32
Timestamp when the game can start.
deathRatio
uint8
Players kill rate.
nfts
bytes
undefined
withdrawHouseEdgeAmount
function withdrawHouseEdgeAmount(addresstokenAddress) external nonpayable
Distributes the token's treasury and team allocations amounts.