Skip to content

feat(#455): add FxOracle integration for cross-currency revenue reporting#511

Open
chizzy192 wants to merge 1 commit into
RevoraOrg:masterfrom
chizzy192:feat/fx-oracle-integration
Open

feat(#455): add FxOracle integration for cross-currency revenue reporting#511
chizzy192 wants to merge 1 commit into
RevoraOrg:masterfrom
chizzy192:feat/fx-oracle-integration

Conversation

@chizzy192

Copy link
Copy Markdown

closes #455

  • Define FxOracle trait with #[contractclient] for cross-contract oracle calls
  • Add FxOracleConfig struct (oracle address, from/to symbols, max_age_secs)
  • Add set_fx_oracle / get_fx_oracle / convert_report_amount_if_needed methods
  • Integrate FX conversion into report_revenue pipeline
  • Add OracleNotConfigured (51) and OracleQuoteStale (52) error variants

Fixes pre-existing compilation issues:

  • Move Multisig* and FrozenOffering variants from DataKey to DataKey2 to fix XDR union variant limit (<=50) exceeded on DataKey enum
  • Add missing PauseState enum definition (#[contracttype])
  • Add missing StaleConcentrationData error variant (54)
  • Fix duplicate discriminant: PeriodAlreadyClosed changed from 48 to 53
  • Fix test_compute_share_invariants.rs compile-time overflow
  • Fix test_claim_transfer_fail.rs sibling offering test

Tests: 84 passed, 0 failed

…nue reporting

- Define FxOracle trait with #[contractclient] for cross-contract oracle calls
- Add FxOracleConfig struct (oracle address, from/to symbols, max_age_secs)
- Add set_fx_oracle / get_fx_oracle / convert_report_amount_if_needed methods
- Integrate FX conversion into report_revenue pipeline
- Add OracleNotConfigured (51) and OracleQuoteStale (52) error variants

Fixes pre-existing compilation issues:
- Move Multisig* and FrozenOffering variants from DataKey to DataKey2 to fix
  XDR union variant limit (<=50) exceeded on DataKey enum
- Add missing PauseState enum definition (#[contracttype])
- Add missing StaleConcentrationData error variant (54)
- Fix duplicate discriminant: PeriodAlreadyClosed changed from 48 to 53
- Fix test_compute_share_invariants.rs compile-time overflow
- Fix test_claim_transfer_fail.rs sibling offering test

Tests: 84 passed, 0 failed
@drips-wave

drips-wave Bot commented Jun 30, 2026

Copy link
Copy Markdown

@chizzy192 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

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.

Add oracle integration trait for FX conversion of cross-currency revenue reports

1 participant