1

If I have a mapping that lets users store strings in a mapping ( by index). How many strings could the contract hold? Not worried about gas this will be on an L2

1 Answer 1

0

To answer your question practically, the answer is "more than you need to store"

To really answer, the EVM's storage slots work on 256 bit addressing. Meaning there are 2^256 slots per contract you can use. Now, with a mapping, you're going to run into collisions on key hashes long before you run out of storage slots, but again, that wont happen until there are far more entries than you will ever enter

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.