diff --git a/codegen/src/api/constants.rs b/codegen/src/api/constants.rs index d7786a6b39..f0f5ad75d2 100644 --- a/codegen/src/api/constants.rs +++ b/codegen/src/api/constants.rs @@ -15,7 +15,10 @@ // along with subxt. If not, see . use crate::types::TypeGenerator; -use frame_metadata::PalletConstantMetadata; +use frame_metadata::{ + PalletConstantMetadata, + PalletMetadata, +}; use heck::ToSnakeCase as _; use proc_macro2::TokenStream as TokenStream2; use quote::{ @@ -26,18 +29,22 @@ use scale_info::form::PortableForm; pub fn generate_constants( type_gen: &TypeGenerator, + pallet: &PalletMetadata, constants: &[PalletConstantMetadata], types_mod_ident: &syn::Ident, ) -> TokenStream2 { let constant_fns = constants.iter().map(|constant| { let fn_name = format_ident!("{}", constant.name.to_snake_case()); + let pallet_name = &pallet.name; + let constant_name = &constant.name; let return_ty = type_gen.resolve_type_path(constant.ty.id(), &[]); - let ref_slice = constant.value.as_slice(); - quote! { pub fn #fn_name(&self) -> ::core::result::Result<#return_ty, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode(&mut &[#(#ref_slice,)*][..])?) + let pallet = self.client.metadata().pallet(#pallet_name)?; + let constant = pallet.constant(#constant_name)?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } }); @@ -46,9 +53,15 @@ pub fn generate_constants( pub mod constants { use super::#types_mod_ident; - pub struct ConstantsApi; + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } - impl ConstantsApi { #(#constant_fns)* } } diff --git a/codegen/src/api/mod.rs b/codegen/src/api/mod.rs index a2adaf7a7e..d2224e48de 100644 --- a/codegen/src/api/mod.rs +++ b/codegen/src/api/mod.rs @@ -203,6 +203,7 @@ impl RuntimeGenerator { let constants_mod = if !pallet.constants.is_empty() { constants::generate_constants( &type_gen, + pallet, &pallet.constants, types_mod_ident, ) @@ -300,8 +301,8 @@ impl RuntimeGenerator { T: ::subxt::Config, X: ::subxt::extrinsic::ExtrinsicParams, { - pub fn constants(&'a self) -> ConstantsApi { - ConstantsApi + pub fn constants(&'a self) -> ConstantsApi<'a, T> { + ConstantsApi { client: &self.client } } pub fn storage(&'a self) -> StorageApi<'a, T> { @@ -335,12 +336,14 @@ impl RuntimeGenerator { } } - pub struct ConstantsApi; + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } - impl ConstantsApi { + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { #( - pub fn #pallets_with_constants(&self) -> #pallets_with_constants::constants::ConstantsApi { - #pallets_with_constants::constants::ConstantsApi + pub fn #pallets_with_constants(&self) -> #pallets_with_constants::constants::ConstantsApi<'a, T> { + #pallets_with_constants::constants::ConstantsApi::new(self.client) } )* } diff --git a/subxt/tests/integration/codegen/polkadot.rs b/subxt/tests/integration/codegen/polkadot.rs index d98c635280..2f63c633cb 100644 --- a/subxt/tests/integration/codegen/polkadot.rs +++ b/subxt/tests/integration/codegen/polkadot.rs @@ -79,15 +79,11 @@ pub mod api { XcmPallet(xcm_pallet::Event), } pub mod system { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct FillBlock { @@ -751,28 +747,23 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn block_weights( &self, ) -> ::core::result::Result< runtime_types::frame_system::limits::BlockWeights, ::subxt::BasicError, > { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 242u8, 5u8, 42u8, 1u8, 0u8, 0u8, 0u8, 0u8, 32u8, 74u8, - 169u8, 209u8, 1u8, 0u8, 0u8, 64u8, 89u8, 115u8, 7u8, 0u8, - 0u8, 0u8, 0u8, 1u8, 192u8, 118u8, 108u8, 143u8, 88u8, 1u8, - 0u8, 0u8, 1u8, 0u8, 152u8, 247u8, 62u8, 93u8, 1u8, 0u8, 0u8, - 1u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 64u8, 89u8, - 115u8, 7u8, 0u8, 0u8, 0u8, 0u8, 1u8, 192u8, 254u8, 190u8, - 249u8, 204u8, 1u8, 0u8, 0u8, 1u8, 0u8, 32u8, 74u8, 169u8, - 209u8, 1u8, 0u8, 0u8, 1u8, 0u8, 136u8, 82u8, 106u8, 116u8, - 0u8, 0u8, 0u8, 64u8, 89u8, 115u8, 7u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("System")?; + let constant = pallet.constant("BlockWeights")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn block_length( &self, @@ -780,19 +771,19 @@ pub mod api { runtime_types::frame_system::limits::BlockLength, ::subxt::BasicError, > { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 0u8, 60u8, 0u8, 0u8, 0u8, 80u8, 0u8, 0u8, 0u8, 80u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("System")?; + let constant = pallet.constant("BlockLength")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn block_hash_count( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[96u8, 9u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("System")?; + let constant = pallet.constant("BlockHashCount")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn db_weight( &self, @@ -800,12 +791,10 @@ pub mod api { runtime_types::frame_support::weights::RuntimeDbWeight, ::subxt::BasicError, > { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 64u8, 120u8, 125u8, 1u8, 0u8, 0u8, 0u8, 0u8, 0u8, 225u8, - 245u8, 5u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("System")?; + let constant = pallet.constant("DbWeight")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn version( &self, @@ -813,52 +802,29 @@ pub mod api { runtime_types::sp_version::RuntimeVersion, ::subxt::BasicError, > { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 32u8, 112u8, 111u8, 108u8, 107u8, 97u8, 100u8, 111u8, 116u8, - 60u8, 112u8, 97u8, 114u8, 105u8, 116u8, 121u8, 45u8, 112u8, - 111u8, 108u8, 107u8, 97u8, 100u8, 111u8, 116u8, 0u8, 0u8, - 0u8, 0u8, 220u8, 35u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 56u8, - 223u8, 106u8, 203u8, 104u8, 153u8, 7u8, 96u8, 155u8, 4u8, - 0u8, 0u8, 0u8, 55u8, 227u8, 151u8, 252u8, 124u8, 145u8, - 245u8, 228u8, 1u8, 0u8, 0u8, 0u8, 64u8, 254u8, 58u8, 212u8, - 1u8, 248u8, 149u8, 154u8, 5u8, 0u8, 0u8, 0u8, 210u8, 188u8, - 152u8, 151u8, 238u8, 208u8, 143u8, 21u8, 3u8, 0u8, 0u8, 0u8, - 247u8, 139u8, 39u8, 139u8, 229u8, 63u8, 69u8, 76u8, 2u8, 0u8, - 0u8, 0u8, 175u8, 44u8, 2u8, 151u8, 162u8, 62u8, 109u8, 61u8, - 2u8, 0u8, 0u8, 0u8, 73u8, 234u8, 175u8, 27u8, 84u8, 138u8, - 12u8, 176u8, 1u8, 0u8, 0u8, 0u8, 145u8, 213u8, 223u8, 24u8, - 176u8, 210u8, 207u8, 88u8, 1u8, 0u8, 0u8, 0u8, 237u8, 153u8, - 197u8, 172u8, 178u8, 94u8, 237u8, 245u8, 3u8, 0u8, 0u8, 0u8, - 203u8, 202u8, 37u8, 227u8, 159u8, 20u8, 35u8, 135u8, 2u8, - 0u8, 0u8, 0u8, 104u8, 122u8, 212u8, 74u8, 211u8, 127u8, 3u8, - 194u8, 1u8, 0u8, 0u8, 0u8, 171u8, 60u8, 5u8, 114u8, 41u8, - 31u8, 235u8, 139u8, 1u8, 0u8, 0u8, 0u8, 188u8, 157u8, 137u8, - 144u8, 79u8, 91u8, 146u8, 63u8, 1u8, 0u8, 0u8, 0u8, 55u8, - 200u8, 187u8, 19u8, 80u8, 169u8, 162u8, 168u8, 1u8, 0u8, 0u8, - 0u8, 12u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("System")?; + let constant = pallet.constant("Version")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn ss58_prefix( &self, ) -> ::core::result::Result<::core::primitive::u16, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode(&mut &[0u8, 0u8][..])?) + let pallet = self.client.metadata().pallet("System")?; + let constant = pallet.constant("SS58Prefix")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod scheduler { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Schedule { @@ -1244,37 +1210,40 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn maximum_weight( &self, ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[0u8, 128u8, 110u8, 135u8, 116u8, 1u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Scheduler")?; + let constant = pallet.constant("MaximumWeight")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn max_scheduled_per_block( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[50u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Scheduler")?; + let constant = pallet.constant("MaxScheduledPerBlock")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod preimage { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct NotePreimage { @@ -1501,15 +1470,11 @@ pub mod api { } } pub mod babe { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ReportEquivocation { @@ -1945,45 +1910,49 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn epoch_duration( &self, ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[96u8, 9u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Babe")?; + let constant = pallet.constant("EpochDuration")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn expected_block_time( &self, ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[112u8, 23u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Babe")?; + let constant = pallet.constant("ExpectedBlockTime")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn max_authorities( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[160u8, 134u8, 1u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Babe")?; + let constant = pallet.constant("MaxAuthorities")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod timestamp { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Set { @@ -2072,29 +2041,31 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn minimum_period( &self, ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[184u8, 11u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Timestamp")?; + let constant = pallet.constant("MinimumPeriod")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod indices { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: codec :: Encode, @@ -2332,32 +2303,31 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn deposit( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 232u8, 118u8, 72u8, 23u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Indices")?; + let constant = pallet.constant("Deposit")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod balances { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Transfer { @@ -2827,43 +2797,46 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn existential_deposit( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 228u8, 11u8, 84u8, 2u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Balances")?; + let constant = pallet.constant("ExistentialDeposit")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn max_locks( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[50u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Balances")?; + let constant = pallet.constant("MaxLocks")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn max_reserves( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[50u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Balances")?; + let constant = pallet.constant("MaxReserves")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod transaction_payment { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod storage { use super::runtime_types; pub struct NextFeeMultiplier; @@ -2915,24 +2888,30 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn transaction_byte_fee( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 64u8, 66u8, 15u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("TransactionPayment")?; + let constant = pallet.constant("TransactionByteFee")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn operational_fee_multiplier( &self, ) -> ::core::result::Result<::core::primitive::u8, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode(&mut &[5u8][..])?) + let pallet = self.client.metadata().pallet("TransactionPayment")?; + let constant = pallet.constant("OperationalFeeMultiplier")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn weight_to_fee( &self, @@ -2944,26 +2923,20 @@ pub mod api { >, ::subxt::BasicError, > { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 4u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 180u8, 196u8, 4u8, 0u8, 1u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("TransactionPayment")?; + let constant = pallet.constant("WeightToFee")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod authorship { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetUncles { @@ -3094,29 +3067,31 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn uncle_generations( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[0u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Authorship")?; + let constant = pallet.constant("UncleGenerations")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod staking { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Bond { @@ -4982,64 +4957,73 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn max_nominations( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[16u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Staking")?; + let constant = pallet.constant("MaxNominations")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn sessions_per_era( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[6u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Staking")?; + let constant = pallet.constant("SessionsPerEra")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn bonding_duration( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[28u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Staking")?; + let constant = pallet.constant("BondingDuration")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn slash_defer_duration( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[27u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Staking")?; + let constant = pallet.constant("SlashDeferDuration")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn max_nominator_rewarded_per_validator( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[0u8, 1u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Staking")?; + let constant = pallet.constant("MaxNominatorRewardedPerValidator")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn max_unlocking_chunks( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[32u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Staking")?; + let constant = pallet.constant("MaxUnlockingChunks")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod offences { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub type Event = runtime_types::pallet_offences::pallet::Event; pub mod events { use super::runtime_types; @@ -5192,21 +5176,15 @@ pub mod api { } } pub mod historical { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; } pub mod session { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetKeys { @@ -5463,15 +5441,11 @@ pub mod api { } } pub mod grandpa { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ReportEquivocation { @@ -5756,29 +5730,31 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn max_authorities( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[160u8, 134u8, 1u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Grandpa")?; + let constant = pallet.constant("MaxAuthorities")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod im_online { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Heartbeat { @@ -5991,35 +5967,35 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn unsigned_priority( &self, ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[255u8, 255u8, 255u8, 255u8, 255u8, 255u8, 255u8, 255u8][..], - )?) + let pallet = self.client.metadata().pallet("ImOnline")?; + let constant = pallet.constant("UnsignedPriority")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod authority_discovery { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; } pub mod democracy { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Propose { @@ -7228,113 +7204,121 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn enactment_period( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[0u8, 39u8, 6u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Democracy")?; + let constant = pallet.constant("EnactmentPeriod")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn launch_period( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[0u8, 39u8, 6u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Democracy")?; + let constant = pallet.constant("LaunchPeriod")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn voting_period( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[0u8, 39u8, 6u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Democracy")?; + let constant = pallet.constant("VotingPeriod")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn vote_locking_period( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[0u8, 39u8, 6u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Democracy")?; + let constant = pallet.constant("VoteLockingPeriod")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn minimum_deposit( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 16u8, 165u8, 212u8, 232u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Democracy")?; + let constant = pallet.constant("MinimumDeposit")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn instant_allowed( &self, ) -> ::core::result::Result<::core::primitive::bool, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode(&mut &[1u8][..])?) + let pallet = self.client.metadata().pallet("Democracy")?; + let constant = pallet.constant("InstantAllowed")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn fast_track_voting_period( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[8u8, 7u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Democracy")?; + let constant = pallet.constant("FastTrackVotingPeriod")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn cooloff_period( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[192u8, 137u8, 1u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Democracy")?; + let constant = pallet.constant("CooloffPeriod")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn preimage_byte_deposit( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 128u8, 150u8, 152u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Democracy")?; + let constant = pallet.constant("PreimageByteDeposit")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn max_votes( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[100u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Democracy")?; + let constant = pallet.constant("MaxVotes")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn max_proposals( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[100u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Democracy")?; + let constant = pallet.constant("MaxProposals")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod council { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetMembers { @@ -7769,15 +7753,11 @@ pub mod api { } } pub mod technical_committee { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SetMembers { @@ -8212,15 +8192,11 @@ pub mod api { } } pub mod phragmen_election { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Vote { @@ -8600,88 +8576,87 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn pallet_id( &self, ) -> ::core::result::Result< [::core::primitive::u8; 8usize], ::subxt::BasicError, > { - Ok(::subxt::codec::Decode::decode( - &mut &[112u8, 104u8, 114u8, 101u8, 108u8, 101u8, 99u8, 116u8][..], - )?) + let pallet = self.client.metadata().pallet("PhragmenElection")?; + let constant = pallet.constant("PalletId")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn candidacy_bond( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 16u8, 165u8, 212u8, 232u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("PhragmenElection")?; + let constant = pallet.constant("CandidacyBond")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn voting_bond_base( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 112u8, 19u8, 183u8, 46u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("PhragmenElection")?; + let constant = pallet.constant("VotingBondBase")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn voting_bond_factor( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 208u8, 18u8, 19u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("PhragmenElection")?; + let constant = pallet.constant("VotingBondFactor")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn desired_members( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[13u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("PhragmenElection")?; + let constant = pallet.constant("DesiredMembers")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn desired_runners_up( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[20u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("PhragmenElection")?; + let constant = pallet.constant("DesiredRunnersUp")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn term_duration( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[192u8, 137u8, 1u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("PhragmenElection")?; + let constant = pallet.constant("TermDuration")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod technical_membership { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct AddMember { @@ -8944,15 +8919,11 @@ pub mod api { } } pub mod treasury { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ProposeSpend { @@ -9230,28 +9201,32 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn proposal_bond( &self, ) -> ::core::result::Result< runtime_types::sp_arithmetic::per_things::Permill, ::subxt::BasicError, > { - Ok(::subxt::codec::Decode::decode( - &mut &[80u8, 195u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Treasury")?; + let constant = pallet.constant("ProposalBond")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn proposal_bond_minimum( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 16u8, 165u8, 212u8, 232u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Treasury")?; + let constant = pallet.constant("ProposalBondMinimum")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn proposal_bond_maximum( &self, @@ -9259,20 +9234,19 @@ pub mod api { ::core::option::Option<::core::primitive::u128>, ::subxt::BasicError, > { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 1u8, 0u8, 80u8, 57u8, 39u8, 140u8, 4u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Treasury")?; + let constant = pallet.constant("ProposalBondMaximum")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn spend_period( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[0u8, 70u8, 5u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Treasury")?; + let constant = pallet.constant("SpendPeriod")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn burn( &self, @@ -9280,9 +9254,10 @@ pub mod api { runtime_types::sp_arithmetic::per_things::Permill, ::subxt::BasicError, > { - Ok(::subxt::codec::Decode::decode( - &mut &[16u8, 39u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Treasury")?; + let constant = pallet.constant("Burn")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn pallet_id( &self, @@ -9290,31 +9265,29 @@ pub mod api { runtime_types::frame_support::PalletId, ::subxt::BasicError, > { - Ok(::subxt::codec::Decode::decode( - &mut &[112u8, 121u8, 47u8, 116u8, 114u8, 115u8, 114u8, 121u8][..], - )?) + let pallet = self.client.metadata().pallet("Treasury")?; + let constant = pallet.constant("PalletId")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn max_approvals( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[100u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Treasury")?; + let constant = pallet.constant("MaxApprovals")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod claims { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Claim { @@ -9684,36 +9657,33 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn prefix( &self, ) -> ::core::result::Result< ::std::vec::Vec<::core::primitive::u8>, ::subxt::BasicError, > { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 132u8, 80u8, 97u8, 121u8, 32u8, 68u8, 79u8, 84u8, 115u8, - 32u8, 116u8, 111u8, 32u8, 116u8, 104u8, 101u8, 32u8, 80u8, - 111u8, 108u8, 107u8, 97u8, 100u8, 111u8, 116u8, 32u8, 97u8, - 99u8, 99u8, 111u8, 117u8, 110u8, 116u8, 58u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Claims")?; + let constant = pallet.constant("Prefix")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod vesting { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Vest; @@ -9988,40 +9958,40 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn min_vested_transfer( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 228u8, 11u8, 84u8, 2u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Vesting")?; + let constant = pallet.constant("MinVestedTransfer")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn max_vesting_schedules( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[28u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Vesting")?; + let constant = pallet.constant("MaxVestingSchedules")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod utility { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Batch { @@ -10175,29 +10145,31 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn batched_calls_limit( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[170u8, 42u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Utility")?; + let constant = pallet.constant("batched_calls_limit")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod identity { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct AddRegistrar { @@ -10885,78 +10857,76 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn basic_deposit( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 125u8, 181u8, 42u8, 47u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Identity")?; + let constant = pallet.constant("BasicDeposit")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn field_deposit( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 205u8, 86u8, 39u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Identity")?; + let constant = pallet.constant("FieldDeposit")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn sub_account_deposit( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 128u8, 248u8, 132u8, 176u8, 46u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Identity")?; + let constant = pallet.constant("SubAccountDeposit")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn max_sub_accounts( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[100u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Identity")?; + let constant = pallet.constant("MaxSubAccounts")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn max_additional_fields( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[100u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Identity")?; + let constant = pallet.constant("MaxAdditionalFields")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn max_registrars( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[20u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Identity")?; + let constant = pallet.constant("MaxRegistrars")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod proxy { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Proxy { @@ -11310,6 +11280,17 @@ pub mod api { const PALLET: &'static str = "Proxy"; const EVENT: &'static str = "ProxyAdded"; } + #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] + pub struct ProxyRemoved { + pub delegator: ::subxt::sp_core::crypto::AccountId32, + pub delegatee: ::subxt::sp_core::crypto::AccountId32, + pub proxy_type: runtime_types::polkadot_runtime::ProxyType, + pub delay: ::core::primitive::u32, + } + impl ::subxt::Event for ProxyRemoved { + const PALLET: &'static str = "Proxy"; + const EVENT: &'static str = "ProxyRemoved"; + } } pub mod storage { use super::runtime_types; @@ -11424,81 +11405,76 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn proxy_deposit_base( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 132u8, 178u8, 149u8, 46u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Proxy")?; + let constant = pallet.constant("ProxyDepositBase")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn proxy_deposit_factor( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 128u8, 102u8, 171u8, 19u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Proxy")?; + let constant = pallet.constant("ProxyDepositFactor")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn max_proxies( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[32u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Proxy")?; + let constant = pallet.constant("MaxProxies")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn max_pending( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[32u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Proxy")?; + let constant = pallet.constant("MaxPending")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn announcement_deposit_base( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 132u8, 178u8, 149u8, 46u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Proxy")?; + let constant = pallet.constant("AnnouncementDepositBase")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn announcement_deposit_factor( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 205u8, 86u8, 39u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Proxy")?; + let constant = pallet.constant("AnnouncementDepositFactor")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod multisig { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct AsMultiThreshold1 { @@ -11835,49 +11811,49 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn deposit_base( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 140u8, 97u8, 197u8, 46u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Multisig")?; + let constant = pallet.constant("DepositBase")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn deposit_factor( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 208u8, 18u8, 19u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Multisig")?; + let constant = pallet.constant("DepositFactor")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn max_signatories( &self, ) -> ::core::result::Result<::core::primitive::u16, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode(&mut &[100u8, 0u8][..])?) + let pallet = self.client.metadata().pallet("Multisig")?; + let constant = pallet.constant("MaxSignatories")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod bounties { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ProposeBounty { @@ -12352,88 +12328,109 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn bounty_deposit_base( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 228u8, 11u8, 84u8, 2u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Bounties")?; + let constant = pallet.constant("BountyDepositBase")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn bounty_deposit_payout_delay( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[0u8, 194u8, 1u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Bounties")?; + let constant = pallet.constant("BountyDepositPayoutDelay")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn bounty_update_period( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[128u8, 198u8, 19u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Bounties")?; + let constant = pallet.constant("BountyUpdatePeriod")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } - pub fn bounty_curator_deposit( + pub fn curator_deposit_multiplier( &self, ) -> ::core::result::Result< runtime_types::sp_arithmetic::per_things::Permill, ::subxt::BasicError, > { - Ok(::subxt::codec::Decode::decode( - &mut &[32u8, 161u8, 7u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Bounties")?; + let constant = pallet.constant("CuratorDepositMultiplier")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) + } + pub fn curator_deposit_max( + &self, + ) -> ::core::result::Result< + ::core::option::Option<::core::primitive::u128>, + ::subxt::BasicError, + > { + let pallet = self.client.metadata().pallet("Bounties")?; + let constant = pallet.constant("CuratorDepositMax")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) + } + pub fn curator_deposit_min( + &self, + ) -> ::core::result::Result< + ::core::option::Option<::core::primitive::u128>, + ::subxt::BasicError, + > { + let pallet = self.client.metadata().pallet("Bounties")?; + let constant = pallet.constant("CuratorDepositMin")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn bounty_value_minimum( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 232u8, 118u8, 72u8, 23u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Bounties")?; + let constant = pallet.constant("BountyValueMinimum")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn data_deposit_per_byte( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 225u8, 245u8, 5u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Bounties")?; + let constant = pallet.constant("DataDepositPerByte")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn maximum_reason_length( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[0u8, 64u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Bounties")?; + let constant = pallet.constant("MaximumReasonLength")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod child_bounties { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct AddChildBounty { @@ -12904,50 +12901,40 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn max_active_child_bounty_count( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[100u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("ChildBounties")?; + let constant = pallet.constant("MaxActiveChildBountyCount")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn child_bounty_value_minimum( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 228u8, 11u8, 84u8, 2u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) - } - pub fn child_bounty_curator_deposit_base( - &self, - ) -> ::core::result::Result< - runtime_types::sp_arithmetic::per_things::Permill, - ::subxt::BasicError, - > { - Ok(::subxt::codec::Decode::decode( - &mut &[16u8, 39u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("ChildBounties")?; + let constant = pallet.constant("ChildBountyValueMinimum")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod tips { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ReportAwesome { @@ -13249,34 +13236,39 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn maximum_reason_length( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[0u8, 64u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Tips")?; + let constant = pallet.constant("MaximumReasonLength")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn data_deposit_per_byte( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 225u8, 245u8, 5u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Tips")?; + let constant = pallet.constant("DataDepositPerByte")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn tip_countdown( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[64u8, 56u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Tips")?; + let constant = pallet.constant("TipCountdown")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn tip_finders_fee( &self, @@ -13284,32 +13276,29 @@ pub mod api { runtime_types::sp_arithmetic::per_things::Percent, ::subxt::BasicError, > { - Ok(::subxt::codec::Decode::decode(&mut &[20u8][..])?) + let pallet = self.client.metadata().pallet("Tips")?; + let constant = pallet.constant("TipFindersFee")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn tip_report_deposit_base( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 228u8, 11u8, 84u8, 2u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Tips")?; + let constant = pallet.constant("TipReportDepositBase")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod election_provider_multi_phase { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct SubmitUnsigned { pub raw_solution : :: std :: boxed :: Box < runtime_types :: pallet_election_provider_multi_phase :: RawSolution < runtime_types :: polkadot_runtime :: NposCompactSolution16 > > , pub witness : runtime_types :: pallet_election_provider_multi_phase :: SolutionOrSnapshotSize , } @@ -13720,23 +13709,36 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn unsigned_phase( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[88u8, 2u8, 0u8, 0u8][..], - )?) + let pallet = self + .client + .metadata() + .pallet("ElectionProviderMultiPhase")?; + let constant = pallet.constant("UnsignedPhase")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn signed_phase( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[88u8, 2u8, 0u8, 0u8][..], - )?) + let pallet = self + .client + .metadata() + .pallet("ElectionProviderMultiPhase")?; + let constant = pallet.constant("SignedPhase")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn solution_improvement_threshold( &self, @@ -13744,129 +13746,167 @@ pub mod api { runtime_types::sp_arithmetic::per_things::Perbill, ::subxt::BasicError, > { - Ok(::subxt::codec::Decode::decode( - &mut &[32u8, 161u8, 7u8, 0u8][..], - )?) + let pallet = self + .client + .metadata() + .pallet("ElectionProviderMultiPhase")?; + let constant = pallet.constant("SolutionImprovementThreshold")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn offchain_repeat( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[18u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self + .client + .metadata() + .pallet("ElectionProviderMultiPhase")?; + let constant = pallet.constant("OffchainRepeat")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn miner_tx_priority( &self, ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[101u8, 102u8, 102u8, 102u8, 102u8, 102u8, 102u8, 230u8][..], - )?) + let pallet = self + .client + .metadata() + .pallet("ElectionProviderMultiPhase")?; + let constant = pallet.constant("MinerTxPriority")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn miner_max_weight( &self, ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[192u8, 132u8, 102u8, 101u8, 87u8, 1u8, 0u8, 0u8][..], - )?) + let pallet = self + .client + .metadata() + .pallet("ElectionProviderMultiPhase")?; + let constant = pallet.constant("MinerMaxWeight")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn signed_max_submissions( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[16u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self + .client + .metadata() + .pallet("ElectionProviderMultiPhase")?; + let constant = pallet.constant("SignedMaxSubmissions")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn signed_max_weight( &self, ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[192u8, 132u8, 102u8, 101u8, 87u8, 1u8, 0u8, 0u8][..], - )?) + let pallet = self + .client + .metadata() + .pallet("ElectionProviderMultiPhase")?; + let constant = pallet.constant("SignedMaxWeight")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn signed_reward_base( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 228u8, 11u8, 84u8, 2u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self + .client + .metadata() + .pallet("ElectionProviderMultiPhase")?; + let constant = pallet.constant("SignedRewardBase")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn signed_deposit_base( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 160u8, 219u8, 33u8, 93u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self + .client + .metadata() + .pallet("ElectionProviderMultiPhase")?; + let constant = pallet.constant("SignedDepositBase")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn signed_deposit_byte( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 120u8, 125u8, 1u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self + .client + .metadata() + .pallet("ElectionProviderMultiPhase")?; + let constant = pallet.constant("SignedDepositByte")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn signed_deposit_weight( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self + .client + .metadata() + .pallet("ElectionProviderMultiPhase")?; + let constant = pallet.constant("SignedDepositWeight")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn max_electing_voters( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[228u8, 87u8, 0u8, 0u8][..], - )?) + let pallet = self + .client + .metadata() + .pallet("ElectionProviderMultiPhase")?; + let constant = pallet.constant("MaxElectingVoters")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn max_electable_targets( &self, ) -> ::core::result::Result<::core::primitive::u16, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode(&mut &[255u8, 255u8][..])?) + let pallet = self + .client + .metadata() + .pallet("ElectionProviderMultiPhase")?; + let constant = pallet.constant("MaxElectableTargets")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn miner_max_length( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[0u8, 0u8, 54u8, 0u8][..], - )?) + let pallet = self + .client + .metadata() + .pallet("ElectionProviderMultiPhase")?; + let constant = pallet.constant("MinerMaxLength")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod bags_list { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Rebag { @@ -14037,206 +14077,37 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn bag_thresholds( &self, ) -> ::core::result::Result< ::std::vec::Vec<::core::primitive::u64>, ::subxt::BasicError, > { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 33u8, 3u8, 0u8, 228u8, 11u8, 84u8, 2u8, 0u8, 0u8, 0u8, 243u8, - 158u8, 128u8, 151u8, 2u8, 0u8, 0u8, 0u8, 168u8, 177u8, 151u8, - 226u8, 2u8, 0u8, 0u8, 0u8, 148u8, 73u8, 46u8, 54u8, 3u8, 0u8, - 0u8, 0u8, 39u8, 156u8, 58u8, 147u8, 3u8, 0u8, 0u8, 0u8, 3u8, - 188u8, 206u8, 250u8, 3u8, 0u8, 0u8, 0u8, 66u8, 192u8, 27u8, - 110u8, 4u8, 0u8, 0u8, 0u8, 27u8, 71u8, 117u8, 238u8, 4u8, - 0u8, 0u8, 0u8, 56u8, 94u8, 85u8, 125u8, 5u8, 0u8, 0u8, 0u8, - 70u8, 220u8, 96u8, 28u8, 6u8, 0u8, 0u8, 0u8, 137u8, 56u8, - 108u8, 205u8, 6u8, 0u8, 0u8, 0u8, 182u8, 238u8, 128u8, 146u8, - 7u8, 0u8, 0u8, 0u8, 254u8, 126u8, 227u8, 109u8, 8u8, 0u8, - 0u8, 0u8, 232u8, 27u8, 26u8, 98u8, 9u8, 0u8, 0u8, 0u8, 176u8, - 25u8, 244u8, 113u8, 10u8, 0u8, 0u8, 0u8, 16u8, 53u8, 146u8, - 160u8, 11u8, 0u8, 0u8, 0u8, 207u8, 201u8, 111u8, 241u8, 12u8, - 0u8, 0u8, 0u8, 65u8, 20u8, 109u8, 104u8, 14u8, 0u8, 0u8, 0u8, - 231u8, 155u8, 218u8, 9u8, 16u8, 0u8, 0u8, 0u8, 206u8, 232u8, - 133u8, 218u8, 17u8, 0u8, 0u8, 0u8, 40u8, 169u8, 199u8, 223u8, - 19u8, 0u8, 0u8, 0u8, 187u8, 112u8, 147u8, 31u8, 22u8, 0u8, - 0u8, 0u8, 142u8, 64u8, 137u8, 160u8, 24u8, 0u8, 0u8, 0u8, - 129u8, 10u8, 9u8, 106u8, 27u8, 0u8, 0u8, 0u8, 54u8, 106u8, - 72u8, 132u8, 30u8, 0u8, 0u8, 0u8, 91u8, 211u8, 106u8, 248u8, - 33u8, 0u8, 0u8, 0u8, 128u8, 124u8, 156u8, 208u8, 37u8, 0u8, - 0u8, 0u8, 201u8, 85u8, 48u8, 24u8, 42u8, 0u8, 0u8, 0u8, - 189u8, 99u8, 193u8, 219u8, 46u8, 0u8, 0u8, 0u8, 113u8, 224u8, - 87u8, 41u8, 52u8, 0u8, 0u8, 0u8, 104u8, 144u8, 146u8, 16u8, - 58u8, 0u8, 0u8, 0u8, 237u8, 196u8, 212u8, 162u8, 64u8, 0u8, - 0u8, 0u8, 105u8, 147u8, 121u8, 243u8, 71u8, 0u8, 0u8, 0u8, - 143u8, 216u8, 12u8, 24u8, 80u8, 0u8, 0u8, 0u8, 75u8, 175u8, - 138u8, 40u8, 89u8, 0u8, 0u8, 0u8, 106u8, 22u8, 166u8, 63u8, - 99u8, 0u8, 0u8, 0u8, 9u8, 149u8, 23u8, 123u8, 110u8, 0u8, - 0u8, 0u8, 120u8, 197u8, 244u8, 251u8, 122u8, 0u8, 0u8, 0u8, - 98u8, 200u8, 17u8, 231u8, 136u8, 0u8, 0u8, 0u8, 81u8, 191u8, - 109u8, 101u8, 152u8, 0u8, 0u8, 0u8, 4u8, 142u8, 171u8, 164u8, - 169u8, 0u8, 0u8, 0u8, 84u8, 70u8, 152u8, 215u8, 188u8, 0u8, - 0u8, 0u8, 145u8, 202u8, 192u8, 54u8, 210u8, 0u8, 0u8, 0u8, - 23u8, 95u8, 24u8, 1u8, 234u8, 0u8, 0u8, 0u8, 189u8, 21u8, - 178u8, 124u8, 4u8, 1u8, 0u8, 0u8, 67u8, 53u8, 143u8, 247u8, - 33u8, 1u8, 0u8, 0u8, 184u8, 252u8, 132u8, 200u8, 66u8, 1u8, - 0u8, 0u8, 153u8, 103u8, 60u8, 80u8, 103u8, 1u8, 0u8, 0u8, - 7u8, 228u8, 78u8, 250u8, 143u8, 1u8, 0u8, 0u8, 179u8, 65u8, - 131u8, 62u8, 189u8, 1u8, 0u8, 0u8, 2u8, 127u8, 46u8, 162u8, - 239u8, 1u8, 0u8, 0u8, 152u8, 131u8, 188u8, 185u8, 39u8, 2u8, - 0u8, 0u8, 22u8, 77u8, 101u8, 42u8, 102u8, 2u8, 0u8, 0u8, - 180u8, 149u8, 19u8, 172u8, 171u8, 2u8, 0u8, 0u8, 45u8, 142u8, - 130u8, 11u8, 249u8, 2u8, 0u8, 0u8, 161u8, 230u8, 152u8, 44u8, - 79u8, 3u8, 0u8, 0u8, 166u8, 22u8, 8u8, 13u8, 175u8, 3u8, 0u8, - 0u8, 204u8, 157u8, 55u8, 199u8, 25u8, 4u8, 0u8, 0u8, 160u8, - 213u8, 132u8, 149u8, 144u8, 4u8, 0u8, 0u8, 66u8, 231u8, - 224u8, 213u8, 20u8, 5u8, 0u8, 0u8, 2u8, 140u8, 215u8, 13u8, - 168u8, 5u8, 0u8, 0u8, 15u8, 117u8, 10u8, 239u8, 75u8, 6u8, - 0u8, 0u8, 234u8, 141u8, 46u8, 92u8, 2u8, 7u8, 0u8, 0u8, - 195u8, 203u8, 153u8, 110u8, 205u8, 7u8, 0u8, 0u8, 177u8, - 229u8, 113u8, 124u8, 175u8, 8u8, 0u8, 0u8, 170u8, 43u8, - 142u8, 31u8, 171u8, 9u8, 0u8, 0u8, 181u8, 193u8, 32u8, 61u8, - 195u8, 10u8, 0u8, 0u8, 38u8, 208u8, 61u8, 14u8, 251u8, 11u8, - 0u8, 0u8, 112u8, 199u8, 89u8, 41u8, 86u8, 13u8, 0u8, 0u8, - 235u8, 173u8, 218u8, 140u8, 216u8, 14u8, 0u8, 0u8, 247u8, - 151u8, 219u8, 170u8, 134u8, 16u8, 0u8, 0u8, 207u8, 240u8, - 68u8, 118u8, 101u8, 18u8, 0u8, 0u8, 31u8, 38u8, 96u8, 113u8, - 122u8, 20u8, 0u8, 0u8, 9u8, 166u8, 17u8, 190u8, 203u8, 22u8, - 0u8, 0u8, 29u8, 251u8, 232u8, 47u8, 96u8, 25u8, 0u8, 0u8, - 148u8, 58u8, 60u8, 96u8, 63u8, 28u8, 0u8, 0u8, 138u8, 254u8, - 137u8, 196u8, 113u8, 31u8, 0u8, 0u8, 206u8, 217u8, 99u8, - 199u8, 0u8, 35u8, 0u8, 0u8, 3u8, 169u8, 42u8, 228u8, 246u8, - 38u8, 0u8, 0u8, 254u8, 114u8, 238u8, 197u8, 95u8, 43u8, 0u8, - 0u8, 54u8, 201u8, 204u8, 105u8, 72u8, 48u8, 0u8, 0u8, 218u8, - 227u8, 50u8, 69u8, 191u8, 53u8, 0u8, 0u8, 6u8, 42u8, 116u8, - 112u8, 212u8, 59u8, 0u8, 0u8, 124u8, 151u8, 50u8, 214u8, - 153u8, 66u8, 0u8, 0u8, 132u8, 163u8, 36u8, 104u8, 35u8, 74u8, - 0u8, 0u8, 87u8, 26u8, 212u8, 89u8, 135u8, 82u8, 0u8, 0u8, - 231u8, 241u8, 2u8, 98u8, 222u8, 91u8, 0u8, 0u8, 13u8, 184u8, - 118u8, 3u8, 68u8, 102u8, 0u8, 0u8, 174u8, 4u8, 1u8, 222u8, - 214u8, 113u8, 0u8, 0u8, 125u8, 158u8, 179u8, 8u8, 185u8, - 126u8, 0u8, 0u8, 30u8, 4u8, 74u8, 118u8, 16u8, 141u8, 0u8, - 0u8, 58u8, 29u8, 240u8, 100u8, 7u8, 157u8, 0u8, 0u8, 224u8, - 79u8, 175u8, 218u8, 204u8, 174u8, 0u8, 0u8, 86u8, 121u8, - 240u8, 47u8, 149u8, 194u8, 0u8, 0u8, 149u8, 195u8, 170u8, - 169u8, 154u8, 216u8, 0u8, 0u8, 150u8, 124u8, 5u8, 37u8, 30u8, - 241u8, 0u8, 0u8, 23u8, 122u8, 102u8, 214u8, 103u8, 12u8, 1u8, - 0u8, 40u8, 203u8, 31u8, 30u8, 200u8, 42u8, 1u8, 0u8, 250u8, - 40u8, 47u8, 117u8, 152u8, 76u8, 1u8, 0u8, 213u8, 125u8, - 200u8, 116u8, 60u8, 114u8, 1u8, 0u8, 125u8, 196u8, 179u8, - 251u8, 34u8, 156u8, 1u8, 0u8, 54u8, 92u8, 222u8, 116u8, - 199u8, 202u8, 1u8, 0u8, 158u8, 184u8, 225u8, 66u8, 179u8, - 254u8, 1u8, 0u8, 12u8, 49u8, 174u8, 84u8, 127u8, 56u8, 2u8, - 0u8, 95u8, 225u8, 1u8, 232u8, 213u8, 120u8, 2u8, 0u8, 99u8, - 115u8, 218u8, 126u8, 116u8, 192u8, 2u8, 0u8, 81u8, 209u8, - 166u8, 13u8, 46u8, 16u8, 3u8, 0u8, 199u8, 233u8, 164u8, - 104u8, 237u8, 104u8, 3u8, 0u8, 97u8, 192u8, 145u8, 247u8, - 183u8, 203u8, 3u8, 0u8, 191u8, 39u8, 161u8, 183u8, 176u8, - 57u8, 4u8, 0u8, 123u8, 20u8, 153u8, 148u8, 27u8, 180u8, 4u8, - 0u8, 133u8, 35u8, 237u8, 34u8, 97u8, 60u8, 5u8, 0u8, 105u8, - 165u8, 212u8, 197u8, 18u8, 212u8, 5u8, 0u8, 236u8, 140u8, - 147u8, 77u8, 239u8, 124u8, 6u8, 0u8, 245u8, 170u8, 144u8, - 27u8, 232u8, 56u8, 7u8, 0u8, 140u8, 190u8, 93u8, 219u8, 38u8, - 10u8, 8u8, 0u8, 2u8, 151u8, 140u8, 225u8, 19u8, 243u8, 8u8, - 0u8, 250u8, 227u8, 20u8, 67u8, 93u8, 246u8, 9u8, 0u8, 221u8, - 241u8, 45u8, 186u8, 254u8, 22u8, 11u8, 0u8, 46u8, 186u8, - 220u8, 111u8, 74u8, 88u8, 12u8, 0u8, 12u8, 85u8, 24u8, 196u8, - 242u8, 189u8, 13u8, 0u8, 240u8, 187u8, 84u8, 49u8, 21u8, - 76u8, 15u8, 0u8, 73u8, 142u8, 134u8, 107u8, 70u8, 7u8, 17u8, - 0u8, 178u8, 193u8, 83u8, 222u8, 159u8, 244u8, 18u8, 0u8, - 39u8, 138u8, 47u8, 178u8, 206u8, 25u8, 21u8, 0u8, 178u8, - 57u8, 159u8, 132u8, 36u8, 125u8, 23u8, 0u8, 225u8, 153u8, - 231u8, 4u8, 170u8, 37u8, 26u8, 0u8, 186u8, 19u8, 245u8, - 171u8, 51u8, 27u8, 29u8, 0u8, 38u8, 71u8, 133u8, 204u8, - 120u8, 102u8, 32u8, 0u8, 136u8, 191u8, 128u8, 63u8, 45u8, - 17u8, 36u8, 0u8, 28u8, 152u8, 35u8, 248u8, 29u8, 38u8, 40u8, - 0u8, 204u8, 196u8, 34u8, 212u8, 80u8, 177u8, 44u8, 0u8, - 240u8, 136u8, 130u8, 5u8, 40u8, 192u8, 49u8, 0u8, 54u8, - 124u8, 109u8, 126u8, 137u8, 97u8, 55u8, 0u8, 110u8, 147u8, - 41u8, 211u8, 10u8, 166u8, 61u8, 0u8, 140u8, 188u8, 108u8, - 19u8, 34u8, 160u8, 68u8, 0u8, 0u8, 112u8, 243u8, 42u8, 92u8, - 100u8, 76u8, 0u8, 180u8, 59u8, 132u8, 105u8, 153u8, 9u8, - 85u8, 0u8, 128u8, 180u8, 171u8, 228u8, 80u8, 169u8, 94u8, - 0u8, 160u8, 205u8, 169u8, 121u8, 219u8, 95u8, 105u8, 0u8, - 76u8, 194u8, 127u8, 76u8, 199u8, 76u8, 117u8, 0u8, 208u8, - 172u8, 14u8, 186u8, 52u8, 147u8, 130u8, 0u8, 72u8, 62u8, - 12u8, 207u8, 61u8, 90u8, 145u8, 0u8, 104u8, 198u8, 142u8, - 116u8, 105u8, 205u8, 161u8, 0u8, 40u8, 30u8, 111u8, 165u8, - 43u8, 29u8, 180u8, 0u8, 152u8, 169u8, 35u8, 38u8, 116u8, - 127u8, 200u8, 0u8, 240u8, 154u8, 116u8, 99u8, 77u8, 48u8, - 223u8, 0u8, 128u8, 205u8, 252u8, 75u8, 141u8, 114u8, 248u8, - 0u8, 144u8, 20u8, 96u8, 45u8, 154u8, 144u8, 20u8, 1u8, 240u8, - 180u8, 19u8, 217u8, 69u8, 221u8, 51u8, 1u8, 32u8, 151u8, - 53u8, 150u8, 193u8, 180u8, 86u8, 1u8, 80u8, 220u8, 251u8, - 174u8, 173u8, 125u8, 125u8, 1u8, 224u8, 17u8, 152u8, 185u8, - 71u8, 170u8, 168u8, 1u8, 48u8, 199u8, 238u8, 22u8, 187u8, - 185u8, 216u8, 1u8, 32u8, 110u8, 72u8, 134u8, 151u8, 57u8, - 14u8, 2u8, 160u8, 250u8, 75u8, 29u8, 114u8, 199u8, 73u8, 2u8, - 192u8, 17u8, 113u8, 112u8, 181u8, 18u8, 140u8, 2u8, 128u8, - 138u8, 22u8, 67u8, 166u8, 222u8, 213u8, 2u8, 192u8, 248u8, - 35u8, 177u8, 162u8, 4u8, 40u8, 3u8, 128u8, 175u8, 89u8, - 112u8, 162u8, 118u8, 131u8, 3u8, 192u8, 111u8, 45u8, 135u8, - 255u8, 65u8, 233u8, 3u8, 64u8, 147u8, 127u8, 172u8, 143u8, - 146u8, 90u8, 4u8, 0u8, 145u8, 9u8, 113u8, 23u8, 182u8, 216u8, - 4u8, 64u8, 15u8, 223u8, 91u8, 33u8, 32u8, 101u8, 5u8, 0u8, - 73u8, 193u8, 73u8, 68u8, 110u8, 1u8, 6u8, 0u8, 142u8, 188u8, - 166u8, 229u8, 108u8, 175u8, 6u8, 0u8, 89u8, 86u8, 134u8, - 133u8, 28u8, 113u8, 7u8, 128u8, 104u8, 170u8, 52u8, 164u8, - 183u8, 72u8, 8u8, 128u8, 161u8, 226u8, 158u8, 82u8, 185u8, - 56u8, 9u8, 0u8, 189u8, 171u8, 232u8, 128u8, 228u8, 67u8, - 10u8, 0u8, 42u8, 114u8, 180u8, 32u8, 76u8, 109u8, 11u8, - 128u8, 241u8, 192u8, 19u8, 51u8, 92u8, 184u8, 12u8, 0u8, - 160u8, 60u8, 203u8, 220u8, 227u8, 40u8, 14u8, 128u8, 184u8, - 98u8, 154u8, 158u8, 32u8, 195u8, 15u8, 0u8, 222u8, 86u8, - 147u8, 210u8, 202u8, 139u8, 17u8, 0u8, 93u8, 127u8, 76u8, - 147u8, 35u8, 136u8, 19u8, 0u8, 26u8, 135u8, 223u8, 53u8, 4u8, - 190u8, 21u8, 0u8, 167u8, 206u8, 75u8, 132u8, 239u8, 51u8, - 24u8, 0u8, 1u8, 16u8, 251u8, 234u8, 36u8, 241u8, 26u8, 0u8, - 128u8, 42u8, 229u8, 209u8, 181u8, 253u8, 29u8, 0u8, 34u8, - 161u8, 52u8, 96u8, 157u8, 98u8, 33u8, 0u8, 68u8, 33u8, 107u8, - 240u8, 218u8, 41u8, 37u8, 0u8, 2u8, 97u8, 241u8, 130u8, - 143u8, 94u8, 41u8, 0u8, 102u8, 32u8, 207u8, 133u8, 30u8, - 13u8, 46u8, 0u8, 132u8, 16u8, 25u8, 82u8, 82u8, 67u8, 51u8, - 0u8, 160u8, 193u8, 143u8, 202u8, 132u8, 16u8, 57u8, 0u8, - 38u8, 173u8, 20u8, 147u8, 204u8, 133u8, 63u8, 0u8, 208u8, - 205u8, 36u8, 102u8, 47u8, 182u8, 70u8, 0u8, 156u8, 225u8, - 154u8, 28u8, 218u8, 182u8, 78u8, 0u8, 88u8, 204u8, 194u8, - 12u8, 95u8, 159u8, 87u8, 0u8, 32u8, 10u8, 117u8, 120u8, - 251u8, 137u8, 97u8, 0u8, 48u8, 187u8, 187u8, 214u8, 228u8, - 147u8, 108u8, 0u8, 96u8, 203u8, 167u8, 220u8, 158u8, 221u8, - 120u8, 0u8, 184u8, 59u8, 192u8, 66u8, 91u8, 139u8, 134u8, - 0u8, 184u8, 134u8, 35u8, 97u8, 100u8, 197u8, 149u8, 0u8, - 248u8, 241u8, 95u8, 220u8, 147u8, 184u8, 166u8, 0u8, 32u8, - 106u8, 145u8, 192u8, 214u8, 150u8, 185u8, 0u8, 216u8, 239u8, - 226u8, 143u8, 192u8, 151u8, 206u8, 0u8, 104u8, 41u8, 155u8, - 245u8, 46u8, 249u8, 229u8, 255u8, 255u8, 255u8, 255u8, 255u8, - 255u8, 255u8, 255u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("BagsList")?; + let constant = pallet.constant("BagThresholds")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod parachains_origin { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; } pub mod configuration { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: codec :: Encode, @@ -15531,15 +15402,11 @@ pub mod api { } } pub mod paras_shared { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct TransactionApi<'a, T: ::subxt::Config, X> { client: &'a ::subxt::Client, @@ -15634,15 +15501,11 @@ pub mod api { } } pub mod para_inclusion { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct TransactionApi<'a, T: ::subxt::Config, X> { client: &'a ::subxt::Client, @@ -15809,15 +15672,11 @@ pub mod api { } } pub mod para_inherent { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Enter { @@ -15923,10 +15782,8 @@ pub mod api { } } pub mod para_scheduler { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod storage { use super::runtime_types; pub struct ValidatorGroups; @@ -16057,15 +15914,11 @@ pub mod api { } } pub mod paras { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceSetCurrentCode { @@ -16972,29 +16825,31 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn unsigned_priority( &self, ) -> ::core::result::Result<::core::primitive::u64, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[255u8, 255u8, 255u8, 255u8, 255u8, 255u8, 255u8, 255u8][..], - )?) + let pallet = self.client.metadata().pallet("Paras")?; + let constant = pallet.constant("UnsignedPriority")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod initializer { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive( :: subxt :: codec :: Encode, @@ -17082,15 +16937,11 @@ pub mod api { } } pub mod dmp { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; pub struct TransactionApi<'a, T: ::subxt::Config, X> { client: &'a ::subxt::Client, @@ -17196,15 +17047,11 @@ pub mod api { } } pub mod ump { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ServiceOverweight { @@ -17492,15 +17339,11 @@ pub mod api { } } pub mod hrmp { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct HrmpInitOpenChannel { @@ -18154,10 +17997,8 @@ pub mod api { } } pub mod para_session_info { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod storage { use super::runtime_types; pub struct AssignmentKeysUnsafe; @@ -18245,15 +18086,11 @@ pub mod api { } } pub mod paras_disputes { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceUnfreeze; @@ -18506,15 +18343,11 @@ pub mod api { } } pub mod registrar { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Register { @@ -18830,43 +18663,40 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn para_deposit( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 16u8, 165u8, 212u8, 232u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Registrar")?; + let constant = pallet.constant("ParaDeposit")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn data_deposit_per_byte( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 128u8, 150u8, 152u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Registrar")?; + let constant = pallet.constant("DataDepositPerByte")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod slots { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ForceLease { @@ -19050,37 +18880,40 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn lease_period( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[0u8, 117u8, 18u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Slots")?; + let constant = pallet.constant("LeasePeriod")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn lease_offset( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[0u8, 16u8, 14u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Slots")?; + let constant = pallet.constant("LeaseOffset")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod auctions { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct NewAuction { @@ -19393,53 +19226,58 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn ending_period( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[64u8, 25u8, 1u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Auctions")?; + let constant = pallet.constant("EndingPeriod")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn sample_length( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[20u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Auctions")?; + let constant = pallet.constant("SampleLength")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn slot_range_count( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[36u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Auctions")?; + let constant = pallet.constant("SlotRangeCount")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn lease_periods_per_slot( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[8u8, 0u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Auctions")?; + let constant = pallet.constant("LeasePeriodsPerSlot")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod crowdloan { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Create { @@ -19928,50 +19766,51 @@ pub mod api { } pub mod constants { use super::runtime_types; - pub struct ConstantsApi; - impl ConstantsApi { + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn new(client: &'a ::subxt::Client) -> Self { + Self { client } + } pub fn pallet_id( &self, ) -> ::core::result::Result< runtime_types::frame_support::PalletId, ::subxt::BasicError, > { - Ok(::subxt::codec::Decode::decode( - &mut &[112u8, 121u8, 47u8, 99u8, 102u8, 117u8, 110u8, 100u8][..], - )?) + let pallet = self.client.metadata().pallet("Crowdloan")?; + let constant = pallet.constant("PalletId")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn min_contribution( &self, ) -> ::core::result::Result<::core::primitive::u128, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[ - 0u8, 116u8, 59u8, 164u8, 11u8, 0u8, 0u8, 0u8, 0u8, 0u8, 0u8, - 0u8, 0u8, 0u8, 0u8, 0u8, - ][..], - )?) + let pallet = self.client.metadata().pallet("Crowdloan")?; + let constant = pallet.constant("MinContribution")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } pub fn remove_keys_limit( &self, ) -> ::core::result::Result<::core::primitive::u32, ::subxt::BasicError> { - Ok(::subxt::codec::Decode::decode( - &mut &[232u8, 3u8, 0u8, 0u8][..], - )?) + let pallet = self.client.metadata().pallet("Crowdloan")?; + let constant = pallet.constant("RemoveKeysLimit")?; + let value = ::subxt::codec::Decode::decode(&mut &constant.value[..])?; + Ok(value) } } } } pub mod xcm_pallet { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; pub mod calls { - use super::{ - root_mod, - runtime_types, - }; + use super::root_mod; + use super::runtime_types; type DispatchError = runtime_types::sp_runtime::DispatchError; #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct Send { @@ -23412,6 +23251,13 @@ pub mod api { proxy_type: runtime_types::polkadot_runtime::ProxyType, delay: ::core::primitive::u32, }, + #[codec(index = 4)] + ProxyRemoved { + delegator: ::subxt::sp_core::crypto::AccountId32, + delegatee: ::subxt::sp_core::crypto::AccountId32, + proxy_type: runtime_types::polkadot_runtime::ProxyType, + delay: ::core::primitive::u32, + }, } } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] @@ -23979,6 +23825,8 @@ pub mod api { V7_0_0, #[codec(index = 7)] V8_0_0, + #[codec(index = 8)] + V9_0_0, } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum RewardDestination<_0> { @@ -27388,7 +27236,7 @@ pub mod api { #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub struct ModuleError { pub index: ::core::primitive::u8, - pub error: ::core::primitive::u8, + pub error: [::core::primitive::u8; 4usize], } #[derive(:: subxt :: codec :: Encode, :: subxt :: codec :: Decode, Debug)] pub enum MultiSignature { @@ -28526,7 +28374,7 @@ pub mod api { if let Self::Module(module_error) = self { Some(::subxt::ModuleErrorData { pallet_index: module_error.index, - error: [module_error.error, 0, 0, 0], + error: module_error.error, }) } else { None @@ -28554,8 +28402,10 @@ pub mod api { T: ::subxt::Config, X: ::subxt::extrinsic::ExtrinsicParams, { - pub fn constants(&'a self) -> ConstantsApi { - ConstantsApi + pub fn constants(&'a self) -> ConstantsApi<'a, T> { + ConstantsApi { + client: &self.client, + } } pub fn storage(&'a self) -> StorageApi<'a, T> { StorageApi { @@ -28611,101 +28461,105 @@ pub mod api { ::subxt::events::subscribe_finalized::(self.client).await } } - pub struct ConstantsApi; - impl ConstantsApi { - pub fn system(&self) -> system::constants::ConstantsApi { - system::constants::ConstantsApi + pub struct ConstantsApi<'a, T: ::subxt::Config> { + client: &'a ::subxt::Client, + } + impl<'a, T: ::subxt::Config> ConstantsApi<'a, T> { + pub fn system(&self) -> system::constants::ConstantsApi<'a, T> { + system::constants::ConstantsApi::new(self.client) } - pub fn scheduler(&self) -> scheduler::constants::ConstantsApi { - scheduler::constants::ConstantsApi + pub fn scheduler(&self) -> scheduler::constants::ConstantsApi<'a, T> { + scheduler::constants::ConstantsApi::new(self.client) } - pub fn babe(&self) -> babe::constants::ConstantsApi { - babe::constants::ConstantsApi + pub fn babe(&self) -> babe::constants::ConstantsApi<'a, T> { + babe::constants::ConstantsApi::new(self.client) } - pub fn timestamp(&self) -> timestamp::constants::ConstantsApi { - timestamp::constants::ConstantsApi + pub fn timestamp(&self) -> timestamp::constants::ConstantsApi<'a, T> { + timestamp::constants::ConstantsApi::new(self.client) } - pub fn indices(&self) -> indices::constants::ConstantsApi { - indices::constants::ConstantsApi + pub fn indices(&self) -> indices::constants::ConstantsApi<'a, T> { + indices::constants::ConstantsApi::new(self.client) } - pub fn balances(&self) -> balances::constants::ConstantsApi { - balances::constants::ConstantsApi + pub fn balances(&self) -> balances::constants::ConstantsApi<'a, T> { + balances::constants::ConstantsApi::new(self.client) } pub fn transaction_payment( &self, - ) -> transaction_payment::constants::ConstantsApi { - transaction_payment::constants::ConstantsApi + ) -> transaction_payment::constants::ConstantsApi<'a, T> { + transaction_payment::constants::ConstantsApi::new(self.client) } - pub fn authorship(&self) -> authorship::constants::ConstantsApi { - authorship::constants::ConstantsApi + pub fn authorship(&self) -> authorship::constants::ConstantsApi<'a, T> { + authorship::constants::ConstantsApi::new(self.client) } - pub fn staking(&self) -> staking::constants::ConstantsApi { - staking::constants::ConstantsApi + pub fn staking(&self) -> staking::constants::ConstantsApi<'a, T> { + staking::constants::ConstantsApi::new(self.client) } - pub fn grandpa(&self) -> grandpa::constants::ConstantsApi { - grandpa::constants::ConstantsApi + pub fn grandpa(&self) -> grandpa::constants::ConstantsApi<'a, T> { + grandpa::constants::ConstantsApi::new(self.client) } - pub fn im_online(&self) -> im_online::constants::ConstantsApi { - im_online::constants::ConstantsApi + pub fn im_online(&self) -> im_online::constants::ConstantsApi<'a, T> { + im_online::constants::ConstantsApi::new(self.client) } - pub fn democracy(&self) -> democracy::constants::ConstantsApi { - democracy::constants::ConstantsApi + pub fn democracy(&self) -> democracy::constants::ConstantsApi<'a, T> { + democracy::constants::ConstantsApi::new(self.client) } - pub fn phragmen_election(&self) -> phragmen_election::constants::ConstantsApi { - phragmen_election::constants::ConstantsApi + pub fn phragmen_election( + &self, + ) -> phragmen_election::constants::ConstantsApi<'a, T> { + phragmen_election::constants::ConstantsApi::new(self.client) } - pub fn treasury(&self) -> treasury::constants::ConstantsApi { - treasury::constants::ConstantsApi + pub fn treasury(&self) -> treasury::constants::ConstantsApi<'a, T> { + treasury::constants::ConstantsApi::new(self.client) } - pub fn claims(&self) -> claims::constants::ConstantsApi { - claims::constants::ConstantsApi + pub fn claims(&self) -> claims::constants::ConstantsApi<'a, T> { + claims::constants::ConstantsApi::new(self.client) } - pub fn vesting(&self) -> vesting::constants::ConstantsApi { - vesting::constants::ConstantsApi + pub fn vesting(&self) -> vesting::constants::ConstantsApi<'a, T> { + vesting::constants::ConstantsApi::new(self.client) } - pub fn utility(&self) -> utility::constants::ConstantsApi { - utility::constants::ConstantsApi + pub fn utility(&self) -> utility::constants::ConstantsApi<'a, T> { + utility::constants::ConstantsApi::new(self.client) } - pub fn identity(&self) -> identity::constants::ConstantsApi { - identity::constants::ConstantsApi + pub fn identity(&self) -> identity::constants::ConstantsApi<'a, T> { + identity::constants::ConstantsApi::new(self.client) } - pub fn proxy(&self) -> proxy::constants::ConstantsApi { - proxy::constants::ConstantsApi + pub fn proxy(&self) -> proxy::constants::ConstantsApi<'a, T> { + proxy::constants::ConstantsApi::new(self.client) } - pub fn multisig(&self) -> multisig::constants::ConstantsApi { - multisig::constants::ConstantsApi + pub fn multisig(&self) -> multisig::constants::ConstantsApi<'a, T> { + multisig::constants::ConstantsApi::new(self.client) } - pub fn bounties(&self) -> bounties::constants::ConstantsApi { - bounties::constants::ConstantsApi + pub fn bounties(&self) -> bounties::constants::ConstantsApi<'a, T> { + bounties::constants::ConstantsApi::new(self.client) } - pub fn child_bounties(&self) -> child_bounties::constants::ConstantsApi { - child_bounties::constants::ConstantsApi + pub fn child_bounties(&self) -> child_bounties::constants::ConstantsApi<'a, T> { + child_bounties::constants::ConstantsApi::new(self.client) } - pub fn tips(&self) -> tips::constants::ConstantsApi { - tips::constants::ConstantsApi + pub fn tips(&self) -> tips::constants::ConstantsApi<'a, T> { + tips::constants::ConstantsApi::new(self.client) } pub fn election_provider_multi_phase( &self, - ) -> election_provider_multi_phase::constants::ConstantsApi { - election_provider_multi_phase::constants::ConstantsApi + ) -> election_provider_multi_phase::constants::ConstantsApi<'a, T> { + election_provider_multi_phase::constants::ConstantsApi::new(self.client) } - pub fn bags_list(&self) -> bags_list::constants::ConstantsApi { - bags_list::constants::ConstantsApi + pub fn bags_list(&self) -> bags_list::constants::ConstantsApi<'a, T> { + bags_list::constants::ConstantsApi::new(self.client) } - pub fn paras(&self) -> paras::constants::ConstantsApi { - paras::constants::ConstantsApi + pub fn paras(&self) -> paras::constants::ConstantsApi<'a, T> { + paras::constants::ConstantsApi::new(self.client) } - pub fn registrar(&self) -> registrar::constants::ConstantsApi { - registrar::constants::ConstantsApi + pub fn registrar(&self) -> registrar::constants::ConstantsApi<'a, T> { + registrar::constants::ConstantsApi::new(self.client) } - pub fn slots(&self) -> slots::constants::ConstantsApi { - slots::constants::ConstantsApi + pub fn slots(&self) -> slots::constants::ConstantsApi<'a, T> { + slots::constants::ConstantsApi::new(self.client) } - pub fn auctions(&self) -> auctions::constants::ConstantsApi { - auctions::constants::ConstantsApi + pub fn auctions(&self) -> auctions::constants::ConstantsApi<'a, T> { + auctions::constants::ConstantsApi::new(self.client) } - pub fn crowdloan(&self) -> crowdloan::constants::ConstantsApi { - crowdloan::constants::ConstantsApi + pub fn crowdloan(&self) -> crowdloan::constants::ConstantsApi<'a, T> { + crowdloan::constants::ConstantsApi::new(self.client) } } pub struct StorageApi<'a, T: ::subxt::Config> {