0

Is the below mapping structure a legit way to create a restricted mapping, or is the latter best practice?

mapping(address => SomeStruct)[5] private structs;

and

mapping(address => mapping(uint256 => SomeStruct)) private structs;
  • 4
    I would basically answer "it depends on your needs" – Lauri Peltonen Sep 3 '20 at 17:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.