Skip to content

Instantly share code, notes, and snippets.

@saintbyte
Last active July 8, 2018 18:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save saintbyte/e73ab0a72229d9e01b6f23a3d84cb33a to your computer and use it in GitHub Desktop.
Save saintbyte/e73ab0a72229d9e01b6f23a3d84cb33a to your computer and use it in GitHub Desktop.
pragma solidity ^0.4.19;
contract Test2 {
function transferInEqualParts(uint256 summaryAmount, address [] recipients) public {
if ( recipients.length > 0) {
uint256 oneAmount = summaryAmount / recipients.length;
for(uint i = 0; i < recipients.length; i++){
recipients[i].transfer(oneAmount);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment