Skip to content

Instantly share code, notes, and snippets.

@dAAAb
Created December 2, 2018 10:26
Show Gist options
  • Save dAAAb/f3fc74a8bf897581198e77b88375c713 to your computer and use it in GitHub Desktop.
Save dAAAb/f3fc74a8bf897581198e77b88375c713 to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.25;
contract MultiTransfer {
function multiTransfer(address[] _addresses, uint256 amount) payable {
for (uint256 i = 0; i < _addresses.length; i++) {
_addresses[i].call.value(amount).gas(21000)();
}
}
function() payable {}
}
@dAAAb
Copy link
Author

dAAAb commented Dec 2, 2018

執行範例: ["0xC7058a6d4AD54AA2550D4A15441fCE7171f275F6","0x2A7e0718049b81824dD5B0c49b1493D70b236c94"],8800000000000000

//轉 0.008 ETH 給兩個地址

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment