Skip to content

Instantly share code, notes, and snippets.

@maurelian
Created September 19, 2017 19:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maurelian/c7b647b64d9d2422b81108f8b6af0c7c to your computer and use it in GitHub Desktop.
Save maurelian/c7b647b64d9d2422b81108f8b6af0c7c to your computer and use it in GitHub Desktop.
A contract for comparing the behavior of error checks in solidity
pragma solidity ^0.4.15;
contract C{
function throws(){
throw;
}
function reverts(){
revert();
}
function requires(){
require(false);
}
function asserts(){
assert(false);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment