-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
backendGame Backend MicroserviceGame Backend MicroserviceenhancementNew feature or requestNew feature or request
Description
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
moveResultwith themoveIdextracted from the event. - Get the
resultfrom 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
IGamecontract 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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
backendGame Backend MicroserviceGame Backend MicroserviceenhancementNew feature or requestNew feature or request
Type
Projects
Status
Done