Skip to content

Latest commit

 

History

History
28 lines (18 loc) · 401 Bytes

assertTrue.md

File metadata and controls

28 lines (18 loc) · 401 Bytes

assertTrue

Signature

function assertTrue(bool data) internal;
function assertTrue(bool data, string memory err) internal;

Description

Asserts data is true.

Optionally includes an error message in the revert string.

Examples

bool success = contract.fun();
assertTrue(success);

SEE ALSO