Closed
Description
Notable changes
- Use named parameters in mappings
// before
mapping(address => uint256) public balanceOf;
// after
mapping(address userAddress => uint256 balance) public balanceOf;
- User-defined value types, blog post
- Defaults to EVM version Shanghai
- PUSH0 support: make that the target chain supports it, Arbitrum and Gnosis chain now support it.
- Run
cast call -r <RPC_URL> --create 0x5f
, if it returns 0x then it supports it, otherwise it returns an error.
- Run
- Immutable variables initialization is now optional
- Qualified access to foreign events now allows emitting events defined in other contracts not inherited from.
- Ugly unchecked increments in for loops no longer necessary to save gas
- Events can now be defined at file-level, outside a contract
- Nothing at language level
- Support for Cancun features, not enabled by default
- Notable Cancun features
- EIP-1153: Transient storage TSTORE and TLOAD opcodes, not in Solidity yet.
- EIP-4844: Blob transactions, adds
blobhash()
andblock. blobbasefee
. - EIP-6780 SELFDESTRUCT limitations: it doesn't clear storage and contract code anymore unless the contract was created in the same transaction.