You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context:
The Game Backend serves just one game instance and communicates with the game through the IGame interface. It will be implemented as a microservice that listens to the blockchain using the web3py library and reacts to events by sending transactions.
Requirements:
Initialization:
Accept RPC URL and contract address as command-line arguments.
Event Listening:
Listen to contract events from the specified contract address.
Process each received event and extract necessary information such as moveId.
Log each event.
Contract Interaction:
For each event processed, call the contract function moveResult with the moveId extracted from the event.
Get the result from the game logic based on the received event.
Send a transaction with the result.
Log each transaction sent.
Implementation Details:
Language: Python
Libraries: web3py
Integration: Interact with the IGame contract as defined on the blockchain.
Notes:
Make sure to align the logic with the specifications of the IGame interface.
Proper error handling and validation should be considered even at this early stage.
Since this is the first implementation stage, we will be focusing on essential functionalities; additional features and refinements may follow in subsequent tasks.
Please refer to the initial design documents and interface definitions for detailed specifications. Feel free to ask questions and discuss implementation details here.
The text was updated successfully, but these errors were encountered:
Context:
The Game Backend serves just one game instance and communicates with the game through the
IGame
interface. It will be implemented as a microservice that listens to the blockchain using the web3py library and reacts to events by sending transactions.Requirements:
Initialization:
Event Listening:
moveId
.Contract Interaction:
moveResult
with themoveId
extracted from the event.result
from the game logic based on the received event.Implementation Details:
IGame
contract as defined on the blockchain.Notes:
Please refer to the initial design documents and interface definitions for detailed specifications. Feel free to ask questions and discuss implementation details here.
The text was updated successfully, but these errors were encountered: