Description
Problem
Sorokit currently lacks a consistent way to model dependencies between Soroban contracts. Applications integrating multiple contracts must manually track required contract versions and can encounter runtime failures when a dependency changes or becomes incompatible.
Solution
Introduce a contract dependency resolver that builds a dependency graph from contract metadata, tracks required versions, and validates compatibility before a contract is used. The resolver should detect conflicting version requirements and expose enough context for callers to understand which dependency caused the conflict.
Support cached dependency metadata and explicit refresh so applications can avoid unnecessary network requests while still detecting upgrades.
Acceptance Criteria
Note for Contributors
Review the existing Soroban contract metadata and client patterns before introducing new abstractions. Keep dependency resolution separate from contract invocation so existing callers remain backward compatible. Include tests for both successful resolution and failure paths.
Description
Problem
Sorokit currently lacks a consistent way to model dependencies between Soroban contracts. Applications integrating multiple contracts must manually track required contract versions and can encounter runtime failures when a dependency changes or becomes incompatible.
Solution
Introduce a contract dependency resolver that builds a dependency graph from contract metadata, tracks required versions, and validates compatibility before a contract is used. The resolver should detect conflicting version requirements and expose enough context for callers to understand which dependency caused the conflict.
Support cached dependency metadata and explicit refresh so applications can avoid unnecessary network requests while still detecting upgrades.
Acceptance Criteria
src/soroban/index.tsandsrc/index.tsNote for Contributors
Review the existing Soroban contract metadata and client patterns before introducing new abstractions. Keep dependency resolution separate from contract invocation so existing callers remain backward compatible. Include tests for both successful resolution and failure paths.