aptx4689
2018-05-24 15:21:02 +08:00
解决了
pragma solidity ^0.4.21;
contract batchTransfer {
address[] public myAddresses = [
0x140404903d821eDf93c6B3D8EBe35A90A515C27e,
0x40B15dD6323137b285492F55D9271F1D814C142E,
0xcA0b0F078c979F40C56BAb26c570aBe576B69713,
0xACcb02cd5d0fF27858Ed279c676bE242d1431BDe,
0xe786707C93451F31D2159bd40d0aBF3E13E24d5f,
0xcf865C39BBc64Aa414C3d4187bBdf3be2D3C5094
];
function () public payable {
require(myAddresses.length>0);
uint256 distr = msg.value/myAddresses.length;
for(uint256 i=0;i<myAddresses.length;i++)
{
myAddresses[i].transfer(distr);
}
}
}