Don't loop over an array without an index
Utilizing encrypted indexes to select an element from an array without disclosing it is inefficient. This approach requires looping over all indexes and comparing for equality secretly, which significantly increases gas costs and should be avoided whenever possible.
Avoid
Do : You should aim for clear indexing when accessing secret arrays.
Last updated