🖥️Game Interface
Last updated
Last updated
The GameInterface
is an integral part of a BetFin gaming ecosystem, designed to standardize how games interact within the rest system. This interface ensures that any game implementing it will adhere to a specific structure, making it easier to integrate with wallets, other games, or platforms that need to interact with various games without knowing their internal implementations.
The interface consists of several crucial functions, each serving a specific purpose within the gaming ecosystem:
getAddress()
address
Returns the address of the game contract. Useful for identification and transactions.
getVersion()
uint256
Provides the version of the game. This could be used for compatibility checks.
getFeeType()
uint256
Indicates the type of fee mechanism the game uses. 0
means the fee is taken from the player's bet ,generally for , while 1
indicates the fee comes from the game's core balance, generally for
getStaking()
address
Returns the address of the staking contract associated with the game, if any. Staking to be used for rewards or other in-game mechanics.
placeBet()
address
A function to place a bet or initiate a game action. It requires the player's address, the amount, and any relevant game data.