Skip to content

Latest commit

 

History

History
31 lines (24 loc) · 1.02 KB

solc 0.6.0 New Features.md

File metadata and controls

31 lines (24 loc) · 1.02 KB
  1. The try/catch statement allows you to react on failed external calls.

  2. struct and enum types can be declared at file level.

  3. Array slices can be used for calldata arrays, for example abi.decode(msg.data[4:], (uint, uint)) is a low-level way to decode the function call payload.

  4. Natspec supports multiple return parameters in developer documentation, enforcing the same naming check as @param.

  5. Yul and Inline Assembly have a new statement called leave that exits the current function.

  6. Conversions from address to address payable are now possible via payable(x), where x must be of type address.


Slide Screenshot

138.jpg


Slide Text

  • try/catch
    • Handle Failed External Calls
  • struct/enum -> File-level
  • Array Slices -> calldata
  • NatSpec -> return
  • Yul -> Leave
  • payable(x)

References


Tags