Skip to content

Looping through big arrays can cause failure#

Low Risk

There is a lot of looping through arrays in this code base. Since there are no bounds to sizes of these arrays, they can grow indefinitely. This can cause the functions that are looping through them to become too expensive or even fail.

Functions that could break if arrays grow too large:

Customize.sol

  • setTokenRefs

Minting.sol

  • processMintPass
  • handleTraits
  • getPrice

URI.sol

  • getRefUri
  • getStaticTraits
  • getSelectedTraits
  • getRandomTraits
  • getTraitsAndParams

Recommendation#

Do extensive tests on all the functions that are looping through arrays and test the limits.