This document outlines the API compatibility protocol and verification suite for backend adapters integrating with the apexchainx_calculator Soroban contract.
Backend services (apexchainx-be) require stable, non-breaking contract method signatures and event schemas. The Standalone API Compatibility Verifier ensures that:
- Public contract entry points (
calculate_sla,get_version_info,get_config,set_config,pause,unpause) preserve their argument types and return schemas. - Version negotiation protocols return expected semantic version tags.
- Event topic signatures (
"sla_calc","config_set","pause") maintain backwards compatibility.
| Function | Parameters | Return Type | Access Level |
|---|---|---|---|
get_version_info |
env: Env |
VersionInfo |
Public |
calculate_sla |
env: Env, severity: u32, mttr: u32 |
SlaResult |
Public |
get_config |
env: Env |
Config |
Public |
set_config |
env: Env, admin: Address, config: Config |
() |
Admin-Gated |
Run the standalone compatibility verifier test suite:
cargo test --package apexchainx_calculator --lib api_compatibility_testsAny breaking signature change will fail compilation or trigger assertion errors before PR merge.