π Description
src/starknet/abi.ts bundles a static ABI used to decode on-chain events and calls. If the deployed contract is upgraded and the bundled ABI drifts, decoding fails or silently mis-decodes fields β there's currently no startup check to catch this early.
π§© Requirements and context
- On boot, fetch the deployed contract's class hash/ABI and compare a fingerprint against the bundled ABI.
- Fail startup loudly (or log a prominent warning, configurable) on mismatch rather than degrading silently later.
π οΈ Suggested execution
- Add a
verifyAbiCompatibility() helper in src/starknet/abi.ts.
- Call it during app startup in
src/index.ts, gated by an env flag for environments without RPC access.
- Add a test with a mocked mismatched class hash.
β
Acceptance criteria
π Security notes
A silently mis-decoded event could misrepresent payment amounts in the API β treat this as a data-integrity control, not just a nicety.
π Guidelines
- Minimum 95% test coverage
- Clear documentation
- Timeframe: 96 hours
π Description
src/starknet/abi.tsbundles a static ABI used to decode on-chain events and calls. If the deployed contract is upgraded and the bundled ABI drifts, decoding fails or silently mis-decodes fields β there's currently no startup check to catch this early.π§© Requirements and context
π οΈ Suggested execution
verifyAbiCompatibility()helper insrc/starknet/abi.ts.src/index.ts, gated by an env flag for environments without RPC access.β Acceptance criteria
π Security notes
A silently mis-decoded event could misrepresent payment amounts in the API β treat this as a data-integrity control, not just a nicety.
π Guidelines