1

I'm wondering what the consequences of using a nested mapping are. If I have a mapping that is 4 levels deep, for example:

mapping(address => mapping(address => mapping(uint256 => uint256))) validTokens;

Are there significant performance costs associated with a mapping that deep, which I could avoid by using an array of structs and iterating through them?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.