v0.4.0 - Better Storage
This release mostly includes the work of @srdtrk in #53. Thanks Srdtrk!
It revamps the secret-toolkit-storage package to make it more similar to cw-storage-plus and much easier
to use. It also removes the Cashmap type from the incubator in favor of KeyMap in secret-toolkit-storage.
This is a summary of the changes and additions in this release:
- Minimum Rust version is bumped to the latest v1.63. This is because we want to use
Mutex::newin aconst fn. - No more distinction between
Readonly*and*Muttypes. Instead, methods take references or mutable references to the storage every time. - Usage of
PrefixedStoreis made mostly unnecessary. - Storage type's constructors are const functions, which means they can be initialized as global static variables.
- Added
secret-toolkit::storage::Itemwhich is similar toItemfromcw-storage-plusorTypedStorefromcosmwasm_storagev0.10. - Added
secret-toolkit::storage::KeyMapwhich is similar toCashmap. Cashmapis completely removed.
A full guide to using the new storage types can be found
in the package's readme file.