Skip to content

v0.20.0

Compare
Choose a tag to compare
@TarikGul TarikGul released this 06 Apr 16:41
· 847 commits to master since this release
v0.20.0
dffeee4

The most significant change in this release is how we create and sign extrinsics, and how we manage the
"additional" and "extra" data that is attached to them. See #477, and the
associated PR #490 for a more detailed look at the code changes.

If you're targeting a node with compatible additional and extra transaction data to Substrate or Polkadot, the main
change you'll have to make is to import and use subxt::PolkadotExtrinsicParams or subxt::SubstrateExtrinsicParams
instead of subxt::DefaultExtra (depending on what node you're compatible with), and then use sign_and_submit_default
instead of sign_and_submit when making a call. Now, sign_and_submit accepts a second argument which allows these
parameters (such as mortality and tip payment) to be customized. See examples/balance_transfer_with_params.rs for a
small usage example.

If you're targeting a node which involves custom additional and extra transaction data, you'll need to implement the
trait subxt::extrinsic::ExtrinsicParams, which determines the parameters that can be provided to sign_and_submit, as
well as how to encode these into the "additional" and "extra" data needed for a transaction. Have a look at
subxt/src/extrinsic/params.rs for the trait definition and Substrate/Polkadot implementations. The aim with this change
is to make it easier to customise this for your own chains, and provide a simple way to provide values at runtime.

Fixed

  • Test utils: parse port from substrate binary output to avoid races (#501)
  • Rely on the kernel for port allocation (#498)

Changed

  • Export ModuleError for downstream matching (#499)
  • Bump jsonrpsee to v0.9.0 (#496)
  • Use tokio instead of async-std in tests/examples (#495)
  • Read constants from metadata at runtime (#494)
  • Handle sp_runtime::ModuleError substrate updates (#492)
  • Simplify creating and signing extrinsics (#490)
  • Add dev_getBlockStats RPC (#489)
  • scripts: Hardcode github subxt pull link for changelog consistency (#482)