Skip to content

implement contract address configuration integrity checks in reporting#445

Merged
Baskarayelu merged 2 commits intoRemitwise-Org:mainfrom
Abolax123:feature/reporting-address-config-integrity
Apr 1, 2026
Merged

implement contract address configuration integrity checks in reporting#445
Baskarayelu merged 2 commits intoRemitwise-Org:mainfrom
Abolax123:feature/reporting-address-config-integrity

Conversation

@Abolax123
Copy link
Copy Markdown

Closes #309

Summary

  • Enforce integrity checks for the reporting dependency contract address configuration (reject self-reference and any duplicated slot).
  • Add public verify_dependency_address_set helper to preflight configurations without auth/storage writes.
  • Migrate reporting errors to #[contracterror] so try_* client calls decode contract errors correctly.

Security notes

  • Validation is constant time and purely structural (5 fixed slots).
  • Prevents ambiguous routing / accidental self-loops (any dependency address equal to Env::current_contract_address() is rejected).
  • Prevents silent role aliasing where two logical dependencies point at the same contract ID (duplicates rejected).
  • Soroban/Stellar contract IDs do not have an EVM-style “zero address”; malformed inputs at this layer are primarily structural issues (duplicates/self-reference). Correctness of which deployments are referenced remains an off-chain governance/deployment concern.

Test plan

  • cargo test -p reporting --all-features

@Abolax123 Abolax123 changed the title mplement contract address configuration integrity checks in reporting implement contract address configuration integrity checks in reporting Mar 29, 2026
@Baskarayelu Baskarayelu merged commit bb8e19b into Remitwise-Org:main Apr 1, 2026
2 of 3 checks passed
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.

Implement contract address configuration integrity checks in reporting

3 participants