You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: CHANGELOG.md
+204
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,210 @@ All notable changes to this project will be documented in this file.
4
4
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
7
+
## [0.23.0] - 2022-08-11
8
+
9
+
This is one of the most significant releases to date in Subxt, and carries with it a number of significant breaking changes, but in exchange, a number of significant improvements. The most significant PR is [#593](https://github.com/paritytech/subxt/pull/593); the fundamental change that this makes is to separate creating a query/transaction/address from submitting it. This gives us flexibility when creating queries; they can be either dynamically or statically generated, but also flexibility in our client, enabling methods to be exposed for online or offline use.
10
+
11
+
The best place to look to get a feel for what's changed, aside from the documentation itself, is the `examples` folder. What follows are some examples of the changes you'll need to make, which all follow a similar pattern:
12
+
13
+
### Submitting a transaction
14
+
15
+
Previously, we'd build a client which is tied to the static codegen, and then use the client to build and submit a transaction like so:
Note that previously, the generated code would do the equivalent of `fetch_or_default` if possible, or `fetch` if no default existed. You must now decide whether to:
74
+
- fetch an entry, returning `None` if it's not found (`api.storage().fetch(..)`), or
75
+
- fetch an entry, returning the default if it's not found (`api.storage().fetch_or_default(..)`).
76
+
77
+
The static types will protect you against using `fetch_or_default` when no such default exists, and so the recommendation is to try changing all storage requests to use `fetch_or_default`, falling back to using `fetch` where doing so leads to compile errors.
78
+
79
+
See `examples/examples/concurrent_storage_requests.rs` for an example of fetching entries.
See the `examples/examples/subscribe_all_events.rs` example for more.
186
+
187
+
The general pattern, as seen above, is that we break apart constructing a query/address and using it. You can now construct queries dynamically instead and forego all static codegen by using the functionality exposed in the `subxt::dynamic` module instead.
188
+
189
+
Other smaller breaking changes have happened, but they should be easier to address by following compile errors.
190
+
191
+
For more details about all of the changes, the full commit history since the last release is as follows:
192
+
193
+
### Added
194
+
195
+
- Expose the extrinsic hash from TxProgress ([#614](https://github.com/paritytech/subxt/pull/614))
196
+
- Add support for `ws` in `subxt-cli` ([#579](https://github.com/paritytech/subxt/pull/579))
197
+
- Expose the SCALE encoded call data of an extrinsic ([#573](https://github.com/paritytech/subxt/pull/573))
198
+
- Validate absolute path for `substitute_type` ([#577](https://github.com/paritytech/subxt/pull/577))
199
+
200
+
### Changed
201
+
202
+
- Rework Subxt API to support offline and dynamic transactions ([#593](https://github.com/paritytech/subxt/pull/593))
203
+
- Use scale-decode to help optimise event decoding ([#607](https://github.com/paritytech/subxt/pull/607))
204
+
- Decode raw events using scale_value and return the decoded Values, too ([#576](https://github.com/paritytech/subxt/pull/576))
0 commit comments