1

This question already has an answer here:

How is this possible? Lets say i want to send 0.05 ether to 100 accounts and don't want to create one and one transactions at a time.

Is there a way to input a list of wallets that you want to send to and it does the rest?

Tried searching for a program that does this, but with no luck..

Can someone help me? Thank you! :)

marked as duplicate by Ismael, Richard Horrocks, Achala Dissanayake, flygoing, ivicaa Feb 26 '18 at 5:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

1

You could write a smart contract for it. You would give a list of addresses to it and it'd distribute the given eth to those addresses. Of course this means you'd also have to pay for the execution of the contract.

Something like this:

function distribute(address[100] addresses) payable public {
    uint oneShare = msg.value / addresses.length;
    for (uint i = 0; i < addresses.length; i++) {
        addresses[i].transfer(oneShare);
    }
}

Please note that this code is not very good (for example the array size is now static and problems with decimal amounts), but you'll get the point.

It's also bad practice to transfer money from a contract - it would be better and safer to allow withdrawal for the address.

  • Alright thank you, so smart contracts are the way to go. Thought there would be a easier way. Would i need to create my own smart contract from scratch or are there some that i can just copy? I know a bit of coding, but i think i will have a hard time if i have to make one from scratch. :) – Seb Feb 25 '18 at 16:48
  • 1
    You can try googling, but I don't think such exist for exactly this use case in any of the generally accepted repositories (such as OpenZeppelin). If you decide to implement it yourself, be extra careful with the implementation as it has the potential to leak real ether. – Lauri Peltonen Feb 25 '18 at 16:53
  • Will try to see if i find something, thank you. If i can't figure it out would you be able to make one for me for a price? :) – Seb Feb 25 '18 at 16:55
  • I'm not a "real" solidity developer, more like a fiddler. And you definitely shouldn't ask a random internet dude to code a money-sensitive contract for you. Hire a real company / some trustworthy freelancer. – Lauri Peltonen Feb 25 '18 at 16:58
  • you could also use Dapp: rstormsf.github.io/multisender/# – rstormsf Sep 1 '18 at 23:31

Not the answer you're looking for? Browse other questions tagged or ask your own question.