mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 11:41:04 +00:00
Rename traits to remove T suffix (#1535)
* Rename traits to renmove T suffix * Fix doc links * Fix straggler doc links
This commit is contained in:
+6
-6
@@ -64,7 +64,7 @@ use crate::utils::Encoded;
|
||||
use alloc::borrow::{Cow, ToOwned};
|
||||
use alloc::vec::Vec;
|
||||
use codec::{Compact, Encode};
|
||||
use payload::PayloadT;
|
||||
use payload::Payload;
|
||||
use signer::Signer as SignerT;
|
||||
use sp_crypto_hashing::blake2_256;
|
||||
|
||||
@@ -75,7 +75,7 @@ pub use crate::client::{ClientState, RuntimeVersion};
|
||||
/// if the call is valid (or if it's not possible to check since the call has no validation hash).
|
||||
/// Return an error if the call was not valid or something went wrong trying to validate it (ie
|
||||
/// the pallet or call in question do not exist at all).
|
||||
pub fn validate<Call: PayloadT>(call: &Call, metadata: &Metadata) -> Result<(), Error> {
|
||||
pub fn validate<Call: Payload>(call: &Call, metadata: &Metadata) -> Result<(), Error> {
|
||||
if let Some(details) = call.validation_details() {
|
||||
let expected_hash = metadata
|
||||
.pallet_by_name_err(details.pallet_name)?
|
||||
@@ -90,14 +90,14 @@ pub fn validate<Call: PayloadT>(call: &Call, metadata: &Metadata) -> Result<(),
|
||||
}
|
||||
|
||||
/// Return the SCALE encoded bytes representing the call data of the transaction.
|
||||
pub fn call_data<Call: PayloadT>(call: &Call, metadata: &Metadata) -> Result<Vec<u8>, Error> {
|
||||
pub fn call_data<Call: Payload>(call: &Call, metadata: &Metadata) -> Result<Vec<u8>, Error> {
|
||||
let mut bytes = Vec::new();
|
||||
call.encode_call_data_to(metadata, &mut bytes)?;
|
||||
Ok(bytes)
|
||||
}
|
||||
|
||||
/// Creates an unsigned extrinsic without submitting it.
|
||||
pub fn create_unsigned<T: Config, Call: PayloadT>(
|
||||
pub fn create_unsigned<T: Config, Call: Payload>(
|
||||
call: &Call,
|
||||
metadata: &Metadata,
|
||||
) -> Result<Transaction<T>, Error> {
|
||||
@@ -130,7 +130,7 @@ pub fn create_unsigned<T: Config, Call: PayloadT>(
|
||||
///
|
||||
/// Note: if not provided, the default account nonce will be set to 0 and the default mortality will be _immortal_.
|
||||
/// This is because this method runs offline, and so is unable to fetch the data needed for more appropriate values.
|
||||
pub fn create_partial_signed<T: Config, Call: PayloadT>(
|
||||
pub fn create_partial_signed<T: Config, Call: Payload>(
|
||||
call: &Call,
|
||||
client_state: &ClientState<T>,
|
||||
params: <T::ExtrinsicParams as ExtrinsicParams<T>>::Params,
|
||||
@@ -165,7 +165,7 @@ pub fn create_signed<T, Call, Signer>(
|
||||
) -> Result<Transaction<T>, Error>
|
||||
where
|
||||
T: Config,
|
||||
Call: PayloadT,
|
||||
Call: Payload,
|
||||
Signer: SignerT<T>,
|
||||
{
|
||||
// 1. Validate this call against the current node metadata if the call comes
|
||||
|
||||
Reference in New Issue
Block a user