Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storage sub-package is updated (Cosmwasm v1.0 Fork) #55

Merged
merged 12 commits into from
Aug 30, 2022
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 37 additions & 7 deletions Releases.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,48 @@
# Release notes for the Secret Toolkit

## Next Release
## secret-toolkit-storage v0.4.1

* BUGFIX: `Item::is_empty` was returning the opposite value from what you'd expect.

## v0.4.0

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::new` in a `const fn`.
* No more distinction between `Readonly*` and `*Mut` types. Instead, methods take references or mutable references to the storage every time.
* Usage of `PrefixedStore` is made mostly unnecessary.
* Storage type's constructors are const functions, which means they can be initialized as global static variables.
* Added `secret-toolkit::storage::Item` which is similar to `Item` from `cw-storage-plus` or `TypedStore` from `cosmwasm_storage` v0.10.
* Added `secret-toolkit::storage::KeyMap` which is similar to `Cashmap`.
* `Cashmap` is completely removed.

A full guide to using the new `storage` types can be found
[in the package's readme file](https://github.com/srdtrk/secret-toolkit/blob/3725530aebe149d14f7f3f1662844340eb27e015/packages/storage/Readme.md).

## secret-toolkit-incubator v0.3.1

* Fixed compilation issue with Rust v1.61 (#46, #48)
* Removed Siphasher dependency (#46, #48)

## secret-toolkit-utils v0.3.1

### Security

* BUGFIX: `secret-toolkit::utils::FeatureToggle::handle_pause` had an inverse authorization check: only non-pausers
could pause features.

## secret-toolkit-permit v0.3.1

* Removed the `ecc-secp256k1` feature from `secret-toolkit-crypto` dependency of `secret-toolkit-permit`.
* This tiny change significantly reduces the size of binaries that only use the permit feature.
* This tiny change significantly reduces the size of binaries that only use the permit feature.

## v0.3.0

* Added `clear` method to `AppendStore` and `DequeStore` to quickly reset the collections (#34)
* docs.rs documentation now includes all sub-crates.
* BUGFIX: `secret-toolkit::snip721::Metadata` was severely out of date with the SNIP-721 specification, and not useful.
Expand All @@ -29,8 +55,9 @@
* Added `secret-toolkit::utils::feature_toggle` which allow managing feature flags in your contract.

### Breaking
* `secret-toolkit::permit::validate()` Now supports validating any type of Cosmos address.
Interface changes: Now takes a reference to the current token address instead

* `secret-toolkit::permit::validate()` Now supports validating any type of Cosmos address.
Interface changes: Now takes a reference to the current token address instead
of taking it by value and an optional hrp string.
In addition, it returns a String and not HumanAddr.
* Renamed `secret-toolkit::permit::Permission` to `secret-toolkit::permit::TokenPermission`.
Expand All @@ -44,6 +71,7 @@ In addition, it returns a String and not HumanAddr.
* `secret-toolkit-incubator` now has features `["cashmap", "generational-store"]` which are all off by default.

## v0.2.0

This release includes a ton of new features, and a few breaking changes in various interfaces.
This version is also the first released to [crates.io](https://crates.io)!

Expand All @@ -53,7 +81,7 @@ This version is also the first released to [crates.io](https://crates.io)!
* Added support for SNIP-22 messages (batch operations)
* Added support for SNIP-23 messages (improved Send operations) which broke some interfaces
* Added support for SNIP-24 permits
* Added `Base64Of<S: Serde, T>`, `Base64JsonOf<T>`, and `Base64Bincode2Of<T>`,
* Added `Base64Of<S: Serde, T>`, `Base64JsonOf<T>`, and `Base64Bincode2Of<T>`,
which are wrappers that automatically deserializes base64 strings to `T`.
It can be used in message types' fields instead of `Binary` when the contents of the string
should have more specific contents.
Expand All @@ -65,9 +93,11 @@ This version is also the first released to [crates.io](https://crates.io)!
while `["crypto", "permit", "incubator"]` are left disabled by default.

## v0.1.1

* Removed unused dev-dependency that was slowing down test compilation times.

## v0.1.0

This is the first release of `secret-toolkit`. It supports:

* `secret-toolkit::snip20` - Helper types and functions for interaction with
Expand All @@ -82,6 +112,6 @@ This is the first release of `secret-toolkit`. It supports:
* `secret-toolkit::serialization` - marker types for overriding the storage
format used by types in `secret-toolkit::storage`. `Json` and `Bincode2`.
* `secret-toolkit::utils` - General utilities for writing contract code.
* `padding` - tools for padding queries and responses.
* `calls` - Tools for marking types as messages in queries and callbacks
* `padding` - tools for padding queries and responses.
* `calls` - Tools for marking types as messages in queries and callbacks
to other contracts.
4 changes: 1 addition & 3 deletions packages/incubator/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "secret-toolkit-incubator"
version = "0.3.1"
version = "0.4.0"
edition = "2018"
authors = ["SCRT Labs <[email protected]>"]
license-file = "../../LICENSE"
Expand All @@ -20,7 +20,5 @@ cosmwasm-storage = { git = "https://github.com/scrtlabs/cosmwasm", branch = "sec
secret-toolkit-serialization = { version = "0.3", path = "../serialization", optional = true }

[features]
default = ["cashmap", "generational-store", "maxheap"]
cashmap = ["cosmwasm-storage", "serde", "secret-toolkit-serialization", "cosmwasm-std"]
generational-store = ["secret-toolkit-serialization", "serde", "cosmwasm-std"]
maxheap = ["secret-toolkit-serialization", "serde", "cosmwasm-std"]
Loading