Bitcoin allows multiple tx_in with multiple tx_out per tx message.
May I know if Ethereum supports this or is it a 1 tx_in to 1 tx_out and for multiple addresses, the tx_out would have to be some sort of multiple-sending contract ?
Bitcoin allows multiple tx_in with multiple tx_out per tx message.
May I know if Ethereum supports this or is it a 1 tx_in to 1 tx_out and for multiple addresses, the tx_out would have to be some sort of multiple-sending contract ?
I think the correct answer is that this is not possible in Ethereum, at least not in the way that is allowed in Bitcoin. The example provided by the answer above by @Sumit is just a loop over many addresses, causing many "1 tx_in to 1 tx_" transfers.
You do not need to have a contract to do this, you can use js. Assume addresses is the array that contains the addresses.
var i;
for (i = 0; i < addresses.length; i++) {
web3.eth.sendTransaction({from:"your_address", to:addresses[i], value:web3.toWei(amount_in_ether,"ether")}, funtion(err,result){
});
}
you may need to wait for each transaction to be mined
you can easily achieve this in ethereum also, by taking the multiple addresses in an array and using the send transaction in one go. You can refer to this How to send tokens to multiple addresses in one go