GenVM Lint
Use this skill whenever intelligent-contracts/*.py changes or when contract ABI/storage behavior is relevant.
Contracts in this repo live in:
intelligent-contracts/IntelligentOracle.pyintelligent-contracts/IntelligentOracleFactory.py
Setup
The linter is expected to be available as genvm-lint. If it is missing:
python3 -m venv .venv
. .venv/bin/activate
python -m pip install genvm-linter
Required Workflow
Run lint before contract tests and before deployment:
genvm-lint check intelligent-contracts/IntelligentOracle.py
genvm-lint check intelligent-contracts/IntelligentOracleFactory.py
For all contracts:
genvm-lint check intelligent-contracts/*.py
Use JSON output when fixing multiple errors:
genvm-lint check intelligent-contracts/*.py --json
Useful Commands
Fast AST checks only:
genvm-lint lint intelligent-contracts/*.py
SDK semantic validation:
genvm-lint validate intelligent-contracts/*.py
Schema and ABI inspection:
genvm-lint schema intelligent-contracts/IntelligentOracle.py --json
genvm-lint schema intelligent-contracts/IntelligentOracleFactory.py --json
Pyright-backed type checking:
genvm-lint typecheck intelligent-contracts/*.py
What To Watch
- Keep storage fields as class-level type annotations.
- Use GenLayer storage types such as
DynArrayandTreeMap; do not persist Pythonlistordict. - Preserve the constructor shape used by
scripts/deploy.tsandsrc/app/api/bridge/deploy-intelligent-oracle/route.ts. - Preserve public method names used by the UI:
get_contract_addresses,create_new_prediction_market,get_dict,get_status, andresolve. - Treat linter failures as blockers for deploy unless the user explicitly asks for exploratory work.