138 - solc 0.6.0 New Features
-
The
try
/catch
statement allows you to react on failed external calls. -
struct
andenum
types can be declared at file level. -
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. -
Natspec supports multiple return parameters in developer documentation, enforcing the same naming check as @param.
-
Yul and Inline Assembly have a new statement called leave that exits the current function.
-
Conversions from address to address payable are now possible via
payable(x)
, where x must be of type address.
- try/catch
- Handle Failed External Calls
- struct/enum -> File-level
- Array Slices -> calldata
- NatSpec -> return
- Yul ->
Leave
- payable(x)