Skip to content

Comments

feat: implement cross-contract orchestrator for automated remittance …#114

Open
Awointa wants to merge 3 commits intoRemitwise-Org:mainfrom
Awointa:main
Open

feat: implement cross-contract orchestrator for automated remittance …#114
Awointa wants to merge 3 commits intoRemitwise-Org:mainfrom
Awointa:main

Conversation

@Awointa
Copy link

@Awointa Awointa commented Feb 21, 2026

feat: Cross-Contract Orchestrator Implementation (#7)

Introduces a dedicated orchestrator contract that coordinates atomic remittance allocation across savings, bill payment, and insurance contracts — with spending limit and permission enforcement delegated to the family wallet contract.


Key Features

  • Atomic multi-contract operations — full automatic rollback on any failure mid-flow
  • Permission & spending limit enforcement — all operations gated through the family wallet contract
  • Individual operation support — savings deposits, bill payments, and insurance premiums can each be triggered independently
  • Audit logging & execution statistics — every orchestrated flow is logged for traceability

Changes

Orchestrator Contract

  • Atomic multi-contract remittance flow with automatic rollback on failure
  • Audit logging and execution statistics on every flow

family_walletcheck_spending_limit (previously blocking)

  • Owner/Admin: unlimited spending
  • Members: limited by configured spending threshold
  • Non-members: denied
  • Fully integrated with orchestrator cross-contract calls

Documentation

  • Updated to reflect orchestrator contract architecture
  • check_spending_limit behaviour and permission tiers documented
  • Cross-contract integration flow documented for downstream contributors

Gas Cost

~22,000 gas for a complete end-to-end remittance flow


Testing

  • 13 orchestrator integration tests passing
  • 24 family_wallet tests passing
  • 133/133 workspace tests passing
cargo test --package orchestrator

Checklist

  • Orchestrator contract implemented
  • Atomic rollback on failure
  • Audit logging and execution statistics
  • check_spending_limit added to family_wallet contract
  • 133/133 tests passing
  • Documentation updated

Closes #7

…allocation

- Add orchestrator contract coordinating family wallet, remittance split, savings, bills, and insurance
- Implement atomic multi-contract operations with automatic rollback on failure
- Add permission checking and spending limit enforcement via family wallet
- Create comprehensive integration test suite with 13 tests covering success and failure scenarios
- Include audit logging, execution statistics, and event emission
- Add detailed documentation and README with usage examples and gas estimates
@Baskarayelu
Copy link
Contributor

@Awointa Please fix the pipeline & resolve the conflicts

…gration

Implements spending limit validation function required by cross-contract orchestrator. Owners/admins have unlimited spending, members are limited by configured threshold.
@Awointa
Copy link
Author

Awointa commented Feb 22, 2026

Done

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 Cross-Contract Integration

2 participants