Skip to main content

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

  • owner
  • coinType
  • stake
  • configId
  • countryId
  • shotZoneId

Shared optional options

  • cashStake
  • betCount
  • metadata
  • gasBudget
  • useGasCoin

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

  1. Read the live Soccer parameters for the selected coin.
  2. Let the player choose the available configuration, country, and shot zone.
  3. Build the transaction with the selected ids.
  4. 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, and shotZoneId must be integers from the current onchain configuration.
  • Partner attribution is injected automatically when the extension is registered with partner.
  • Reserved metadata keys such as partner and referrer are ignored with a warning when passed manually.