Skip to content
Snippets Groups Projects
Commit 6dd3d00c authored by bear's avatar bear Committed by GitHub
Browse files

Add `TypeInfo` (#11599)

parent e9e69165
No related merge requests found
......@@ -21,6 +21,7 @@ use crate::{
codec::{Decode, Encode},
RuntimeDebug,
};
use scale_info::TypeInfo;
use sp_std::prelude::*;
/// Priority for a transaction. Additive. Higher is better.
......@@ -34,7 +35,7 @@ pub type TransactionLongevity = u64;
pub type TransactionTag = Vec<u8>;
/// An invalid transaction validity.
#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, RuntimeDebug)]
#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, RuntimeDebug, TypeInfo)]
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
pub enum InvalidTransaction {
/// The call of the transaction is not expected.
......@@ -117,7 +118,7 @@ impl From<InvalidTransaction> for &'static str {
}
/// An unknown transaction validity.
#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, RuntimeDebug)]
#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, RuntimeDebug, TypeInfo)]
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
pub enum UnknownTransaction {
/// Could not lookup some information that is required to validate the transaction.
......@@ -141,7 +142,7 @@ impl From<UnknownTransaction> for &'static str {
}
/// Errors that can occur while checking the validity of a transaction.
#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, RuntimeDebug)]
#[derive(Clone, PartialEq, Eq, Encode, Decode, Copy, RuntimeDebug, TypeInfo)]
#[cfg_attr(feature = "std", derive(serde::Serialize, serde::Deserialize))]
pub enum TransactionValidityError {
/// The transaction is invalid.
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment