Feat/flexible fee destination routing (#593)#696
Open
Chucks1093 wants to merge 2 commits intoJagadeeshftw:masterfrom
Open
Feat/flexible fee destination routing (#593)#696Chucks1093 wants to merge 2 commits intoJagadeeshftw:masterfrom
Chucks1093 wants to merge 2 commits intoJagadeeshftw:masterfrom
Conversation
- Expanded traits.rs: added PauseInterface and FeeInterface with full doc comments referencing Grainlify internal spec - BountyEscrowContract now formally implements all four traits (EscrowInterface, UpgradeInterface, PauseInterface, FeeInterface) - soroban/contracts/escrow: added local EscrowInterface + UpgradeInterface trait definitions and implementations; added get_balance and get_escrow_info to satisfy standard surface - grainlify-core: added local UpgradeInterface trait and impl for GrainlifyContract (feature-gated to match existing contract gate) - contracts/view-facade: implemented ViewFacade contract with register/deregister/list/get_contract for cross-contract discovery
|
@Chucks1093 is attempting to deploy a commit to the Jagadeesh B's projects Team on Vercel. A member of the Team first needs to authorize it. |
Owner
|
please resolve the conflicts |
Owner
|
Did you mind resolving the conflicts? @Chucks1093 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #593
Changes
Flexible fee routing model added to bounty escrow
FeeRoutingConfigwith:treasury_recipienttreasury_bpspartner_recipient(optional)partner_bpsDataKey::FeeRouting(u64)for per-bounty routing.New admin configuration entrypoints
set_fee_routing(bounty_id, treasury_recipient, treasury_bps, partner_recipient, partner_bps)clear_fee_routing(bounty_id)get_fee_routing(bounty_id)Deterministic routing + validation
treasury_bps >= 0partner_bps >= 0treasury_bps + partner_bps == 10_000partner_bps > 0requirespartner_recipientpartner_bps == 0requires nopartner_recipienttotal_fee * treasury_bps / 10_000(floor)total_fee - treasury_fee(remainder-safe, no drift)Fee routing integrated into payout paths
lock_fundsbatch_lock_fundsrelease_fundsbatch_release_fundspartial_releaserelease_with_capabilityclaimclaim_with_capabilityclaim_with_ticketBackward-compatible default behavior
FeeConfig.fee_recipientNew events for full accounting visibility
FeeRoutingUpdatedemitted when routing config changesFeeRoutedemitted on fee distribution with complete split detailsTesting
Added new test module:
contracts/bounty_escrow/contracts/escrow/src/test_fee_routing.rsNew coverage includes:
Validation run:
cargo test --lib test_fee_routing -- --nocapture✅cargo test --lib -- --nocapturein bounty escrow crate ✅ (519 passed)Notes
contracts/bounty_escrow/contracts/escrow