Skip to content

fix: maintain consistent i128 usage for vote weight summation#369

Merged
hman38705 merged 1 commit intosolutions-plug:mainfrom
CHEF-SAVY:fix/issue-61-type-safety
Mar 28, 2026
Merged

fix: maintain consistent i128 usage for vote weight summation#369
hman38705 merged 1 commit intosolutions-plug:mainfrom
CHEF-SAVY:fix/issue-61-type-safety

Conversation

@CHEF-SAVY
Copy link
Copy Markdown
Contributor

close #167

Explicitly annotates the tally binding as i128 in calculate_voting_outcome (resolution.rs) to ensure strict type alignment between voting::get_tally's return value and the total_votes/max_votes accumulators. Prevents any
implicit type inference ambiguity when summing large vote weights.

Changes: contracts/predict-iq/src/modules/resolution.rs — one-line type annotation on tally binding in the outcome loop.

@drips-wave
Copy link
Copy Markdown

drips-wave bot commented Mar 28, 2026

@CHEF-SAVY 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

@hman38705 hman38705 merged commit 90be195 into solutions-plug:main Mar 28, 2026
2 of 13 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.

Tally Counter Type Inconsistency in resolution.rs

2 participants