Repository navigation
fix and docs: resolve issues #63, #69, #68, #66 - #214
Merged
Merged
Conversation
|
@Rampop01 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! 🚀 |
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.
Summary
This pull request addresses and resolves all 4 assigned issues:
__constructoraccepts any admin and token without validationDetailed Changes
1. Limits Quick Reference Table (Closes #63)
Limitsquick reference table todocs/CONTRACT.mdnear the top of the document.10_000,BPS_DENOM), maximum recipient count (20,MAX_RECIPIENTS), maximum message length (280bytes,MAX_MESSAGE_LEN), maximum batch tips (10,MAX_BATCH_TIPS), and maximum jar ID length (33bytes,MAX_JAR_SLUG_LEN + 1).SplitOutOfRange/SplitSumNot100Pct,TooManyRecipients,MessageTooLong,BatchTooLarge,InvalidJarId).2. Constructor Argument Validation (Closes #69)
__constructorrejects anadminandtokenthat are the same address (admin == token), preventing permanent deployment misconfigurations that would require jar redeployment and migration.constructor_rejects_admin_and_token_with_same_addresscovering the rejected case.3. Checked Arithmetic in Minimum-Share & Overflow Guard (Closes #68)
checked_mul) with consistent error handling (AmountOverflow).compute_shares_overflow_fails_with_amount_overflowverifying that an amount overflowingi128(such asi128::MAX) fails with typedError::AmountOverflowinstead of an untyped WASM trap.4. Self-Recipient Share Accounting (Closes #66)
tipper_who_is_non_final_recipient_keeps_own_sharecovering a tipper holding a non-final share (3000 bps) alongside another recipient (7000 bps) when tipping 100, ensuring only 70 leaves the tipper and 30 remains with them.Closes #63
Closes #69
Closes #68
Closes #66