pragma solidity ^0.5.4; import "./gazillion.sol"; contract VerifyGazillion is challenge1 { event AssertionFailed(string message); function buy() public payable { uint256 balance_pre = balance; super.buy(); bool postcondition = balance >= balance_pre; if (!postcondition) { emit AssertionFailed("Postcondition violated in buy(): Balance must be higher or equal."); } } function burn(uint256 amount) public { uint256 balance_pre = balance; super.burn(amount); bool postcondition = balance <= balance_pre; if (!postcondition) { emit AssertionFailed("Postcondition violated in burn(): Balance must be lower or equal."); } } }
0.5.10