Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SnapshotItem total, public query methods, and safe math #802

Merged
merged 3 commits into from Sep 19, 2022

Conversation

ismellike
Copy link
Contributor

cw4-group should be able to make use of the SnapshotMap's weights by also storing a snapshot of the total.
Here's a relevant example: https://docs.daodao.zone/docs/voting-config

Query methods should be public to allow importing.

Math should use checked arithmetic for safety.

Copy link
Member

@ueco-jb ueco-jb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 for introducing safe math here

Rather minor thing, but you didn't test at_height variant. Please add some.

@ueco-jb
Copy link
Member

ueco-jb commented Sep 19, 2022

Nice, extensive tests 👍 Merging

@ueco-jb ueco-jb merged commit ad0fe7b into CosmWasm:main Sep 19, 2022
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.

None yet

2 participants