Skip to content

Three-Way Split & Reseller Revenue Sharing (Soroban SDK Compliance)#158

Merged
elizabetheonoja-art merged 2 commits intoUtility-Drip:mainfrom
GazzyLee:feature/reseller-revenue-sharing
Apr 3, 2026
Merged

Three-Way Split & Reseller Revenue Sharing (Soroban SDK Compliance)#158
elizabetheonoja-art merged 2 commits intoUtility-Drip:mainfrom
GazzyLee:feature/reseller-revenue-sharing

Conversation

@GazzyLee
Copy link
Copy Markdown

Summary:

  • Implements a three-way split for utility revenue: Main Provider, Reseller, and Platform.
  • Adds support for neighborhood "Electricity Resellers" to take a configurable cut of managed drip.
  • Each party has independent withdrawal counters for accurate, auditable revenue sharing.
  • Refactors contract to fully comply with Soroban SDK constraints (no f32, correct event topics, struct completeness).
  • Fixes all previous build errors, duplicate definitions, and type mismatches.
  • Cleans up contract and test code for maintainability.

Key Changes:

  • New data models: ResellerConfig, ResellerEarnings, ResellerWithdrawn.
  • Extended Meter struct and storage keys for reseller logic.
  • New/updated contract methods: assign_reseller, remove_reseller, reseller_withdraw, get_reseller_earnings, get_reseller_config.
  • All struct initializers and event topics updated for Soroban SDK.
  • Removed unsupported summary string methods and fixed all integer/string conversions.
  • Duplicate and deprecated code removed.
  • All tests and logic now build and pass under Soroban SDK.

How to Review:

  • Focus on new/updated contract logic for revenue sharing and withdrawal.
  • Review Soroban SDK compliance changes (types, events, struct fields).
  • See test coverage for reseller assignment, withdrawal, and error cases.

** Closes #125

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 30, 2026

@GazzyLee 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

@GazzyLee GazzyLee force-pushed the feature/reseller-revenue-sharing branch from 99df073 to 1900c24 Compare March 30, 2026 14:30
@elizabetheonoja-art elizabetheonoja-art merged commit 68b67bc into Utility-Drip:main Apr 3, 2026
0 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.

93. Implement Sub-Drip_Revenue_Sharing_for_Resellers

3 participants