Problem
The examples/run_historical.sol file cannot be compiled due to 5 separate errors. Any developer trying to use this example as a starting point will be blocked immediately.
Steps to Reproduce
- Clone the solid-ml repository
- Attempt to compile
examples/run_historical.sol
- Compilation fails
Errors Found
- Wrong import path —
../lib/TensorLib.sol should be ../src/lib/TensorLib.sol
- Non-existent function call —
runHistoricalInference should be runInferenceOnPriceFeed (per src/interfaces/OGHistorical.sol)
- Undefined variable —
input_query on line 50 should be input (the local variable declared on line 38)
- Missing struct field —
HistoricalInputQuery requires candle_duration_in_mins but it is omitted in both struct constructions
- Undeclared state variables —
results and resultNumber are used but never declared
Additional Issues
- README.md examples have the same function name and struct field errors
- README.md struct assignments missing
memory keyword (TensorLib.Number prediction → TensorLib.Number memory prediction)
- README.md links missing
https:// protocol (hub.opengradient.ai → https://hub.opengradient.ai)
- NatSpec typo "OGInfernece" in
src/interfaces/OGInference.sol
- Copy-paste error in
src/interfaces/OGHistorical.sol NatSpec ("OGInference" → "OGHistorical")
- Redundant
uint32 >= 0 check in src/lib/TensorLib.sol wastes gas (unsigned integers are always >= 0)
Environment
- Solidity compiler: 0.8.20+
- Foundry/Hardhat: any version
Problem
The
examples/run_historical.solfile cannot be compiled due to 5 separate errors. Any developer trying to use this example as a starting point will be blocked immediately.Steps to Reproduce
examples/run_historical.solErrors Found
../lib/TensorLib.solshould be../src/lib/TensorLib.solrunHistoricalInferenceshould berunInferenceOnPriceFeed(persrc/interfaces/OGHistorical.sol)input_queryon line 50 should beinput(the local variable declared on line 38)HistoricalInputQueryrequirescandle_duration_in_minsbut it is omitted in both struct constructionsresultsandresultNumberare used but never declaredAdditional Issues
memorykeyword (TensorLib.Number prediction→TensorLib.Number memory prediction)https://protocol (hub.opengradient.ai→https://hub.opengradient.ai)src/interfaces/OGInference.solsrc/interfaces/OGHistorical.solNatSpec ("OGInference" → "OGHistorical")uint32 >= 0check insrc/lib/TensorLib.solwastes gas (unsigned integers are always >= 0)Environment