12

And if so, what is it?

Also, would it differ by dynamic and static arrays?

My initial guess is that:

  • a statically-declared array has a maximum number of slots equal to the largest uint, as in array[max_uint256].
  • a dynamically-declared array has no "practical" limit to its size (but perhaps a huge theoretical one: see link at bottom)

Possibly related

10

There are no limits in specification, so arrays may grow up to 2^256-1 elements.

3
  • 1
    It’s worth noting that even if such a large array could exist, traversing it would fail due to was constraints. – pabloruiz55 Dec 12 '17 at 1:13
  • 1
    @pabloruiz55, as in due to gas constraints ? – Andy B. Jul 16 '18 at 17:44
  • 1
    Yes, I meant GAS constraints – pabloruiz55 Jul 17 '18 at 1:38

Your Answer

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

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