Soccer
Use Soccer to build a wager for a selected game configuration, country, and shot zone.
What the builder does
createGameBet('soccer', options) validates the selected configuration,
country, and shot-zone ids, then builds the Soccer play transaction.
Required options
ownercoinTypestakeconfigIdcountryIdshotZoneId
Shared optional options
cashStakebetCountmetadatagasBudgetuseGasCoin
Example
const tx = client.suigar.tx.createGameBet('soccer', {
owner: '0x123',
coinType: '0x2::sui::SUI',
stake: 1_000_000_000n,
configId: 0,
countryId: 0,
shotZoneId: 0,
});
Typical usage
- Read the live Soccer parameters for the selected coin.
- Let the player choose the available configuration, country, and shot zone.
- Build the transaction with the selected ids.
- Sign and execute it with the player's wallet.
Read current limits
const parameters = await client.suigar.getGameParameters('soccer', {
coinType: '0x2::sui::SUI',
});
console.log(parameters.min_stake);
console.log(parameters.max_stake);
Use the returned live parameters to validate a wager before the player signs.
Notes
configId,countryId, andshotZoneIdmust be integers from the current onchain configuration.- Partner attribution is injected automatically when the extension is registered with
partner. - Reserved metadata keys such as
partnerandreferrerare ignored with a warning when passed manually.