Created
October 27, 2019 16:07
-
-
Save ylv-io/bb00fb7630c1af16dc4ccb15de12a717 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.5.0; | |
contract Fomo3d { | |
address public winner; | |
bool public gameover; | |
function win(address contender) public { | |
winner = contender; | |
} | |
} | |
contract BlockPacker { | |
Fomo3d public fomo3d; | |
constructor(Fomo3d target) public { | |
fomo3d = target; | |
} | |
function stuffBlock(address winner) public { | |
// burn gas only if the game is still running | |
require(!fomo3d.gameover(), "Game is over"); | |
// burn all the gas if we are winning | |
assert(winner != fomo3d.winner()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment