Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
[0.36.0] - 2024-05-16
This release adds a few new features, which I'll go over below in more detail.
subxt-core
We now have a brand new
subxt-core
crate, which is#[no-std]
compatible, and contains a lot of the core logic that is needed in Subxt. Using this crate, you can do things in a no-std environment like:blocks
: decode and explore block bodies.constants
: access and validate the constant addresses in some metadata.custom_values
: access and validate the custom value addresses in some metadata.metadata
: decode bytes into the metadata used throughout this library.storage
: construct storage request payloads and decode the results you'd get back.tx
: construct and sign transactions (extrinsics).runtime_api
: construct runtime API request payloads and decode the results you'd get back.events
: decode and explore events.Check out the docs for more, including examples of each case.
A breaking change that comes from migrating a bunch of logic to this new crate is that the
ExtrinsicParams
trait is now handed&ClientState<T>
rather than aClient
.ClientState
is just a concrete struct containing the state that one needs for things like signed extensions.Support for reconnecting
We've baked in a bunch of support for automatically reconnecting after a connection loss into Subxt. This comes in three parts:
unstable-reconnecting-rpc-client
feature flag at the moment, andDisconnectedWillReconnect
error to the user where it cannot. Note that the individualLegacyRpcMethods
andUnstableRpcMethods
are not automatically retried on reconnection. Which leads us to..subxt::backend::retry
andsubxt::backend::retry_stream
) which can be used in conjunction with a reconnecting RPC client to make it easy to automatically retry RPC method calls where needed.We'd love feedback on this reconnecting work! To try it out, enable the
unstable-reconnecting-rpc-client
feature flag and then you can make use of this like so:Check out the full example here.
Better Ethereum support
We've added built-in support for Ethereum style chains (eg Frontier and Moonbeam) in
subxt-signer
, making it easier to sign transactions for these chains now.Check out a full example here.
We plan to improve on this in the future, baking in better Ethereum support if possible so that it's as seamless to use
AccountId20
as it isAccountId32
.Stabilizing the new V2 RPCs (#1540, #1539, #1538)
A bunch of the new RPCs are now stable in the spec, and have consequently been stabilized here, bringing the
unstable-backend
a step closer to being stabilized itself! We'll probably first remove the feature flag and next make it the default backend, in upcoming releases.All of the notable changes in this release are as follows:
Added
frontier/ethereum
example (#1557)subxt-core
crate (#1466)Changed
scale-type-resolver
0.2 (#1565)Fixed
subxt-signer::eth
(#1553)