-
Notifications
You must be signed in to change notification settings - Fork 11.8k
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
Add Utils Struct EnumerableMap Bytes32ToUintMap #3416
Add Utils Struct EnumerableMap Bytes32ToUintMap #3416
Conversation
Hello @arturictus Can you tell us more about your usecase for a bytes32 → uint256 map? |
hello @Amxx,
I use the map as
This allows me:
I can imagine other use cases:
Happy to hear your thoughts |
Thanks for the details. In your case, I would argue that the key could be a uint corresponding to the day's "timestamp". I would consider that safer than We also have #3338. We'll discuss new mapping types soon |
Hi @Amxx,
The problem with that is that a day has
Still considering to hash it unless I need to get the original key. |
Could you please add a changelog entry? |
Yes!, done :) |
Adding Bytes32ToUintMap in struct helpers.
PR Checklist