mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-23 00:15:41 +00:00
Split off TypeId so as not to pull in sr-io (#3740)
* Add type-id * Builds with std now. * Fix for cargo * Remove unneeded stuff * Move TypeId.
This commit is contained in:
@@ -23,7 +23,7 @@ use runtime_io;
|
||||
use std::fmt::{Debug, Display};
|
||||
#[cfg(feature = "std")]
|
||||
use serde::{Serialize, Deserialize, de::DeserializeOwned};
|
||||
use primitives::{self, Hasher, Blake2Hasher};
|
||||
use primitives::{self, Hasher, Blake2Hasher, TypeId};
|
||||
use crate::codec::{Codec, Encode, Decode, HasCompact};
|
||||
use crate::transaction_validity::{
|
||||
ValidTransaction, TransactionValidity, TransactionValidityError, UnknownTransaction,
|
||||
@@ -1123,12 +1123,6 @@ pub trait AccountIdConversion<AccountId>: Sized {
|
||||
fn try_from_sub_account<S: Decode>(x: &AccountId) -> Option<(Self, S)>;
|
||||
}
|
||||
|
||||
/// Provide a simple 4 byte identifier for a type.
|
||||
pub trait TypeId {
|
||||
/// Simple 4 byte identifier.
|
||||
const TYPE_ID: [u8; 4];
|
||||
}
|
||||
|
||||
/// Format is TYPE_ID ++ encode(parachain ID) ++ 00.... where 00... is indefinite trailing zeroes to
|
||||
/// fill AccountId.
|
||||
impl<T: Encode + Decode + Default, Id: Encode + Decode + TypeId> AccountIdConversion<T> for Id {
|
||||
|
||||
Reference in New Issue
Block a user