🧑House Wins
Wager
Payload: The payload for placing a bet is as follows: Please ensure to change the
kyc_id
with your bettor address, and update the timestamps. A JWT ticket should be created out of this payload for providing it in the transaction below.
Transaction: The transaction for placing a bet is as follows:
sged tx bet place-bet [uid] [amount] [ticket] --chain-id [chain-id] --from [signer-account-key]
Example:
sged tx bet place-bet 6631c60f-2025-48ce-ae79-1dc110f16123 1000000000 [ticket] --chain-id sge --from bettor
Verification: The above success or failure of the above transaction can be verified using the queries and the state table below.
Query the transaction hash:
sged q tx [tx-hash]
Expectation: Code is 0Query the list of bets
saaged q bet bets
Expectation: One bet should be placed.Query the balance of the bettor
saaged q bank balances sge1uffpdv3lg4v3gdwlt6pp0ty3fr7fyyau59hzmd
Resolve the market
Payload: The payload for resolving the above 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 resolving a market is as follows:
sged tx market resolve [ticket] --chain-id [chain-id] --from [signer-account-key]
Example:sged tx market resolve [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]
Conclusion:
The bettor has been rewarded with the payout from the house.
Last updated