Hello guys, while working with openzeppelin EnumerableSet, I wanted to clear all stored data on the array but if i loop through to clear all data, one or two data will remain in the array.

attached is a screenshot of what i am saying will appreciate any help.

Nov 7, 2022, 8:46 PM
Nov 7, 2022, 8:47 PM
Everything seems to be in order. I think the major thing might be the pre increment in clear all function. I starts evaluating at 1 rather than 0...hence only two gets deleted.

Try switching to i++ in the clear all function rather than ++i
Nov 7, 2022, 10:15 PM

© 2024 Draquery.com All rights reserved.