current position:Home>Using for loop in smart contract may consume gas, but is there a better one

Using for loop in smart contract may consume gas, but is there a better one

2022-02-03 23:13:27 Q & A of Denglian community

When users recharge, I will put the user address into a address[] in , The backstage pays interest to these addresses at a fixed time , In this way, you have to traverse all the addresses , I think it's more convenient to use arrays , Is there any better way , Thank you very much ?




Take the answer 1:

Arrays can




copyright notice
author[Q & A of Denglian community],Please bring the original link to reprint, thank you.
https://en.netfreeman.com/2022/02/202202032313242407.html

Random recommended