Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InfiniQuilt Game Backend Microservice #11

Open
8 tasks done
utgarda opened this issue Aug 7, 2023 · 0 comments
Open
8 tasks done

InfiniQuilt Game Backend Microservice #11

utgarda opened this issue Aug 7, 2023 · 0 comments
Assignees
Labels
backend Game Backend Microservice enhancement New feature or request

Comments

@utgarda
Copy link
Member

utgarda commented Aug 7, 2023

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.

@utgarda utgarda added enhancement New feature or request backend Game Backend Microservice labels Aug 7, 2023
@utgarda utgarda moved this to Todo in Superhack!-2023 Aug 7, 2023
@YaroslavSmrinov YaroslavSmrinov moved this from Todo to Done in Superhack!-2023 Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Game Backend Microservice enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

3 participants