mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-09 20:11:09 +00:00
Add Assets module (#925)
* Add Assets module * Fixes * Fix * Update comments * Support `GenesisConfig` without any fields Fixes: #923 * Do not generate an empty `GenesisConfig`, instead generate no `GenesisConfig`
This commit is contained in:
@@ -269,19 +269,32 @@ pub fn verify_encoded_lazy<V: Verify, T: codec::Encode>(sig: &V, item: &T, signe
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! __impl_outer_config_types {
|
||||
($concrete:ident $config:ident $snake:ident $($rest:ident)*) => {
|
||||
(
|
||||
$concrete:ident $config:ident $snake:ident < $ignore:ident > $( $rest:tt )*
|
||||
) => {
|
||||
#[cfg(any(feature = "std", test))]
|
||||
pub type $config = $snake::GenesisConfig<$concrete>;
|
||||
__impl_outer_config_types! {$concrete $($rest)*}
|
||||
};
|
||||
(
|
||||
$concrete:ident $config:ident $snake:ident $( $rest:tt )*
|
||||
) => {
|
||||
#[cfg(any(feature = "std", test))]
|
||||
pub type $config = $snake::GenesisConfig;
|
||||
__impl_outer_config_types! {$concrete $($rest)*}
|
||||
};
|
||||
($concrete:ident) => ()
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
/// Implement the output "meta" module configuration struct.
|
||||
macro_rules! impl_outer_config {
|
||||
( pub struct $main:ident for $concrete:ident { $( $config:ident => $snake:ident, )* } ) => {
|
||||
__impl_outer_config_types! { $concrete $( $config $snake )* }
|
||||
(
|
||||
pub struct $main:ident for $concrete:ident {
|
||||
$( $config:ident => $snake:ident $( < $generic:ident > )*, )*
|
||||
}
|
||||
) => {
|
||||
__impl_outer_config_types! { $concrete $( $config $snake $( < $generic > )* )* }
|
||||
#[cfg(any(feature = "std", test))]
|
||||
#[derive(Serialize, Deserialize)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
|
||||
@@ -566,5 +566,5 @@ pub trait ProvideInherent {
|
||||
pub trait Extrinsic {
|
||||
/// Is this `Extrinsic` signed?
|
||||
/// If no information are available about signed/unsigned, `None` should be returned.
|
||||
fn is_signed(&self) -> Option<bool>;
|
||||
fn is_signed(&self) -> Option<bool> { None }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user