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 |
Add
Bytes32ToBytes32MapinEnumerableMap.sol.PR Checklist