Created
June 10, 2018 07:15
-
-
Save alexroan/aea327019af2ca67861659aabbc3c944 to your computer and use it in GitHub Desktop.
Created using remix-ide: Realtime Ethereum Contract Compiler and Runtime. Load this file by pasting this gists URL or ID at https://remix.ethereum.org/#version=soljson-v0.4.24+commit.e67f0147.js&optimize=false&gist=
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
contract TestThrows{ | |
//Assert takes boolean. | |
//Used in concept of checking data values | |
function testAssert(){ | |
assert(1==2); | |
} | |
//Require takes boolean | |
//More parameter requirement | |
function testRequire(){ | |
require(1==2); | |
} | |
//Doesn't require any params | |
//Reverts gas cost of the message sent | |
//Run out of coins to sell? revert the gas - unfair | |
function testRevert(){ | |
revert(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment