Skip to content

Instantly share code, notes, and snippets.

@tjade273
Created July 16, 2016 14:53
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tjade273/acb0d443592287d4f2fc44955e126854 to your computer and use it in GitHub Desktop.
Save tjade273/acb0d443592287d4f2fc44955e126854 to your computer and use it in GitHub Desktop.
contract SplitFunds {
function split(address[] addrs){
if(!addrs[uint(block.blockhash(block.number-1)) % addrs.length].send(msg.value)) throw;
}
}
@veox
Copy link

veox commented Jul 26, 2016

I'm planning on using this technique in a dapp that'll reference my fork oracle for the condition check.

EDIT: Ah, I see there's already a splitter that uses Timon Rapp's oracle. No biggie.

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