Skip to main content
3 events
when toggle format what by license comment
Feb 9, 2023 at 12:32 comment added Nal Luksic If that is your goal I agree with the first part, but you should be careful with pushing elements to an array. What will happen is that at some point you will have an arbitrarily large array (since you won't really delete any elements) which causes extremely high gas costs and at some point transaction reversion.
Feb 9, 2023 at 11:57 comment added Alvin Sartor deposited tokens will always be associated to the contract (not the user), this is why 1 array of batches would be enough (the only "user" is the contract). Also switching before popping isn't a very good piece of advice. As the elements are pushed in an orderly fashion, I only need to loop the array until I find a date greater than today (then I am sure that all the following batches are still locked). If I change the positions, this assumption won't be true anymore.
Feb 8, 2023 at 17:10 history answered Nal Luksic CC BY-SA 4.0