Smart Contracts
Last updated
Last updated
Using our contract infrastructure, developers can:
Analyze betting trends and access transparent odds, volume and game result data
Deploy a hedging contract for players to hedge parlays automatically
Develop a frontend on existing Betonchain contracts
Capture contract events to stream on social platforms
Deploy and fund our NFT voucher contracts to host risk-free bets for holders
And more!
You can access a wallet's bets by calling the functions below. The structs referenced below areMoneyLineBetJoin
, OverUnderBetJoin
andPointSpreadBetJoin
. For relevant events see the Events section.
Anyone can deploy and fund our NFT Voucher contracts to host risk-free bets for a specified scope of holders. The vouchers are compatible with both ERC721
and ERC1155
contract types.
The vouchers can be updated by their deployer and optionally support an array of IDs that allow subsets of NFT holders to qualify.
Vouchers accept funding in USDC, USDT or DAI for distributing risk-free bets after they're placed by qualified users through the Betonchain protocol.
The amount to distribute per bet and the interval over which to do so are required parameters. For example, one can specify that up to 100 USDC should be distributed in risk-free bets every 24 hours until funding is depleted.
Please reach out on our Discord for more details on NFT Vouchers and assistance with configuration and deployment.
The official DApp displays an event stream: https://betonchain.gg/activity
An event emitted when fulfillInitGame()
executes successfully.
requestId
bytes32 indexed
Request ID of the data request that was fulfilled
game_id
uint256
Game ID of the game for which data was initialized
An event emitted when fulfillOdds()
executes successfully.
requestId
bytes32 indexed
Request ID of the data request that was fulfilled
game_id
uint256
Game ID of the game for which data was initialized
An event emitted when fulfillResults()
executes successfully.
requestId
bytes32 indexed
Request ID of the data request that was fulfilled
game_id
uint256
Game ID of the game for which data was initialized
An event emitted when _addGame()
executes successfully.
gameId
uint256
Game ID of the game that was added for betting
league
string
League of the game that was added for betting