Sign & Submit score
Connect to wallet
Connect to the wallet by clicking the "Connect to wallet" button:
Then select the user account. If you don't have a dedicated user account, go to the Presentation page.
Once connected, the account address and a unique game session id are displayed:
If the Thanos wallet is not installed (as a browser extension), then the "Install Thanos" button is displayed.
Click the "Compute & sign score" button.
The Orcale recieves the list played actions (direction keys) and the session id.
On the Oracle side, the session id is associated to the initial board configuration. With the list of actions, the oracle is able to compute the score, sign it with its private key and send it back to the DApp's user interface.
When received, the signed score value and actions is displayed abve the "Submit" button:
Click the submit button to send it to the smart contract. The transaction information pops up:
Note that 2 arguments are passed to the submit entry point:
- encoded data
- signed data (by the Oracle)
The smart contract checks that the signed data is the encoded data signed by the Oracle.