This section specifies the steps to understand the complete life cycle of a bet. Please follow the below steps to implement wager and bet settlement if you want to run it on your local machine (not on the SGE mainnet). This includes the following steps:
Query the initial state of the system
Add a market
Wager on the market
Resolve the market
Settle the bet
Query the OVM public keys
Command: sged q ovm pubkeys
Expectation- At least three public keys should be present
Query the balance of the Bettor (Please ensure to change the bettor address to your specific address)
sged q bank balances <address of the bettor>
Query the list of markets
sged q market markets
Query the list of bets
sged q bet bets
Payload: The payload for adding a market is as follows: A JWT ticket should be created out of this payload for providing it in the transaction below. The timestamps need to be updated accordingly.
Transaction: The transaction for adding a market is as follows:
sged tx market add [ticket] --chain-id sge --from oracle
Verification: The above success or failure of the above transaction can be verified using the query below.
Query the transaction hash:
sged q tx [tx-hash]
Payload: The payload for participation in a market is as follows:
Transaction: To participate in a market, a Deposit command is needed
sged tx house deposit "5531c60f-2025-48ce-ae79-1dc110f16001" 1000000usge [ticket] --chain-id sge --from deposior
Verification: The above success or failure of the above transaction can be verified using the query below.
Query the transaction hash:
sged q tx [tx-hash]