mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-07 02:38:02 +00:00
b6b9ac65c7
* TransactionExtensions basic support for V5 VerifySignature and renames * WIP: subxt-core v5 transaction support * Subxt to support V5 extrinsics * WIP tests failing with wsm trap error * Actually encode mortality to fix tx encode issue * fmt * rename to sign_with_account_and_signature * Add explicit methods for v4 and v5 ext construction * clippy * fix wasm example and no mut self where not needed * fix doc example * another doc fix * Add tests for tx encoding and fix v5 encode issue * add copyright and todo * refactor APIs to have clear v4/v5 split in core and slightly nicer split in subxt proper * rename Partial/SubmittableExtrinsic to *Transaction * Remove SignerT::address since it's not needed * doc fixes * fmt * doc fixes * Fix comment number * Clarify panic behaviour of inject_signature * fmt
40 lines
1.7 KiB
Rust
40 lines
1.7 KiB
Rust
// Copyright 2019-2024 Parity Technologies (UK) Ltd.
|
|
// This file is dual-licensed as Apache-2.0 or GPL-3.0.
|
|
// see LICENSE for license details.
|
|
|
|
//! A couple of client types that we use elsewhere.
|
|
|
|
use crate::{config::Config, metadata::Metadata};
|
|
use derive_where::derive_where;
|
|
|
|
/// This provides access to some relevant client state in transaction extensions,
|
|
/// and is just a combination of some of the available properties.
|
|
#[derive_where(Clone, Debug)]
|
|
pub struct ClientState<C: Config> {
|
|
/// Genesis hash.
|
|
pub genesis_hash: C::Hash,
|
|
/// Runtime version.
|
|
pub runtime_version: RuntimeVersion,
|
|
/// Metadata.
|
|
pub metadata: Metadata,
|
|
}
|
|
|
|
/// Runtime version information needed to submit transactions.
|
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
|
pub struct RuntimeVersion {
|
|
/// Version of the runtime specification. A full-node will not attempt to use its native
|
|
/// runtime in substitute for the on-chain Wasm runtime unless all of `spec_name`,
|
|
/// `spec_version` and `authoring_version` are the same between Wasm and native.
|
|
pub spec_version: u32,
|
|
/// All existing dispatches are fully compatible when this number doesn't change. If this
|
|
/// number changes, then `spec_version` must change, also.
|
|
///
|
|
/// This number must change when an existing dispatchable (module ID, dispatch ID) is changed,
|
|
/// either through an alteration in its user-level semantics, a parameter
|
|
/// added/removed/changed, a dispatchable being removed, a module being removed, or a
|
|
/// dispatchable/module changing its index.
|
|
///
|
|
/// It need *not* change when a new module is added or when a dispatchable is added.
|
|
pub transaction_version: u32,
|
|
}
|