Params

Bet module parameter types and definition.

The Bet module has the following parameters:

  • Batch Settlement Count: this is the count of bets to be settled automatically in each block.

  • Max bet by UID query count: is the max count of bets to be returned in the bets by UID list query.

  • Constraints: contains the bet wagering constraints.

The proto for the params is as follows:

// Params defines the parameters for the module.
message Params {
  option (gogoproto.goproto_stringer) = false;

  // batch_settlement_count is the batch settlement bet count.
  uint32 batch_settlement_count = 1;

  // max_bet_by_uid_query_count is the maximum bet by uid query items count.
  uint32 max_bet_by_uid_query_count = 2;
}

Constraints

Constraints define the constraints that will apply while accepting bets. The following constraints can be applied to the bet acceptance criteria:

  1. Min Amount: Blockchain should not accept bets with a bet amount (after the deduction of the bet fee) less than the value stored in this field.

  2. Fee: Blockchain should set a fee for every bet it accepts.

The proto for the constraints are as follows:

// Constraints is the bet constrains type for the bets
message Constraints {
  // min_amount is the minimum allowed bet amount.
  string min_amount = 1 [
    (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
    (gogoproto.nullable) = false
  ];

  // fee is the fee that the bettor needs to pay to bet.
  string fee = 2 [
    (gogoproto.customtype) = "github.com/cosmos/cosmos-sdk/types.Int",
    (gogoproto.nullable) = false
  ];
}

Last updated