Is this a more elegant way to do an aggressive multi-send?

by praneeth mendu   Last Updated November 08, 2018 19:28 PM

I understand there are many approaches to do multisend but for me timing is a priority and I do not want to stop the transaction if a address.send fails.

   function multiSend() internal isAdmin {
     for (uint initial = iter; iter < initial + 100 && iter < sendList.length; iter++) {
         if(!sendList[iter].send(valueMap[sendList[iter]])) {}

addresses in the sendLinst need to be sent ether mapped to them in valueMap.

iter is set to 0 initially, so the first time above function is called the first 100 (or length of array) addresses will be sent their mapped amounts. The nest time above function is called the next 100 addressed are paid and so on.

changes to sendList and valueMap are locked at this point and iter is not manipulated anywhere else. The function still does its job when the address reverts or runs out of gas.

this it what that looks like

enter image description here

I know I have ignored a bunch of security recommendations with this but are there any obvious security concerns with this approach ?

Related Questions

Web3j: Set ether value for a function call

Updated May 06, 2018 07:28 AM

How to call transfer function from ETH system?

Updated September 17, 2017 04:28 AM

Transfer a fixed value of ether

Updated December 11, 2017 18:28 PM

can't get transfer to execute

Updated October 08, 2017 12:28 PM