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.pywith a propergltest-based test that:- Uses
get_contract_factoryandfactory.deploy()to deploy the contract through the GenLayer pipeline. - Calls
place_betandresolve_betvia the transaction runtime (exercising@gl.public.writedecorators and GenLayer storage). - Uses
tx_execution_succeededto assert that transactions complete without reverting. - Verifies on-chain state via
get_pointsor equivalent view methods.
- Uses
Prerequisites
- Docker 26+ and Node.js 18+ installed.
- GenLayer Studio running locally (or via the hosted version at studio.genlayer.com).
genlayerCLI installed vianpm install -g genlayer.
References
- PR: https://github.com/genlayerlabs/genlayer-project-boilerplate/pull/37
- Review comment: https://github.com/genlayerlabs/genlayer-project-boilerplate/pull/37#discussion_r3013033643
- Requested by: @linnbenton
Source: genlayerlabs/genlayer-project-boilerplate