Add test snapshots for premium payment scenarios and gas benchmarks#53
Merged
Baskarayelu merged 1 commit intoRemitwise-Org:mainfrom Jan 30, 2026
Merged
Conversation
- Created test snapshots for paying premiums on inactive and nonexistent policies, capturing expected failures and error handling. - Added a successful payment test snapshot for active policies, ensuring correct premium processing. - Implemented gas benchmarks for insurance and remittance split contracts, measuring performance under worst-case scenarios. - Optimized the retrieval of savings goals by iterating directly over stored goals instead of using an ID range.
Contributor
Author
|
@Baskarayelu review the code and remember to allocate point. thank you |
Contributor
Author
|
@1nonlypiece review my code and also allocate compliment point to it. thank you |
Contributor
Author
|
@Baskarayelu thank you so much... Can you help me with compliments please 🥺 |
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 #49
This pull request introduces significant improvements to gas efficiency and benchmarking for the
bill_payments,insurance, andfamily_walletcontracts. The main changes focus on optimizing how collections are iterated (eliminating unnecessary scans and gap handling), adding deterministic gas benchmark tests, and clarifying documentation for gas measurement methodology.Gas Efficiency Improvements:
bill_paymentsandinsurancecontracts to use direct map iteration (for (_, item) in map.iter()) instead of scanning by index, eliminating the need to handle gaps and improving performance. [1] [2] [3] [4] [5] [6]Gas Benchmarking:
bill_paymentsandfamily_walletcontracts, providing worst-case scenario measurements and printing CPU/memory usage for key methods. [1] [2]README.mdto document the gas benchmarking methodology and provide instructions for running the new benchmarks.Family Wallet Multi-Sig Improvements:
family_walletto improve role checking logic and reduce redundant lookups, introducing theis_owner_or_admin_in_membershelper for clarity and efficiency. [1] [2] [3]Testing: