-
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 bytes32 to bytes32 enumerable map #3192
Add bytes32 to bytes32 enumerable map #3192
Conversation
Hi @Amxx. Currently, map supports for uint256=>address and address=>uint256. It doesn't support bytes32=>bytes32 to let user customize. I think that SafeCast should work with casting uint256 or bytes32 to uintX or bytesX. |
Thank you @wiasliaw. This type is kind of already present as the @Amxx As for support for other types, I'm not really sure to be honest. I don't really like that we have all of these variations for different types. I don't trust the compiler to efficiently remove the casts and inline functions. I was in fact considering that we can only have a single type using bytes32 and let users cast to whatever type they need. This is what we did with the Deque type essentially. |
@frangio I think that expose through a new struct will have more readability. |
Yeah possibly. In that case I'd rather we renamed the current |
I'd be ok to do that, but we'll also need to change |
I think we got the result of implementation. I will work on this PR. |
I meant |
I had done with the PR. Plz review. TKS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, Thank you !
Add
Bytes32ToBytes32Map
inEnumerableMap.sol
.PR Checklist