Summary
Allow payers to include an optional tip amount on top of the invoice amount when calling pay().
Motivation
Freelancers and service providers often receive gratuities. Having tip support on-chain makes it transparent and eliminates the need for a separate transfer.
Proposed Change
- Add optional
tip: Option<i128> param to pay()
- Transfer tip separately to a configurable tip recipient (creator by default)
- Emit a
tip_received event with the tip amount
- Store tips in the
Payment struct (field already exists as tip: i128)
Acceptance Criteria
Labels
enhancement, good first issue
Summary
Allow payers to include an optional tip amount on top of the invoice amount when calling
pay().Motivation
Freelancers and service providers often receive gratuities. Having tip support on-chain makes it transparent and eliminates the need for a separate transfer.
Proposed Change
tip: Option<i128>param topay()tip_receivedevent with the tip amountPaymentstruct (field already exists astip: i128)Acceptance Criteria
Labels
enhancement, good first issue