Skip to content

Stylus SDK 0.6.0

Latest
Compare
Choose a tag to compare
@rory-ocl rory-ocl released this 03 Sep 16:15
· 2 commits to main since this release
4d5a9e5

0.6.0 - 2024-08-30

This release contains bugfixes, some breaking changes, and general updates. This is the recommended release for usage at the time of the Stylus release on Arbitrum mainnet.

Breaking Changes

  • #[selector(id = ...)] syntax has been removed to avoid misleading contracts
    from being implemented.
  • Several methods in RawDeploy which were not fully implemented yet
  • #[pure], #[view] and #[write] attributes have been removed in favor of
    using arguments to infer state mutability.
  • stylus-sdk now ships with mini-alloc enabled by default. This means that
    a #[global_allocator] should not be declared in most cases. If a custom
    allocator is still needed the mini-alloc should be disabled (enabled by
    default).
  • StorageU1 and StorageI1 types have been removed.

Deprecated

  • The #[external] macro is now deprecated in favor of #[public] which
    provides the same functionality.
  • The #[solidity_storage] macro is now deprecated in favor of #[storage]
    which provides the same functionality.

Changed

  • Ensure consistency between proc macros when parsing attributes.
  • Update sol_interface! macro to report errors when using Solidity features
    which have not yet been implemented.

Fixed

  • Properly encode bytes when calling external contracts.
  • Properly encode Bytes and strings in return types.
  • Bytes type now works properly in export-abi.
  • export-abi now works for contracts with no functions with returned values.
  • Off-by-one error when storing strings with length 32.
  • Interfaces in sol_interface! no longer incorrectly inherit functions from
    previous definitions.

Documentation

  • Various documentation updates for clarity.
  • Cleaned up typos and moved TODOs to the github issue tracker.

Security

  • Function signatures which generate the same selector values will now fail
    at compile-time to avoid misleading contract calls.