This file contains hidden or 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
struct Player: | |
id : uint256 | |
playerAddress : address | |
wager : wei_value | |
GameBegan : event({_firstPlayer : address, _amount : wei_value}) | |
wager : public(wei_value) | |
winner : public(uint256) |
This file contains hidden or 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.5.0; | |
// pragma experimental ABIEncoderV2; | |
import "github.com/oraclize/ethereum-api/provableAPI.sol"; | |
contract CoinFlip is usingProvable { | |
constructor() payable public { | |
} | |
uint public winner; |
This file contains hidden or 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.5.0; | |
// pragma experimental ABIEncoderV2; | |
contract CoinFlip { | |
uint public winner; | |
mapping (uint => player) public players; | |
uint public wager; | |
struct player { | |
uint id; | |
address payable playerAddress; |
This file contains hidden or 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.5.0; | |
library simpleCalculator { | |
event actionHappened(string action, uint result); | |
function addition(uint a, uint b) public{ | |
emit actionHappened("addition", a+b); | |
} | |
This file contains hidden or 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
pragmra solidity 0.5.4; | |
contract Voting { | |
} | |
This file contains hidden or 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.5.0; | |
interface CoinFlipGameInterface { | |
function bet() external payable; | |
function maxBet() external view returns(uint256); | |
} | |
contract CoinFlipHack { | |
constructor(address payable coinFliGame) public payable{ |