Skip to content

Stylus SDK 0.2.0

Compare
Choose a tag to compare
@rachel-bousfield rachel-bousfield released this 01 Sep 23:29
· 196 commits to stylus since this release
3e8693c

This release makes a few improvements based on community feedback. You can upgrade to this release by changing the following in your Cargo.toml

stylus-sdk = "0.2.0"

Alloy FixedBytes

abi::FixedBytes has been removed in favor of Alloy's FixedBytes. This makes the following much more intuitive

pub fn root(&self) -> Result<B256, Vec<u8>> {
    Ok(self.root.get().into())
}

EVM affordances now return better types

Some EVM affordances, like block::basefee returned B256. Those likely to be used in math now return U256.

Interface fixes

Importing interface methods with empty args or methods that are write caused compile errors. These have now been fixed.

sol_interface! {
    interface IClass {
        function empty_args();
        function write_method(bytes32);
    }
}