Forc 0.34 Released with Breaking Changes

forc version 0.34.0 is officially out! There are many new enhancements and some breaking changes, including:

  • It is no longer allowed to instantiate enum variants of unit type using parentheses. For example, Option::None() is now a compile error and should be replaced with Option::None.
  • The function std::storage::get(key: b256) now returns an Option. If no value was previously stored at the key, Option::None is returned. Otherwise,Option::Some(value) is returned, where value is the value previously stored at key.
  • The method StorageMap::get(self, key: K) now returns an Option. If no value was previously stored at key, Option::None is returned. Otherwise, Option::Some(value) is returned, where value is the value previously stored at key.
  • The methods split and join of std::bytes::Bytes have been renamed to split_at and append.
  • The trait std::math::Exponentiate has been renamed to std::math::Power.

You can check out the full release notes on GitHub:

7 Likes