Add gltest-based integration test for resolve_bet

Author: coderabbitai[bot]Created Mar 31, 2026Updated May 23, 2026

Summary

This issue tracks adding a proper gltest-based integration test for the resolve_bet contract method in the test/ directory, as a follow-up to PR #37.

Background

PR #37 (https://github.com/genlayerlabs/genlayer-project-boilerplate/pull/37) introduced validation and error-handling improvements to resolve_bet. As an interim measure, unit tests and an integration-style test that directly instantiates FootballBets() were added. However, these tests only exercise local fallback stubs and do not go through the real GenLayer storage, decorators, or transaction runtime.

Per the project's coding guidelines, contract tests should be written as Python integration tests run via the gltest command.

What needs to be done

  • Replace or supplement the current test/test_integration_football_bet.py with a proper gltest-based test that:
    • Uses get_contract_factory and factory.deploy() to deploy the contract through the GenLayer pipeline.
    • Calls place_bet and resolve_bet via the transaction runtime (exercising @gl.public.write decorators and GenLayer storage).
    • Uses tx_execution_succeeded to assert that transactions complete without reverting.
    • Verifies on-chain state via get_points or equivalent view methods.

Prerequisites

  • Docker 26+ and Node.js 18+ installed.
  • GenLayer Studio running locally (or via the hosted version at studio.genlayer.com).
  • genlayer CLI installed via npm install -g genlayer.

References

Source: genlayerlabs/genlayer-project-boilerplate