Skip to content

Instantly share code, notes, and snippets.

@jtakalai
Last active November 8, 2018 08:30
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtakalai/659ed2c7b14ef4d35c48484c61289682 to your computer and use it in GitHub Desktop.
Save jtakalai/659ed2c7b14ef4d35c48484c61289682 to your computer and use it in GitHub Desktop.
What does this contract do? Can you spot a bug?
pragma solidity ^0.4.0;
contract Puzzle {
address _a;
address _b;
constructor(address a, address b) public {
_a = a;
_b = b;
}
function () public payable {
_a.transfer(msg.value / 2);
_b.transfer(msg.value / 2);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment