-
Notifications
You must be signed in to change notification settings - Fork 187
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
10 changed files
with
383 additions
and
79 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
contract Foo: | ||
pub def bar(baz: u256): | ||
assert baz > 5 | ||
assert baz > 5 | ||
|
||
pub def revert_with_static_string(baz: u256): | ||
assert baz > 5, "Must be greater than five" | ||
|
||
pub def revert_with(baz: u256, reason: string1000): | ||
assert baz > 5, reason |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
contract Foo { | ||
function revert_me() public pure returns(uint){ | ||
revert("Not enough Ether provided."); | ||
} | ||
|
||
function revert_with_long_string() public pure returns(uint){ | ||
revert("A muuuuuch longer reason string that consumes multiple words"); | ||
} | ||
|
||
function revert_with_empty_string() public pure returns(uint){ | ||
revert(""); | ||
} | ||
} |
Oops, something went wrong.