Add HoldReason to the NIS pallet (#13823)

* Add HoldReason to the NIS pallet

* Rename composable_enum to composite_enum

* Add encoding test

* Add more doc comments
This commit is contained in:
Keith Yeung
2023-04-06 14:24:45 +08:00
committed by GitHub
parent 3ace2f50c5
commit 38f3b053d7
8 changed files with 27 additions and 9 deletions
@@ -35,6 +35,7 @@ pub fn expand_outer_freeze_reason(pallet_decls: &[Pallet], scrate: &TokenStream)
}
quote! {
/// A reason for placing a freeze on funds.
#[derive(
Copy, Clone, Eq, PartialEq, Ord, PartialOrd,
#scrate::codec::Encode, #scrate::codec::Decode, #scrate::codec::MaxEncodedLen,
@@ -35,6 +35,7 @@ pub fn expand_outer_hold_reason(pallet_decls: &[Pallet], scrate: &TokenStream) -
}
quote! {
/// A reason for placing a hold on funds.
#[derive(
Copy, Clone, Eq, PartialEq, Ord, PartialOrd,
#scrate::codec::Encode, #scrate::codec::Decode, #scrate::codec::MaxEncodedLen,
@@ -35,6 +35,7 @@ pub fn expand_outer_lock_id(pallet_decls: &[Pallet], scrate: &TokenStream) -> To
}
quote! {
/// An identifier for each lock placed on funds.
#[derive(
Copy, Clone, Eq, PartialEq, Ord, PartialOrd,
#scrate::codec::Encode, #scrate::codec::Decode, #scrate::codec::MaxEncodedLen,
@@ -35,6 +35,7 @@ pub fn expand_outer_slash_reason(pallet_decls: &[Pallet], scrate: &TokenStream)
}
quote! {
/// A reason for slashing funds.
#[derive(
Copy, Clone, Eq, PartialEq, Ord, PartialOrd,
#scrate::codec::Encode, #scrate::codec::Decode, #scrate::codec::MaxEncodedLen,