Last active
July 8, 2018 18:43
-
-
Save saintbyte/e73ab0a72229d9e01b6f23a3d84cb33a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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