🖥️Bet Interface
The Bet Interface provides methods to interact with a betting contract on the Ethereum blockchain. This interface allows users to retrieve various information related to a bet, such as player address, bet amount, payout result, bet status, game address, and creation timestamp.
Interface Methods
getPlayer
Description: Returns the address of the player who placed the bet.
Usage: Call this method to retrieve the address of the player.
Return Type:
address
getAmount
Description: Returns the amount of the bet.
Usage: Call this method to retrieve the amount of the bet in Wei.
Return Type:
uint256
getResult
Description: Returns the payout result of the bet.
Usage: Call this method to retrieve the payout result of the bet.
Return Type:
uint256
getStatus
Description: Returns the status of the bet.
Usage: Call this method to retrieve the status of the bet.
Return Type:
uint256
getGame
Description: Returns the address of the game associated with the bet.
Usage: Call this method to retrieve the address of the game contract.
Return Type:
address
getCreated
Description: Returns the timestamp when the bet was created.
Usage: Call this method to retrieve the creation timestamp of the bet.
Return Type:
uint256
getBetInfo
Description: Returns all relevant information about the bet.
Usage: Call this method to retrieve all data related to the bet at once, including player address, game address, bet amount, payout result, bet status, and creation timestamp.
Return Type:
(address, address, uint256, uint256, uint256, uint256)
Last updated