Transactions & Payloads

The exposed transactions CLI commands and ticket payloads by the Market module.

Add Market Transaction

The below transaction can be used to add a market to the blockchain.

Command

sged tx market add [ticket] --flags

Payload

The payload for the add-market transaction is as follows:

{
 "uid": "5531c60f-2025-48ce-ae79-1dc110f16000",
 "start_ts": 1668480139,
 "end_ts": 1669480139,
 "odds": [
   { "uid": "9991c60f-2025-48ce-ae79-1dc110f16990", "meta": "team A wins" },
   { "uid": "9991c60f-2025-48ce-ae79-1dc110f16991", "meta": "team A looses" },
   { "uid": "9991c60f-2025-48ce-ae79-1dc110f16992", "meta": "draw" },
 ],
 "status": 1,
 "meta": "winner of the A and B match",
 "iat": 1757700212,
 "exp": 1757700212
}

The values in the payload should be changed according to the data.

Update Market Transaction

The below transaction can be used to update a market stored in the blockchain.

Command

sged tx market update [ticket] --flags

Payload

The payload for the update-market transaction is as follows:

{
 "uid": "5531c60f-2025-48ce-ae79-1dc110f16000",
 "start_ts": 1668480139,
 "end_ts": 1669480139,
 "status": 1,
 "iat": 1757700212,
 "exp": 1757700212
}

The values in the payload should be changed according to the data.

Resolve Market Transaction

The below transaction can be used to resolve a market to the blockchain.

Command

 sged tx market resolve [ticket] --flags

Payload

The payload for the resolve-market transaction is as follows:

{
  "uid": "5531c60f-2025-48ce-ae79-1dc110f16000",
  "resolution_ts": 1867270827,
  "status": 4,
  "winner_odds_uids": [
    "9991c60f-2025-48ce-ae79-1dc110f16990"
  ],
  "iat": 1757700212,
  "exp": 1757700212
}

The values in the payload should be changed according to the data.

Update Market Transaction

The below transaction can be used to update a market to the blockchain.

Command

sged tx market update-market [ticket] --flags

Payload

The payload for the update-market transaction is as follows:

{
 "uid": "5531c60f-2025-48ce-ae79-1dc110f16000",
 "start_ts": 1668480139,
 "end_ts": 1669480139,
 "status": 1,
 "iat": 1757700212,
 "exp": 1757700212
}

The values in the payload should be changed according to the data.

Last updated