Skip to content

feat: add cross-contract upgrade compatibility checks - #110

Open
afeezorobsco-cyber wants to merge 2 commits into
SPulse-Org:mainfrom
afeezorobsco-cyber:feat/contract-upgrade-coordination
Open

feat: add cross-contract upgrade compatibility checks#110
afeezorobsco-cyber wants to merge 2 commits into
SPulse-Org:mainfrom
afeezorobsco-cyber:feat/contract-upgrade-coordination

Conversation

@afeezorobsco-cyber

Copy link
Copy Markdown

##close #96

Summary

Adds explicit cross-contract interface/version compatibility checks to prevent unilateral contract upgrades from silently breaking the prediction market, referral, leaderboard, and token call chain.

What changed

  • Added contract/interface version metadata and read access where required.
  • Added compatibility validation for cross-contract calls.
  • Added typed failures for incompatible or missing interface versions.
  • Preserved existing business-function ABI signatures.
  • Added tests for compatible, incompatible, and uninitialized version states.
  • Documented the upgrade coordination/versioning model and deployment implications.

Protected dependencies

  • prediction_marketreferral_registry
  • prediction_marketleaderboard
  • referral_registryleaderboard
  • leaderboardpulse_token

Validation

  • cargo fmt --all -- --check
  • cargo clippy --workspace --all-targets -- -D warnings
  • cargo test --workspace

Upgrade safety

Contract upgrades must preserve the declared interface compatibility expected by their callers. An incompatible target is rejected before the dependent cross-contract operation proceeds.

Closes #[ISSUE_NUMBER]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[CRITICAL] No upgrade coordination between contracts — independent upgrades break cross-contract ABI

1 participant