Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 711 Bytes

File metadata and controls

17 lines (14 loc) · 711 Bytes

90 - Require

The require function either creates an error of type Error(string) or an error without any error data and it should be used to ensure valid conditions that cannot be detected until execution time. This includes conditions on inputs or return values from calls to external contracts. You can optionally provide a message string for require, but not for assert.


Slide Screenshot

090.jpg


Slide Deck

  • require() -> Error([string])
  • Detect Runtime Invalid Conditions
  • E.g.: Input Validation, Return Value Checks
  • Message String -> Optional

References